web/_includes/css-selector.html
2020-05-30 17:48:16 +08:00

54 lines
1.9 KiB
HTML

<!--
CSS selector for site.
Chirpy v2.3
https://github.com/cotes2020/jekyll-theme-chirpy
© 2020 Cotes Chung
MIT Licensed
-->
{% if page.layout == 'home' %}
<link rel="preload" href="{{ '/assets/css/home.css' | relative_url }}" as="style">
<link rel="stylesheet" href="{{ '/assets/css/home.css' | relative_url }}">
{% elsif page.layout == 'page' %}
{% if page.title == 'Categories' %}
<link rel="preload" href="{{ '/assets/css/categories.css' | relative_url }}" as="style">
<link rel="stylesheet" href="{{ '/assets/css/categories.css' | relative_url }}">
{% elsif page.title == 'Tags' %}
<link rel="preload" href="{{ '/assets/css/tags.css' | relative_url }}" as="style">
<link rel="stylesheet" href="{{ '/assets/css/tags.css' | relative_url }}">
{% elsif page.title == 'Archives' %}
<link rel="preload" href="{{ '/assets/css/archives.css' | relative_url }}" as="style">
<link rel="stylesheet" href="{{ '/assets/css/archives.css' | relative_url }}">
{% else %}
<link rel="preload" href="{{ '/assets/css/page.css' | relative_url }}" as="style">
<link rel="stylesheet" href="{{ '/assets/css/page.css' | relative_url }}">
{% endif %}
{% elsif page.layout == 'category' or page.layout == 'tag' %}
<link rel="preload" href="{{ '/assets/css/category-tag.css' | relative_url }}" as="style">
<link rel="stylesheet" href="{{ '/assets/css/category-tag.css' | relative_url }}">
{% elsif page.layout == 'post' %}
<link rel="preload" as="style" href="{{ '/assets/css/post.css' | relative_url }}">
<link rel="stylesheet" href="{{ '/assets/css/post.css' | relative_url }}">
{% if site.toc and page.toc %}
<link rel="preload" as="style" href="{{ '/assets/css/lib/bootstrap-toc.min.css' | relative_url }}">
<link rel="stylesheet" href="{{ '/assets/css/lib/bootstrap-toc.min.css' | relative_url }}" />
{% endif %}
{% endif %}