mirror of
https://github.com/welpo/tabi.git
synced 2026-03-12 02:57:19 +01:00
Merge 742d9ea1fc into 3896c1597c
This commit is contained in:
commit
fc7bd13540
15 changed files with 180 additions and 2 deletions
|
|
@ -9,6 +9,8 @@ content="default-src 'self'
|
|||
{%- set isso_enabled = config.extra.isso.enabled_for_all_posts or page.extra.isso -%}
|
||||
{%- if page -%}
|
||||
{%- set iine_enabled = macros_settings::evaluate_setting_priority(setting="iine", page=page, default_global_value=false) == "true" -%}
|
||||
{%- elif section and section.extra.show_micro | default(value=false) and config.extra.micro_iine | default(value=false) -%}
|
||||
{%- set iine_enabled = true -%}
|
||||
{%- endif -%}
|
||||
{%- if page -%}
|
||||
{%- set mermaid_enabled = macros_settings::evaluate_setting_priority(setting="mermaid", page=page, default_global_value=false) == "true" -%}
|
||||
|
|
|
|||
|
|
@ -86,6 +86,6 @@
|
|||
{%- endif -%}
|
||||
|
||||
{# Add iine.js for the like button #}
|
||||
{%- if page and macros_settings::evaluate_setting_priority(setting="iine", page=page_s, section=section_s, default_global_value=false) == "true" -%}
|
||||
{%- if (page and macros_settings::evaluate_setting_priority(setting="iine", page=page_s, section=section_s, default_global_value=false) == "true") or (section and section.extra.show_micro | default(value=false) and config.extra.micro_iine | default(value=false)) -%}
|
||||
<script defer src="https://cdn.jsdelivr.net/gh/welpo/iine@main/iine.mini.js"></script>
|
||||
{%- endif -%}
|
||||
|
|
|
|||
38
templates/partials/main_page_micro_list.html
Normal file
38
templates/partials/main_page_micro_list.html
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{% if section.extra.show_micro | default(value=false) %}
|
||||
{% if section.extra.micro_path %}
|
||||
{%- set micro_section = get_section(path=section.extra.micro_path) -%}
|
||||
{%- if micro_section -%}
|
||||
{%- set show_pages = micro_section.pages -%}
|
||||
{%- set max_micro = section.extra.max_micro | default(value=5) -%}
|
||||
{%- set section_name = section.extra.micro_section_name | default(value="Latest Thoughts") -%}
|
||||
<div id="micro-posts">
|
||||
<h1 class="title-container section-title bottom-divider">{{ section_name }}</h1>
|
||||
<div class="micro-list">
|
||||
{% for post in show_pages | slice(end=max_micro) %}
|
||||
<div class="micro-entry">
|
||||
<div class="micro-meta">
|
||||
<a class="micro-date no-hover-padding" href="{{ post.permalink | safe }}">
|
||||
<time datetime="{{ post.date | date(format='%Y-%m-%dT%H:%M:%S') }}">
|
||||
{{ macros_format_date::format_date(date=post.date, short=true, language_strings=language_strings) }} · {{ post.date | date(format='%H:%M') }}
|
||||
</time>
|
||||
</a>
|
||||
{%- if config.extra.micro_iine | default(value=false) -%}
|
||||
{%- set slug = post.path -%}
|
||||
{%- include "partials/iine_button.html" -%}
|
||||
{%- endif -%}
|
||||
</div>
|
||||
<div class="micro-text">
|
||||
{{ post.content | safe }}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{%- if show_pages | length > max_micro -%}
|
||||
<div class="all-posts">
|
||||
<a href="{{ get_url(path=micro_section.path, lang=lang) }}/">All {{ section_name | lower }} <span class="arrow">⟶</span></a>
|
||||
</div>
|
||||
{%- endif -%}
|
||||
</div>
|
||||
{%- endif -%}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
|
@ -52,6 +52,9 @@
|
|||
{%- include "partials/main_page_posts_list.html" -%}
|
||||
{%- include "partials/main_page_projects_list.html" -%}
|
||||
{%- endif -%}
|
||||
|
||||
{# Add micro posts section #}
|
||||
{%- include "partials/main_page_micro_list.html" -%}
|
||||
</main>
|
||||
|
||||
{%- include "partials/extra_features.html" -%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue