{"id":18082820,"url":"https://github.com/ranfdev/proxiedhiccup","last_synced_at":"2025-09-21T17:55:56.220Z","repository":{"id":198269386,"uuid":"700459165","full_name":"ranfdev/proxiedhiccup","owner":"ranfdev","description":"Create an HTML document with a Javascript DSL adapted from Clojure's Hiccup","archived":false,"fork":false,"pushed_at":"2023-10-04T16:46:31.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-12T05:14:52.204Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ranfdev.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}},"created_at":"2023-10-04T16:27:06.000Z","updated_at":"2023-10-04T16:46:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"560a478a-b264-459b-a441-201745e78ebf","html_url":"https://github.com/ranfdev/proxiedhiccup","commit_stats":null,"previous_names":["ranfdev/proxiedhiccup"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranfdev%2Fproxiedhiccup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranfdev%2Fproxiedhiccup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranfdev%2Fproxiedhiccup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranfdev%2Fproxiedhiccup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ranfdev","download_url":"https://codeload.github.com/ranfdev/proxiedhiccup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411243,"owners_count":20934654,"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-10-31T14:06:09.872Z","updated_at":"2025-09-21T17:55:51.171Z","avatar_url":"https://github.com/ranfdev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# proxiedhiccup\nCreate an HTML document with a Javascript DSL adapted from Clojure's Hiccup\n\n\n# Example\n## Basic\n```js\nimport {h, hToHTML} from \"./hiccup\"\n\nconst doc = h.div(\n    h.h1(\"Hello world\"),\n    h.p(\"Pretty nice\")\n)\n\nconsole.log(hToHTML(doc))\n```\n\noutput\n\n```html\n\u003cdiv\u003e\n    \u003ch1\u003eHello world\u003c/h1\u003e\n    \u003cp\u003ePretty nice\u003c/p\u003e\n\u003c/div\u003e\n```\n\n## Attributes\n```js\nh.form({action: \"/email\", method: \"post\"}, \n    h.input({type: \"text\", name: \"username\", placeholder: \"username...\"}),\n    h.input({type: \"text\", name: \"password\", placeholder: \"password...\"}),\n)\n```\n\n## Css classes shorthand\n```js\n// all of these are equivalent\nlet ex1 = h.h1.heading(\"Big text\");\nlet ex2 = h.h1[\"heading\"](\"Big text\");\nlet ex3 = h.h1({class: \"heading\"}, \"Big text\");\n```\n\n## Components\nUse a function to organize the code and improve readability:\n```js\nfunction header({title, subtitle}) {\n    return h.header(\n        h.h1[\"big-title-class another-class red\"](title),\n        h.h2(subtitle)\n    )\n}\n\nfunction home() {\n    return h.div(\n        header({title: \"News\", subtitle: \"Hottest news refreshed hourly\"}),\n        h.ul(\n            h.li(\"News 1\"),\n            h.li(\"News 2\"),\n        )\n    )\n}\n```\n\n## Tailwind\n```js\n\nfunction button(label) {\n    return h.button[`rounded font-bold bg-blue-500 shadow-lg`](label);\n}\n\nfunction page() {\n    return h.div(\n        h.h1[\"text-lg font-bold\"](\"Do you want to subscribe?\"),\n        button(\"Subscribe\")\n    )\n}\n```\n\n# Security\nThe text isn't escaped automatically, only provide trusted values. It can be automated easily if necessary.\nThis code was just a proof of concept.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Franfdev%2Fproxiedhiccup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Franfdev%2Fproxiedhiccup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Franfdev%2Fproxiedhiccup/lists"}