From 2c6967b3da133e7c7f92d893d585b04a391bb560 Mon Sep 17 00:00:00 2001 From: Deimos Date: Fri, 20 Mar 2020 18:16:39 -0600 Subject: [PATCH] Fix alignment of "segmented" subgroup header links --- tildes/scss/modules/_site-header.scss | 1 + tildes/scss/themes/_theme_base.scss | 8 +++++--- tildes/tildes/templates/base.jinja2 | 2 +- tildes/tildes/templates/group_wiki.jinja2 | 2 +- .../tildes/templates/group_wiki_edit_page.jinja2 | 2 +- tildes/tildes/templates/group_wiki_new_page.jinja2 | 2 +- tildes/tildes/templates/group_wiki_page.jinja2 | 2 +- tildes/tildes/templates/macros/groups.jinja2 | 5 ++--- tildes/tildes/templates/new_message.jinja2 | 2 +- tildes/tildes/templates/new_topic.jinja2 | 2 +- tildes/tildes/templates/search.jinja2 | 14 ++++++-------- tildes/tildes/templates/topic.jinja2 | 2 +- tildes/tildes/templates/topic_listing.jinja2 | 2 +- tildes/tildes/templates/user.jinja2 | 2 +- 14 files changed, 24 insertions(+), 24 deletions(-) diff --git a/tildes/scss/modules/_site-header.scss b/tildes/scss/modules/_site-header.scss index b8b86cd..21c0dbe 100644 --- a/tildes/scss/modules/_site-header.scss +++ b/tildes/scss/modules/_site-header.scss @@ -28,6 +28,7 @@ } .site-header-context { + display: inline-block; vertical-align: text-bottom; white-space: nowrap; overflow: hidden; diff --git a/tildes/scss/themes/_theme_base.scss b/tildes/scss/themes/_theme_base.scss index 2e9bb08..cbae65e 100644 --- a/tildes/scss/themes/_theme_base.scss +++ b/tildes/scss/themes/_theme_base.scss @@ -458,9 +458,11 @@ color: map-get($theme, "link"); } - .site-header-context, - .site-header-context:visited { - color: map-get($theme, "foreground-primary"); + .site-header-context { + a, + a:visited { + color: map-get($theme, "foreground-primary"); + } } .site-header-logo, diff --git a/tildes/tildes/templates/base.jinja2 b/tildes/tildes/templates/base.jinja2 index 7995297..8bcfad5 100644 --- a/tildes/tildes/templates/base.jinja2 +++ b/tildes/tildes/templates/base.jinja2 @@ -80,7 +80,7 @@ {% endif %} >Sidebar - {% block header_context_link %}{% endblock %} +
{% block header_context_link %}{% endblock %}
{{ logged_in_user_info() }} diff --git a/tildes/tildes/templates/group_wiki.jinja2 b/tildes/tildes/templates/group_wiki.jinja2 index 819dfff..8caa3b0 100644 --- a/tildes/tildes/templates/group_wiki.jinja2 +++ b/tildes/tildes/templates/group_wiki.jinja2 @@ -8,7 +8,7 @@ {% block title %}~{{ group.path }} wiki{% endblock %} {% block header_context_link %} -~{{ group.path }} +~{{ group.path }} {% endblock %} {% block main_heading %}~{{ group.path }} wiki pages{% endblock %} diff --git a/tildes/tildes/templates/group_wiki_edit_page.jinja2 b/tildes/tildes/templates/group_wiki_edit_page.jinja2 index 0e7a1eb..adada86 100644 --- a/tildes/tildes/templates/group_wiki_edit_page.jinja2 +++ b/tildes/tildes/templates/group_wiki_edit_page.jinja2 @@ -8,7 +8,7 @@ {% block title %}Edit wiki page{% endblock %} {% block header_context_link %} -~{{ page.group.path }} +~{{ page.group.path }} {% endblock %} {% block main_heading %}Editing page "{{ page.page_name }}" in ~{{ page.group.path }}{% endblock %} diff --git a/tildes/tildes/templates/group_wiki_new_page.jinja2 b/tildes/tildes/templates/group_wiki_new_page.jinja2 index ee8d21b..5908313 100644 --- a/tildes/tildes/templates/group_wiki_new_page.jinja2 +++ b/tildes/tildes/templates/group_wiki_new_page.jinja2 @@ -8,7 +8,7 @@ {% block title %}New wiki page{% endblock %} {% block header_context_link %} -~{{ group.path }} +~{{ group.path }} {% endblock %} {% block main_heading %}Create a new wiki page in ~{{ group.path }}{% endblock %} diff --git a/tildes/tildes/templates/group_wiki_page.jinja2 b/tildes/tildes/templates/group_wiki_page.jinja2 index e05fcdc..c9e3abe 100644 --- a/tildes/tildes/templates/group_wiki_page.jinja2 +++ b/tildes/tildes/templates/group_wiki_page.jinja2 @@ -8,7 +8,7 @@ {% block title %}{{ page.page_name }} - ~{{ page.group.path }} wiki{% endblock %} {% block header_context_link %} -~{{ page.group.path }} +~{{ page.group.path }} {% endblock %} {% block main_classes %}text-formatted text-wiki{% endblock %} diff --git a/tildes/tildes/templates/macros/groups.jinja2 b/tildes/tildes/templates/macros/groups.jinja2 index d607d6d..98a4bdb 100644 --- a/tildes/tildes/templates/macros/groups.jinja2 +++ b/tildes/tildes/templates/macros/groups.jinja2 @@ -36,9 +36,8 @@ ~{{ group.path[0:1] }} - {% for i in range(1, group.path|length) %} - . - {{ group.path[i:i+1] }} {% endfor %} diff --git a/tildes/tildes/templates/new_message.jinja2 b/tildes/tildes/templates/new_message.jinja2 index b500911..7dc1cf1 100644 --- a/tildes/tildes/templates/new_message.jinja2 +++ b/tildes/tildes/templates/new_message.jinja2 @@ -8,7 +8,7 @@ {% block title %}New private message conversation{% endblock %} {% block header_context_link %} -{{ user.username }} +{{ user.username }} {% endblock %} {% block main_heading %} diff --git a/tildes/tildes/templates/new_topic.jinja2 b/tildes/tildes/templates/new_topic.jinja2 index 0807a51..c4bca10 100644 --- a/tildes/tildes/templates/new_topic.jinja2 +++ b/tildes/tildes/templates/new_topic.jinja2 @@ -6,7 +6,7 @@ {% block title %}New topic{% endblock %} {% block header_context_link %} -~{{ group.path }} +~{{ group.path }} {% endblock %} {% block main_heading %}Post a new topic in ~{{ group.path }}{% endblock %} diff --git a/tildes/tildes/templates/search.jinja2 b/tildes/tildes/templates/search.jinja2 index 42df497..2cf2a85 100644 --- a/tildes/tildes/templates/search.jinja2 +++ b/tildes/tildes/templates/search.jinja2 @@ -9,14 +9,12 @@ {% block title %}Search results: {{ search }}{% endblock %} {% block header_context_link %} - - {% if group %} - Search in ~{{ group.path }}: - {% else %} - Search: - {% endif %} - {{ search }} - + {% if group %} + Search in ~{{ group.path }}: + {% else %} + Search: + {% endif %} + {{ search }} {% endblock %} {% block filter_info %} diff --git a/tildes/tildes/templates/topic.jinja2 b/tildes/tildes/templates/topic.jinja2 index 1365f8f..fab73fb 100644 --- a/tildes/tildes/templates/topic.jinja2 +++ b/tildes/tildes/templates/topic.jinja2 @@ -27,7 +27,7 @@ {% endblock %} {% block header_context_link %} - {{ group_segmented_link(topic.group, class="site-header-context") }} + {{ group_segmented_link(topic.group) }} {% endblock %} {% block content %} diff --git a/tildes/tildes/templates/topic_listing.jinja2 b/tildes/tildes/templates/topic_listing.jinja2 index c963439..94268df 100644 --- a/tildes/tildes/templates/topic_listing.jinja2 +++ b/tildes/tildes/templates/topic_listing.jinja2 @@ -11,7 +11,7 @@ {% block title %}Topics in ~{{ group.path }}{% endblock %} {% block header_context_link %} - {{ group_segmented_link(group, class="site-header-context") }} + {{ group_segmented_link(group) }} {% endblock %} {% block content %} diff --git a/tildes/tildes/templates/user.jinja2 b/tildes/tildes/templates/user.jinja2 index dbb377c..8f70235 100644 --- a/tildes/tildes/templates/user.jinja2 +++ b/tildes/tildes/templates/user.jinja2 @@ -17,7 +17,7 @@ {% endblock %} {% block header_context_link %} -{{ user.username }} +{{ user.username }} {% endblock %} {# Only show the heading if they can't see the type tabs and the user isn't deleted/banned #}