sass-site/source/layouts/section_reference.haml
Natalie Weizenbaum e7ffef4fc9 Avoid an unstyled rendering moment with the tables of contents
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.
2019-04-12 00:09:10 -07:00

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]