gitoria

layouts

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitb9a3f85fb9a3f85fLOG: MLmreb9a3f85f/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

  • b9a3f85fLOG: MLmre
  • 7979397creport ML-mobilemre
  • 85d2ed25gate: wordingmre
  • 98a311c0gate: 390 px checks for list rows, table word, edited tap target, code in titlesmre
  • 769b99d7theme: table cells keep a word whole, code in a title stays text-sized, 'edited' is a 44 px tap target on the phonemre
  • c36b7595list rows (notes, mail) stack their parts full width: the date no longer a one-letter column beside the titlemre
  • 02aa74aasync components.hybriel 134b4e3: MdEditor builds an editor put into the page at once, redraws a surface put in anew (F5, hybriel#211)mre
  • 268b1c87sync components.hybriel 6b0936a: the 'edited' foldable drops the theme's border and marginmre
  • c51d039fsync components.hybriel 8d79ff7: bubble hugs its content, quiet 'edited' label; gate checksmre
  • f4ad7eecsync components 9a: shared Icon (icons/icons.hl), md-editor toolbar icons + single focus ring (components f4-icons ba96735)mre
  • db258c11sync-components: copy icons/icons.hl + README (F4); testsmre
  • badc1879md-editor.hl: verbatim copy of components f3-mdvalue (an older text handed back is kept)mre
  • 867a8375md-editor.hl: verbatim copy of components f3-mdvalue (an outside value change is shown by the editor)mre
  • 5d8d2c67tests: wait for hydration before real clicks after a navigation (H2)mre
  • 99db79f0re-vendor Hybriel 5406d146 (hl:web batches 9+10: #72 emits while the socket is closed delivered after reconnect, browser boot linear, faster list appends; contains int 6–14 + m406)mre
  • 30353f60tests: e2e-md-showcase Chrome range from LAYOUTS_GATE_CHROME_MD, default unchangedmre
  • 16a7878cre-vendor Hybriel 6f8a0689 (int 6–11: streaming cursors, #203 index heal + close() fix, fd403 listDir/cursor fds, hl:time browser side, hl:web batches 5+6)mre
  • 6af559e8docker-compose: nofile 65536 (Hybriel int 6+ boot opened >1024 files in the tracker)mre
  • 5599cf56deploy: backup copies index files first and *.mpack data last (hot-copy skew, hybriel #203)mre
  • 0bcc6294Mission 011: e2e-197, brief, report, LOGmre