mirror of
https://github.com/abhinavxd/libredesk.git
synced 2026-09-10 22:25:39 +00:00
048eb1acd5
Help centers now have a template setting with two layouts. Classic is the default: the existing hero banner, large search bar and collection cards. Docs is new: sticky top bar, collections sidebar on every page, command palette search (Ctrl+K) with a no-JS fallback form, and an on-page table of contents. Backend adds a template column (default 'classic', checked to the two values), threads it through insert/update queries and the request validator, and resolves page template names as '<template>-<page>' when rendering public pages. Docs pages also get the published tree for the sidebar. Public templates are restructured so each layout is fully isolated and a third template is just a new directory plus its CSS file: web-templates/help/shared/ holds the head, announcement, lang switcher, icons and shared JS; help/classic/ and help/docs/ each hold their own layout and five pages. The classic stylesheet is renamed to help-center-classic.css so the head links help-center-<template>.css directly. Template parsing now globs the help/ subdirectories too. The admin create and edit forms get a template picker, and classic-only styling fields (header background, collection layout, card icons) are hidden when docs is selected.