Merge branch 'feature/simplify-html-struct'

This commit is contained in:
Cotes Chung 2021-12-31 00:09:53 +08:00
commit 9e2a4fc8c9
3 changed files with 19 additions and 16 deletions

View file

@ -4,30 +4,32 @@ layout: default
{% include lang.html %} {% include lang.html %}
<div class="row{% unless layout.tail_includes %} alone{% endunless %}"> <div class="row">
<!-- core --> <!-- core -->
<div id="core-wrapper" class="col-12 col-lg-11 col-xl-8"> <div id="core-wrapper" class="col-12 col-lg-11 col-xl-8">
<div class="post pl-1 pr-1 pl-sm-2 pr-sm-2 pl-md-4 pr-md-4"> <div class="post pl-1 pr-1 pl-sm-2 pr-sm-2 pl-md-4 pr-md-4">
{% if page.dynamic_title or page.collection == 'tabs' %}
{% capture _content %}
{% if layout.refactor or page.layout == 'page' %}
{% include refactor-content.html content=content %}
{% else %}
{{ content }}
{% endif %}
{% endcapture %}
{% if page.layout == 'page' or page.collection == 'tabs'%}
{% assign title = site.data.locales[lang].tabs[tab_key] | default: page.title %}
<h1 class="dynamic-title"> <h1 class="dynamic-title">
{%- capture tab_key -%}{{ page.url | split: '/' }}{%- endcapture -%} {{ title }}
{{- site.data.locales[lang].tabs[tab_key] | default: page.title -}}
</h1> </h1>
<div class="post-content"> <div class="post-content">
{% if page.layout == 'page' %} {{ _content }}
{% include refactor-content.html content=content %}
{% else %}
{{ content }}
{% endif %}
</div> </div>
{% else %} {% else %}
{% if page.layout == 'post' %} {{ _content }}
{% include refactor-content.html content=content %}
{% else %}
{{ content }}
{% endif %}
{% endif %} {% endif %}
</div> </div>
</div> <!-- #core-wrapper --> </div> <!-- #core-wrapper -->

View file

@ -1,5 +1,6 @@
--- ---
layout: page layout: page
refactor: true
pannel_includes: pannel_includes:
- toc - toc
tail_includes: tail_includes:

View file

@ -1075,7 +1075,7 @@ $sidebar-display: "sidebar-display";
} }
} }
.row.alone { div.row:first-of-type:last-of-type { // alone
margin-bottom: 4rem; margin-bottom: 4rem;
} }
} }