jekyll-theme-acg 1.0.1 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +53 -1
  3. data/_config.yml +25 -17
  4. data/{source/_includes → _includes}/README.md +0 -0
  5. data/_includes/article.html +8 -0
  6. data/{source/_includes → _includes}/footer.html +2 -4
  7. data/_includes/header.html +27 -0
  8. data/_includes/item-category.html +26 -0
  9. data/_includes/item-date.html +10 -0
  10. data/_includes/item-pin.html +2 -0
  11. data/_includes/item-tag.html +29 -0
  12. data/_includes/posts.html +53 -0
  13. data/_includes/style.html +22 -0
  14. data/{source/_includes → _includes}/toc.html +0 -0
  15. data/_layouts/categories.html +21 -0
  16. data/_layouts/category.html +14 -0
  17. data/{source/_includes/head.html → _layouts/default.html} +12 -9
  18. data/_layouts/home.html +54 -0
  19. data/_layouts/page.html +13 -0
  20. data/_layouts/post.html +24 -0
  21. data/_layouts/tag.html +14 -0
  22. data/_layouts/tags.html +21 -0
  23. data/_sass/markdown.scss +86 -0
  24. data/_sass/root.scss +99 -0
  25. data/_sass/scrollbar.scss +24 -0
  26. data/assets/404.html +6 -0
  27. data/assets/about.md +11 -0
  28. data/assets/categories.html +4 -0
  29. data/assets/css/style.scss +5 -0
  30. data/assets/tags.html +4 -0
  31. data/index.html +3 -0
  32. metadata +73 -31
  33. data/source/_includes/body.html +0 -5
  34. data/source/_includes/header.html +0 -31
  35. data/source/_includes/main.html +0 -12
  36. data/source/_includes/style.html +0 -80
  37. data/source/_layouts/default.html +0 -8
  38. data/source/_layouts/home.html +0 -125
  39. data/source/_layouts/post.html +0 -44
  40. data/source/_sass/markdown.scss +0 -35
  41. data/source/_sass/root.scss +0 -39
  42. data/source/assets/css/style.scss +0 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f260e8d8eac56fb62b9dd43190c04b017834bf41827430f55a83939ef1f22884
4
- data.tar.gz: 9b0e7e03d2cb17811982dbc2b89fd4f52985bf6769dd8512b2f1f72a3d8cda4f
3
+ metadata.gz: 1abc3a8fdf5221295dc69934c9fa2723bd357a6e16e14e0f66e6d0b3a29edfea
4
+ data.tar.gz: 861d93df0ba98250a1a095431dd5239603247a48791c7f6ab39d8613a6a67fa0
5
5
  SHA512:
