jekyll-theme-acg 1.0.6 → 1.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1abc3a8fdf5221295dc69934c9fa2723bd357a6e16e14e0f66e6d0b3a29edfea
4
- data.tar.gz: 861d93df0ba98250a1a095431dd5239603247a48791c7f6ab39d8613a6a67fa0
3
+ metadata.gz: 22a1409600ed35b4705d463977468cc0a8fd9b84ba07ff9901d66b8ac36a5e6f
4
+ data.tar.gz: 161493328a0178531e75bc4f23699335c6f3744011bc97a007bc31f2c96381f1
5
5
  SHA512:
6
- metadata.gz: 791995911806b2a7201106587cb1f0d87401586a31dda36b9cda152f7d38e526a90b8b7cecc3225862c9e80cb7c1a905d9969dde6813bf441ebac45537211a33
7
- data.tar.gz: 34b1402b4bd267a8a2d42cc09088b03bda8feb8b7699c6b2e2616998b2c309da0434d7c32a5e0aa2edf5f36df24442c96336e6b4eb8a34bf9e06350f838023ff
6
+ metadata.gz: 82b47a3b5a88ea5ddbf26a59f563c342e4d5ce6870555bfd79382ca8f88ef4345a7baeb77436f7c3fe698f526b712583f47b425fa92373b05c9f1f222e981bd6
7
+ data.tar.gz: a200df938baa636502f72d6389173e75919f3ee427ef3eecb688afa4252d96432a51737d63da550246a493fb2d4985bd48b158efeff1e4ee2592f42de750b1d2
data/README.md CHANGED
@@ -8,6 +8,9 @@
8
8
 
9
9
  This theme is still under development, just waiting for me...
10
10
 
