{"id":20536781,"url":"https://github.com/planety/kview","last_synced_at":"2025-06-27T17:33:49.689Z","repository":{"id":118211796,"uuid":"239265136","full_name":"planety/kview","owner":"planety","description":"For karax html preview written in Nim.","archived":false,"fork":false,"pushed_at":"2020-02-23T02:00:01.000Z","size":14,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-03T07:27:29.085Z","etag":null,"topics":["jester","karax","nim","prologue","web"],"latest_commit_sha":null,"homepage":"","language":"Nim","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/planety.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-02-09T07:36:19.000Z","updated_at":"2023-08-30T22:13:39.000Z","dependencies_parsed_at":"2023-11-05T07:15:06.604Z","dependency_job_id":null,"html_url":"https://github.com/planety/kview","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/planety%2Fkview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/planety%2Fkview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/planety%2Fkview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/planety%2Fkview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/planety","download_url":"https://codeload.github.com/planety/kview/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247694882,"owners_count":20980733,"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":["jester","karax","nim","prologue","web"],"created_at":"2024-11-16T00:37:52.872Z","updated_at":"2025-04-09T16:20:38.908Z","avatar_url":"https://github.com/planety.png","language":"Nim","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Test Prologue](https://github.com/planety/kview/workflows/Test%20Prologue/badge.svg)\n\n# kview\n\n### Installation\n\n```text\nnimble install kview\n```\n\nFor karax html preview written in Nim.\n\n```nim\n# app.nim\nimport os, strutils\n\nfrom kview import writeExample\nimport karax / [karaxdsl, vdom]\n\nconst \n  places = @[\"boston\", \"cleveland\", \"los angeles\", \"new orleans\"] \n  first = \"first\"\n  second = \"second\"\n\n# will write app_login.html\nproc login*(name: string): string {.writeExample.} =\n  let vnode = buildHtml(tdiv(class = \"mt-3\")):\n    h1: text \"My Web Page\"\n    p: text \"Hello \" \u0026 name\n    ul:\n      for place in places:\n        li: text place\n    dl:\n      dt: text \"Can I use Karax for client side single page apps?\"\n      dd: text \"Yes\"\n\n      dt: text \"Can I use Karax for server side HTML rendering?\"\n      dd: text \"Yes\"\n  result = $vnode\n\ndiscard login(first)\ndiscard login(second)\n\nassert readFile(\"app_login.html\").strip() == \"\"\"\u003cdiv class=\"mt-3\"\u003e\n  \u003ch1\u003eMy Web Page\u003c/h1\u003e\n  \u003cp\u003eHello first\u003c/p\u003e\n  \u003cul\u003e\n    \u003cli\u003eboston\u003c/li\u003e\n    \u003cli\u003ecleveland\u003c/li\u003e\n    \u003cli\u003elos angeles\u003c/li\u003e\n    \u003cli\u003enew orleans\u003c/li\u003e\n  \u003c/ul\u003e\n  \u003cdl\u003e\n    \u003cdt\u003eCan I use Karax for client side single page apps?\u003c/dt\u003e\n    \u003cdd\u003eYes\u003c/dd\u003e\n    \u003cdt\u003eCan I use Karax for server side HTML rendering?\u003c/dt\u003e\n    \u003cdd\u003eYes\u003c/dd\u003e\n  \u003c/dl\u003e\n\u003c/div\u003e\n\"\"\".strip()\n```\n\nmore examples in [tests](https://github.com/planety/kview/blob/master/tests/test.nim).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplanety%2Fkview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplanety%2Fkview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplanety%2Fkview/lists"}