gitoria

layouts

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit8a3d5d408a3d5d40Mission 010: brief, report, LOG, STATUSmre8a3d5d40/project.hl

6.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. // components/settings.hl /settings: the header's Settings (the accent switcher), in the app shell
  15. // components/read.hl, lib/read.hl /read/:doc: docs and component READMEs read INSIDE the app shell (the raw .md stay routable for tools, nothing links to them)
  16. // lib/search.hl the header's search (GET /search?q= → /search/<words>)
  17. // docs/ the docs, served as Markdown under /docs/
  18. import WebFramework from 'hl:web'
  19. import { env } from 'hl:proc'
  20. import Styles from './components/styles.hl'
  21. import Home from './components/home.hl'
  22. import Elements from './components/elements.hl'
  23. import Search from './components/search.hl'
  24. import ReadPage from './components/read.hl'
  25. import SettingsPage from './components/settings.hl'
  26. import ComponentsPage from './components/pages/components.hl'
  27. import ShellsPage from './components/pages/shells.hl'
  28. import DocsPage from './components/pages/docs.hl'
  29. import ShowMonthView from './components/showcase/month-view.hl'
  30. import ShowDatePicker from './components/showcase/date-picker.hl'
  31. import ShowRangePicker from './components/showcase/range-picker.hl'
  32. import ShowPagination from './components/showcase/pagination.hl'
  33. import ShowMdEditor from './components/showcase/md-editor.hl'
  34. import ShowCodeEditor from './components/showcase/code-editor.hl'
  35. import ShowFileUpload from './components/showcase/file-upload.hl'
  36. import ShowModal from './components/showcase/modal.hl'
  37. import ShowComments from './components/showcase/comments.hl'
  38. import ShowFilesUpload from './components/showcase/files-upload.hl'
  39. import ShowFilesUploadPick from './components/showcase/files-upload-pick.hl'
  40. import ContentFirstDemo from './components/demo/tracker-demo.hl'
  41. import ListFirstDemo from './components/demo/notes-demo.hl'
  42. import ThreePaneDemo from './components/demo/mail-demo.hl'
  43. import { siteName } from './lib/site.hl'
  44. import { searchRedirect } from './lib/search.hl'
  45. appTitle = siteName
  46. appDescription = 'The WorldAPI theme for Hybriel apps: tokens, themed components, app shells.'
  47. styles = Styles
  48. static markdown = { 'Content-Type' = 'text/markdown; charset=utf-8' 'Cache-Control' = 'no-cache' }
  49. routes = [
  50. { pattern = "/" component = Home }
  51. { pattern = "/elements" component = Elements }
  52. { pattern = "/settings" component = SettingsPage }
  53. { pattern = "/read/:doc" component = ReadPage }
  54. { pattern = "/search" function = (route, req) => { return searchRedirect(req) } }
  55. { pattern = "/search/:q" component = Search }
  56. { pattern = "/components" component = ComponentsPage }
  57. { pattern = "/components/month-view" component = ShowMonthView }
  58. { pattern = "/components/date-picker" component = ShowDatePicker }
  59. { pattern = "/components/range-picker" component = ShowRangePicker }
  60. { pattern = "/components/pagination" component = ShowPagination }
  61. { pattern = "/components/md-editor" component = ShowMdEditor }
  62. { pattern = "/components/code-editor" component = ShowCodeEditor }
  63. { pattern = "/components/file-upload" component = ShowFileUpload }
  64. { pattern = "/components/modal" component = ShowModal }
  65. { pattern = "/components/comments" component = ShowComments }
  66. { pattern = "/components/files-upload" component = ShowFilesUpload }
  67. { pattern = "/components/files-upload-pick" component = ShowFilesUploadPick }
  68. { pattern = "/components/month-view/README.md" file = "./components/month-view/README.md" headers = markdown }
  69. { pattern = "/components/date-picker/README.md" file = "./components/date-picker/README.md" headers = markdown }
  70. { pattern = "/components/range-picker/README.md" file = "./components/range-picker/README.md" headers = markdown }
  71. { pattern = "/components/pagination/README.md" file = "./components/pagination/README.md" headers = markdown }
  72. { pattern = "/components/md-editor/README.md" file = "./components/md-editor/README.md" headers = markdown }
  73. { pattern = "/components/code-editor/README.md" file = "./components/code-editor/README.md" headers = markdown }
  74. { pattern = "/components/file-upload/README.md" file = "./components/file-upload/README.md" headers = markdown }
  75. { pattern = "/components/modal/README.md" file = "./components/modal/README.md" headers = markdown }
  76. { pattern = "/components/comments/README.md" file = "./components/comments/README.md" headers = markdown }
  77. { pattern = "/components/files-upload/README.md" file = "./components/files-upload/README.md" headers = markdown }
  78. { pattern = "/shells" component = ShellsPage }
  79. { pattern = "/shells/content-first" component = ContentFirstDemo }
  80. { pattern = "/shells/content-first/:kind" component = ContentFirstDemo }
  81. { pattern = "/shells/list-first" component = ListFirstDemo }
  82. { pattern = "/shells/list-first/:id" component = ListFirstDemo }
  83. { pattern = "/shells/three-pane" component = ThreePaneDemo }
  84. { pattern = "/shells/three-pane/:id" component = ThreePaneDemo }
  85. { pattern = "/docs" component = DocsPage }
  86. { pattern = "/docs/*" directory = "./docs" headers = markdown }
  87. { pattern = "/theme/check-theme.mjs" file = "./theme/check-theme.mjs" headers = { 'Content-Type' = 'text/javascript; charset=utf-8' 'Cache-Control' = 'no-cache' } }
  88. ]
  89. port = env('LAYOUTS_PORT') != null ? toNumber(env('LAYOUTS_PORT')) : 8760
  90. // HL_HOST = the interface hl:web binds: 127.0.0.1 on Byrodin behind nginx; unset = 0.0.0.0 (dev on Loreana).
  91. // LAYOUTS_WATCH=0 = no dev watcher. No sessions are kept (no login, no data).
  92. watching = env('LAYOUTS_WATCH') != '0'
  93. server = new WebFramework(routes = routes, styles = styles, minify = true, port = port, watchMode = watching, sessionDir = false, sessionCookie = 'layoutssid', uploadMax = 5242880)
  94. on Error(e) { console.log('error absorbed: ' + e.message) }

