mirror of
https://github.com/danog/sass-site.git
synced 2024-12-14 02:17:36 +01:00
e7ffef4fc9
Tables of contents are now statically rendered in their appropriately open/closed states, rather than updated via JavaScript, so they render correctly on the first page load. In order to make the "page sections" table still usable without JS, this adds a stylesheet in a <noscript> tag that forces the sections into an open state.
13 lines
393 B
Plaintext
13 lines
393 B
Plaintext
= wrap_layout :has_both_sidebars do
|
|
=yield
|
|
|
|
- content_for :navigation do
|
|
= partial "layouts/components/reference_table_of_contents"
|
|
|
|
- if current_page.data.table_of_contents
|
|
- content_for :complementary do
|
|
%h3 Page Sections
|
|
|
|
%nav.page-sections.sl-c-list-navigation-wrapper.sl-c-list-navigation-wrapper--collapsible
|
|
= current_page.metadata[:table_of_contents]
|