--- layout: compress --- {% capture lang %}{{ page.lang | default: site.lang | default: "en-US" }}{% endcapture %} {% comment %} color {% endcomment %} {% capture color %}{{ page.color | default: site.color | downcase }}{% endcapture %} {% assign colors = "red, blue, pink, green, yellow, purple, gray, default" | split: ", " %} {% for item in colors %} {% if item == color %}{% break %}{% endif %} {% if item == "default" %}{% assign color = "red" %}{% endif %} {% endfor %} {% comment %} background {% endcomment %} {% capture background %}{{ page.background | default: site.acg.background | default: "https://cdn.jsdelivr.net/gh/coderzhaoziwei/jekyll-theme-acg/assets/images/pixiv86925095.png" | relative_url }}{% endcapture %} {% assign title = page.title %} {% assign description = page.description %} {% assign content = content | strip %} {% if page.type == "home" %} {% capture title %}{{ site.title }}{% endcapture %} {% capture description %}{{ site.description }}{% endcapture %} {% elsif page.permalink == "/categories.html" %} {% capture title %}{{ site.acg.categories.label }}{% endcapture %} {% capture description %}{{ site.acg.categories.description }}{% endcapture %} {% elsif page.permalink == "/tags.html" %} {% capture title %}{{ site.acg.tags.label }}{% endcapture %} {% capture description %}{{ site.acg.tags.description }}{% endcapture %} {% elsif page.permalink == "/about.html" %} {% capture title %}{{ site.acg.about.label }}{% endcapture %} {% capture description %}{{ site.acg.about.description }}{% endcapture %} {% elsif page.permalink == "/friends.html" %} {% capture title %}{{ site.acg.friends.label }}{% endcapture %} {% capture description %}{{ site.acg.friends.description }}{% endcapture %} {% elsif page.permalink == "/404.html" %} {% capture title %}{{ site.acg.error.label }}{% endcapture %} {% capture description %}{{ site.acg.error.description }}{% endcapture %} {% endif %} {% assign list = "" | split: "" %} {% if page.permalink == "/categories.html" %} {% for item in site.categories %}{% assign list = list | push: item[0] %}{% endfor %} {% elsif page.permalink == "/tags.html" %} {% for item in site.tags %}{% assign list = list | push: item[0] %}{% endfor %} {% endif %} {% assign list = list | sort %} {% include head.html %} {% include header.html %}
{% if page.type == "category" %} {% include chip.html type="category" text=title width=8 larger=true %} {% elsif page.type == "tag" %} {% include chip.html type="tag" text=title width=8 larger=true %} {% else %} {{ title }} {% endif %}
{{ description }}
{% if page.permalink == "/categories.html" %} {% for category in list %}{% assign count = site.categories[category].size %}
{% include chip.html type="category" text=category count=count width=4 %}
{% endfor %} {% elsif page.permalink == "/tags.html" %} {% for tag in list %}{% assign count = site.tags[tag].size %}
{% include chip.html type="tag" text=tag count=count width=4 %}
{% endfor %} {% endif %}
{% if page.type == "post" %}
{% include chip.html type="date" text=page.date width=4 %}
{% for category in page.categories %} {% include chip.html type="category" text=category width=4 %} {% endfor %} {% for tag in page.tags %} {% include chip.html type="tag" text=tag width=4 %} {% endfor %}

{{ title }}

{% include toc.html html=content %} {{ content }}
{% include flip.html %} {% elsif content != empty %}
{{ content }}
{% endif %} {% if page.type == "home" %}
{% include posts.html posts=site.posts %}
{% include paginator.html %}
{% elsif page.posts %}
{% include posts.html posts=page.posts %}
{% endif %}
{% include footer.html %}