6
- metadata.gz: 58036eb578213ba822a9f25a0139a0b2bb87db905261af873924e874c760e7a8609b57cc587833f2f2d2b513dc87062bf91d9985337e5e3724f97e67a70a4097
7
- data.tar.gz: edfe5f5e24d8d42a04ad14a3c5097e53925092fc1fd8df6008330ab9f75b5a369990a0a1e474d3b554f3c810d8c7e2e7489106a33894042a074a0e260d588ac7
6
+ metadata.gz: 791995911806b2a7201106587cb1f0d87401586a31dda36b9cda152f7d38e526a90b8b7cecc3225862c9e80cb7c1a905d9969dde6813bf441ebac45537211a33
7
+ data.tar.gz: 34b1402b4bd267a8a2d42cc09088b03bda8feb8b7699c6b2e2616998b2c309da0434d7c32a5e0aa2edf5f36df24442c96336e6b4eb8a34bf9e06350f838023ff
data/README.md CHANGED
@@ -1,7 +1,59 @@
1
- # jekyll-theme-acg
1
+ # Jekyll Theme ACG
2
+
3
+ ![](https://img.shields.io/gem/v/jekyll-theme-acg)
4
+ ![](https://img.shields.io/gem/dt/jekyll-theme-acg)
5
+ ![](https://img.shields.io/github/stars/coderzhaoziwei/jekyll-theme-acg?style=social)
6
+
7
+ ## Status: Beta
8
+
9
+ This theme is still under development, just waiting for me...
10
+
11
+
12
+ ## Usage
13
+
14
+ - Set theme in `/_config.yml`:
15
+
16
+ ```
17
+ theme: jekyll-theme-acg
18
+ ```
19
+
20
+ - Add gem in `/Gemfile`:
21
+
22
+ ```
23
+ gem "jekyll-theme-acg"
24
+ ```
25
+
26
+ - Set Front Matter in your `/index.html`:
27
+
28
+ ```
29
+ ---
30
+ layout: home
31
+ ---
32
+ ```
33
+
34
+ > Your homepage filename must be `index.html`, not `index.md` or others.
35
+
36
+ - Build:
37
+
38
+ ```
39
+ bundle update & bundle exec jekyll serve -o
40
+ ```
41
+
42
+ ## Documentation
43
+
44
+ To be continued...
2
45
 
3
46
 
4
47
  ## Thanks
5
48
 
6
49
  - Markdown Style: https://github.com/primer/css/tree/main/src/markdown
7
50
  - Highlight JS: https://highlightjs.org
51
+
52
+
53
+ ## License
54
+
55
+ MIT
56
+
57
+
58
+ <!-- https://rubygems.org/gems/jekyll-theme-acg -->
59
+ <!-- https://github.com/coderzhaoziwei/jekyll-theme-acg -->
data/_config.yml CHANGED
@@ -8,6 +8,7 @@ github_id: coderzhaoziwei
8
8
 
9
9
  # Theme Name
10
10
  theme: jekyll-theme-acg
11
+ background: https://cdn.jsdelivr.net/gh/coderzhaoziwei/jekyll-theme-acg/assets/images/bg.png
11
12
 
12
13
  # Theme Color
13
14
  # Default: red
@@ -21,7 +22,7 @@ baseurl:
21
22
  # Default: /assets/images/bg.png
22
23
  # Author: saino
23
24
  # Origin: https://www.pixiv.net/artworks/86925095
24
- themeBackground:
25
+
25
26
 
26
27
 
27
28
 
@@ -31,22 +32,25 @@ paginate_path: /page:num
31
32
 
32
33
  # ========== ========== ========== ========== ==========
33
34
 
34
- source: "source"
35
- destination: ".bundle"
36
35
 
37
- data_dir: "_data" # /source/_data
38
- layouts_dir: "_layouts" # /source/_layouts
39
- includes_dir: "_includes" # /source/_includes
40
- plugins_dir: ["_plugins"] # /source/_plugins
36
+ exclude: [
37
+ "LICENSE",
38
+ "README.md",
39
+ "package.json",
40
+ "tailwind.config.js",
41
+ "yarn.lock",
42
+ "jekyll-theme-acg.gemspec",
43
+ "jekyll-theme-acg-*.gem",
44
+ ]
41
45
 
42
46
  sass:
43
- sass_dir: _sass
44
47
  style: compressed
45
48
 
46
- collections_dir: "" # /source
49
+ collections_dir: ""
47
50
  collections:
48
51
  posts:
49
52
  output: true
53
+ permalink: /:collection/:title
50
54
 
51
55
  defaults:
52
56
  - scope:
@@ -59,14 +63,18 @@ defaults:
59
63
  values:
60
64
  layout: post
61
65
 
62
- plugins:
63
- - jekyll-gist
64
- - jekyll-feed
65
- - jekyll-seo-tag
66
- - jekyll-paginate
67
- - jekyll-spaceship
68
-
69
- # Configuration for plugin: jekyll-spaceship
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
70
78
  # @see https://github.com/jeffreytse/jekyll-spaceship#usage
71
79
  jekyll-spaceship:
72
80
  processors:
File without changes
@@ -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>
@@ -1,7 +1,6 @@
1
- {% capture color %}{{ page.color | default: site.color }}{% endcapture %}
1
+ {% assign color = page.color | default: site.color %}
2
2
 
3
- {%- comment -%}{%- endcomment -%}
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 -%}
@@ -0,0 +1,27 @@
1
+ {% assign color = page.color | default: site.color %}
2
+
3
+
4
+ <header class="w-full fixed z-50 select-none bg-{{ color }}-600 bg-opacity-10 bg-blur">
5
+ <nav class="p-4 font-serif text-xl text-{{ color }}-50 flex justify-between">
6
+ <a class="hover:text-{{ color }}-400 text-2xl" href="{{ site.url | default: "/" | relative_url }}">{{ site.title }}</a>
7
+ <div class="hidden md:block space-x-4">
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
+ </div>
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">
15
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
16
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
17
+ </svg>
18
+ </button>
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>
23
+ </div>
24
+ </div>
25
+
26
+ </nav>
27
+ </header>
@@ -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 %}
@@ -0,0 +1,22 @@
1
+ {% assign color = page.color | default: site.color %}
2
+ {% capture output %}
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 }}");
17
+ }
18
+ {% endcapture %}
19
+
20
+ {%- comment -%}{%- endcomment -%}
21
+ <{{ "style" }}>{{ output }}</{{ "style" }}>
22
+ {%- comment -%}{%- endcomment -%}
File without changes
@@ -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>
@@ -1,6 +1,5 @@
1
- {% capture color %}{{ page.color | default: site.color }}{% endcapture %}
2
-
3
- {%- comment -%}{%- endcomment -%}
1
+ <!DOCTYPE html>
2
+ <html lang="{{ page.lang | default: site.lang | default: "en-US" }}" class="min-h-screen bg-image bg-cover bg-center bg-fixed">
4
3
  <head>
