Browse Source

Improve formatting of wiki page headers

merge-requests/70/head
Deimos 5 years ago
parent
commit
f0cbbd5ba7
  1. 33
      tildes/scss/modules/_text.scss
  2. 8
      tildes/scss/themes/_theme_base.scss
  3. 2
      tildes/tildes/templates/group_wiki_page.jinja2

33
tildes/scss/modules/_text.scss

@ -9,3 +9,36 @@
font-size: 0.6rem; font-size: 0.6rem;
line-height: 0.9rem; 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;
}
}

8
tildes/scss/themes/_theme_base.scss

@ -443,6 +443,14 @@
color: map-get($theme, "warning"); color: map-get($theme, "warning");
} }
.text-wiki {
h1, h2, h3, h4, h5, h6 {
a {
color: map-get($theme, "foreground-highlight");
}
}
}
.toast { .toast {
color: map-get($theme, "foreground-highlight"); color: map-get($theme, "foreground-highlight");
border-color: map-get($theme, "border"); border-color: map-get($theme, "border");

2
tildes/tildes/templates/group_wiki_page.jinja2

@ -11,7 +11,7 @@
<a class="site-header-context" href="/~{{ page.group.path }}">~{{ page.group.path }}</a> <a class="site-header-context" href="/~{{ page.group.path }}">~{{ page.group.path }}</a>
{% endblock %} {% endblock %}
{% block main_classes %}text-formatted{% endblock %}
{% block main_classes %}text-formatted text-wiki{% endblock %}
{% block main_heading %}{{ page.page_name }}{% endblock %} {% block main_heading %}{{ page.page_name }}{% endblock %}

Loading…
Cancel
Save