jekyll-theme-acg 1.0.2 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f5ff29da0d09a68067bfdcde86d45901fd78a56e59c9cd246bb73a203e513a2
4
- data.tar.gz: eabb56cc9c7cb79d665991904c23af41f1d663a92cecb22c7f5195614f92e8ee
3
+ metadata.gz: 2a1bfc82c9da9620e8757ebb6f816be5530ea937596c77d2839effe91d98bf42
4
+ data.tar.gz: fbd05c7e4a65466fceca8dd3e51cf75de0464ad11d2c91feb284c413e974b3f7
5
5
  SHA512:
6
- metadata.gz: 89e82303b8cfa543cba6057cf0c38e0451cca6ee5042047af65eb9b00c979e0a48cb7ad032294935148ccc697c71b1e8db1cfa5949180f5483eae46201232ed5
7
- data.tar.gz: 34e19f348a5af5a1f8694918ffa03281261d1f30aacb3040be2a5f8343a113ae4425a39997163423d5e49738997ea8775852eaf8bdadee9e8d84656fbec64969
6
+ metadata.gz: 43cda9abfb9aea262840acd9a253fe841a07cb51916b3eb980e9ab83db621600cbfd4a89a2da74d02475814e60daca52dabf8b46b9e2a176a79b24f615f66bbf
7
+ data.tar.gz: afe48d1ef08e8acd5ac59171763b21945a4630633a0dcdf9a8ba3639f51d4dd3989f83439f279c2f2e609884f4adab9832139e09486d15a92d2ee8ed6456f2e1
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
@@ -1,74 +1,81 @@
1
1
  lang: zh-CN
2
2
  title: Jekyll Theme ACG
3
3
  description: An awesome theme for Jekyll.
4
-
5
4
  author: Coder Zhao
6
5
  email: coderzhaoziwei@outlook.com
7
- github_id: coderzhaoziwei
8
6
 
9
7
  # Theme Name
10
8
  theme: jekyll-theme-acg
9
+ acg:
10
+ categories: Categories
11
+ tags: Tags
12
+ about: About
13
+ error: Page Not Found.
14
+ github: coderzhaoziwei
11
15
 
12
16
  # Theme Color
13
17
  # Default: red
14
18
  # Options: red, blue, pink, green, yellow, purple
15
19
  color: red
16
-
17
- url:
18
- baseurl:
19
-
20
20
  # Theme Background Image Path
21
21
  # Default: /assets/images/bg.png
22
22
  # Author: saino
23
23
  # Origin: https://www.pixiv.net/artworks/86925095
24
- themeBackground:
25
-
24
+ background: https://cdn.jsdelivr.net/gh/coderzhaoziwei/jekyll-theme-acg/assets/images/bg.png
26
25
 
26
+ url:
27
+ baseurl:
28
+ paginate: 10
27
29
 
28
30
  show_excerpt: true
29
- paginate: 10
30
31
  paginate_path: /page:num
31
32
 
32
33
  # ========== ========== ========== ========== ==========
33
34
 
34
-
35
35
  exclude: [
36
36
  "LICENSE",
37
37
  "README.md",
38
38
  "package.json",
39
39
  "tailwind.config.js",
40
40
  "yarn.lock",
41
- "jekyll-theme-acg.gemspec",
42
- "jekyll-theme-acg-*.gem",
41
+ "*.gem",
42
+ "*.gemspec",
43
43
  ]
44
44
 
45
- sass:
46
- style: compressed
47
-
48
45
  collections_dir: ""
49
46
  collections:
50
47
  posts:
51
48
  output: true
49
+ permalink: /:collection/:title
52
50
 
53
51
  defaults:
54
52
  - scope:
55
53
  path: "" # all files in the project
56
54
  values:
57
- layout: default
55
+ layout: page
58
56
  - scope:
59
57
  path: ""
60
58
  type: posts
61
59
  values:
62
60
  layout: post
63
61
 
64
- plugins:
65
- - jekyll-gist
66
- - jekyll-feed
67
- - jekyll-seo-tag
68
- - jekyll-paginate
69
- - jekyll-spaceship
62
+ sass:
63
+ style: compressed
64
+
65
+
66
+ # Jekyll Archives
67
+ # @see https://github.com/jekyll/jekyll-archives
68
+ jekyll-archives:
69
+ enabled: [categories, tags]
70
+ layouts:
71
+ category: page
72
+ tag: page
73
+ permalinks:
74
+ tag: /tags/:name/
75
+ category: /categories/:name/
76
+
70
77
 
71
- # Configuration for plugin: jekyll-spaceship
78
+ # Jekyll Spaceship
72
79
  # @see https://github.com/jeffreytse/jekyll-spaceship#usage