5
4
  <meta charset="utf-8">
6
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -9,18 +8,22 @@
9
8
  {% feed_meta %}
10
9
  <!-- End Jekyll Feed -->
11
10
 
12
- <!-- Tailwind CSS -->
11
+ <!-- Tailwind Style -->
13
12
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/tailwindcss@2/dist/tailwind.min.css">
14
- <!-- Primer Markdown CSS -->
13
+ <!-- Primer Markdown Style -->
15
14
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/primer-markdown@4.0.0/build/build.css">
16
15
  <!-- HighlightJS -->
17
16
  <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.0.1/build/highlight.min.js"></script>
18
17
  <script>hljs.highlightAll();</script>
19
- <!-- HighlightJS Theme VS2015 CSS -->
18
+ <!-- HighlightJS Theme VS2015 Style -->
20
19
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/highlight.js@11.0.1/styles/vs2015.css">
21
- <!-- CSS -->
20
+ <!-- Theme Style -->
22
21
  <link rel="stylesheet" href="{{ "assets/css/style.css" | relative_url }}">
23
- <!-- Scroll Bar CSS -->
24
22
  {% include style.html %}
25
23
  </head>
26
- {%- comment -%}{%- endcomment -%}
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>
29
+ </html>
@@ -0,0 +1,54 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ {% assign color = page.color | default: site.color %}
5
+ {% assign title = page.title | default: site.title %}
6
+ {% assign description = page.description | default: site.description %}
7
+
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>
12
+
13
+ {% comment %}
14
+ paginator.page The number of the current page
15
+ paginator.per_page Number of posts per page
16
+ paginator.posts Posts available for the current page
17
+ paginator.total_posts Total number of posts
18
+ paginator.total_pages Total number of pages
19
+ paginator.previous_page The number of the previous page, or nil if no previous page exists
20
+ paginator.previous_page_path The path to the previous page, or nil if no previous page exists
21
+ paginator.next_page The number of the next page, or nil if no subsequent page exists
22
+ paginator.next_page_path The path to the next page, or nil if no subsequent page exists
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%}
26
+
27
+
28
+ <!-- Paginator -->
29
+ <div class="flex justify-between items-center">
30
+ <!-- Prev -->
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">
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>
33
+ </a>
34
+ <!-- Pages -->
35
+ <div class="flex flex-wrap items-center justify-center">
36
+ <!-- paginator.total_pages -->
37
+ {%- for pageCount in (1..paginator.total_pages) -%}
38
+ {% assign pagePath = site.paginate_path | replace: ":num", pageCount %}
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 -%}"
40
+
41
+ {% if pageCount != paginator.page %}
42
+ {% if pageCount == 1 %}href={{ "/" | relative_url }}{% else %}href="{{ pagePath | relative_url }}"{% endif %}
43
+ {% endif %}
44
+
45
+ ><span class="block">{{ pageCount }}</span></a>
46
+ {%- endfor -%}
47
+ </div>
48
+ <!-- Next -->
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">
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>
51
+ </a>
52
+ </div>
53
+
54
+ </div>