Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistency pass on href outputs #18

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions templates/base.html
Expand Up @@ -15,8 +15,8 @@
<link rel="stylesheet" href="{{ get_url(path="base.css", trailing_slash=false) }}">
<link rel="stylesheet" href="{{ get_url(path=color_mode_css_path, trailing_slash=false) }}">

<link rel="preload" href={{ config.extra.cdn.font_awesome }} as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href={{ config.extra.cdn.font_awesome }}></noscript>
<link rel="preload" href="{{ config.extra.cdn.font_awesome | safe }}" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="{{ config.extra.cdn.font_awesome | safe }}"></noscript>

{% if config.generate_feed %}
<link rel="alternate" type={% if config.feed_filename == "atom.xml" %}"application/atom+xml"{% else %}"application/rss+xml"{% endif %} title="RSS" href="{{ get_url(path=config.feed_filename) | safe }}">
Expand All @@ -36,14 +36,14 @@
{% set base_url = get_url(path="", lang=lang) %}
<header>
<h1 class="site-header">
<a href="{{ base_url }}">{{ config.title }}</a>
<a href="{{ base_url | safe }}">{{ config.title }}</a>
</h1>
<nav>
<ul>
{% block nav_bar %}
{% for subsec in config.extra.menu_items %}
{% set link_url = subsec.url | replace(from="$BASE_URL", to=config.base_url) | replace(from="$LANG_BASE_URL", to=base_url) %}
<li><a {% if current_url and current_url is starting_with(link_url) %}class="active"{% endif %} href="{{ link_url }}">{{ trans(key=subsec.name, lang=lang) }}</a></li>
<li><a {% if current_url and current_url is starting_with(link_url) %}class="active"{% endif %} href="{{ link_url | safe }}">{{ trans(key=subsec.name, lang=lang) }}</a></li>
{% endfor %}
{% endblock nav_bar %}
</ul>
Expand Down
2 changes: 1 addition & 1 deletion templates/blog.html
Expand Up @@ -12,7 +12,7 @@
{% else %}
{% set tags_url = "/tags" %}
{% endif %}
{{ trans(key="view_by", lang=lang) }}: <a href={{ tags_url }}>{{ trans(key="tags", lang=lang) }}</a>
{{ trans(key="view_by", lang=lang) }}: <a href="{{ tags_url | safe }}">{{ trans(key="tags", lang=lang) }}</a>
</p>
{% endblock heading %}
{% if paginator.pages %}
Expand Down
2 changes: 1 addition & 1 deletion templates/categories/list.html
Expand Up @@ -9,7 +9,7 @@ <h1>{{ trans(key="categories", lang=lang) }}</h1>
<ul class="terms">
{% for term in terms %}
<li>
<a href="{{ term.permalink }}">
<a href="{{ term.permalink | safe }}">
{{ term.name }}
</a>
({{ term.pages | length }})
Expand Down
2 changes: 1 addition & 1 deletion templates/index.html
Expand Up @@ -28,7 +28,7 @@ <h2>
{% for page in subsec_section_pages | slice(end=subsec.recent_items) %}
{{ page_macros::page_listing(page=page) }}
{% endfor %}
<p class="read-more"><a href={{ subsec_link_path }}>{{ trans(key=subsec.more_trans_key, lang=lang) }} ≫</a></p>
<p class="read-more"><a href="{{ subsec_link_path | safe }}">{{ trans(key=subsec.more_trans_key, lang=lang) }} ≫</a></p>
</section>
{% endfor %}
</section>
Expand Down
6 changes: 3 additions & 3 deletions templates/macros/page.html
Expand Up @@ -26,7 +26,7 @@

{% macro page_listing(page) %}
<article class="post-list">
<a href="{{ page.permalink }}">
<a href="{{ page.permalink | safe }}">
<header>
<h3>
{{ page.title }}
Expand Down Expand Up @@ -63,10 +63,10 @@ <h3>
{% macro project_listing(page) %}
<article class="post-list">
{# {% if page.extra.featured_image %}
<a href="{{ page.permalink }}"><img src="{{ page.permalink }}/{{ page.extra.featured_image }}" alt="{% if page.extra.featured_image_alt %}{{ page.extra.featured_image_alt }}{% else %}{{ page.title }}{% endif %}"/></a>
<a href="{{ page.permalink | safe }}"><img src="{{ page.permalink | safe }}/{{ page.extra.featured_image }}" alt="{% if page.extra.featured_image_alt %}{{ page.extra.featured_image_alt }}{% else %}{{ page.title }}{% endif %}"/></a>
{% endif %}
#}
<a href="{{ page.permalink }}">
<a href="{{ page.permalink | safe }}">
<header>
<h3>
{{ page.title }}
Expand Down
2 changes: 1 addition & 1 deletion templates/macros/social.html
Expand Up @@ -68,7 +68,7 @@

{% if social_config.other %}
{% for social in social_config.other %}
<a href={{ social.url }} aria-label="Open {{ social.name }}" target="_blank">
<a href="{{ social.url | safe }}" aria-label="Open {{ social.name }}" target="_blank">
<span class="icon is-large">
<i class="{{ social.font_awesome }} fa-lg" aria-hidden="true" title={{ social.name }}></i>
</span>
Expand Down
2 changes: 1 addition & 1 deletion templates/tags/list.html
Expand Up @@ -9,7 +9,7 @@ <h1>{{ trans(key="tags", lang=lang) }}</h1>
<ul class="terms">
{% for term in terms %}
<li>
<a href="{{ term.permalink }}">
<a href="{{ term.permalink | safe }}">
#{{ term.name }}
</a>
({{ term.pages | length }})
Expand Down