73
80
  jekyll-spaceship:
74
81
  processors:
@@ -82,18 +89,18 @@ jekyll-spaceship:
82
89
  - element-processor
83
90
  mathjax-processor:
84
91
  src:
85
- - https://polyfill.io/v3/polyfill.min.js?features=es6
92
+ # - https://polyfill.io/v3/polyfill.min.js?features=es6
86
93
  - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
87
94
  config:
88
95
  tex:
89
96
  inlineMath:
90
- - ['$','$']
91
- - ['\(','\)']
97
+ - ["$", "$"]
98
+ - ["\(", "\)"]
92
99
  displayMath:
93
- - ['$$','$$']
94
- - ['\[','\]']
100
+ - ["$$", "$$"]
101
+ - ["\[", "\]"]
95
102
  svg:
96
- fontCache: 'global'
103
+ fontCache: "global"
97
104
  optimize: # optimization on building stage to check and add mathjax scripts
98
105
  enabled: true # value `false` for adding to all pages
99
106
  include: [] # include patterns for math expressions checking (regexp)
@@ -103,29 +110,29 @@ jekyll-spaceship:
103
110
  css:
104
111
  class: plantuml
105
112
  syntax:
106
- code: 'plantuml!'
107
- custom: ['@startuml', '@enduml']
113
+ code: "plantuml!"
114
+ custom: ["@startuml", "@enduml"]
108
115
  src: http://www.plantuml.com/plantuml/svg/
109
116
  mermaid-processor:
110
117
  mode: default # mode value 'pre-fetch' for fetching image at building stage
111
118
  css:
112
119
  class: mermaid
113
120
  syntax:
114
- code: 'mermaid!'
115
- custom: ['@startmermaid', '@endmermaid']
121
+ code: "mermaid!"
122
+ custom: ["@startmermaid", "@endmermaid"]
116
123
  config:
117
124
  theme: default
118
125
  src: https://mermaid.ink/svg/
119
126
  media-processor:
120
127
  default:
121
- id: 'media-{id}'
122
- class: 'media'
123
- width: '100%'
128
+ id: "media-{id}"
129
+ class: "media"
130
+ width: "100%"
124
131
  height: 350
125
132
  frameborder: 0
126
- style: 'max-width: 600px; outline: none;'
127
- allow: 'encrypted-media; picture-in-picture'
133
+ style: "max-width: 600px; outline: none;"
134
+ allow: "encrypted-media; picture-in-picture"
128
135
  emoji-processor:
129
136
  css:
130
137
  class: emoji
131
- src: https://github.githubassets.com/images/icons/emoji/
138
+ # src: https://github.githubassets.com/images/icons/emoji/
@@ -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 -%}
@@ -0,0 +1,25 @@
1
+ {% capture workspace %}
2
+
3
+ {% assign color = page.color | default: site.color %}
4
+ {% assign name = include.name | default: "CATEGORY" %}
5
+ {% assign count = include.count | default: 0 %}
6
+ {% assign href = "/categories/" | append: name | relative_url %}
7
+ {% assign title = include.title | default: false %}
8
+
9
+ {% if title %}
10
+ {% assign a = "mx-px text-4xl text-color-100 text-opacity-75 flex items-center" %}
11
+ {% else %}
12
+ {% assign a = "mx-px text-sm text-color-500 text-opacity-75 flex items-center" %}
13
+ {% endif %}
14
+
15
+ {% if title %}
16
+ {% assign svg = "h-8 w-8 m-1" %}
17
+ {% else %}
18
+ {% assign svg = "h-4 w-4" %}
19
+ {% endif %}
20
+
21
+ {% capture output %}
22
+ <a class="{{ a | replace: "color", color }}" href="{{ href }}"><svg xmlns="http://www.w3.org/2000/svg" class="{{ svg }}" 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><span class="inline-block p-1">{{ name }}</span>{% if count > 0 %}<span class="inline-block p-1 text-{{ color }}-500 text-opacity-50">{{ count }}</span>{% endif %}</a>
23
+ {% endcapture %}
24
+
25
+ {% endcapture %}{{ output | strip }}
@@ -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,25 @@
1
+ {% capture workspace %}
2
+
3
+ {% assign color = page.color | default: site.color %}
4
+ {% assign name = include.name | default: "TAG" %}
5
+ {% assign count = include.count | default: 0 %}
6
+ {% assign href = "/tags/" | append: name | relative_url %}
7
+ {% assign title = include.title | default: false %}
8
+
9
+ {% if title %}
10
+ {% assign a = "mx-px text-4xl text-color-100 text-opacity-75 flex items-center" %}
11
+ {% else %}
12
+ {% assign a = "mx-px text-sm text-color-500 text-opacity-75 flex items-center" %}
13
+ {% endif %}
14
+
15
+ {% if title %}
16
+ {% assign svg = "h-8 w-8 m-1" %}
17
+ {% else %}
18
+ {% assign svg = "h-4 w-4" %}
19
+ {% endif %}
20
+
21
+ {% capture output %}
22
+ <a class="{{ a | replace: "color", color }}" href="{{ href }}"><svg xmlns="http://www.w3.org/2000/svg" class="{{ svg }}" 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><span class="inline-block p-1">{{ name }}</span>{% if count > 0 %}<span class="inline-block p-1 text-{{ color }}-500 text-opacity-50">{{ count }}</span>{% endif %}</a>
23
+ {% endcapture %}
24
+
25
+ {% endcapture %}{{ output | strip }}
@@ -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 %}
File without changes
data/_includes/toc.html CHANGED
@@ -50,8 +50,4 @@
50
50
  {% capture output %}{{ output }}</li>{% if include.ordered %}</ol>{% else %}</ul>{% endif %}{% endcapture %}
