{"id":22980347,"url":"https://github.com/pianopia/crossnim","last_synced_at":"2025-04-02T09:23:05.097Z","repository":{"id":105930875,"uuid":"237884360","full_name":"pianopia/crossnim","owner":"pianopia","description":"Crossplatform based on Nim and Vulkan","archived":false,"fork":false,"pushed_at":"2020-02-03T05:08:05.000Z","size":2,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-08T00:28:39.812Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Nim","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pianopia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-03T04:24:52.000Z","updated_at":"2020-07-02T03:47:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"82684df1-7e2d-4bd7-b51d-ec9dbe9f50e6","html_url":"https://github.com/pianopia/crossnim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pianopia%2Fcrossnim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pianopia%2Fcrossnim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pianopia%2Fcrossnim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pianopia%2Fcrossnim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pianopia","download_url":"https://codeload.github.com/pianopia/crossnim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246785868,"owners_count":20833594,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-15T01:38:54.107Z","updated_at":"2025-04-02T09:23:05.072Z","avatar_url":"https://github.com/pianopia.png","language":"Nim","funding_links":[],"categories":[],"sub_categories":[],"readme":"# crossnim\nCrossplatform based on Nim and Vulkan\n\n# 理想のcrossplatform\nBackground Graphic API: Vulkan\nNim言語で記述\nコンポーネントを使いまわせる\nXcodeすら使わない\n\n# 記述式\n# 下のレイヤーから記載する\n# layout.nimui\n\n```\nContainer:\n    key: \"DealContainer\"\n    width:100%\n    height:100%\n\n    ListView:\n        key: \"DealList\"\n        width: 100%\n        height: 100%\n        canReload: true\n\n    FloatingActionButtom:\n        src: \"img/test.png\"\n        position:\n\nListCell:\n    isStock: true\n    key: \"BannerCell\"\n    width: 100%\n    height: 50px\n\n    Image:\n        width: 100%\n        height: 100%\n\nListCell:\n    isStock: true\n    key: \"DealCell\"\n    width: 100%\n    height:200px\n\n    Image:\n        width: 80%\n        margin: 10px 10% 10px 10%\n        radius: 5px\n\n    Container:\n        width: 100%\n        height: 50px\n\n        Text:\n            key: \"DealTitle\"\n\n        Text:\n            key: \"DealPrice\"\n\n```\n\n\n# データをレイアウトにマッピング\n\n\n# main.nim\n\n```\n# API\nproc fetchDealList(): Seq[Deal]\n\nproc reloadDealList():\n    fetchDealList().mapData(mapDealList())\n\n# データマッピング\nproc mapDealList(deal: Deal): key.DealCell =\n    var dealCell = generateUI(key.DealCell)\n    dealCell.DealTitle.text = deal.dealTitle\n    dealCell.DealPrice.text = deal.dealPrice\n\nfetchDealList().mapData(mapDealList())\n\nproc showDetail(context: Context) =\n    showModal(key.DealDetail, isSetHistory: false)\n\nmain.onRunning\n\nmain.onBack =\n    history.back()\n    history.back(3)\n    if history.current == \"DealDetail\":\n        debugLog(\"DealDetail\")\n\n# ライフサイクル\nkey.DealContainer.onStart =\n    # APIを叩いてDealCellに入れ、DealCellをDealListに入れる\n    key.DealList.cell = fetchDealList().mapDealList()\n\nkey.DealContainer.onRunning =\n    key.DealList.onReload(mapDealList())\n    key.DealCell.onTouch()\n\nkey DealContainer.onStop =\n    discard\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpianopia%2Fcrossnim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpianopia%2Fcrossnim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpianopia%2Fcrossnim/lists"}