web/_layouts/page.html
2023-09-08 22:48:37 +08:00

26 lines
622 B
HTML

---
layout: default
---
{% capture _content %}
{% if layout.refactor or page.layout == 'page' %}
{% include refactor-content.html content=content lang=lang %}
{% else %}
{{ content }}
{% endif %}
{% endcapture %}
<article class="px-1">
{% if page.layout == 'page' or page.collection == 'tabs' %}
{% assign tab_key = page.title | downcase %}
{% assign title = site.data.locales[lang].tabs[tab_key] | default: page.title %}
<h1 class="dynamic-title">
{{ title }}
</h1>
<div class="content">
{{ _content }}
</div>
{% else %}
{{ _content }}
{% endif %}
</article>