jekyll-theme-acg 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: f260e8d8eac56fb62b9dd43190c04b017834bf41827430f55a83939ef1f22884
4
+ data.tar.gz: 9b0e7e03d2cb17811982dbc2b89fd4f52985bf6769dd8512b2f1f72a3d8cda4f
5
+ SHA512:
6
+ metadata.gz: 58036eb578213ba822a9f25a0139a0b2bb87db905261af873924e874c760e7a8609b57cc587833f2f2d2b513dc87062bf91d9985337e5e3724f97e67a70a4097
7
+ data.tar.gz: edfe5f5e24d8d42a04ad14a3c5097e53925092fc1fd8df6008330ab9f75b5a369990a0a1e474d3b554f3c810d8c7e2e7489106a33894042a074a0e260d588ac7
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Coder Zhao
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # jekyll-theme-acg
2
+
3
+
4
+ ## Thanks
5
+
6
+ - Markdown Style: https://github.com/primer/css/tree/main/src/markdown
7
+ - Highlight JS: https://highlightjs.org
data/_config.yml ADDED
@@ -0,0 +1,129 @@
1
+ lang: zh-CN
2
+ title: Jekyll Theme ACG
3
+ description: An awesome theme for Jekyll.
4
+
5
+ author: Coder Zhao
6
+ email: coderzhaoziwei@outlook.com
7
+ github_id: coderzhaoziwei
8
+
9
+ # Theme Name
10
+ theme: jekyll-theme-acg
11
+
12
+ # Theme Color
13
+ # Default: red
14
+ # Options: red, blue, pink, green, yellow, purple
15
+ color: red
16
+
17
+ url:
18
+ baseurl:
19
+
20
+ # Theme Background Image Path
21
+ # Default: /assets/images/bg.png
22
+ # Author: saino
23
+ # Origin: https://www.pixiv.net/artworks/86925095
24
+ themeBackground:
25
+
26
+
27
+
28
+ show_excerpt: true
29
+ paginate: 10
30
+ paginate_path: /page:num
31
+
32
+ # ========== ========== ========== ========== ==========
33
+
34
+ source: "source"
35
+ destination: ".bundle"
36
+
37
+ data_dir: "_data" # /source/_data
38
+ layouts_dir: "_layouts" # /source/_layouts
39
+ includes_dir: "_includes" # /source/_includes
40
+ plugins_dir: ["_plugins"] # /source/_plugins
41
+
42
+ sass:
43
+ sass_dir: _sass
44
+ style: compressed
45
+
46
+ collections_dir: "" # /source
47
+ collections:
48
+ posts:
49
+ output: true
50
+
51
+ defaults:
52
+ - scope:
53
+ path: "" # all files in the project
54
+ values:
55
+ layout: default
56
+ - scope:
57
+ path: ""
58
+ type: posts
59
+ values:
60
+ layout: post
61
+
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
70
+ # @see https://github.com/jeffreytse/jekyll-spaceship#usage
71
+ jekyll-spaceship:
72
+ processors:
73
+ - table-processor
74
+ - mathjax-processor
75
+ - plantuml-processor
76
+ - mermaid-processor
77
+ - polyfill-processor
78
+ - media-processor
79
+ - emoji-processor
80
+ - element-processor
81
+ mathjax-processor:
82
+ src:
83
+ - https://polyfill.io/v3/polyfill.min.js?features=es6
84
+ - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
85
+ config:
86
+ tex:
87
+ inlineMath:
88
+ - ['$','$']
89
+ - ['\(','\)']
90
+ displayMath:
91
+ - ['$$','$$']
92
+ - ['\[','\]']
93
+ svg:
94
+ fontCache: 'global'
95
+ optimize: # optimization on building stage to check and add mathjax scripts
96
+ enabled: true # value `false` for adding to all pages
97
+ include: [] # include patterns for math expressions checking (regexp)
98
+ exclude: [] # exclude patterns for math expressions checking (regexp)
99
+ plantuml-processor:
100
+ mode: default # mode value 'pre-fetch' for fetching image at building stage
101
+ css:
102
+ class: plantuml
103
+ syntax:
104
+ code: 'plantuml!'
105
+ custom: ['@startuml', '@enduml']
106
+ src: http://www.plantuml.com/plantuml/svg/
107
+ mermaid-processor:
108
+ mode: default # mode value 'pre-fetch' for fetching image at building stage
109
+ css:
110
+ class: mermaid
111
+ syntax:
112
+ code: 'mermaid!'
113
+ custom: ['@startmermaid', '@endmermaid']
114
+ config:
115
+ theme: default
116
+ src: https://mermaid.ink/svg/
117
+ media-processor:
118
+ default:
119
+ id: 'media-{id}'
120
+ class: 'media'
121
+ width: '100%'
122
+ height: 350
123
+ frameborder: 0
124
+ style: 'max-width: 600px; outline: none;'
125
+ allow: 'encrypted-media; picture-in-picture'
126
+ emoji-processor:
127
+ css:
128
+ class: emoji
129
+ src: https://github.githubassets.com/images/icons/emoji/
@@ -0,0 +1,36 @@
1
+ # toc.html
2
+
3
+ ## Usage
4
+
5
+ ```liquid
6
+ {% include toc.html html=content %}
7
+ ```
8
+
9
+ ## Parameters
10
+
11
+ Except `html`, all other parameters are optional.
12
+
13
+ | Param | Type | Default | |
14
+ | :------ | :----- | :---------------- | :---------------------------------------------------------------------------- |
15
+ | html | string | | html of markdown generated by kramdown in Jekyll |
16
+ | min | int | 2 | min header level value in toc |
17
+ | max | int | 3 | max header level value in toc |
18
+ | ordered | bool | false | true => `<ol></ol>`<br>false => `<ul></ul>` |
19
+ | id | string | "toc" | id name for toc element |
20
+ | class | string | "toc" | class name for toc element |
21
+ | a | string | "toc-a" | class name for each anchor element |
22
+ | li | string | "toc-li-%level%" | class name for each list item<br>`%level%` => current heading level |
23
+ | sub | string | "toc-sub-%level%" | class name for each child group of list<br>`%level%` => current heading level |
24
+ | base | string | "" | base url to the toc links |
25
+
26
+ > If your TOC is on another page than the actual content, parameter `base` is useful.
27
+
28
+ ## Thanks
29
+
30
+ This `toc.html` is modified from [@allejo](https://github.com/allejo)'s project.
31
+
32
+ @see https://github.com/allejo/jekyll-toc/blob/master/_includes/toc.html
33
+
34
+ ## License
35
+
36
+ MIT
@@ -0,0 +1,5 @@
1
+ <body class="flex flex-col items-center bg-black bg-opacity-50">
2
+ {% include header.html %}
3
+ {% include main.html %}
4
+ {% include footer.html %}
5
+ </body>
@@ -0,0 +1,17 @@
1
+ {% capture color %}{{ page.color | default: site.color }}{% endcapture %}
2
+
3
+ {%- comment -%}{%- endcomment -%}
4
+ <footer class="w-full p-2 text-xs text-{{ color }}-100 ">
5
+ <p class="text-center">
6
+ Powered by
7
+ <a class="text-{{ color }}-400" href="https://jekyllrb.com" target="_block">Jekyll</a>
8
+ ·
9
+ <a class="text-{{ color }}-400" href="https://github.com/coderzhaoziwei/jekyll-theme-acg" target="_block">Jekyll Theme ACG</a>
10
+ </p>
11
+ <p class="text-center">
12
+ Copyright {{ "now" | date: "%Y" }}
13
+ <a class="text-{{ color }}-400" href="https://github.com/{{ site.github_id }}" target="_block">{{ site.author }}</a>
14
+ · All rights reserved.
15
+ </p>
16
+ </footer>
17
+ {%- comment -%}{%- endcomment -%}
@@ -0,0 +1,26 @@
1
+ {% capture color %}{{ page.color | default: site.color }}{% endcapture %}
2
+
3
+ {%- comment -%}{%- endcomment -%}
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+
8
+ {% seo %}<!-- Begin Jekyll Feed -->
9
+ {% feed_meta %}
10
+ <!-- End Jekyll Feed -->
11
+
12
+ <!-- Tailwind CSS -->
13
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/tailwindcss@2/dist/tailwind.min.css">
14
+ <!-- Primer Markdown CSS -->
15
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/primer-markdown@4.0.0/build/build.css">
16
+ <!-- HighlightJS -->
17
+ <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.0.1/build/highlight.min.js"></script>
18
+ <script>hljs.highlightAll();</script>
19
+ <!-- HighlightJS Theme VS2015 CSS -->
20
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/highlight.js@11.0.1/styles/vs2015.css">
21
+ <!-- CSS -->
22
+ <link rel="stylesheet" href="{{ "assets/css/style.css" | relative_url }}">
23
+ <!-- Scroll Bar CSS -->
24
+ {% include style.html %}
25
+ </head>
26
+ {%- comment -%}{%- endcomment -%}
@@ -0,0 +1,31 @@
1
+ {% capture color %}{{ page.color | default: site.color }}{% endcapture %}
2
+
3
+ {%- comment -%}{%- endcomment -%}
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="/tags">Tags</a>
9
+ <a class="hover:text-{{ color }}-400" href="/archives">Archives</a>
10
+ <a class="hover:text-{{ color }}-400" href="/about">About</a>
11
+ </div>
12
+ <div class="md:hidden">
13
+ <style>#theme-menu:focus + #theme-menu-dropdown { display: block; }</style>
14
+ <button
15
+ id="theme-menu"
16
+ class="focus:outline-none focus:text-{{ color }}-400 "
17
+ >
18
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
19
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
20
+ </svg>
21
+ </button>
22
+ <div class="hidden origin-top-right absolute right-1 mt-1 rounded-md py-1 bg-{{ color }}-100 focus:block focus:outline-none" id="theme-menu-dropdown">
23
+ <a class="block px-4 py-2 text-sm text-{{ color }}-600 hover:text-{{ color }}-400" href="/tags">Tags</a>
24
+ <a class="block px-4 py-2 text-sm text-{{ color }}-600 hover:text-{{ color }}-400" href="/archives">Archives</a>
25
+ <a class="block px-4 py-2 text-sm text-{{ color }}-600 hover:text-{{ color }}-400" href="/about">About</a>
26
+ </div>
27
+ </div>
28
+
29
+ </nav>
30
+ </header>
31
+ {%- comment -%}{%- endcomment -%}
@@ -0,0 +1,12 @@
1
+ {% capture color %}{{ page.color | default: site.color }}{% endcapture %}
2
+ {%- comment -%}{%- endcomment -%}
3
+ <main class="w-full flex-grow">
4
+ <figure class="w-full h-screen flex flex-col justify-center items-center select-none">
5
+ <figcaption class="w-full h-full flex flex-col items-center justify-center text-{{ color }}-50">
6
+ <span class="block font-serif text-4xl w-3/4 text-center py-4">{{ page.title | default: site.title }}</span>
7
+ <span class="block font-sans text-base w-2/3 text-center">{{ page.description | default: site.description }}</span>
8
+ </figcaption>
9
+ </figure>
10
+ {{ content }}
11
+ </main>
12
+ {%- comment -%}{%- endcomment -%}
@@ -0,0 +1,80 @@
1
+ {% capture style %}style{% endcapture %}
2
+ {% capture color %}{{ page.color | default: site.color }}{% endcapture %}
3
+ {% capture output %}
4
+ ::-webkit-scrollbar {
5
+ width: 4px;
6
+ height: 4px;
7
+ }
8
+ ::-webkit-scrollbar-track-piece {
9
+ background: var(--{{ color }}-200);
10
+ }
11
+ ::-webkit-scrollbar-thumb {
12
+ border-radius: 4px;
13
+ background-color: var(--{{ color }}-600);
14
+ background-image: repeating-linear-gradient(
15
+ -45deg,
16
+ var(--{{ color }}-600) 0,
17
+ var(--{{ color }}-600) 32px,
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;
75
+ }
76
+ {% endcapture %}
77
+
78
+ {%- comment -%}{%- endcomment -%}
79
+ <{{ style }}>{{ output }}</{{ style }}>
80
+ {%- comment -%}{%- endcomment -%}
@@ -0,0 +1,57 @@
1
+ {% capture workspace %}
2
+
3
+ {% assign min = include.min | default: 2 %}
4
+ {% assign max = include.max | default: 3 %}
5
+ {% assign nodes = include.html | strip | split: '<h' %}
6
+ {% for node in nodes %}
7
+ {% if node == '' or node contains 'omit-in-toc' %}{% continue %}{% endif %}
8
+
9
+ {% assign level = node | slice: 0, 1 | to_integer %}
10
+ {% if level < min or max < level %}{% continue %}{% endif %}
11
+
12
+ {% assign title = node | split: '</h'| first | split: 'id="' | shift | join: '' | split: '"' | first %}
13
+ {% if title == '' or title == nil %}{% continue %}{% endif %}
14
+
15
+ {% if output == nil %}
16
+ {% assign min = level %}
17
+ {% assign id = include.id | default: 'toc' %}
18
+ {% assign class = include.class | default: 'toc' %}
19
+ {% capture output %}<{% if include.ordered %}ol{% else %}ul{% endif %}{% endcapture %}
20
+ {% capture output %}{{ output }} id="{{ id }}" class="{{ class }}">{% endcapture %}
21
+ {% elsif lastLevel < level %}
22
+ {% assign sub = include.sub | default: 'toc-sub-%level%' %}
23
+ {% assign subLevel = level | minus: 1 %}
24
+ {% capture output %}{{ output }}<{% if include.ordered %}ol{% else %}ul{% endif %}{% endcapture %}
25
+ {% capture output %}{{ output }} class="{{ sub | replace: '%level%', subLevel }}">{% endcapture %}
26
+ {% elsif level < lastLevel %}
27
+ {% assign count = lastLevel | minus: level %}
28
+ {% for index in (1..count) %}
29
+ {% capture output %}{{ output }}</li>{% if include.ordered %}</ol>{% else %}</ul>{% endif %}{% endcapture %}
30
+ {% endfor %}
31
+ {% capture output %}{{ output }}</li>{% endcapture %}
32
+ {% else %}
33
+ {% capture output %}{{ output }}</li>{% endcapture %}
34
+ {% endif %}
35
+
36
+ {% capture a_body_temp %}{{ node | split: '</h' | first }}{% endcapture %}
37
+ {% capture a_body_prev %}{{ a_body_temp | split: '>' | first }}>{% endcapture %}
38
+ {% capture a_body %}{{ a_body_temp | replace: a_body_prev, '' }}{% endcapture %}
39
+ {% capture a_class %}{{ include.a | default: 'toc-a' }}{% endcapture %}
40
+ {% capture a_href %}{{ include.base | default: '' }}#{{ title }}{% endcapture %}
41
+ {% capture a %}<a class="{{ a_class }}" href="{{ a_href }}">{{ a_body | strip_html }}</a>{% endcapture %}
42
+ {% capture liClass %}{{ include.li | default: 'toc-li-%level%' | replace: '%level%', level }}{% endcapture %}
43
+ {% capture output %}{{ output }}<li class="{{ liClass }}">{{ a }}{% endcapture %}
44
+
45
+ {% assign lastLevel = level %}
46
+ {% endfor %}
47
+
48
+ {% assign count = lastLevel | minus: min | plus: 1 %}
49
+ {% for index in (1..count) %}
50
+ {% capture output %}{{ output }}</li>{% if include.ordered %}</ol>{% else %}</ul>{% endif %}{% endcapture %}
51
+ {% endfor %}
52
+
53
+ {% endcapture %}
54
+
55
+ {%- comment -%}{%- endcomment -%}
56
+ {{ output }}
57
+ {%- comment -%}{%- endcomment -%}
@@ -0,0 +1,8 @@
1
+ {% capture lang %}{{ page.lang | default: site.lang | default: "en-US" }}{% endcapture %}
2
+ {%- comment -%}{%- endcomment -%}
3
+ <!DOCTYPE html>
4
+ <html lang="{{ lang }}" class="min-h-screen bg-image bg-cover bg-center bg-fixed">
5
+ {% include head.html %}
6
+ {% include body.html %}
7
+ </html>
8
+ {%- comment -%}{%- endcomment -%}
@@ -0,0 +1,125 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ {% capture color %}{{ page.color | default: site.color }}{% endcapture %}
5
+
6
+ <div class="w-full max-w-acg m-auto p-4 grid gap-6 grid-cols-1">
7
+
8
+ {%- comment -%}
9
+ paginator.page The number of the current page
10
+ paginator.per_page Number of posts per page
11
+ paginator.posts Posts available for the current page
12
+ paginator.total_posts Total number of posts
13
+ paginator.total_pages Total number of pages
14
+ paginator.previous_page The number of the previous page, or nil if no previous page exists
15
+ paginator.previous_page_path The path to the previous page, or nil if no previous page exists
16
+ paginator.next_page The number of the next page, or nil if no subsequent page exists
17
+ paginator.next_page_path The path to the next page, or nil if no subsequent page exists
18
+ {%- endcomment -%}
19
+
20
+ {% capture workspace %}
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 -%}
97
+
98
+
99
+ <!-- Paginator -->
100
+ <div class="flex justify-between items-center">
101
+ <!-- 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">
103
+ <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
+ </a>
105
+ <!-- Pages -->
106
+ <div class="flex flex-wrap items-center justify-center">
107
+ <!-- paginator.total_pages -->
108
+ {%- for pageCount in (1..paginator.total_pages) -%}
109
+ {% assign pagePath = site.paginate_path | replace: ":num", pageCount %}
110
+ <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
+
112
+ {% if pageCount != paginator.page %}
113
+ {% if pageCount == 1 %}href="/"{% else %}href="{{ pagePath }}"{% endif %}
114
+ {% endif %}
115
+
116
+ ><span class="block">{{ pageCount }}</span></a>
117
+ {%- endfor -%}
118
+ </div>
119
+ <!-- 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">
121
+ <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
+ </a>
123
+ </div>
124
+
125
+ </div>
@@ -0,0 +1,44 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ {% capture color %}{{ page.color | default: site.color }}{% endcapture %}
5
+ {%- comment -%}{%- endcomment -%}
6
+ <article
7
+ class="markdown-body my-4 mx-auto p-4 pb-8 max-w-acg
8
+ rounded-lg shadow-xl text-black bg-{{ color }}-50 bg-opacity-75 "
9
+ >
10
+ <h1>{{ page.title }}</h1>
11
+ <!-- Jekyll TOC -->
12
+ {% include toc.html html=content %}
13
+ <!-- Jekyll TOC End -->
14
+ {{ content }}
15
+ </article>
16
+ {%- comment -%}{%- endcomment -%}
17
+
18
+
19
+
20
+
21
+ <div class="mx-auto flex justify-between max-w-acg space-x-4 pb-4">
22
+ <a
23
+ class="w-1/2 p-4 flex items-center rounded-lg shadow-xl
24
+ bg-{{ color }}-50 bg-opacity-75
25
+ {% unless page.next.id %}opacity-0{% endunless %}"
26
+ {% if page.next.id %}href="{{ page.next.id }}"{% endif %}
27
+ >
28
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 flex-shrink-0 text-{{ color }}-600" fill="none" viewBox="0 0 24 24" stroke="currentColor">
29
+ <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" />
30
+ </svg>
31
+ <span class="ml-4">{{ page.next.title | default: "" }}</span>
32
+ </a>
33
+ <a
34
+ class="w-1/2 p-4 flex items-center flex-row-reverse rounded-lg shadow-xl
35
+ bg-{{ color }}-50 bg-opacity-75
36
+ {% unless page.previous.id %}opacity-0{% endunless %}"
37
+ {% if page.previous.id %}href="{{ page.previous.id }}"{% endif %}
38
+ >
39
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 flex-shrink-0 text-{{ color }}-600" fill="none" viewBox="0 0 24 24" stroke="currentColor">
40
+ <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" />
41
+ </svg>
42
+ <span class="mr-4">{{ page.previous.title | default: "" }}</span>
43
+ </a>
44
+ </div>
@@ -0,0 +1,35 @@
1
+ .markdown-body a:hover {
2
+ text-decoration: underline;
3
+ }
4
+
5
+ .markdown-body .highlight pre,
6
+ .markdown-body pre {
7
+ background-color: rgba(0, 0, 0, 0.75);
8
+ }
9
+
10
+ .markdown-body ol {
11
+ list-style-type: decimal;
12
+ }
13
+ .markdown-body ol ol,
14
+ .markdown-body ul ol {
15
+ list-style-type: lower-roman;
16
+ }
17
+ .markdown-body ol ol ol,
18
+ .markdown-body ul ol ol,
19
+ .markdown-body ol ul ol,
20
+ .markdown-body ul ul ol {
21
+ list-style-type: lower-alpha;
22
+ }
23
+ .markdown-body ul {
24
+ list-style-type: disc;
25
+ }
26
+ .markdown-body ul ul,
27
+ .markdown-body ol ul {
28
+ list-style-type: circle;
29
+ }
30
+ .markdown-body ul ul ul,
31
+ .markdown-body ol ul ul,
32
+ .markdown-body ul ol ul,
33
+ .markdown-body ol ol ul {
34
+ list-style-type: square;
35
+ }
@@ -0,0 +1,39 @@
1
+ :root {
2
+ --opacity: 1;
3
+
4
+ --red-200: rgba(254, 200, 200, var(--opacity));
5
+ --red-400: rgba(248, 114, 114, var(--opacity));
6
+ --red-500: #ef4444;
7
+ --red-600: rgba(220, 40, 40, var(--opacity));
8
+ --red-800: rgba(153, 27, 27, var(--opacity));
9
+
10
+ --blue-200: rgba(191, 219, 254, var(--opacity));
11
+ --blue-400: rgba(96, 165, 250, var(--opacity));
12
+ --blue-500: #3b82f6;
13
+ --blue-600: rgba(37, 99, 235, var(--opacity));
14
+ --blue-800: rgba(30, 64, 175, var(--opacity));
15
+
16
+ --pink-200: rgba(251, 207, 232, var(--opacity));
17
+ --pink-400: rgba(244, 114, 182, var(--opacity));
18
+ --pink-500: #ec4899;
19
+ --pink-600: rgba(219, 39, 119, var(--opacity));
20
+ --pink-800: rgba(157, 23, 77, var(--opacity));
21
+
22
+ --green-200: rgba(167, 243, 208, var(--opacity));
23
+ --green-400: rgba(52, 211, 153, var(--opacity));
24
+ --green-500: #10b981;
25
+ --green-600: rgba(5, 150, 105, var(--opacity));
26
+ --green-800: rgba(6, 95, 70, var(--opacity));
27
+
28
+ --yellow-200: rgba(253, 230, 138, var(--opacity));
29
+ --yellow-400: rgba(251, 191, 36, var(--opacity));
30
+ --yellow-500: #f59e0b;
31
+ --yellow-600: rgba(217, 119, 6, var(--opacity));
32
+ --yellow-800: rgba(146, 64, 14, var(--opacity));
33
+
34
+ --purple-200: rgba(221, 214, 254, var(--opacity));
35
+ --purple-400: rgba(167, 139, 250, var(--opacity));
36
+ --purple-500: #8b5cf6;
37
+ --purple-600: rgba(124, 58, 237, var(--opacity));
38
+ --purple-800: rgba(91, 33, 182, var(--opacity));
39
+ }
@@ -0,0 +1,16 @@
1
+ ---
2
+ ---
3
+ @import "root";
4
+ @import "markdown";
5
+
6
+ .bg-image {
7
+ background-image: url("{{ site.themeBackground | default: '/assets/images/bg.png' }}");
8
+ }
9
+
10
+ .bg-blur {
11
+ backdrop-filter: blur(8px);
12
+ }
13
+
14
+ .max-w-acg {
15
+ max-width: MIN(90%, 768px);
16
+ }
metadata ADDED
@@ -0,0 +1,178 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jekyll-theme-acg
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Coder Zhao
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-06-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: jekyll
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '4.0'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '5.0'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '4.0'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '5.0'
33
+ - !ruby/object:Gem::Dependency
34
+ name: jekyll-feed
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '0.9'
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '0.9'
47
+ - !ruby/object:Gem::Dependency
48
+ name: jekyll-seo-tag
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '2.1'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '2.1'
61
+ - !ruby/object:Gem::Dependency
62
+ name: jekyll-gist
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ type: :runtime
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ - !ruby/object:Gem::Dependency
76
+ name: jekyll-paginate
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ type: :runtime
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ - !ruby/object:Gem::Dependency
90
+ name: jekyll-spaceship
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ type: :runtime
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ - !ruby/object:Gem::Dependency
104
+ name: kramdown-parser-gfm
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ type: :runtime
111
+ prerelease: false
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
117
+ - !ruby/object:Gem::Dependency
118
+ name: bundler
119
+ requirement: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
124
+ type: :development
125
+ prerelease: false
126
+ version_requirements: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - ">="
129
+ - !ruby/object:Gem::Version
130
+ version: '0'
131
+ description:
132
+ email: coderzhaoziwei@outlook.com
133
+ executables: []
134
+ extensions: []
135
+ extra_rdoc_files: []
136
+ files:
137
+ - LICENSE
138
+ - README.md
139
+ - _config.yml
140
+ - source/_includes/README.md
141
+ - source/_includes/body.html
142
+ - source/_includes/footer.html
143
+ - source/_includes/head.html
144
+ - source/_includes/header.html
145
+ - source/_includes/main.html
146
+ - source/_includes/style.html
147
+ - source/_includes/toc.html
148
+ - source/_layouts/default.html
149
+ - source/_layouts/home.html
150
+ - source/_layouts/post.html
151
+ - source/_sass/markdown.scss
152
+ - source/_sass/root.scss
153
+ - source/assets/css/style.scss
154
+ homepage: https://github.com/coderzhaoziwei/jekyll-theme-acg
155
+ licenses:
156
+ - MIT
157
+ metadata:
158
+ plugin_type: theme
159
+ post_install_message:
160
+ rdoc_options: []
161
+ require_paths:
162
+ - lib
163
+ required_ruby_version: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - ">="
166
+ - !ruby/object:Gem::Version
167
+ version: '0'
168
+ required_rubygems_version: !ruby/object:Gem::Requirement
169
+ requirements:
170
+ - - ">="
171
+ - !ruby/object:Gem::Version
172
+ version: '0'
173
+ requirements: []
174
+ rubygems_version: 3.1.4
175
+ signing_key:
176
+ specification_version: 4
177
+ summary: An awesome theme for Jekyll.
178
+ test_files: []