From a6881865e67b27dbd2743805e78ddb20e23cee07 Mon Sep 17 00:00:00 2001 From: alexisben <alex@noesya.coop> Date: Thu, 10 Nov 2022 15:29:50 +0100 Subject: [PATCH] toc --- assets/sass/_theme/_configuration.sass | 6 ++++++ assets/sass/_theme/blocks/pages.sass | 2 ++ assets/sass/_theme/design-system/grid.sass | 2 +- assets/sass/_theme/design-system/table_of_content.sass | 9 ++++++--- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/assets/sass/_theme/_configuration.sass b/assets/sass/_theme/_configuration.sass index 2393355c..2e0e9139 100644 --- a/assets/sass/_theme/_configuration.sass +++ b/assets/sass/_theme/_configuration.sass @@ -210,6 +210,12 @@ $post-time-color: color-contrast($main-color, 20%) !default // Table of content $toc-color: $main-color !default $toc-active-color: $main-color !default // TODO : checker ce que ça fait +$toc-font-family: $body-font-family !default +$toc-font-size: $h4-size !default +$toc-font-size-md: $h4-size-md !default +$toc-line-height: $h4-line-height !default +$toc-font-weight: normal !default + // Person $persons-avatar-background-color: $main-light-color !default diff --git a/assets/sass/_theme/blocks/pages.sass b/assets/sass/_theme/blocks/pages.sass index 4921666f..0fae92a1 100644 --- a/assets/sass/_theme/blocks/pages.sass +++ b/assets/sass/_theme/blocks/pages.sass @@ -59,6 +59,8 @@ .pages @include grid(3, md) margin-top: $spacing2 + @include in-page-with-aside + @include grid(2, md) .page aspect-ratio: 0.8 background-color: $block-pages-card-page-background diff --git a/assets/sass/_theme/design-system/grid.sass b/assets/sass/_theme/design-system/grid.sass index 1431a501..ab9cee24 100644 --- a/assets/sass/_theme/design-system/grid.sass +++ b/assets/sass/_theme/design-system/grid.sass @@ -14,7 +14,7 @@ transform: translateX(-50%) width: 100% > div - @include sticky + @include sticky($spacing1) > * width: col(4) pointer-events: auto diff --git a/assets/sass/_theme/design-system/table_of_content.sass b/assets/sass/_theme/design-system/table_of_content.sass index 54c4e83a..a94c33a3 100644 --- a/assets/sass/_theme/design-system/table_of_content.sass +++ b/assets/sass/_theme/design-system/table_of_content.sass @@ -10,12 +10,15 @@ &:not(:last-child) margin-bottom: 1rem a - // TODO : nav link style ? color: $toc-color display: block - font-size: px2rem(18) - line-height: px2rem(20) + font-size: $toc-font-size + font-family: $toc-font-family + font-weight: $toc-font-weight + line-height: $toc-line-height text-decoration: none + @include media-breakpoint-up(md) + font-size: $toc-font-size-md &:hover text-decoration: underline .active -- GitLab