gitoria

layouts

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit0d0fef250d0fef25paths: projects moved into /media/STORAGE/projects/WorldAPI/mre0d0fef25/project.hl

5.6 KB

  1. // project.hl — layouts.worldapi.org: THE MAP. The WorldAPI theme (theme/) and the showcase site that shows it: every
  2. // themed element and component, the three app shells as mock apps, the docs. No login, no data.
  3. //
  4. // Index (which file handles what):
  5. // theme/theme.hl the theme: tokens, plain elements, the components' themed rules (apps copy theme/)
  6. // theme/shell/*.hl header, main menu, user menu, sidebar, content-first, list-first, three-pane
  7. // theme/check-theme.mjs the gate helper apps run: hard-coded colours, decorative borders
  8. // components/styles.hl the site's styles file (inherits the theme)
  9. // components/main.hl the site's body shell (+ the accent the switcher kept)
  10. // components/site-*.hl the showcase's header and sidebar; accent-switcher.hl the switcher
  11. // components/home.hl, elements.hl, search.hl, pages/*.hl, list-pages.hl the showcase pages
  12. // components/showcase/*.hl one page per themed component; components/<name>/ = verbatim copies of components.hybriel
  13. // components/demo/*.hl the shell demos (mock tracker, notes, mail); lib/mock.hl their data, lib/site.hl the menus
  14. // lib/search.hl the header's search (GET /search?q= → /search/<words>)
  15. // docs/ the docs, served as Markdown under /docs/
  16. import WebFramework from 'hl:web'
  17. import { env } from 'hl:proc'
  18. import Styles from './components/styles.hl'
  19. import Home from './components/home.hl'
  20. import Elements from './components/elements.hl'
  21. import Search from './components/search.hl'
  22. import ComponentsPage from './components/pages/components.hl'
  23. import ShellsPage from './components/pages/shells.hl'
  24. import DocsPage from './components/pages/docs.hl'
  25. import ShowMonthView from './components/showcase/month-view.hl'
  26. import ShowDatePicker from './components/showcase/date-picker.hl'
  27. import ShowRangePicker from './components/showcase/range-picker.hl'
  28. import ShowPagination from './components/showcase/pagination.hl'
  29. import ShowMdEditor from './components/showcase/md-editor.hl'
  30. import ShowCodeEditor from './components/showcase/code-editor.hl'
  31. import ShowFileUpload from './components/showcase/file-upload.hl'
  32. import ShowModal from './components/showcase/modal.hl'
  33. import ContentFirstDemo from './components/demo/tracker-demo.hl'
  34. import ListFirstDemo from './components/demo/notes-demo.hl'
  35. import ThreePaneDemo from './components/demo/mail-demo.hl'
  36. import { siteName } from './lib/site.hl'
  37. import { searchRedirect } from './lib/search.hl'
  38. appTitle = siteName
  39. appDescription = 'The WorldAPI theme for Hybriel apps: tokens, themed components, app shells.'
  40. styles = Styles
  41. static markdown = { 'Content-Type' = 'text/markdown; charset=utf-8' 'Cache-Control' = 'no-cache' }
  42. routes = [
  43. { pattern = "/" component = Home }
  44. { pattern = "/elements" component = Elements }
  45. { pattern = "/search" function = (route, req) => { return searchRedirect(req) } }
  46. { pattern = "/search/:q" component = Search }
  47. { pattern = "/components" component = ComponentsPage }
  48. { pattern = "/components/month-view" component = ShowMonthView }
  49. { pattern = "/components/date-picker" component = ShowDatePicker }
  50. { pattern = "/components/range-picker" component = ShowRangePicker }
  51. { pattern = "/components/pagination" component = ShowPagination }
  52. { pattern = "/components/md-editor" component = ShowMdEditor }
  53. { pattern = "/components/code-editor" component = ShowCodeEditor }
  54. { pattern = "/components/file-upload" component = ShowFileUpload }
  55. { pattern = "/components/modal" component = ShowModal }
  56. { pattern = "/components/month-view/README.md" file = "./components/month-view/README.md" headers = markdown }
  57. { pattern = "/components/date-picker/README.md" file = "./components/date-picker/README.md" headers = markdown }
  58. { pattern = "/components/range-picker/README.md" file = "./components/range-picker/README.md" headers = markdown }
  59. { pattern = "/components/pagination/README.md" file = "./components/pagination/README.md" headers = markdown }
  60. { pattern = "/components/md-editor/README.md" file = "./components/md-editor/README.md" headers = markdown }
  61. { pattern = "/components/code-editor/README.md" file = "./components/code-editor/README.md" headers = markdown }
  62. { pattern = "/components/file-upload/README.md" file = "./components/file-upload/README.md" headers = markdown }
  63. { pattern = "/components/modal/README.md" file = "./components/modal/README.md" headers = markdown }
  64. { pattern = "/shells" component = ShellsPage }
  65. { pattern = "/shells/content-first" component = ContentFirstDemo }
  66. { pattern = "/shells/content-first/:kind" component = ContentFirstDemo }
  67. { pattern = "/shells/list-first" component = ListFirstDemo }
  68. { pattern = "/shells/list-first/:id" component = ListFirstDemo }
  69. { pattern = "/shells/three-pane" component = ThreePaneDemo }
  70. { pattern = "/shells/three-pane/:id" component = ThreePaneDemo }
  71. { pattern = "/docs" component = DocsPage }
  72. { pattern = "/docs/*" directory = "./docs" headers = markdown }
  73. { pattern = "/theme/check-theme.mjs" file = "./theme/check-theme.mjs" headers = { 'Content-Type' = 'text/javascript; charset=utf-8' 'Cache-Control' = 'no-cache' } }
  74. ]
  75. port = env('LAYOUTS_PORT') != null ? toNumber(env('LAYOUTS_PORT')) : 8760
  76. // HL_HOST = the interface hl:web binds: 127.0.0.1 on Byrodin behind nginx; unset = 0.0.0.0 (dev on Loreana).
  77. // LAYOUTS_WATCH=0 = no dev watcher. No sessions are kept (no login, no data).
  78. watching = env('LAYOUTS_WATCH') != '0'
  79. server = new WebFramework(routes = routes, styles = styles, minify = true, port = port, watchMode = watching, sessionDir = false, sessionCookie = 'layoutssid', uploadMax = 5242880)
  80. on Error(e) { console.log('error absorbed: ' + e.message) }

