Fix links and nested p tags

Signed-off-by: Egor Savkin <es@m-labs.hk>
This commit is contained in:
Egor Savkin 2025-01-06 16:24:23 +08:00
parent 4819de9f98
commit 0a0fb78a47
4 changed files with 19 additions and 19 deletions

View File

@ -85,7 +85,7 @@
</a>
<div class="dropdown-menu shadow-none shadow-lg text-end text-lg-start" aria-labelledby="navbarDropdown">
{% for page in subsection.pages %}
<a class="dropdown-item pt-2 pb-2 pt-sm-3 pb-sm-3" href="{{ page.permalink }}">{{ page.title }}</a>
<a class="dropdown-item pt-2 pb-2 pt-sm-3 pb-sm-3" href="{{ page.permalink | safe }}">{{ page.title }}</a>
{% endfor %}
</div>
</li>
@ -93,7 +93,7 @@
{% elif subsection.title != 'Other' %}
<li class="nav-item ms-0 ms-md-4">
<a class="nav-link" href="{{ subsection.permalink }}">{{ subsection.title }}</a>
<a class="nav-link" href="{{ subsection.permalink | safe }}">{{ subsection.title }}</a>
</li>
{% endif %}

View File

@ -17,7 +17,7 @@
<meta property="og:description" content="{% block og_description%}{{ config.description }}{% endblock %}">
{% endblock %}
<meta property="og:site_name" content="{{ config.extra.author }}">
<meta property="og:url" content="{{ config.base_url }}">
<meta property="og:url" content="{{ config.base_url | safe }}">
<meta property="og:image" content="{{ get_url(path='images/logo@2x.png', cachebust=true) }}">
{% block meta %}{% endblock meta %}
@ -42,9 +42,9 @@
<link href="{{ get_url(path='favicon.ico', cachebust=true) }}" rel="shortcut icon" type="image/x-icon">
<link href="{{ get_url(path='favicon.ico', cachebust=true) }}" rel="icon" type="image/x-icon">
<link href="https://m-labs.hk{{ current_path }}" rel="alternate" hreflang="x-default" >
<link href="https://m-labs.ph{{ current_path }}" rel="alternate" hreflang="en-ph" >
<link href="https://m-labs-intl.com{{ current_path }}" rel="alternate" hreflang="en-us" >
<link href="https://m-labs.hk{{ current_path | safe }}" rel="alternate" hreflang="x-default" >
<link href="https://m-labs.ph{{ current_path | safe }}" rel="alternate" hreflang="en-ph" >
<link href="https://m-labs-intl.com{{ current_path | safe }}" rel="alternate" hreflang="en-us" >
{% block links %}{% endblock %}
@ -93,11 +93,11 @@
<div class="dropdown-menu shadow-none shadow-lg text-start text-lg-start" aria-labelledby="navbarDropdown">
{% for tmp_page in subsection.pages %}
{% if tmp_page.extra.menu_item and tmp_page.extra.menu_item == "th1" %}
<a class="dropdown-item pt-2 pb-2 mx-4 mt-2 mb-2 mt-sm-3 mb-sm-3 w-auto btn btn-primary btn-inversed {% if current_path == tmp_page.path %}active{% endif %} rounded-1" href="{{ tmp_page.permalink }}">
<a class="dropdown-item pt-2 pb-2 mx-4 mt-2 mb-2 mt-sm-3 mb-sm-3 w-auto btn btn-primary btn-inversed {% if current_path == tmp_page.path %}active{% endif %} rounded-1" href="{{ tmp_page.permalink | safe }}">
<center>{{ tmp_page.title }}</center>
</a>
{% else %}
<a class="dropdown-item pt-2 pb-2 {% if current_path == tmp_page.path %}active{% endif %}" href="{{ tmp_page.permalink }}">{{ tmp_page.title }}</a>
<a class="dropdown-item pt-2 pb-2 {% if current_path == tmp_page.path %}active{% endif %}" href="{{ tmp_page.permalink | safe }}">{{ tmp_page.title }}</a>
{% endif %}
{% endfor %}
</div>
@ -106,7 +106,7 @@
{% elif subsection.title != 'Other' %}
<li class="nav-item ms-0 ms-md-4 {% if current_path == subsection.path %}active{% endif %}">
<a class="nav-link" href="{{ subsection.permalink }}">{{ subsection.title }}</a>
<a class="nav-link" href="{{ subsection.permalink | safe }}">{{ subsection.title }}</a>
</li>
{% endif %}

View File

@ -33,7 +33,7 @@
<div class="card-footer border-light-subtle">
{% for link in publication.links %}
{% if link.path %}
<a href="{{link.path}}" class="card-link">{{link.name}}</a>
<a href="{{link.path | safe}}" class="card-link">{{link.name}}</a>
{% else %}
<div class="card-link d-inline">{{link.name}}</div>
{% endif %}

View File

@ -4,8 +4,8 @@
<div class="row g-0">
<div class="col-md-4 funding-logo-start d-flex p-1 justify-content-center">
{% if logo %}
{% if logo_link %}<a href="{{ logo_link }}" class="align-self-center">{% endif %}
<img src="{{ logo }}" class="img-fluid rounded" alt="{{ logo_alt }}"/>
{% if logo_link %}<a href="{{ logo_link | safe }}" class="align-self-center">{% endif %}
<img src="{{ logo | safe }}" class="img-fluid rounded" alt="{{ logo_alt }}"/>
{% if logo_link %}</a>{% endif %}
{% endif %}
</div>
@ -14,11 +14,11 @@
{% if title %}<h5 class="card-title">{{ title | markdown | safe }}</h5>{% endif %}
{% if icon %}
<span class="badge bg-transparent position-absolute top-0 start-100 translate-middle-x">
<img src="{{ icon }}" alt="{{ icon }}" class="rounded"
<img src="{{ icon | safe }}" alt="{{ icon }}" class="rounded"
style="height: 2rem;"/>
</span>
{% endif %}
<p class="card-text">{{ body | markdown | safe }}</p>
<div class="card-text">{{ body | markdown | safe }}</div>
</div>
</div>
</div>
@ -33,17 +33,17 @@
{% if title %}<h5 class="card-title text-end">{{ title | markdown | safe }}</h5>{% endif %}
{% if icon %}
<span class="badge bg-transparent position-absolute top-0 start-0 translate-middle-x">
<img src="{{ icon }}" alt="{{ icon }}" class="rounded"
<img src="{{ icon | safe }}" alt="{{ icon }}" class="rounded"
style="height: 2rem;"/>
</span>
{% endif %}
<p class="card-text">{{ body | markdown | safe }}</p>
<div class="card-text">{{ body | markdown | safe }}</div>
</div>
</div>
<div class="col-md-4 funding-logo-end d-flex p-1 justify-content-center">
{% if logo %}
{% if logo_link %}<a href="{{ logo_link }}" class="align-self-center">{% endif %}
<img src="{{ logo }}" class="img-fluid rounded" alt="{{ logo_alt }}"/>
{% if logo_link %}<a href="{{ logo_link | safe }}" class="align-self-center">{% endif %}
<img src="{{ logo | safe }}" class="img-fluid rounded" alt="{{ logo_alt }}"/>
{% if logo_link %}</a>{% endif %}
{% endif %}
</div>
@ -57,7 +57,7 @@
<div class="col-md-12">
<div class="card-body">
{% if title %}<h4 class="card-title text-center">{{ title | markdown | safe }}</h4>{% endif %}
<p class="card-text">{{ body | markdown | safe }}</p>
<div class="card-text">{{ body | markdown | safe }}</div>
</div>
</div>
</div>