Add external
class to https:// links in navbar/footer
This commit is contained in:
@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Add `config.extra.debug_no_styles` config variable for debugging.
|
- Add `config.extra.debug_no_styles` config variable for debugging.
|
||||||
- Add `config.extra.nav.auto_hide` config variable for making the navbar auto-hide unless hovered or keyboard-focused (#106).
|
- Add `config.extra.nav.auto_hide` config variable for making the navbar auto-hide unless hovered or keyboard-focused (#106).
|
||||||
- Add `config.extra.show_backlinks` config variable for showing the backlinks button for linked articles in the article's quick actions.
|
- Add `config.extra.show_backlinks` config variable for showing the backlinks button for linked articles in the article's quick actions.
|
||||||
|
- Add `external` class to https:// links in navbar/footer.
|
||||||
- Add `fediverse:creator` meta tag.
|
- Add `fediverse:creator` meta tag.
|
||||||
- Add `title` class for use on `<strong>`.
|
- Add `title` class for use on `<strong>`.
|
||||||
- Add back support for lazy async images in comments.
|
- Add back support for lazy async images in comments.
|
||||||
|
@ -7,10 +7,7 @@
|
|||||||
{%- for link in config.extra.footer.links %}
|
{%- for link in config.extra.footer.links %}
|
||||||
{%- if link.url is matching('https?://') %}
|
{%- if link.url is matching('https?://') %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ link.url }}" rel="{{ rel_attributes }}"
|
<a href="{{ link.url }}" rel="{{ rel_attributes }}" class="external">
|
||||||
{%- if current_url | default(value='/') | trim_end_matches(pat='/') | safe == link.url | trim_end_matches(pat='/') | safe -%}
|
|
||||||
class="active"
|
|
||||||
{%- endif -%}>
|
|
||||||
{{- macros_translate::translate(key=link.name, default=link.name, language_strings=language_strings) -}}
|
{{- macros_translate::translate(key=link.name, default=link.name, language_strings=language_strings) -}}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -28,10 +28,7 @@
|
|||||||
{%- for link in link.menu -%}
|
{%- for link in link.menu -%}
|
||||||
{%- if link.url is matching('https?://') %}
|
{%- if link.url is matching('https?://') %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ link.url }}" rel="{{ rel_attributes }}"
|
<a href="{{ link.url }}" rel="{{ rel_attributes }}" class="external">
|
||||||
{%- if current_url | default(value='/') | trim_end_matches(pat='/') | safe == link.url | trim_end_matches(pat='/') | safe -%}
|
|
||||||
class="active"
|
|
||||||
{%- endif -%}>
|
|
||||||
{{- macros_translate::translate(key=link.name, default=link.name, language_strings=language_strings) -}}
|
{{- macros_translate::translate(key=link.name, default=link.name, language_strings=language_strings) -}}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@ -51,10 +48,7 @@
|
|||||||
</li>
|
</li>
|
||||||
{%- elif link.url is matching('https?://') %}
|
{%- elif link.url is matching('https?://') %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ link.url }}" rel="{{ rel_attributes }}"
|
<a href="{{ link.url }}" rel="{{ rel_attributes }}" class="external">
|
||||||
{%- if current_url | default(value='/') | trim_end_matches(pat='/') | safe == link.url | trim_end_matches(pat='/') | safe -%}
|
|
||||||
class="active"
|
|
||||||
{%- endif -%}>
|
|
||||||
{{- macros_translate::translate(key=link.name, default=link.name, language_strings=language_strings) -}}
|
{{- macros_translate::translate(key=link.name, default=link.name, language_strings=language_strings) -}}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
Reference in New Issue
Block a user