Branches

Latest commits

  • 0d0fef25paths: projects moved into /media/STORAGE/projects/WorldAPI/mre
  • 2dbe0df5Re-vendor Hybriel to the shared static build 0f396652 (plugins; bin/ is git-ignored), compose cache volume + tmpfs /tmp, gate wait 120 s, report 004mre
  • 0adc551emission brief 004mre
  • 1376e905deploy.sh: wait up to DEPLOY_URL_WAIT (120 s) for 200 after the restart, as the other apps (cold compile, hybriel#148)mre
  • c0fdbf6cdocker-compose: init: true (hybriel#156, PID 1 ignored SIGTERM, every restart waited 10 s)mre
  • ecf70665usage: layouts on components a567b57mre
  • 315731efcomponents re-synced to components.hybriel a567b57 (md-editor tables)mre
  • b59e2ee9docs/usage.md + tools/usage.sh: which app carries which component/theme/tokens copy, and whether it matches the sourcemre
  • 0222f67ctheme: two corner radii only (radiusSmall 5px, radiusLarge 10px); check-theme flags any other radius; gate 76/0mre
  • 877b63acdesign rules: two radii only (5px small, 10px large)mre
  • 635234dfcomponents re-synced to components.hybriel 5a98d77 (#15 black/white base look); gate 73/0, check-theme 0, screenshots unchangedmre
  • 876b2064docs: workaround note for hybriel#130 (slot marker mid-line)mre
  • 85b56541layouts mission 002 3/3: same-output tests, letcount, shots ports, docs, reportmre
  • 0f325d3blayouts mission 002 2/3: code rules — styles.hl -> components/styles.hl, the one never-reassigned let dropped; gate 73/0, same outputmre
  • a3e74c8alayouts mission 002 1/3: components re-copied byte-verbatim from components.hybriel 3f93d71 by tools/sync-components.sh (+ --check, components/SOURCE); gate 73/0, check-theme 0mre
  • 80ce6ba9report 001 (mission 075)mre
  • 5c6e338flayouts.worldapi.org in Hybriel: WorldAPI theme (tokens, borderless elements, themed components.hybriel components), shells (header, main/user menu, sidebar overlay, content-first, list-first, three-pane), showcase, check-theme helper; gate 73/0 (mission 075)mre