Page MenuHomeDevCentral

Simplify FAQ layout
ClosedPublic

Authored by dereckson on May 28 2023, 13:44.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 14, 22:59
Unknown Object (File)
Tue, Apr 9, 09:15
Unknown Object (File)
Fri, Apr 5, 14:20
Unknown Object (File)
Fri, Apr 5, 06:53
Unknown Object (File)
Fri, Apr 5, 06:53
Unknown Object (File)
Fri, Apr 5, 06:53
Unknown Object (File)
Fri, Apr 5, 05:59
Unknown Object (File)
Fri, Apr 5, 05:27
Subscribers
None

Details

Summary

The structure faq_layout describes the FAQ and table of contents layout.

This produces the same code, with two single each loop, one for the ToC,
one for the content.

Handlebars seems to require custom partial development for advanced
features like {{#each <reference>}}. As a workaround, to keep the
templates as simple as possible, entries from faq_entries are
aliased into the faq_layout data structure.

To help go back to the table of contents, add buttons to go back up.
The round CSS class can be used to create such round bouttons.

This code has received some love so we can offer it as a pattern
to create a FAQ for other static sites.

Test Plan

Ensure the layout ToC and questions is no-op

Click arrow buttons, ensure the anchor leads us on the top

Diff Detail

Repository
rJOIN Join Nasqueron
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dereckson created this revision.

Tidy up HTML and template

This revision is now accepted and ready to land.May 28 2023, 13:46
This revision was automatically updated to reflect the committed changes.