Drop link content from listing, localize link pages

This commit is contained in:
jultty 2024-09-27 09:02:32 -03:00
commit bade72a7a2
2 changed files with 13 additions and 12 deletions

View file

@ -6,7 +6,8 @@
{%- block content %}
<h1 id="post-title"><a href="{{ page.extra.url }}">{{ page.title }}</a></h1>
<time class="link-date"><strong>Linked {{ page.date }}</strong></time>
<time class="link-date"><strong>{% if lang == "pt" %}Linkado{% else %}Linked{% endif %} {{ page.date }}</strong></time>
{%- if page.extra.comment %}<p>{{ page.extra.comment }}</p>{% endif %}
{{- page.content | safe }}
{%- endblock content %}

View file

@ -10,19 +10,19 @@
<ul id="posts">
{%- for page in english_section.pages %}
<li>
{%- if page.content %}<a class="post-date" href="{{ page.permalink }}">{{ page.date }}</a>
{%- else %}
{%- if page.content -%}
{%- set portuguese_page = get_page(path="links/" ~ page.slug ~ ".pt.md") %}
<time class="post-date"><a href="
{%- if lang == "pt" -%}
{{ portuguese_page.permalink -}}
{%- else -%}
{{ page.permalink -}}
{%- endif -%}
">{{ page.date -}}</a></time>
{%- else %}
<time class="post-date">{{ page.date }}</time>
{%- endif %}
{%- endif -%}
<a href="{{ page.extra.url | safe }}">{{ page.title }}</a>
{%- if page.content %}
{%- set portuguese_page = get_page(path="links/" ~ page.slug ~ ".pt.md") %}
{%- if lang == "pt" %}
<span>{{ portuguese_page.content | replace(from="<p>", to="") | safe }}</span>
{%- else %}
<span>{{ page.content | replace(from="<p>", to="") | safe }}</span>
{%- endif %}
{%- endif %}
</li>
{%- endfor %}
</ul>