51
51
  {% endfor %}
52
52
 
53
- {% endcapture %}
54
-
55
- {%- comment -%}{%- endcomment -%}
56
- {{ output }}
57
- {%- comment -%}{%- endcomment -%}
53
+ {% endcapture %}{{ output }}
@@ -1,8 +1,72 @@
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
- {% include head.html %}
6
- {% include body.html %}
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
+
23
+ {% include head-style.html %}
24
+
25
+ </head>
26
+
27
+ <body class="flex flex-col items-center bg-black bg-opacity-50">
28
+
29
+ {% assign color = page.color | default: site.color %}
30
+
31
+ <header class="w-full fixed z-50 select-none bg-{{ color }}-600 bg-opacity-10 bg-blur">
32
+ <nav class="p-4 font-serif text-xl text-{{ color }}-50 flex justify-between">
33
+ <a class="hover:text-{{ color }}-400 text-2xl" href="{{ site.url | default: "/" | relative_url }}">{{ site.title }}</a>
34
+ <div class="hidden md:block space-x-4">
35
+ <a class="hover:text-{{ color }}-400" href="{{ "/categories" | relative_url }}">{{ site.acg.categories }}</a>
36
+ <a class="hover:text-{{ color }}-400" href="{{ "/tags" | relative_url }}">{{ site.acg.tags }}</a>
37
+ <a class="hover:text-{{ color }}-400" href="{{ "/about" | relative_url }}">{{ site.acg.about }}</a>
38
+ </div>
39
+ <div id="theme-menu" class="md:hidden">
40
+ <style>#theme-menu:hover > #theme-menu-dropdown { display: block; }</style>
41
+ <button class="hover:outline-none hover:text-{{ color }}-400">
42
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
43
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
44
+ </svg>
45
+ </button>
46
+ <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">
47
+ <a class="block px-4 py-2 text-sm text-{{ color }}-600 hover:bg-{{ color }}-200" href="{{ "/categories" | relative_url }}">{{ site.acg.categories }}</a>
48
+ <a class="block px-4 py-2 text-sm text-{{ color }}-600 hover:bg-{{ color }}-200" href="{{ "/tags" | relative_url }}">{{ site.acg.tags }}</a>
49
+ <a class="block px-4 py-2 text-sm text-{{ color }}-600 hover:bg-{{ color }}-200" href="{{ "/about" | relative_url }}">{{ site.acg.about }}</a>
50
+ </div>
51
+ </div>
52
+ </nav>
53
+ </header>
54
+
55
+ {{ content }}
56
+
57
+ <footer class="w-full mt-4 p-2 text-sm text-{{ color }}-100 ">
58
+ <p class="text-center">
59
+ Powered by
60
+ <a class="text-{{ color }}-400" href="https://jekyllrb.com" target="_block">Jekyll</a>
61
+ ·
62
+ <a class="text-{{ color }}-400" href="https://github.com/coderzhaoziwei/jekyll-theme-acg" target="_block">Jekyll Theme ACG</a>
63
+ </p>
64
+ <p class="text-center">
65
+ Copyright {{ "now" | date: "%Y" }}
66
+ <a class="text-{{ color }}-400" href="https://github.com/{{ site.acg.github }}" target="_block">{{ site.author }}</a>
67
+ · All rights reserved.
68
+ </p>
69
+ </footer>
70
+
71
+ </body>
7
72
  </html>
8
- {%- comment -%}{%- endcomment -%}