From c85b5b7dc98cc7d07383639c7b840703eae69dc3 Mon Sep 17 00:00:00 2001 From: Helen Chong <119173961+helenclx@users.noreply.github.com> Date: Mon, 9 Dec 2024 13:01:49 +0800 Subject: [PATCH] Style tab wrap table of contents --- src/_includes/main/links.njk | 6 ++++-- src/assets/css/components.css | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/_includes/main/links.njk b/src/_includes/main/links.njk index cd0fbf24..8725ab0a 100644 --- a/src/_includes/main/links.njk +++ b/src/_includes/main/links.njk @@ -30,8 +30,10 @@ isContentDivided: true {% headingAnchor 2 %}{{ group.data.title }}{% endheadingAnchor %} {% if group.data.toc %} -

Table of Contents

- {{ group.templateContent | toc | safe }} +
+

Table of Contents

+ {{ group.templateContent | toc | safe }} +
{% endif %} {{ group.templateContent | safe }} diff --git a/src/assets/css/components.css b/src/assets/css/components.css index 0e647803..ac8d34be 100644 --- a/src/assets/css/components.css +++ b/src/assets/css/components.css @@ -195,6 +195,11 @@ p + .adoptables { margin-top: 1em; } outline: 0.2em solid var(--clr-title-border); outline-offset: 0.15em; } + +.tabwrap__toc { + background-color: var(--clr-quote-bg); + padding: 1em 1em 0.5em; +} .tab__back { margin-top: 3em; } /* Web ring */