jekyll-theme-acg 1.0.3 → 1.0.8

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: 83fa34bbb9cfb8e722928b7114e3e9e976c6a4fb33fe22115e2cd8b6fe5aabbf
4
- data.tar.gz: f75eedd59282ad283b4005e2f79affc61dc93f18bb6dc3ca2e9274777f0abbd4
3
+ metadata.gz: 18c679ceecb40fcabc2f49d221454edafb556cf9829de90c8014a1ca725f9c17
4
+ data.tar.gz: 8b8529a344f5b0d0b5508702a428e9c8d24c984b70f16f02340438ee010a35c0
5
5
  SHA512:
6
- metadata.gz: 9c6544fa61df9651e75ef45dd0007d72a0cba85fdc182f30137025b97c80bc101b1e82f4ee53508d7ff1868d80c633eb8134dcea307c7a545e2abcebf9e41611
7
- data.tar.gz: 06cc88c2270ee4c748f334a406b963a8ef5e345fb136b95ae986a949563be7c3a686defe793a37f994617f5bd670fa06cac29fe9941954d4d413db85bd5385ad
6
+ metadata.gz: cb0e14c40bdc925bd39be4bd988efac6eba728c2eb7e0764b9124023941e5b78eaec64fd0218b21809def1ba1b71d05baef01643de1a077c981b01a8bfcebb93
7
+ data.tar.gz: 4a403e8f25ee858ade841f461371076e98b6eb40e54368341a40480662900d0196fb9594e0fa90946b641cd34429c51ff45b3e5fc23caf61a95c31e837de0529
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,75 +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
11
- background: https://cdn.jsdelivr.net/gh/coderzhaoziwei/jekyll-theme-acg/assets/images/bg.png
9
+ acg:
10
+ categories: Categories
11
+ tags: Tags
12
+ about: About
13
+ error: Page Not Found.
14
+ github: coderzhaoziwei
12
15
 
13
16
  # Theme Color
14
17
  # Default: red
15
18
  # Options: red, blue, pink, green, yellow, purple
16
19
  color: red
17
-
18
- url:
19
- baseurl:
20
-
21
20
  # Theme Background Image Path
22
21
  # Default: /assets/images/bg.png
23
22
  # Author: saino
24
23
  # Origin: https://www.pixiv.net/artworks/86925095
24
+ background: https://cdn.jsdelivr.net/gh/coderzhaoziwei/jekyll-theme-acg/assets/images/bg.png
25
25
 
26
-
27
-
26
+ url:
27
+ baseurl:
28
+ paginate: 10
28
29
 
29
30
  show_excerpt: true
30
- paginate: 10
31
31
  paginate_path: /page:num
32
32
 
33
33
  # ========== ========== ========== ========== ==========
34
34
 
35
-
36
35
  exclude: [
37
36
  "LICENSE",
38
37
  "README.md",
39
38
  "package.json",
40
39
  "tailwind.config.js",
41
40
  "yarn.lock",
42
- "jekyll-theme-acg.gemspec",
43
- "jekyll-theme-acg-*.gem",
41
+ "*.gem",
42
+ "*.gemspec",
44
43
  ]
45
44
 
46
- sass:
47
- style: compressed
48
-
49
45
  collections_dir: ""
50
46
  collections:
51
47
  posts:
52
48
  output: true
49
+ permalink: /:collection/:title
53
50
 
54
51
  defaults:
55
52
  - scope:
56
53
  path: "" # all files in the project
57
54
  values:
58
- layout: default
55
+ layout: page
59
56
  - scope:
60
57
  path: ""
61
58
  type: posts
62
59
  values:
63
60
  layout: post
64
61
 
65
- plugins:
66
- - jekyll-gist
67
- - jekyll-feed
68
- - jekyll-seo-tag
69
- - jekyll-paginate
70
- - 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
+
71
77
 
72
- # Configuration for plugin: jekyll-spaceship
78
+ # Jekyll Spaceship
73
79
  # @see https://github.com/jeffreytse/jekyll-spaceship#usage
74
80
  jekyll-spaceship:
75
81
  processors:
@@ -83,18 +89,18 @@ jekyll-spaceship:
83
89
  - element-processor
84
90
  mathjax-processor:
85
91
  src:
86
- - https://polyfill.io/v3/polyfill.min.js?features=es6
92
+ # - https://polyfill.io/v3/polyfill.min.js?features=es6
87
93
  - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
88
94
  config:
89
95
  tex:
90
96
  inlineMath:
91
- - ['$','$']
92
- - ['\(','\)']
97
+ - ["$", "$"]
98
+ # - ["\(", "\)"]
93
99
  displayMath:
94
- - ['$$','$$']
95
- - ['\[','\]']
100
+ - ["$$", "$$"]
101
+ # - ["\[", "\]"]
96
102
  svg:
97
- fontCache: 'global'
103
+ fontCache: "global"
98
104
  optimize: # optimization on building stage to check and add mathjax scripts
99
105
  enabled: true # value `false` for adding to all pages
100
106
  include: [] # include patterns for math expressions checking (regexp)
@@ -104,29 +110,29 @@ jekyll-spaceship:
104
110
  css:
105
111
  class: plantuml
106
112
  syntax:
107
- code: 'plantuml!'
108
- custom: ['@startuml', '@enduml']
113
+ code: "plantuml!"
114
+ custom: ["@startuml", "@enduml"]
109
115
  src: http://www.plantuml.com/plantuml/svg/
110
116
  mermaid-processor:
111
117
  mode: default # mode value 'pre-fetch' for fetching image at building stage
112
118
  css:
113
119
  class: mermaid
114
120
  syntax:
115
- code: 'mermaid!'
116
- custom: ['@startmermaid', '@endmermaid']
121
+ code: "mermaid!"
122
+ custom: ["@startmermaid", "@endmermaid"]
117
123
  config:
118
124
  theme: default
119
125
  src: https://mermaid.ink/svg/
120
126
  media-processor:
121
127
  default:
122
- id: 'media-{id}'
123
- class: 'media'
124
- width: '100%'
128
+ id: "media-{id}"
129
+ class: "media"
130
+ width: "100%"
125
131
  height: 350
126
132
  frameborder: 0
127
- style: 'max-width: 600px; outline: none;'
128
- allow: 'encrypted-media; picture-in-picture'
133
+ style: "max-width: 600px; outline: none;"
134
+ allow: "encrypted-media; picture-in-picture"
129
135
  emoji-processor:
130
136
  css:
131
137
  class: emoji
132
- 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 -%}