{% extends "base.html" %} {% block title %}{{ site_title }}{% endblock %} {% block content %} {% if hero_url %} {# hero 用 而不是内联 style:这样 CSP 的 style-src 可以是 'self', 不需要 'unsafe-inline'。图片本身由管理员自己托管。 #} {% endif %} {% if intro or social_items %} {% if intro %}{{ intro }}{% endif %} {% if social_items %} {{ t('social_prefix') }} {%- for item in social_items -%} {% if not loop.first %}{{ t('social_sep') if not loop.last else t('social_join') }}{% endif %} {%- if item.icon %} {%- else %}{{ item.name or 'link' }}{% endif -%} {%- endfor -%} {{ t('social_end') }} {% endif %} {% endif %} {{ t('home_writing') }} ({{ total_articles }}) {% if articles %} {% for article in articles %} {{ article.date_display }} {{ article.title }} {% endfor %} {% else %} {{ t('home_no_articles') }} {% endif %} {% if total_pages > 1 %} {% if page > 1 %} {% endif %} {{ t('home_page_of', page=page, total=total_pages) }} {% if page < total_pages %} {% endif %} {% endif %} {% if project_items %} {{ t('home_projects') }} {% for item in project_items %} {% if item.name and item.url %} {{ item.name }} {% elif item.name %} {{ item.name }} {% else %} {{ item.url }} {% endif %} {% if item.description %}{{ item.description }}{% endif %} {% endfor %} {% endif %} {% endblock %}
{{ intro }}
{{ t('social_prefix') }} {%- for item in social_items -%} {% if not loop.first %}{{ t('social_sep') if not loop.last else t('social_join') }}{% endif %} {%- if item.icon %} {%- else %}{{ item.name or 'link' }}{% endif -%} {%- endfor -%} {{ t('social_end') }}
{{ t('home_no_articles') }}