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.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 `external` class to https:// links in navbar/footer.
|
||||
- Add `fediverse:creator` meta tag.
|
||||
- Add `title` class for use on `<strong>`.
|
||||
- Add back support for lazy async images in comments.
|
||||
|
@ -7,10 +7,7 @@
|
||||
{%- for link in config.extra.footer.links %}
|
||||
{%- if link.url is matching('https?://') %}
|
||||
<li>
|
||||
<a href="{{ link.url }}" rel="{{ rel_attributes }}"
|
||||
{%- if current_url | default(value='/') | trim_end_matches(pat='/') | safe == link.url | trim_end_matches(pat='/') | safe -%}
|
||||
class="active"
|
||||
{%- endif -%}>
|
||||
<a href="{{ link.url }}" rel="{{ rel_attributes }}" class="external">
|
||||
{{- macros_translate::translate(key=link.name, default=link.name, language_strings=language_strings) -}}
|
||||
</a>
|
||||
</li>
|
||||
|
@ -28,10 +28,7 @@
|
||||
{%- for link in link.menu -%}
|
||||
{%- if link.url is matching('https?://') %}
|
||||
<li>
|
||||
<a href="{{ link.url }}" rel="{{ rel_attributes }}"
|
||||
{%- if current_url | default(value='/') | trim_end_matches(pat='/') | safe == link.url | trim_end_matches(pat='/') | safe -%}
|
||||
class="active"
|
||||
{%- endif -%}>
|
||||
<a href="{{ link.url }}" rel="{{ rel_attributes }}" class="external">
|
||||
{{- macros_translate::translate(key=link.name, default=link.name, language_strings=language_strings) -}}
|
||||
</a>
|
||||
</li>
|
||||
@ -51,10 +48,7 @@
|
||||
</li>
|
||||
{%- elif link.url is matching('https?://') %}
|
||||
<li>
|
||||
<a href="{{ link.url }}" rel="{{ rel_attributes }}"
|
||||
{%- if current_url | default(value='/') | trim_end_matches(pat='/') | safe == link.url | trim_end_matches(pat='/') | safe -%}
|
||||
class="active"
|
||||
{%- endif -%}>
|
||||
<a href="{{ link.url }}" rel="{{ rel_attributes }}" class="external">
|
||||
{{- macros_translate::translate(key=link.name, default=link.name, language_strings=language_strings) -}}
|
||||
</a>
|
||||
</li>
|
||||
|
Reference in New Issue
Block a user