From f0cbbd5ba7edb55738dd3d188183aa532efc0b66 Mon Sep 17 00:00:00 2001 From: Deimos Date: Mon, 27 May 2019 17:07:01 -0600 Subject: [PATCH] Improve formatting of wiki page headers --- tildes/scss/modules/_text.scss | 33 +++++++++++++++++++ tildes/scss/themes/_theme_base.scss | 8 +++++ .../tildes/templates/group_wiki_page.jinja2 | 2 +- 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/tildes/scss/modules/_text.scss b/tildes/scss/modules/_text.scss index 8b5d866..ee8df14 100644 --- a/tildes/scss/modules/_text.scss +++ b/tildes/scss/modules/_text.scss @@ -9,3 +9,36 @@ font-size: 0.6rem; line-height: 0.9rem; } + +// special formatting rules for wiki pages +.text-wiki { + h1, h2, h3, h4, h5, h6 { + a { + text-decoration: none; + } + } + + h1, h2, h3 { + border-bottom: 1px dotted; + padding-bottom: 0.2rem; + } + + h1, h2 { + margin-top: 2rem; + } + + h3 { + margin-top: 1rem; + font-size: 0.9rem; + } + + h4 { + font-size: 0.8rem; + font-weight: bold; + } + + .heading-main { + margin-top: 0; + border-bottom: 0; + } +} diff --git a/tildes/scss/themes/_theme_base.scss b/tildes/scss/themes/_theme_base.scss index f01f57f..eb3be0a 100644 --- a/tildes/scss/themes/_theme_base.scss +++ b/tildes/scss/themes/_theme_base.scss @@ -443,6 +443,14 @@ color: map-get($theme, "warning"); } + .text-wiki { + h1, h2, h3, h4, h5, h6 { + a { + color: map-get($theme, "foreground-highlight"); + } + } + } + .toast { color: map-get($theme, "foreground-highlight"); border-color: map-get($theme, "border"); diff --git a/tildes/tildes/templates/group_wiki_page.jinja2 b/tildes/tildes/templates/group_wiki_page.jinja2 index f219665..690e27f 100644 --- a/tildes/tildes/templates/group_wiki_page.jinja2 +++ b/tildes/tildes/templates/group_wiki_page.jinja2 @@ -11,7 +11,7 @@ ~{{ page.group.path }} {% endblock %} -{% block main_classes %}text-formatted{% endblock %} +{% block main_classes %}text-formatted text-wiki{% endblock %} {% block main_heading %}{{ page.page_name }}{% endblock %}