11
+ ## Showcase
12
+
13
+ - [Coder Zhao’s Zone](https://coderzhaoziwei.github.io)
11
14
 
12
15
  ## Usage
13
16
 
@@ -57,3 +60,17 @@ MIT
57
60
 
58
61
  <!-- https://rubygems.org/gems/jekyll-theme-acg -->
59
62
  <!-- https://github.com/coderzhaoziwei/jekyll-theme-acg -->
63
+
64
+ <!--
65
+
66
+ The page build completed successfully, but returned the following warning for the `main` branch:
67
+
68
+ You are attempting to use a Jekyll theme, "jekyll-theme-acg", which is not supported by GitHub Pages. Please visit https://pages.github.com/themes/ for a list of supported themes. If you are using the "theme" configuration variable for something other than a Jekyll theme, we recommend you rename this variable throughout your site. For more information, see https://docs.github.com/github/working-with-github-pages/adding-a-theme-to-your-github-pages-site-using-jekyll.
69
+
70
+ For information on troubleshooting Jekyll see:
71
+
72
+ https://docs.github.com/articles/troubleshooting-jekyll-builds
73
+
74
+ If you have any questions you can submit a request at https://support.github.com/contact?repo_id=380397777&page_build_id=262410246
75
+
76
+ -->
data/_config.yml CHANGED
@@ -1,36 +1,36 @@
1
- lang: zh-CN
1
+ url:
2
+ baseurl:
2
3
  title: Jekyll Theme ACG
3
4
  description: An awesome theme for Jekyll.
4
-
5
5
  author: Coder Zhao
6
- email: coderzhaoziwei@outlook.com
7
- github_id: coderzhaoziwei
8
-
6
+ lang: en-US
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
12
-
13
- # Theme Color
14
- # Default: red
15
- # Options: red, blue, pink, green, yellow, purple
16
- color: red
17
-
18
- url:
19
- baseurl:
20
9
 
21
- # Theme Background Image Path
22
- # Default: /assets/images/bg.png
23
- # Author: saino
24
- # Origin: https://www.pixiv.net/artworks/86925095
25
10
 
26
-
27
-
28
-
29
- show_excerpt: true
30
- paginate: 10
31
- paginate_path: /page:num
32
-
33
- # ========== ========== ========== ========== ==========
11
+ acg:
12
+ # Theme Color
13
+ # Default: red
14
+ # Options: red, blue, pink, green, yellow, purple, gray
15
+ color:
16
+ # Theme Background Image Path
17
+ # Default: https://cdn.jsdelivr.net/gh/coderzhaoziwei/jekyll-theme-acg/assets/images/pixiv86925095.png
18
+ background:
19
+ categories:
20
+ label: Categories
21
+ description:
22
+ tags:
23
+ label: Tags
24
+ description:
25
+ about:
26
+ label: About
27
+ description:
28
+ friends:
29
+ label: Friends
30
+ description:
31
+ error:
32
+ label: <span class="text-6xl">404</span>
33
+ description: "Page not found."
34
34
 
35
35
 
36
36
  exclude: [
@@ -39,99 +39,97 @@ exclude: [
39
39
  "package.json",
40
40
  "tailwind.config.js",
41
41
  "yarn.lock",
42
- "jekyll-theme-acg.gemspec",
43
- "jekyll-theme-acg-*.gem",
42
+ "*.gem",
43
+ "*.gemspec",
44
44
  ]
45
45
 
46
- sass:
47
- style: compressed
48
-
49
- collections_dir: ""
50
- collections:
51
- posts:
52
- output: true
53
- permalink: /:collection/:title
54
46
 
55
47
  defaults:
56
- - scope:
57
- path: "" # all files in the project
48
+ - scope: # all
49
+ path: ""
58
50
  values:
59
- layout: default
51
+ layout: page
60
52
  - scope:
53
+ path: "index.html"
54
+ values:
55
+ layout: page
56
+ type: home
57
+ - scope: # _posts
61
58
  path: ""
62
59
  type: posts
63
60
  values:
64
- layout: post
61
+ layout: page
62
+ permalink: /posts/:title
63
+ type: post
64
+
65
65
 
66
- # Configuration for plugin jekyll-archives
66
+ paginate: 10
67
+ show_excerpt: true
68
+ paginate_path: /page:num
69
+ sass:
70
+ style: compressed
71
+
72
+
73
+ # ************************************************ #
74
+ # #
75
+ # Jekyll Archives #
76
+ # #
77
+ # @see https://github.com/jekyll/jekyll-archives #
78
+ # #
79
+ # ************************************************ #
67
80
  jekyll-archives:
68
81
  enabled: [categories, tags]
69
82
  layouts:
70
- category: category
71
- tag: tag
83
+ category: page
84
+ tag: page
72
85
  permalinks:
73
86
  tag: /tags/:name/
74
87
  category: /categories/:name/
75
- # layout: archive
76
88
 
77
- # Configuration for plugin jekyll-spaceship
78
- # @see https://github.com/jeffreytse/jekyll-spaceship#usage
89
+
90
+ # ***************************************************** #
91
+ # #
92
+ # Jekyll Spaceship #
93
+ # #
94
+ # @see https://github.com/jeffreytse/jekyll-spaceship #
95
+ # #
96
+ # ***************************************************** #
79
97
  jekyll-spaceship:
80
98
  processors:
81
99
  - table-processor
82
- - mathjax-processor
83
100
  - plantuml-processor
84
101
  - mermaid-processor
85
- - polyfill-processor
86
102
  - media-processor
87
103
  - emoji-processor
88
104
  - element-processor
89
- mathjax-processor:
90
- src:
91
- - https://polyfill.io/v3/polyfill.min.js?features=es6
92
- - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
93
- config:
94
- tex:
95
- inlineMath:
96
- - ['$','$']
97
- - ['\(','\)']
98
- displayMath:
99
- - ['$$','$$']
100
- - ['\[','\]']
101
- svg:
102
- fontCache: 'global'
103
- optimize: # optimization on building stage to check and add mathjax scripts
104
- enabled: true # value `false` for adding to all pages
105
- include: [] # include patterns for math expressions checking (regexp)
106
- exclude: [] # exclude patterns for math expressions checking (regexp)
107
105
  plantuml-processor:
108
106
  mode: default # mode value 'pre-fetch' for fetching image at building stage
109
107
  css:
110
108
  class: plantuml
111
109
  syntax:
112
- code: 'plantuml!'
113
- custom: ['@startuml', '@enduml']
110
+ code: "plantuml!"
111
+ custom: ["@startuml", "@enduml"]
114
112
  src: http://www.plantuml.com/plantuml/svg/
115
113
  mermaid-processor:
116
114
  mode: default # mode value 'pre-fetch' for fetching image at building stage
117
115
  css:
118
116
  class: mermaid
119
117
  syntax:
120
- code: 'mermaid!'
121
- custom: ['@startmermaid', '@endmermaid']
118
+ code: "mermaid!"
119
+ custom: ["@startmermaid", "@endmermaid"]
122
120
  config:
123
121
  theme: default
124
122
  src: https://mermaid.ink/svg/
125
123
  media-processor:
126
124
  default:
127
- id: 'media-{id}'
128
- class: 'media'
129
- width: '100%'
125
+ id: "media-{id}"
126
+ class: "media"
127
+ width: "100%"
130
128
  height: 350
131
129
  frameborder: 0
132
- style: 'max-width: 600px; outline: none;'
133
- allow: 'encrypted-media; picture-in-picture'
130
+ style: "max-width: 600px; outline: none;"
131
+ allow: "encrypted-media; picture-in-picture"
134
132
  emoji-processor:
135
133
  css:
136
134
  class: emoji
137
- src: https://github.githubassets.com/images/icons/emoji/
135
+ # src: https://github.githubassets.com/images/icons/emoji/
@@ -0,0 +1,36 @@
1
+ {% comment %} size {% endcomment %}
2
+ {% assign width = include.width | default: include.height | default: 6 %}
3
+ {% assign height = include.height | default: include.width | default: 6 %}
4
+
5
+ {% comment %} text {% endcomment %}
6
+ {% assign text = include.text %}
7
+ {% if include.type == "date" %}
8
+ {% assign text = text | date: "%Y-%m-%d" %}
9
+ {% endif %}
10
+
11
+ {% comment %} href {% endcomment %}
12
+ {% assign href = nil %}
13
+ {% if include.type == "category" %}
14
+ {% assign name = include.text | default: "CATEGORY" | slugify %}
15
+ {% assign href = "/categories/" | append: name %}
16
+ {% elsif include.type == "tag" %}
17
+ {% assign name = include.text | default: "TAG" | slugify %}
18
+ {% assign href = "/tags/" | append: name %}
19
+ {% endif %}
20
+
21
+ <a
22
+ class="mx-px text-opacity-75 flex items-center select-none
23
+ {% if include.larger %}text-4xl text-{{ color }}-100{% else %}text-sm text-{{ color }}-500{% endif %}"
24
+ {% if href %}href="{{ href | relative_url }}"{% endif %}
25
+ >
26
+ <!-- svg -->
27
+ {% include svg-{{ include.type }}.html width=width height=height %}
28
+ <!-- text -->
29
+ {% if include.text %}
30
+ <span class="inline-block p-1 whitespace-nowrap">{{ text }}</span>
31
+ {% endif %}
32
+ <!-- count -->
33
+ {% if include.count and include.count > 0 %}
34
+ <span class="inline-block p-1 whitespace-nowrap">{{ include.count }}</span>
35
+ {% endif %}
36
+ </a>
File without changes
@@ -0,0 +1,25 @@
1
+ {% capture svgClass %}flex-shrink-0 text-{{ color }}-600{% endcapture %}
2
+
3
+ <div class="w-full mx-auto flex justify-between space-x-4">
4
+
5
+ <!-- prev -->
6
+ {% if page.next and page.next.id %}
7
+ <a class="w-1/2 p-4 flex items-center rounded-lg bg-{{ color }}-50 bg-opacity-75" href="{{ page.next.id | relative_url }}">
8
+ {% include svg-prev.html class=svgClass %}
9
+ <span class="ml-4 text-black">{{ page.next.title | default: "" }}</span>
10
+ </a>
11
+ {% else %}
12
+ <a class="w-1/2 p-4 opacity-0"></a>
13
+ {% endif %}
14
+
15
+ <!-- next -->
16
+ {% if page.previous and page.previous.id %}
17
+ <a class="w-1/2 p-4 flex flex-row-reverse items-center rounded-lg bg-{{ color }}-50 bg-opacity-75" href="{{ page.previous.id | relative_url }}">
18
+ {% include svg-next.html class=svgClass %}
19
+ <span class="mr-4 text-black">{{ page.previous.title | default: "" }}</span>
20
+ </a>
21
+ {% else %}
22
+ <a class="w-1/2 p-4 opacity-0"></a>
23
+ {% endif %}
24
+
25
+ </div>
@@ -1,5 +1,3 @@
1
- {% assign color = page.color | default: site.color %}
2
-
3
1
  <footer class="w-full mt-4 p-2 text-sm text-{{ color }}-100 ">
4
2
  <p class="text-center">
5
3
  Powered by
@@ -9,7 +7,7 @@
9
7
  </p>
10
8
  <p class="text-center">
11
9
  Copyright {{ "now" | date: "%Y" }}
12
- <a class="text-{{ color }}-400" href="https://github.com/{{ site.github_id }}" target="_block">{{ site.author }}</a>
10
+ <a class="text-{{ color }}-400">{{ site.author | default: "AUTHOR_NAME" }}</a>
13
11
  · All rights reserved.
14
12
  </p>
15
13
  </footer>
@@ -0,0 +1,47 @@
1
+ <head>
2
+ <meta charset="utf-8">
3
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
4
+
5
+ {% seo %}<!-- Begin Jekyll Feed -->
6
+ {% feed_meta %}
7
+ <!-- End Jekyll Feed -->
8
+
9
+ <!-- Tailwind -->
10
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/tailwindcss@2/dist/tailwind.min.css">
11
+ <!-- Primer Markdown -->
12
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/primer-markdown@4.0.0/build/build.css">
13
+ <!-- HighlightJS -->
14
+ <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.0.1/build/highlight.min.js"></script>
15
+ <script>hljs.highlightAll();</script>
16
+ <!-- HighlightJS Theme VS2015 -->
17
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/highlight.js@11.0.1/styles/vs2015.css">
18
+ <!-- MathJax @see https://www.mathjax.org -->
19
+ {% if page.math == true %}
20
+ <script>
21
+ MathJax = {
22
+ tex: {
23
+ inlineMath: [["$", "$"], ["\\(", "\\)"]]
24
+ },
25
+ };
26
+ </script>
27
+ <script id="MathJax-script" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js" async></script>
28
+ {% endif %}
29
+ <!-- Theme -->
30
+ <link rel="stylesheet" href="{{ "assets/css/style.css" | relative_url }}">
31
+ <style id="ThemeColor">
32
+ :root {
33
+ --theme-50: var(--{{ color }}-50);
34
+ --theme-100: var(--{{ color }}-100);
35
+ --theme-200: var(--{{ color }}-200);
36
+ --theme-300: var(--{{ color }}-300);
37
+ --theme-400: var(--{{ color }}-400);
38
+ --theme-500: var(--{{ color }}-500);
39
+ --theme-600: var(--{{ color }}-600);
40
+ --theme-700: var(--{{ color }}-700);
41
+ --theme-800: var(--{{ color }}-800);
42
+ --theme-900: var(--{{ color }}-900);
43
+ }
44
+ </style>
45
+ <style id="ThemeBackgroundImage">.bg-image { background-image: url("{{ background }}"); }</style>
46
+ {% include custom-head.html %}
47
+ </head>
@@ -1,27 +1,46 @@
1
- {% assign color = page.color | default: site.color %}
2
1
 
2
+ {% capture siteUrl %}{{ site.url | default: "/" | relative_url }}{% endcapture %}
3
+ {% capture siteTitle %}{{ site.title }}{% endcapture %}
4
+
5
+ {% capture categoriesUrl %}{{ "/categories" | relative_url }}{% endcapture %}
6
+ {% capture categoriesLabel %}{{ site.acg.categories.label | default: "Categories" }}{% endcapture %}
7
+
8
+ {% capture tagsUrl %}{{ "/tags" | relative_url }}{% endcapture %}
9
+ {% capture tagsLabel %}{{ site.acg.tags.label | default: "Tags" }}{% endcapture %}
10
+
11
+ {% capture aboutUrl %}{{ "/about" | relative_url }}{% endcapture %}
12
+ {% capture aboutLabel %}{{ site.acg.about.label | default: "Tags" }}{% endcapture %}
13
+
14
+ {% capture friendsUrl %}{{ "/friends" | relative_url }}{% endcapture %}
15
+ {% capture friendsLabel %}{{ site.acg.friends.label | default: "Friends" }}{% endcapture %}
16
+
17
+ {% assign friends = site.data.friends %}
3
18
 
4
19
  <header class="w-full fixed z-50 select-none bg-{{ color }}-600 bg-opacity-10 bg-blur">
5
20
  <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>
21
+ <a class="hover:text-{{ color }}-400 text-2xl" href="{{ siteUrl }}">{{ siteTitle }}</a>
7
22
  <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>
23
+ <a class="hover:text-{{ color }}-400" href="{{ categoriesUrl }}">{{ categoriesLabel }}</a>
24
+ <a class="hover:text-{{ color }}-400" href="{{ tagsUrl }}">{{ tagsLabel }}</a>
25
+ <a class="hover:text-{{ color }}-400" href="{{ aboutUrl }}">{{ aboutLabel }}</a>
26
+ {% if friends.size > 0 %}
27
+ <a class="hover:text-{{ color }}-400" href="{{ friendsUrl }}">{{ friendsLabel }}</a>
28
+ {% endif %}
11
29
  </div>
30
+
31
+ <style>#theme-menu:hover > #theme-menu-dropdown { display: block; }</style>
12
32
  <div id="theme-menu" class="md:hidden">
13
- <style>#theme-menu:hover > #theme-menu-dropdown { display: block; }</style>
14
33
  <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>
34
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></svg>
18
35
  </button>
19
36
  <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>
37
+ <a class="block px-4 py-2 text-sm text-{{ color }}-600 hover:bg-{{ color }}-200" href="{{ categoriesUrl }}">{{ categoriesLabel }}</a>
38
+ <a class="block px-4 py-2 text-sm text-{{ color }}-600 hover:bg-{{ color }}-200" href="{{ tagsUrl }}">{{ tagsLabel }}</a>
39
+ <a class="block px-4 py-2 text-sm text-{{ color }}-600 hover:bg-{{ color }}-200" href="{{ aboutUrl }}">{{ aboutLabel }}</a>
40
+ {% if friends.size > 0 %}
41
+ <a class="block px-4 py-2 text-sm text-{{ color }}-600 hover:bg-{{ color }}-200" href="{{ friendsUrl }}">{{ friendsLabel }}</a>
42
+ {% endif %}
23
43
  </div>
24
44
  </div>
25
-
26
45
  </nav>
27
46
  </header>
@@ -0,0 +1,38 @@
1
+
2
+ {% capture class %}flex-shrink-0 text-{{ color }}-400{% endcapture %}
3
+
4
+
5
+ <div class="flex justify-between items-center">
6
+ <!-- Prev -->
7
+ <a
8
+ href="{{ paginator.previous_page_path | relative_url }}"
9
+ class="flex justify-center items-center m-2 ml-0 w-8 h-8 rounded-full bg-{{ color }}-50 bg-opacity-75
10
+ hover:bg-{{ color }}-100 hover:bg-opacity-75 hover:text-{{ color }}-400"
11
+ >{% include svg-prev.html class=class %}</a>
12
+ <!-- Pages -->
13
+ <div class="flex flex-wrap items-center justify-center">
14
+ <!-- paginator.total_pages -->
15
+ {%- for pageCount in (1..paginator.total_pages) -%}
16
+ {% assign pagePath = site.paginate_path | replace: ":num", pageCount %}
17
+ <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-opacity-75 border border-transparent hover:bg-{{ color }}-100 hover:bg-opacity-75 hover:text-{{ color }}-400
18
+ {% if pageCount == paginator.page %}
19
+ text-{{ color }}-400 select-none
20
+ {% else %}
21
+ text-black
22
+ {% endif %}"
23
+
24
+ {% if pageCount != paginator.page %}
25
+ {% if pageCount == 1 %}href={{ "/" | relative_url }}{% else %}href="{{ pagePath | relative_url }}"{% endif %}
26
+ {% endif %}
27
+
28
+ ><span class="block">{{ pageCount }}</span></a>
29
+ {%- endfor -%}
30
+ </div>
31
+ <!-- Next -->
32
+ <a
33
+ href="{{ paginator.next_page_path | relative_url }}"
34
+ class="flex justify-center items-center m-2 mr-0 w-8 h-8 rounded-full bg-{{ color }}-50 bg-opacity-75 hover:bg-{{ color }}-100 hover:bg-opacity-75 hover:text-{{ color }}-400"
35
+ >
36
+ {% include svg-next.html class=class %}
37
+ </a>
38
+ </div>