page.liquid

Baklib

发布于:2024-07-07

页面模板,位于 templates/page.liquid


<!-- Article content -->
<main>
   <div>
       <header class="mb-6">
           <h1 class="mb-4 text-xl font-bold lg:text-4xl text-slate-800 dark:text-slate-200">
               {{ page.settings.title }}</h1>
           <hr class=" bg-slate-100" />
       </header>
       <div class="space-y-6 text-base text-slate-600 dark:text-slate-400 ProseMirror">
           {{ page.settings.content }}
       </div>
   </div>
  {% if page.settings.tags.size > 0 %}
    <div class="flex items-center py-4 mt-4 space-x-2 text-xs font-light md:mt-8 shrink-0 ">
      <p>{{ "generic.tags" | t }}</p>
    {% for tag in page.settings.tags %}
      <a href="{{ tag.path }}" style="background-color: {{ tag.color }}">
        {{ tag.name }}
      </a>
    {% endfor %}
    </div>
  {% endif %}
  <!-- Feedback -->
  {% render "feedback_form", page: page %}
</main>

{% schema %}
{
  "name": "页面",
  "description": "页面",
  "thumb_url": "images/theme/page.png",
  "sub_page_templates": ["page"],
  "settings": [
    {
      "id": "title",
      "type": "text",
      "label": "标题"
    },
    {
      "id": "content",
      "type": "richtext",
      "label": "内容"
    },
    {
      "id": "tags",
      "type": "tag_picker",
      "multiple": true,
      "label": "标签"
    }
  ]
}
{% endschema %}

提交反馈