jekyll-theme-acg 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +15 -1
- data/_config.yml +13 -8
- data/_includes/article.html +8 -0
- data/_includes/footer.html +2 -4
- data/_includes/header.html +12 -16
- data/_includes/item-category.html +26 -0
- data/_includes/item-date.html +10 -0
- data/_includes/item-pin.html +2 -0
- data/_includes/item-tag.html +29 -0
- data/_includes/posts.html +53 -0
- data/_includes/style.html +16 -74
- data/_layouts/categories.html +21 -0
- data/_layouts/category.html +14 -0
- data/_layouts/default.html +27 -6
- data/_layouts/home.html +14 -85
- data/_layouts/page.html +13 -0
- data/_layouts/post.html +13 -33
- data/_layouts/tag.html +14 -0
- data/_layouts/tags.html +21 -0
- data/_sass/markdown.scss +51 -0
- data/_sass/root.scss +97 -37
- data/_sass/scrollbar.scss +24 -0
- data/assets/404.html +6 -0
- data/assets/about.md +11 -0
- data/assets/categories.html +4 -0
- data/assets/css/style.scss +1 -12
- data/assets/tags.html +4 -0
- metadata +77 -36
- data/_includes/body.html +0 -5
- data/_includes/head.html +0 -26
- data/_includes/main.html +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 815f15ec1cedc8ec4c04fb030651f2e93b9b268356effaf506c0c5f6fd18e856
|
4
|
+
data.tar.gz: 552d93ec31524be5543ec4e6d6bf52b7f27d38c6deae2afda0561642b3fcfe23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d7f2aee02e36f765a034b39b63cf0f6450dd21504bdbac40bbbd5b94a301e8834288e343e9e75ca0cfaf1ffb89c2f788d5dc156b6e2eeef682037758e1c9a6c
|
7
|
+
data.tar.gz: 848ab001e6efcf976357a2ca709cd78b48b8c3aa7d87c93f64756d60fe65ef6185854fd3c117fe27e03c99142d26b97c7e92edc3d026e9a1513afa07155e7f4b
|
data/README.md
CHANGED
@@ -1,6 +1,20 @@
|
|
1
1
|
<h1 style="text-align:center;">Jekyll Theme ACG</h1>
|
2
2
|
|
3
|
-
|
3
|
+
<div style="text-align:center;">
|
4
|
+
<!-- gem version -->
|
5
|
+
<a href="https://rubygems.org/gems/jekyll-theme-acg">
|
6
|
+
<image src="https://img.shields.io/gem/v/jekyll-theme-acg"></image>
|
7
|
+
</a>
|
8
|
+
<!-- gem downloads -->
|
9
|
+
<a href="https://rubygems.org/gems/jekyll-theme-acg">
|
10
|
+
<image src="https://img.shields.io/gem/dt/jekyll-theme-acg"></image>
|
11
|
+
</a>
|
12
|
+
<!-- github stars -->
|
13
|
+
<a href="https://github.com/coderzhaoziwei/jekyll-theme-acg">
|
14
|
+
<image src="https://img.shields.io/github/stars/coderzhaoziwei/jekyll-theme-acg?style=social"></image>
|
15
|
+
</a>
|
16
|
+
</div>
|
17
|
+
|
4
18
|
|
5
19
|
## About
|
6
20
|
|
data/_config.yml
CHANGED
@@ -50,6 +50,7 @@ collections_dir: ""
|
|
50
50
|
collections:
|
51
51
|
posts:
|
52
52
|
output: true
|
53
|
+
permalink: /:collection/:title
|
53
54
|
|
54
55
|
defaults:
|
55
56
|
- scope:
|
@@ -62,14 +63,18 @@ defaults:
|
|
62
63
|
values:
|
63
64
|
layout: post
|
64
65
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
66
|
+
# Configuration for plugin jekyll-archives
|
67
|
+
jekyll-archives:
|
68
|
+
enabled: [categories, tags]
|
69
|
+
layouts:
|
70
|
+
category: category
|
71
|
+
tag: tag
|
72
|
+
permalinks:
|
73
|
+
tag: /tags/:name/
|
74
|
+
category: /categories/:name/
|
75
|
+
# layout: archive
|
76
|
+
|
77
|
+
# Configuration for plugin jekyll-spaceship
|
73
78
|
# @see https://github.com/jeffreytse/jekyll-spaceship#usage
|
74
79
|
jekyll-spaceship:
|
75
80
|
processors:
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<article class="markdown-body my-4 mx-auto p-4 pb-8 max-w-acg rounded-lg shadow-xl text-black bg-{{ color }}-50 bg-opacity-75">
|
2
|
+
<h1>{{ page.title }}</h1>
|
3
|
+
|
4
|
+
<!-- Jekyll TOC -->
|
5
|
+
{% include toc.html html=content %}
|
6
|
+
<!-- Jekyll TOC End -->
|
7
|
+
{{ content }}
|
8
|
+
</article>
|
data/_includes/footer.html
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
-
{%
|
1
|
+
{% assign color = page.color | default: site.color %}
|
2
2
|
|
3
|
-
|
4
|
-
<footer class="w-full p-2 text-xs text-{{ color }}-100 ">
|
3
|
+
<footer class="w-full mt-4 p-2 text-sm text-{{ color }}-100 ">
|
5
4
|
<p class="text-center">
|
6
5
|
Powered by
|
7
6
|
<a class="text-{{ color }}-400" href="https://jekyllrb.com" target="_block">Jekyll</a>
|
@@ -14,4 +13,3 @@
|
|
14
13
|
· All rights reserved.
|
15
14
|
</p>
|
16
15
|
</footer>
|
17
|
-
{%- comment -%}{%- endcomment -%}
|
data/_includes/header.html
CHANGED
@@ -1,31 +1,27 @@
|
|
1
|
-
{%
|
1
|
+
{% assign color = page.color | default: site.color %}
|
2
|
+
|
2
3
|
|
3
|
-
{%- comment -%}{%- endcomment -%}
|
4
4
|
<header class="w-full fixed z-50 select-none bg-{{ color }}-600 bg-opacity-10 bg-blur">
|
5
5
|
<nav class="p-4 font-serif text-xl text-{{ color }}-50 flex justify-between">
|
6
6
|
<a class="hover:text-{{ color }}-400 text-2xl" href="{{ site.url | default: "/" | relative_url }}">{{ site.title }}</a>
|
7
7
|
<div class="hidden md:block space-x-4">
|
8
|
-
<a class="hover:text-{{ color }}-400" href="/
|
9
|
-
<a class="hover:text-{{ color }}-400" href="/
|
10
|
-
<a class="hover:text-{{ color }}-400" href="/about">About</a>
|
8
|
+
<a class="hover:text-{{ color }}-400" href="{{ "/categories" | relative_url }}">Categories</a>
|
9
|
+
<a class="hover:text-{{ color }}-400" href="{{ "/tags" | relative_url }}">Tags</a>
|
10
|
+
<a class="hover:text-{{ color }}-400" href="{{ "/about" | relative_url }}">About</a>
|
11
11
|
</div>
|
12
|
-
<div class="md:hidden">
|
13
|
-
<style>#theme-menu:
|
14
|
-
<button
|
15
|
-
id="theme-menu"
|
16
|
-
class="focus:outline-none focus:text-{{ color }}-400 "
|
17
|
-
>
|
12
|
+
<div id="theme-menu" class="md:hidden">
|
13
|
+
<style>#theme-menu:hover > #theme-menu-dropdown { display: block; }</style>
|
14
|
+
<button class="hover:outline-none hover:text-{{ color }}-400">
|
18
15
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
19
16
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
|
20
17
|
</svg>
|
21
18
|
</button>
|
22
|
-
<div class="hidden origin-top-right absolute right-1
|
23
|
-
<a class="block px-4 py-2 text-sm text-{{ color }}-600 hover:
|
24
|
-
<a class="block px-4 py-2 text-sm text-{{ color }}-600 hover:
|
25
|
-
<a class="block px-4 py-2 text-sm text-{{ color }}-600 hover:
|
19
|
+
<div class="hidden origin-top-right absolute right-1 rounded-md py-1 bg-{{ color }}-100 bg-opacity-50 focus:block focus:outline-none" id="theme-menu-dropdown">
|
20
|
+
<a class="block px-4 py-2 text-sm text-{{ color }}-600 hover:bg-{{ color }}-200" href="{{ "/categories" | relative_url }}">Categories</a>
|
21
|
+
<a class="block px-4 py-2 text-sm text-{{ color }}-600 hover:bg-{{ color }}-200" href="{{ "/tags" | relative_url }}">Tags</a>
|
22
|
+
<a class="block px-4 py-2 text-sm text-{{ color }}-600 hover:bg-{{ color }}-200" href="{{ "/about" | relative_url }}">About</a>
|
26
23
|
</div>
|
27
24
|
</div>
|
28
25
|
|
29
26
|
</nav>
|
30
27
|
</header>
|
31
|
-
{%- comment -%}{%- endcomment -%}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
{% capture workspace %}
|
2
|
+
{% assign color = page.color | default: site.color %}
|
3
|
+
{% assign name = include.name | default: "CATEGORY" %}
|
4
|
+
{% assign count = include.count | default: 0 %}
|
5
|
+
{% assign href = "/categories/" | append: name | relative_url %}
|
6
|
+
{% assign zoom = include.zoom | default: false %}
|
7
|
+
|
8
|
+
{% if zoom %}
|
9
|
+
{% assign textClass = "text-2xl text-color-50 text-opacity-75 " | replace: "color", color %}
|
10
|
+
{% assign svgClass = "h-8 w-8" %}
|
11
|
+
{% assign countClass = "text-color-50 text-opacity-50" | replace: "color", color %}
|
12
|
+
{% else %}
|
13
|
+
{% assign textClass = "text-sm text-color-500 text-opacity-75" | replace: "color", color %}
|
14
|
+
{% assign svgClass = "h-4 w-4" %}
|
15
|
+
{% assign countClass = "text-color-500 text-opacity-50" | replace: "color", color %}
|
16
|
+
{% endif %}
|
17
|
+
|
18
|
+
{% endcapture %}
|
19
|
+
|
20
|
+
<a class="mx-px {{ textClass }} text-opacity-75 flex items-center" href="{{ href }}">
|
21
|
+
<svg xmlns="http://www.w3.org/2000/svg" class="{{ svgClass }}" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z" /></svg>
|
22
|
+
<span class="inline-block p-1">{{ name }}</span>
|
23
|
+
{% if count > 0 %}
|
24
|
+
<span class="inline-block p-1 {{ countClass }}">{{ count }}</span>
|
25
|
+
{% endif %}
|
26
|
+
</a>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
{% capture workspace %}
|
2
|
+
{% assign color = page.color | default: site.color %}
|
3
|
+
{% assign date = include.date | date: "%Y-%m-%d" %}
|
4
|
+
"%Y-%m-%d %H:%M"
|
5
|
+
{% endcapture %}
|
6
|
+
|
7
|
+
<a class="mx-px text-sm text-{{ color }}-500 text-opacity-75 flex items-center" href="{{ href }}">
|
8
|
+
<svg xmlns="http://www.w3.org/2000/svg" class="inline-block h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" /></svg>
|
9
|
+
<span class="inline-block p-1 whitespace-nowrap">{{ date }}</span>
|
10
|
+
</a>
|
@@ -0,0 +1,2 @@
|
|
1
|
+
{% assign color = page.color | default: site.color %}
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" class="absolute -left-2 -top-2 h-6 w-6 text-{{ color }}-600" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13"></svg>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
{% capture workspace %}
|
2
|
+
{% capture color %}{{ page.color | default: site.color }}{% endcapture %}
|
3
|
+
|
4
|
+
{% capture name %}{{ include.name | default: "TAG" }}{% endcapture %}
|
5
|
+
{% assign count = include.count | default: 0 %}
|
6
|
+
|
7
|
+
{% capture href %}{{ "/tags/" | append: name | relative_url }}{% endcapture %}
|
8
|
+
|
9
|
+
{% assign zoom = include.zoom | default: false %}
|
10
|
+
|
11
|
+
{% if zoom %}
|
12
|
+
{% assign textClass = "text-2xl text-color-50 text-opacity-75 " | replace: "color", color %}
|
13
|
+
{% assign svgClass = "h-8 w-8" %}
|
14
|
+
{% assign countClass = "text-color-50 text-opacity-50" | replace: "color", color %}
|
15
|
+
{% else %}
|
16
|
+
{% assign textClass = "text-sm text-color-500 text-opacity-75" | replace: "color", color %}
|
17
|
+
{% assign svgClass = "h-4 w-4" %}
|
18
|
+
{% assign countClass = "text-color-500 text-opacity-50" | replace: "color", color %}
|
19
|
+
{% endif %}
|
20
|
+
|
21
|
+
{% endcapture %}
|
22
|
+
|
23
|
+
<a class="mx-px {{ textClass }} flex items-center" href="{{ href }}">
|
24
|
+
<svg xmlns="http://www.w3.org/2000/svg" class="inline-block {{ svgClass }}" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z" /></svg>
|
25
|
+
<span class="inline-block p-1">{{ name }}</span>
|
26
|
+
{% if count > 0 %}
|
27
|
+
<span class="inline-block p-1 {{ countClass }}">{{ count }}</span>
|
28
|
+
{% endif %}
|
29
|
+
</a>
|
@@ -0,0 +1,53 @@
|
|
1
|
+
{% capture workspace %}
|
2
|
+
{% assign posts1 = "" | split: "" %}
|
3
|
+
{% assign posts2 = "" | split: "" %}
|
4
|
+
|
5
|
+
{% for post in include.posts %}
|
6
|
+
{% if post.pin %}
|
7
|
+
{% assign posts1 = posts1 | push: post %}
|
8
|
+
{% else %}
|
9
|
+
{% assign posts2 = posts2 | push: post %}
|
10
|
+
{% endif %}
|
11
|
+
{% endfor %}
|
12
|
+
|
13
|
+
{% assign posts = posts1 | concat: posts2 %}
|
14
|
+
|
15
|
+
{% if page.layout == "home" %}
|
16
|
+
{% assign offset = paginator.page | minus: 1 | times: paginator.per_page %}
|
17
|
+
{% assign count = paginator.posts | size | minus: 1 %}
|
18
|
+
{% assign minIndex = offset %}
|
19
|
+
{% assign maxIndex = offset | plus: count %}
|
20
|
+
{% else %}
|
21
|
+
{% assign minIndex = 0 %}
|
22
|
+
{% assign maxIndex = posts.size | minus: 1 %}
|
23
|
+
{% endif %}
|
24
|
+
|
25
|
+
{% endcapture %}
|
26
|
+
|
27
|
+
{% for index in (minIndex..maxIndex) %}
|
28
|
+
{% capture workspace %}
|
29
|
+
{% assign post = posts[index] %}
|
30
|
+
{% assign pin = post.pin | default: false %}
|
31
|
+
{% assign href = post.id | relative_url %}
|
32
|
+
{% assign title = post.title | default: "NO TITLE" | escape %}
|
33
|
+
{% assign description = post.description | default: post.excerpt | default: site.description | strip_html %}
|
34
|
+
{% assign date = post.date %}
|
35
|
+
{% assign tags = post.tags | default: nil %}
|
36
|
+
{% assign categories = post.categories | default: nil %}
|
37
|
+
{% endcapture %}
|
38
|
+
|
39
|
+
<div class="relative p-3 pb-1 rounded-lg flex flex-col justify-between bg-{{ color }}-50 bg-opacity-75 text-black">
|
40
|
+
{% if post.pin %}{% include item-pin.html %}{% endif %}
|
41
|
+
<a class="block text-3xl font-serif font-medium" href="{{ href }}">{{ title }}</a>
|
42
|
+
<span class="block p-1 text-sm font-extralight">{{ description }}</span>
|
43
|
+
|
44
|
+
<div class="flex flex-wrap select-none">
|
45
|
+
<div class="flex-grow">{% include item-date.html date=date %}</div>
|
46
|
+
<div class="flex flex-wrap">
|
47
|
+
{% for category in categories %}{% include item-category.html name=category %}{% endfor %}
|
48
|
+
{% for tag in tags %}{% include item-tag.html name=tag %}{% endfor %}
|
49
|
+
</div>
|
50
|
+
</div>
|
51
|
+
</div>
|
52
|
+
|
53
|
+
{% endfor %}
|
data/_includes/style.html
CHANGED
@@ -1,80 +1,22 @@
|
|
1
|
-
{%
|
2
|
-
{% capture color %}{{ page.color | default: site.color }}{% endcapture %}
|
1
|
+
{% assign color = page.color | default: site.color %}
|
3
2
|
{% capture output %}
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
}
|
8
|
-
|
9
|
-
|
10
|
-
}
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
var(--{{ color }}-400) 32px,
|
19
|
-
var(--{{ color }}-400) 36px
|
20
|
-
);
|
21
|
-
}
|
22
|
-
::-webkit-scrollbar-thumb:vertical {
|
23
|
-
height: 4px;
|
24
|
-
}
|
25
|
-
::-webkit-scrollbar-thumb:horizontal {
|
26
|
-
width: 4px;
|
27
|
-
}
|
28
|
-
|
29
|
-
.markdown-body a {
|
30
|
-
color: var(--{{ color }}-600);
|
31
|
-
font-weight: 500;
|
32
|
-
}
|
33
|
-
.markdown-body a.reversefootnote {
|
34
|
-
font-family: monospace;
|
35
|
-
}
|
36
|
-
.markdown-body h1, .markdown-body h2 {
|
37
|
-
border-bottom-color: var(--{{ color }}-600);
|
38
|
-
}
|
39
|
-
.markdown-body hr {
|
40
|
-
background-color: var(--{{ color }}-600);
|
41
|
-
}
|
42
|
-
.markdown-body blockquote {
|
43
|
-
color: var(--{{ color }}-500);
|
44
|
-
border-left-color: var(--{{ color }}-600);
|
45
|
-
}
|
46
|
-
.markdown-body code:not(.hljs) {
|
47
|
-
color: var(--{{ color }}-600);
|
48
|
-
}
|
49
|
-
|
50
|
-
.markdown-body .task-list-item {
|
51
|
-
display: flex;
|
52
|
-
align-items: center;
|
53
|
-
}
|
54
|
-
.markdown-body .task-list-item input[type="checkbox"] {
|
55
|
-
appearance: none;
|
56
|
-
}
|
57
|
-
.markdown-body .task-list-item input[type="checkbox"]::before{
|
58
|
-
content: "";
|
59
|
-
display: block;
|
60
|
-
width: 1em;
|
61
|
-
height: 1em;
|
62
|
-
line-height: 1;
|
63
|
-
margin-right: 0.5em;
|
64
|
-
text-align: center;
|
65
|
-
border-radius: 4px;
|
66
|
-
color: white;
|
67
|
-
background-color: var(--{{ color }}-600);
|
68
|
-
}
|
69
|
-
.markdown-body .task-list-item input[type="checkbox"][checked]::before{
|
70
|
-
content: "\2713";
|
71
|
-
}
|
72
|
-
|
73
|
-
.markdown-body .footnotes {
|
74
|
-
padding-top: 2em;
|
3
|
+
:root {
|
4
|
+
--theme-50: var(--{{ color }}-50);
|
5
|
+
--theme-100: var(--{{ color }}-100);
|
6
|
+
--theme-200: var(--{{ color }}-200);
|
7
|
+
--theme-300: var(--{{ color }}-300);
|
8
|
+
--theme-400: var(--{{ color }}-400);
|
9
|
+
--theme-500: var(--{{ color }}-500);
|
10
|
+
--theme-600: var(--{{ color }}-600);
|
11
|
+
--theme-700: var(--{{ color }}-700);
|
12
|
+
--theme-800: var(--{{ color }}-800);
|
13
|
+
--theme-900: var(--{{ color }}-900);
|
14
|
+
}
|
15
|
+
.bg-image {
|
16
|
+
background-image: url("{{ page.background | default: site.background | relative_url }}");
|
75
17
|
}
|
76
18
|
{% endcapture %}
|
77
19
|
|
78
20
|
{%- comment -%}{%- endcomment -%}
|
79
|
-
<{{ style }}>{{ output }}</{{ style }}>
|
21
|
+
<{{ "style" }}>{{ output }}</{{ "style" }}>
|
80
22
|
{%- comment -%}{%- endcomment -%}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
---
|
4
|
+
{% assign color = page.color | default: site.color %}
|
5
|
+
|
6
|
+
{% assign categoryList = "" | split: "" %}
|
7
|
+
{% for item in site.categories %}
|
8
|
+
{% assign categoryName = item[0] %}
|
9
|
+
{% assign categoryList = categoryList | push: categoryName %}
|
10
|
+
{% endfor %}
|
11
|
+
{% assign categoryList = categoryList | sort %}
|
12
|
+
|
13
|
+
<div class="min-h-screen py-16 flex flex-wrap justify-center items-center content-center select-none">
|
14
|
+
<div class="w-full py-8 font-serif text-4xl text-{{ color }}-50 text-center">{{ site.CATEGORIES | default: "CATEGORIES" }}</div>
|
15
|
+
{% for categoryName in categoryList %}
|
16
|
+
{% assign categoryCount = site.categories[categoryName].size %}
|
17
|
+
<div class="m-1 px-2 bg-{{ color }}-50 bg-opacity-75 rounded">
|
18
|
+
{% include item-category.html name=categoryName count=categoryCount %}
|
19
|
+
</div>
|
20
|
+
{% endfor %}
|
21
|
+
</div>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
---
|
4
|
+
{% assign color = page.color | default: site.color %}
|
5
|
+
{% assign title = page.title | capitalize %}
|
6
|
+
|
7
|
+
<div class="w-acg min-h-screen">
|
8
|
+
<div class="w-full mt-16 p-16 flex justify-center">
|
9
|
+
{% include item-category.html name=page.title zoom=true %}
|
10
|
+
</div>
|
11
|
+
<div class="w-full m-auto p-4 flex flex-col space-y-4">
|
12
|
+
{% include posts.html posts=page.posts %}
|
13
|
+
</div>
|
14
|
+
</div>
|
data/_layouts/default.html
CHANGED
@@ -1,8 +1,29 @@
|
|
1
|
-
{% capture lang %}{{ page.lang | default: site.lang | default: "en-US" }}{% endcapture %}
|
2
|
-
{%- comment -%}{%- endcomment -%}
|
3
1
|
<!DOCTYPE html>
|
4
|
-
<html lang="{{ lang }}" class="min-h-screen bg-image bg-cover bg-center bg-fixed">
|
5
|
-
|
6
|
-
|
2
|
+
<html lang="{{ page.lang | default: site.lang | default: "en-US" }}" class="min-h-screen bg-image bg-cover bg-center bg-fixed">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
|
7
|
+
{% seo %}<!-- Begin Jekyll Feed -->
|
8
|
+
{% feed_meta %}
|
9
|
+
<!-- End Jekyll Feed -->
|
10
|
+
|
11
|
+
<!-- Tailwind Style -->
|
12
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/tailwindcss@2/dist/tailwind.min.css">
|
13
|
+
<!-- Primer Markdown Style -->
|
14
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/primer-markdown@4.0.0/build/build.css">
|
15
|
+
<!-- HighlightJS -->
|
16
|
+
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.0.1/build/highlight.min.js"></script>
|
17
|
+
<script>hljs.highlightAll();</script>
|
18
|
+
<!-- HighlightJS Theme VS2015 Style -->
|
19
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/highlight.js@11.0.1/styles/vs2015.css">
|
20
|
+
<!-- Theme Style -->
|
21
|
+
<link rel="stylesheet" href="{{ "assets/css/style.css" | relative_url }}">
|
22
|
+
{% include style.html %}
|
23
|
+
</head>
|
24
|
+
<body class="flex flex-col items-center bg-black bg-opacity-50">
|
25
|
+
{% include header.html %}
|
26
|
+
{{ content }}
|
27
|
+
{% include footer.html %}
|
28
|
+
</body>
|
7
29
|
</html>
|
8
|
-
{%- comment -%}{%- endcomment -%}
|
data/_layouts/home.html
CHANGED
@@ -1,11 +1,16 @@
|
|
1
1
|
---
|
2
2
|
layout: default
|
3
3
|
---
|
4
|
-
{%
|
4
|
+
{% assign color = page.color | default: site.color %}
|
5
|
+
{% assign title = page.title | default: site.title %}
|
6
|
+
{% assign description = page.description | default: site.description %}
|
5
7
|
|
6
|
-
<div class="w-full
|
8
|
+
<div class="w-full h-screen flex flex-col justify-center items-center select-none text-{{ color }}-50">
|
9
|
+
<div class="font-serif text-4xl w-3/4 text-center py-4">{{ title }}</div>
|
10
|
+
<div class="font-sans text-base w-2/3 text-center">{{ description }}</div>
|
11
|
+
</div>
|
7
12
|
|
8
|
-
{
|
13
|
+
{% comment %}
|
9
14
|
paginator.page The number of the current page
|
10
15
|
paginator.per_page Number of posts per page
|
11
16
|
paginator.posts Posts available for the current page
|
@@ -15,91 +20,15 @@ paginator.previous_page The number of the previous page, or nil if no prev
|
|
15
20
|
paginator.previous_page_path The path to the previous page, or nil if no previous page exists
|
16
21
|
paginator.next_page The number of the next page, or nil if no subsequent page exists
|
17
22
|
paginator.next_page_path The path to the next page, or nil if no subsequent page exists
|
18
|
-
{
|
19
|
-
|
20
|
-
{%
|
21
|
-
{% assign posts1 = "" | split: "" %}
|
22
|
-
{% assign posts2 = "" | split: "" %}
|
23
|
-
|
24
|
-
{% for post in site.posts %}
|
25
|
-
{% if post.pin %}
|
26
|
-
{% assign posts1 = posts1 | push: post %}
|
27
|
-
{% else %}
|
28
|
-
{% assign posts2 = posts2 | push: post %}
|
29
|
-
{% endif %}
|
30
|
-
{% endfor %}
|
31
|
-
|
32
|
-
{% assign posts = posts1 | concat: posts2 %}
|
33
|
-
|
34
|
-
{% assign offset = paginator.page | minus: 1 | times: paginator.per_page %}
|
35
|
-
{% assign count = paginator.posts | size | minus: 1 %}
|
36
|
-
{% assign minIndex = offset %}
|
37
|
-
{% assign maxIndex = offset | plus: count %}
|
38
|
-
{% endcapture %}
|
39
|
-
|
40
|
-
{%- for index in (minIndex..maxIndex) -%}
|
41
|
-
|
42
|
-
{% capture workspace %}
|
43
|
-
{% assign index = offset | plus: i %}
|
44
|
-
{% assign post = posts[index] %}
|
45
|
-
|
46
|
-
{% capture url %}{{ post.id | relative_url }}{% endcapture %}
|
47
|
-
{% capture title %}{{ post.title | default: "NO TITLE" | escape }}{% endcapture %}
|
48
|
-
{% capture date %}{{ post.date | date: "%Y-%m-%d" }}{% endcapture %}
|
49
|
-
{% capture description %}{{ post.description | default: post.excerpt | default: site.description | strip_html }}{% endcapture %}
|
50
|
-
|
51
|
-
{% assign tags = post.tags | default: nil %}
|
52
|
-
{% assign categories = post.categories | default: nil %}
|
53
|
-
{% assign pin = post.pin | default: false %}
|
54
|
-
{% endcapture %}
|
55
|
-
<!-- PostItem -->
|
56
|
-
<div class="relative p-3 pb-1 rounded-lg flex flex-col justify-between bg-{{ color }}-50 bg-opacity-75 text-black">
|
57
|
-
<!-- Pin -->
|
58
|
-
{% if pin %}
|
59
|
-
<svg xmlns="http://www.w3.org/2000/svg" class="absolute -left-2 -top-2 h-6 w-6 text-{{ color }}-600" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
60
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13" />
|
61
|
-
</svg>
|
62
|
-
{% endif %}
|
63
|
-
|
64
|
-
<a class="block text-3xl font-serif font-medium" href="{{ url }}">{{ title }}</a>
|
65
|
-
|
66
|
-
<span class="block p-1 text-sm font-extralight">{{ description }}</span>
|
67
|
-
|
68
|
-
<div class="flex flex-wrap select-none">
|
69
|
-
<!-- Date -->
|
70
|
-
<div class="flex-grow mx-px text-sm text-{{ color }}-500 text-opacity-75 flex items-center self-end">
|
71
|
-
<svg xmlns="http://www.w3.org/2000/svg" class="inline-block h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" /></svg>
|
72
|
-
<span class="inline-block p-1 whitespace-nowrap">{{ date }}</span>
|
73
|
-
</div>
|
74
|
-
|
75
|
-
<div class="flex flex-wrap">
|
76
|
-
<!-- Categories -->
|
77
|
-
{% for category in categories %}
|
78
|
-
<!-- Category -->
|
79
|
-
<a class="mx-px text-sm text-{{ color }}-500 text-opacity-75 flex items-center" href="">
|
80
|
-
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z" /></svg>
|
81
|
-
<span class="inline-block p-1">{{ category }}</span>
|
82
|
-
</a>
|
83
|
-
{% endfor %}
|
84
|
-
<!-- Tags -->
|
85
|
-
{%- for tag in tags -%}
|
86
|
-
<!-- Tag -->
|
87
|
-
<a class="mx-px text-sm text-{{ color }}-500 text-opacity-75 flex items-center" href="">
|
88
|
-
<svg xmlns="http://www.w3.org/2000/svg" class="inline-block h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z" /></svg>
|
89
|
-
<span class="inline-block p-1">{{ tag }}</span>
|
90
|
-
</a>
|
91
|
-
{%- endfor -%}
|
92
|
-
|
93
|
-
</div>
|
94
|
-
</div>
|
95
|
-
</div>
|
96
|
-
{%- endfor -%}
|
23
|
+
{% endcomment %}
|
24
|
+
<div class="w-full max-w-acg m-auto p-4 grid gap-6 grid-cols-1">
|
25
|
+
{% include posts.html posts=site.posts%}
|
97
26
|
|
98
27
|
|
99
28
|
<!-- Paginator -->
|
100
29
|
<div class="flex justify-between items-center">
|
101
30
|
<!-- Prev -->
|
102
|
-
<a href="{{ paginator.previous_page_path }}" class="flex justify-center items-center m-2 w-8 h-8 rounded-full bg-{{ color }}-50 bg-opacity-75 hover:bg-{{ color }}-100 hover:bg-opacity-75 hover:text-{{ color }}-400">
|
31
|
+
<a href="{{ paginator.previous_page_path | relative_url }}" class="flex justify-center items-center m-2 w-8 h-8 rounded-full bg-{{ color }}-50 bg-opacity-75 hover:bg-{{ color }}-100 hover:bg-opacity-75 hover:text-{{ color }}-400">
|
103
32
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 flex-shrink-0 text-{{ color }}-400" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 15l-3-3m0 0l3-3m-3 3h8M3 12a9 9 0 1118 0 9 9 0 01-18 0z" /></svg>
|
104
33
|
</a>
|
105
34
|
<!-- Pages -->
|
@@ -110,14 +39,14 @@ paginator.next_page_path The path to the next page, or nil if no subsequent
|
|
110
39
|
<a class="flex justify-center items-center w-8 h-8 m-px rounded-full text-sm font-mono bg-{{ color }}-50 bg-opacity-75 text-black text-opacity-75 border border-transparent hover:bg-{{ color }}-100 hover:bg-opacity-75 hover:text-{{ color }}-400 {%- if pageCount == paginator.page %} text-{{ color }}-400 select-none{% endif -%}"
|
111
40
|
|
112
41
|
{% if pageCount != paginator.page %}
|
113
|
-
{% if pageCount == 1 %}href="/"{% else %}href="{{ pagePath }}"{% endif %}
|
42
|
+
{% if pageCount == 1 %}href={{ "/" | relative_url }}{% else %}href="{{ pagePath | relative_url }}"{% endif %}
|
114
43
|
{% endif %}
|
115
44
|
|
116
45
|
><span class="block">{{ pageCount }}</span></a>
|
117
46
|
{%- endfor -%}
|
118
47
|
</div>
|
119
48
|
<!-- Next -->
|
120
|
-
<a href="{{ paginator.next_page_path }}" class="flex justify-center items-center m-2 w-8 h-8 rounded-full bg-{{ color }}-50 bg-opacity-75 hover:bg-{{ color }}-100 hover:bg-opacity-75 hover:text-{{ color }}-400">
|
49
|
+
<a href="{{ paginator.next_page_path | relative_url }}" class="flex justify-center items-center m-2 w-8 h-8 rounded-full bg-{{ color }}-50 bg-opacity-75 hover:bg-{{ color }}-100 hover:bg-opacity-75 hover:text-{{ color }}-400">
|
121
50
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 flex-shrink-0 text-{{ color }}-400" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 9l3 3m0 0l-3 3m3-3H8m13 0a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
|
122
51
|
</a>
|
123
52
|
</div>
|