gitoriaLog in with ident

components

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit4b4dabe54b4dabe5State of 2026-09-27, before the move to gitoriamre4b4dabe5/project.hl

3.4 KB

  1. // project.hl — components.hybriel.worldapi.org: THE SITE. Hybriel components developed standalone: the home
  2. // lists them, each has a demo page (`/<component>`) and its README (`/<component>/README.md`). No login, no data.
  3. // Apps vendor a component by copying its folder (README of the component says which files).
  4. import WebFramework from 'hl:web'
  5. import { env } from 'hl:proc'
  6. import Styles from './styles.hl'
  7. import Index from './components/index.hl'
  8. import MonthViewDemo from './components/month-view/demo.hl'
  9. import DatePickerDemo from './components/date-picker/demo.hl'
  10. import RangePickerDemo from './components/range-picker/demo.hl'
  11. import PaginationDemo from './components/pagination/demo.hl'
  12. import MdEditorDemo from './components/md-editor/demo.hl'
  13. import CodeEditorDemo from './components/code-editor/demo.hl'
  14. import FileUploadDemo from './components/file-upload/demo.hl'
  15. static siteName = "Hybriel components"
  16. appTitle = siteName
  17. styles = Styles
  18. // the component's README is plain Markdown, served as it is
  19. routes = [
  20. { pattern = "/favicon.ico" direct = "" }
  21. { pattern = "/" component = Index }
  22. { pattern = "/month-view" component = MonthViewDemo }
  23. { pattern = "/month-view/README.md" file = "./components/month-view/README.md" headers = { 'Content-Type' = 'text/markdown; charset=utf-8' 'Cache-Control' = 'no-cache' } }
  24. { pattern = "/date-picker" component = DatePickerDemo }
  25. { pattern = "/date-picker/README.md" file = "./components/date-picker/README.md" headers = { 'Content-Type' = 'text/markdown; charset=utf-8' 'Cache-Control' = 'no-cache' } }
  26. { pattern = "/range-picker" component = RangePickerDemo }
  27. { pattern = "/range-picker/README.md" file = "./components/range-picker/README.md" headers = { 'Content-Type' = 'text/markdown; charset=utf-8' 'Cache-Control' = 'no-cache' } }
  28. { pattern = "/md-editor" component = MdEditorDemo }
  29. { pattern = "/md-editor/README.md" file = "./components/md-editor/README.md" headers = { 'Content-Type' = 'text/markdown; charset=utf-8' 'Cache-Control' = 'no-cache' } }
  30. { pattern = "/md-editor/files/*" directory = "./storage/md-files" headers = { 'X-Content-Type-Options' = 'nosniff' 'Content-Security-Policy' = "sandbox" } }
  31. { pattern = "/code-editor" component = CodeEditorDemo }
  32. { pattern = "/code-editor/README.md" file = "./components/code-editor/README.md" headers = { 'Content-Type' = 'text/markdown; charset=utf-8' 'Cache-Control' = 'no-cache' } }
  33. { pattern = "/file-upload" component = FileUploadDemo }
  34. { pattern = "/file-upload/README.md" file = "./components/file-upload/README.md" headers = { 'Content-Type' = 'text/markdown; charset=utf-8' 'Cache-Control' = 'no-cache' } }
  35. { pattern = "/pagination" component = PaginationDemo }
  36. { pattern = "/pagination/README.md" file = "./components/pagination/README.md" headers = { 'Content-Type' = 'text/markdown; charset=utf-8' 'Cache-Control' = 'no-cache' } }
  37. ]
  38. sessionDir = env('COMPONENTS_SESSIONS') != null ? env('COMPONENTS_SESSIONS') : null
  39. port = env('COMPONENTS_PORT') != null ? toNumber(env('COMPONENTS_PORT')) : 8380
  40. // HL_HOST = the interface hl:web binds: 127.0.0.1 on Byrodin behind nginx; unset = 0.0.0.0 (dev on Loreana).
  41. // COMPONENTS_WATCH=0 = no dev watcher.
  42. watching = env('COMPONENTS_WATCH') != '0'
  43. sessionCookie = 'componentssid'
  44. server = new WebFramework(routes = routes, styles = styles, minify = true, port = port, watchMode = watching, sessionCookie = sessionCookie, uploadMax = 5242880)
  45. on Error(e) { console.log('error absorbed: ' + e.message) }

Branches

Latest commits

  • 4b4dabe5State of 2026-09-27, before the move to gitoriamre