Branches

Latest commits

  • 8a3d5d40Mission 010: brief, report, LOG, STATUSmre
  • a56abf1fSync components to components.hybriel 3794c59 (MdEditor real-key fixes); showcase real-key check on the md-editor pagemre
  • 76f99f64E2E in lisbeth's Chrome for the menu's current page (mission 009): tests/e2e-menu-current.mjs, reportmre
  • 159b1d53MainMenu/Sidebar: current page marked beyond colour, count badge, item current flag; gate 300/0 (mission 009)mre
  • 0573eed3usage: notes + tickets on MdEditor (md-editor.js retired), gitoria on theme dbe3de7, tracker theme oldermre
  • 78478f6eSync showcase to components.hybriel 1442e58: pick-mode page, comments attach, md-editor rows/files off; gates 285/0mre
  • dbe3de79Display bugs from a real Chrome walk (mission 007): Settings page and in-shell doc reader instead of raw .md links, closed phone search hidden whatever a page says, /elements form rules scoped, three-pane danger contrast; display audit gate (132 -> 244 checks), walk + Settings e2e toolsmre
  • 1875a051Theme: 44 px tap targets mobile first (layoutTap), 16 px fields, desktop denser only in @media 60rem; 390 px tap audit + gate checks (mission 006)mre
  • 3d4f8e19Sync showcase to components.hybriel 9db927d: comments and files-upload pages, pagination onPage, md-editor readonly, gate 99 checksmre
  • 64d635acmission brief 005mre
  • 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