jekyll-theme-acg 1.0.7 → 1.0.12

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: 2a1bfc82c9da9620e8757ebb6f816be5530ea937596c77d2839effe91d98bf42
4
- data.tar.gz: fbd05c7e4a65466fceca8dd3e51cf75de0464ad11d2c91feb284c413e974b3f7
3
+ metadata.gz: d0ebe65d00ff1b13954d9ad9d17ff30969ac57e08c06dcbb6eafad7da26f153b
4
+ data.tar.gz: 7e4655460e9f9e0c17dfd70f81f03e51db16be7db38c8d68e2d3b7db6dd5281b
5
5
  SHA512:
6
- metadata.gz: 43cda9abfb9aea262840acd9a253fe841a07cb51916b3eb980e9ab83db621600cbfd4a89a2da74d02475814e60daca52dabf8b46b9e2a176a79b24f615f66bbf
7
- data.tar.gz: afe48d1ef08e8acd5ac59171763b21945a4630633a0dcdf9a8ba3639f51d4dd3989f83439f279c2f2e609884f4adab9832139e09486d15a92d2ee8ed6456f2e1
6
+ metadata.gz: df76671b47f54391ade85663f10a2450b5da9d983f9b49d26ed738a77d47f740a1b430c7831ab20ddc2c14fa1624751513b09a72efee92371de2f78942ce8b86
7
+ data.tar.gz: 237486fbdbccc787f884ba48f6ab910220378456a1c8c19312fbacb88c8fc3c54f86f1d122655e06b63a127bab590c96be92939835d53a90f741b16f59170800
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,34 @@
1
- lang: zh-CN
1
+ url:
2
+ baseurl:
2
3
  title: Jekyll Theme ACG
3
4
  description: An awesome theme for Jekyll.
4
5
  author: Coder Zhao
5
- email: coderzhaoziwei@outlook.com
6
-
7
- # Theme Name
6
+ lang:
8
7
  theme: jekyll-theme-acg
9
- acg:
10
- categories: Categories
11
- tags: Tags
12
- about: About
13
- error: Page Not Found.
14
- github: coderzhaoziwei
15
-
16
- # Theme Color
17
- # Default: red
18
- # Options: red, blue, pink, green, yellow, purple
19
- color: red
20
- # Theme Background Image Path
21
- # Default: /assets/images/bg.png
22
- # Author: saino
23
- # Origin: https://www.pixiv.net/artworks/86925095
24
- background: https://cdn.jsdelivr.net/gh/coderzhaoziwei/jekyll-theme-acg/assets/images/bg.png
25
-
26
- url:
27
- baseurl:
28
- paginate: 10
29
-
30
- show_excerpt: true
31
- paginate_path: /page:num
32
8
 
33
- # ========== ========== ========== ========== ==========
9
+ acg:
10
+ # Theme Color
11
+ # Default: red
12
+ # Options: red, blue, pink, green, yellow, purple, gray
13
+ color:
14
+ # Theme Background Image Path
15
+ # Default: https://cdn.jsdelivr.net/gh/coderzhaoziwei/jekyll-theme-acg/assets/images/pixiv86925095.png
16
+ background:
17
+ categories:
18
+ label:
19
+ description:
20
+ tags:
21
+ label:
22
+ description:
23
+ about:
24
+ label:
25
+ description:
26
+ friends:
27
+ label:
28
+ description:
29
+ error:
30
+ label:
31
+ description:
34
32
 
35
33
  exclude: [
36
34
  "LICENSE",
@@ -42,29 +40,37 @@ exclude: [
42
40
  "*.gemspec",
43
41
  ]
44
42
 
45
- collections_dir: ""
46
- collections:
47
- posts:
48
- output: true
49
- permalink: /:collection/:title
50
-
51
43
  defaults:
52
- - scope:
53
- path: "" # all files in the project
44
+ - scope: # all
45
+ path: ""
54
46
  values:
55
47
  layout: page
56
48
  - scope:
49
+ path: "index.html"
50
+ values:
51
+ layout: page
52
+ type: home
53
+ - scope: # _posts
57
54
  path: ""
58
55
  type: posts
59
56
  values:
60
- layout: post
57
+ layout: page
58
+ permalink: /posts/:title
59
+ type: post
61
60
 
61
+ paginate: 10
62
+ show_excerpt: true
63
+ paginate_path: /page:num
62
64
  sass:
63
65
  style: compressed
64
66
 
65
-
66
- # Jekyll Archives
67
- # @see https://github.com/jekyll/jekyll-archives
67
+ # ************************************************ #
68
+ # #
69
+ # Jekyll Archives #
70
+ # #
71
+ # @see https://github.com/jekyll/jekyll-archives #
72
+ # #
73
+ # ************************************************ #
68
74
  jekyll-archives:
69
75
  enabled: [categories, tags]
70
76
  layouts:
@@ -75,36 +81,21 @@ jekyll-archives:
75
81
  category: /categories/:name/
76
82
 
77
83
 
78
- # Jekyll Spaceship
79
- # @see https://github.com/jeffreytse/jekyll-spaceship#usage
84
+ # ***************************************************** #
85
+ # #
86
+ # Jekyll Spaceship #
87
+ # #
88
+ # @see https://github.com/jeffreytse/jekyll-spaceship #
89
+ # #
90
+ # ***************************************************** #
80
91
  jekyll-spaceship:
81
92
  processors:
82
93
  - table-processor
83
- - mathjax-processor
84
94
  - plantuml-processor
85
95
  - mermaid-processor
86
- - polyfill-processor
87
96
  - media-processor
88
97
  - emoji-processor
89
98
  - element-processor
90
- mathjax-processor:
91
- src:
92
- # - https://polyfill.io/v3/polyfill.min.js?features=es6
93
- - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
94
- config:
95
- tex:
96
- inlineMath:
97
- - ["$", "$"]
98
- - ["\(", "\)"]
99
- displayMath:
100
- - ["$$", "$$"]
101
- - ["\[", "\]"]
102
- svg:
103
- fontCache: "global"
104
- optimize: # optimization on building stage to check and add mathjax scripts
105
- enabled: true # value `false` for adding to all pages
106
- include: [] # include patterns for math expressions checking (regexp)
107
- exclude: [] # exclude patterns for math expressions checking (regexp)
108
99
  plantuml-processor:
109
100
  mode: default # mode value 'pre-fetch' for fetching image at building stage
110
101
  css:
@@ -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>
@@ -0,0 +1,13 @@
1
+ <footer class="w-full mt-4 p-2 text-sm text-{{ color }}-100 ">
2
+ <p class="text-center">
3
+ Powered by
4
+ <a class="text-{{ color }}-400" href="https://jekyllrb.com" target="_block">Jekyll</a>
5
+ ·
6
+ <a class="text-{{ color }}-400" href="https://github.com/coderzhaoziwei/jekyll-theme-acg" target="_block">Jekyll Theme ACG</a>
7
+ </p>
8
+ <p class="text-center">
9
+ Copyright {{ "now" | date: "%Y" }}
10
+ <a class="text-{{ color }}-400">{{ site.author | default: "AUTHOR_NAME" }}</a>
11
+ · All rights reserved.
12
+ </p>
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>
@@ -0,0 +1,46 @@
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: "About" }}{% 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 %}
18
+
19
+ <header class="w-full fixed z-50 select-none bg-{{ color }}-600 bg-opacity-10 bg-blur">
20
+ <nav class="p-4 font-serif text-xl text-{{ color }}-50 flex justify-between">
21
+ <a class="hover:text-{{ color }}-400 text-2xl" href="{{ siteUrl }}">{{ siteTitle }}</a>
22
+ <div class="hidden md:block space-x-4">
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 %}
29
+ </div>
30
+
31
+ <style>#theme-menu:hover > #theme-menu-dropdown { display: block; }</style>
32
+ <div id="theme-menu" class="md:hidden">
33
+ <button class="hover:outline-none hover:text-{{ color }}-400">
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>
35
+ </button>
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">
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 %}
43
+ </div>
44
+ </div>
45
+ </nav>
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>
data/_includes/posts.html CHANGED
@@ -1,53 +1,54 @@
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 %}
1
+ {% assign posts1 = "" | split: "" %}
2
+ {% assign posts2 = "" | split: "" %}
3
+ {% for post in include.posts %}
4
+ {% if post.pin %}
5
+ {% assign posts1 = posts1 | push: post %}
20
6
  {% else %}
21
- {% assign minIndex = 0 %}
22
- {% assign maxIndex = posts.size | minus: 1 %}
7
+ {% assign posts2 = posts2 | push: post %}
23
8
  {% 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
-
9
+ {% endfor %}
10
+ {% assign posts = posts1 | concat: posts2 %}
11
+
12
+ {% if page.type == "home" %}
13
+ {% assign offset = paginator.page | minus: 1 | times: paginator.per_page %}
14
+ {% assign count = paginator.posts | size | minus: 1 %}
15
+ {% assign minIndex = offset %}
16
+ {% assign maxIndex = offset | plus: count %}
17
+ {% else %}
18
+ {% assign minIndex = 0 %}
19
+ {% assign maxIndex = posts.size | minus: 1 %}
20
+ {% endif %}
21
+
22
+ {% for index in (minIndex..maxIndex) %}{% assign post = posts[index] %}
39
23
  <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
-
24
+ <!-- post.pin -->
25
+ {% if post.pin %}
26
+ {% capture class %}{{ "absolute -left-2 -top-2 text-color-600" | replace: "color", color }}{% endcapture %}
27
+ {% include svg-pin.html class=class %}
28
+ {% endif %}
29
+ <!-- post.title -->
30
+ <a class="block text-3xl font-serif font-medium" href="{{ post.id | relative_url }}">
31
+ {{ post.title | default: "NO_TITLE" | escape }}
32
+ </a>
33
+ <!-- post.description -->
34
+ <span class="block p-1 text-sm font-extralight">
35
+ {{ post.description | default: post.excerpt | strip_html }}
36
+ </span>
44
37
  <div class="flex flex-wrap select-none">
45
- <div class="flex-grow">{% include item-date.html date=date %}</div>
38
+ <div class="flex-grow">
39
+ <!-- post.date -->
40
+ {% include chip.html type="date" text=post.date width=4 %}
41
+ </div>
46
42
  <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 %}
43
+ <!-- post.categories -->
44
+ {% for category in post.categories %}
45
+ {% include chip.html type="category" text=category width=4 %}
46
+ {% endfor %}
47
+ <!-- post.tags -->
48
+ {% for tag in post.tags %}
49
+ {% include chip.html type="tag" text=tag width=4 %}
50
+ {% endfor %}
49
51
  </div>
50
52
  </div>
51
53
  </div>
52
-
53
54
  {% endfor %}
@@ -0,0 +1,10 @@
1
+ <svg
2
+ class="
3
+ {{ include.class }}
4
+ w-{{ include.width | default: include.height | default: 6 }}
5
+ h-{{ include.height | default: include.width | default: 6 }}
6
+ "
7
+ xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"
8
+ >
9
+ <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">
10
+ </svg>
@@ -0,0 +1,10 @@
1
+ <svg
2
+ class="
3
+ {{ include.class }}
4
+ w-{{ include.width | default: include.height | default: 6 }}
5
+ h-{{ include.height | default: include.width | default: 6 }}
6
+ "
7
+ xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"
8
+ >
9
+ <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">
10
+ </svg>
@@ -0,0 +1,10 @@
1
+ <svg
2
+ class="
3
+ {{ include.class }}
4
+ w-{{ include.width | default: include.height | default: 6 }}
5
+ h-{{ include.height | default: include.width | default: 6 }}
6
+ "
7
+ xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"
8
+ >
9
+ <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">
10
+ </svg>
@@ -0,0 +1,10 @@
1
+ <svg
2
+ class="
3
+ {{ include.class }}
4
+ w-{{ include.width | default: include.height | default: 6 }}
5
+ h-{{ include.height | default: include.width | default: 6 }}
6
+ "
7
+ xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"
8
+ >
9
+ <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">
10
+ </svg>
@@ -0,0 +1,10 @@
1
+ <svg
2
+ class="
3
+ {{ include.class }}
4
+ w-{{ include.width | default: include.height | default: 6 }}
5
+ h-{{ include.height | default: include.width | default: 6 }}
6
+ "
7
+ xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"
8
+ >
9
+ <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">
10
+ </svg>
@@ -0,0 +1,10 @@
1
+ <svg
2
+ class="
3
+ {{ include.class }}
4
+ w-{{ include.width | default: include.height | default: 6 }}
5
+ h-{{ include.height | default: include.width | default: 6 }}
6
+ "
7
+ xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"
8
+ >
9
+ <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">
10
+ </svg>
@@ -0,0 +1,10 @@
1
+ ---
2
+ # Jekyll layout that compresses HTML
3
+ # v3.1.0
4
+ # http://jch.penibelst.de/
5
+ # © 2014–2015 Anatol Broder
6
+ # MIT License
7
+ ---
8
+
9
+ {% capture _LINE_FEED %}
10
+ {% endcapture %}{% if site.compress_html.ignore.envs contains jekyll.environment or site.compress_html.ignore.envs == "all" %}{{ content }}{% else %}{% capture _content %}{{ content }}{% endcapture %}{% assign _profile = site.compress_html.profile %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _end %}</{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _end %}{% endfor %}{% if _profile and _endings %}{% assign _profile_endings = _content | size | plus: 1 %}{% endif %}{% for _element in site.compress_html.startings %}{% capture _start %}<{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _start %}{% endfor %}{% if _profile and site.compress_html.startings %}{% assign _profile_startings = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.comments == "all" %}{% assign _comments = "<!-- -->" | split: " " %}{% else %}{% assign _comments = site.compress_html.comments %}{% endif %}{% if _comments.size == 2 %}{% capture _comment_befores %}.{{ _content }}{% endcapture %}{% assign _comment_befores = _comment_befores | split: _comments.first %}{% for _comment_before in _comment_befores %}{% if forloop.first %}{% continue %}{% endif %}{% capture _comment_outside %}{% if _carry %}{{ _comments.first }}{% endif %}{{ _comment_before }}{% endcapture %}{% capture _comment %}{% unless _carry %}{{ _comments.first }}{% endunless %}{{ _comment_outside | split: _comments.last | first }}{% if _comment_outside contains _comments.last %}{{ _comments.last }}{% assign _carry = false %}{% else %}{% assign _carry = true %}{% endif %}{% endcapture %}{% assign _content = _content | remove_first: _comment %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% assign _pre_befores = _content | split: "<pre" %}{% assign _content = "" %}{% for _pre_before in _pre_befores %}{% assign _pres = _pre_before | split: "</pre>" %}{% assign _pres_after = "" %}{% if _pres.size != 0 %}{% if site.compress_html.blanklines %}{% assign _lines = _pres.last | split: _LINE_FEED %}{% capture _pres_after %}{% for _line in _lines %}{% assign _trimmed = _line | split: " " | join: " " %}{% if _trimmed != empty or forloop.last %}{% unless forloop.first %}{{ _LINE_FEED }}{% endunless %}{{ _line }}{% endif %}{% endfor %}{% endcapture %}{% else %}{% assign _pres_after = _pres.last | split: " " | join: " " %}{% endif %}{% endif %}{% capture _content %}{{ _content }}{% if _pre_before contains "</pre>" %}<pre{{ _pres.first }}</pre>{% endif %}{% unless _pre_before contains "</pre>" and _pres.size == 1 %}{{ _pres_after }}{% endunless %}{% endcapture %}{% endfor %}{% if _profile %}{% assign _profile_collapse = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.clippings == "all" %}{% assign _clippings = "html head title base link meta style body article section nav aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr blockquote ol ul li dl dt dd figure figcaption main div table caption colgroup col tbody thead tfoot tr td th" | split: " " %}{% else %}{% assign _clippings = site.compress_html.clippings %}{% endif %}{% for _element in _clippings %}{% assign _edges = " <e;<e; </e>;</e>;</e> ;</e>" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{% if _profile and _clippings %}{% assign _profile_clippings = _content | size | plus: 1 %}{% endif %}{{ _content }}{% if _profile %} <table id="compress_html_profile_{{ site.time | date: "%Y%m%d" }}" class="compress_html_profile"> <thead> <tr> <td>Step <td>Bytes <tbody> <tr> <td>raw <td>{{ content | size }}{% if _profile_endings %} <tr> <td>endings <td>{{ _profile_endings }}{% endif %}{% if _profile_startings %} <tr> <td>startings <td>{{ _profile_startings }}{% endif %}{% if _profile_comments %} <tr> <td>comments <td>{{ _profile_comments }}{% endif %}{% if _profile_collapse %} <tr> <td>collapse <td>{{ _profile_collapse }}{% endif %}{% if _profile_clippings %} <tr> <td>clippings <td>{{ _profile_clippings }}{% endif %} </table>{% endif %}{% endif %}
data/_layouts/page.html CHANGED
@@ -1,57 +1,125 @@
1
1
  ---
2
- layout: default
2
+ layout: compress
3
3
  ---
4
- {% capture workspace %}
5
- {% assign color = page.color | default: site.color %}
6
- {% assign title = page.title %}
7
- {% assign description = page.description %}
8
- {% assign content = content | strip %}
9
-
10
- {% assign list = "" | split: "" %}
11
-
12
- {% if page.permalink == "/404.html" %}
13
- {% capture title %}<span class="text-6xl">404</span>{% endcapture %}
14
- {% capture description %}{{ site.acg.error | default: "Page not found." }}{% endcapture %}
15
- {% elsif page.permalink == "/categories.html" %}
16
- {% assign title = site.acg.categories %}
17
- {% for item in site.categories %}{% assign list = list | push: item[0] %}{% endfor %}
18
- {% elsif page.permalink == "/tags.html" %}
19
- {% assign title = site.acg.tags %}
20
- {% for item in site.tags %}{% assign list = list | push: item[0] %}{% endfor %}
21
- {% endif %}
4
+ {% capture lang %}{{ page.lang | default: site.lang | default: "en-US" }}{% endcapture %}
5
+
6
+ {% comment %} color {% endcomment %}
7
+ {% capture color %}{{ page.color | default: site.color | downcase }}{% endcapture %}
8
+ {% assign colors = "red, blue, pink, green, yellow, purple, gray, default" | split: ", " %}
9
+ {% for item in colors %}
10
+ {% if item == color %}{% break %}{% endif %}
11
+ {% if item == "default" %}{% assign color = "red" %}{% endif %}
12
+ {% endfor %}
13
+
14
+ {% comment %} background {% endcomment %}
15
+ {% capture background %}{{ page.background | default: site.acg.background | default: "https://cdn.jsdelivr.net/gh/coderzhaoziwei/jekyll-theme-acg/assets/images/pixiv86925095.png" | relative_url }}{% endcapture %}
22
16
 
23
- {% assign list = list | sort %}
17
+ {% assign title = page.title %}
18
+ {% assign description = page.description %}
19
+ {% assign content = content | strip %}
24
20
 
25
- {% endcapture %}
21
+ {% if page.type == "home" %}
22
+ {% capture title %}{{ site.title }}{% endcapture %}
23
+ {% capture description %}{{ site.description }}{% endcapture %}
24
+ {% elsif page.permalink == "/categories.html" %}
25
+ {% capture title %}{{ site.acg.categories.label | default: "Categories" }}{% endcapture %}
26
+ {% capture description %}{{ site.acg.categories.description }}{% endcapture %}
27
+ {% elsif page.permalink == "/tags.html" %}
28
+ {% capture title %}{{ site.acg.tags.label | default: "Tags" }}{% endcapture %}
29
+ {% capture description %}{{ site.acg.tags.description }}{% endcapture %}
30
+ {% elsif page.permalink == "/about.html" %}
31
+ {% capture title %}{{ site.acg.about.label | default: "About" }}{% endcapture %}
32
+ {% capture description %}{{ site.acg.about.description }}{% endcapture %}
33
+ {% elsif page.permalink == "/friends.html" %}
34
+ {% capture title %}{{ site.acg.friends.label | default: "Friends" }}{% endcapture %}
35
+ {% capture description %}{{ site.acg.friends.description }}{% endcapture %}
36
+ {% elsif page.permalink == "/404.html" %}
37
+ {% capture title %}{{ site.acg.error.label | default: '<span class="text-6xl">404</span>' }}{% endcapture %}
38
+ {% capture description %}{{ site.acg.error.description | default: "Page not found." }}{% endcapture %}
39
+ {% endif %}
26
40
 
41
+ {% assign list = "" | split: "" %}
42
+ {% if page.permalink == "/categories.html" %}
43
+ {% for item in site.categories %}{% assign list = list | push: item[0] %}{% endfor %}
44
+ {% elsif page.permalink == "/tags.html" %}
45
+ {% for item in site.tags %}{% assign list = list | push: item[0] %}{% endfor %}
46
+ {% endif %}
47
+ {% assign list = list | sort %}
48
+
49
+ <!DOCTYPE html>
50
+ <html lang="{{ lang }}" class="min-h-screen bg-image bg-cover bg-center bg-fixed">
51
+ {% include head.html %}
52
+ <body class="flex flex-col items-center bg-black bg-opacity-50">
53
+ {% include header.html %}
27
54
  <div class="w-acg min-h-screen py-16">
28
- <div class="w-full py-32 text-{{ color }}-50 flex flex-col justify-center items-center content-center">
55
+ <div class="w-full flex flex-col justify-center items-center content-center text-{{ color }}-50
56
+ {% if page.type == "home" %}h-screen select-none pb-16{% else %}py-32{% endif %}"
57
+ >
29
58
  <!-- title -->
30
59
  <div class="text-center text-4xl font-serif py-8">
31
- {% if page.type == "category" %}{% include item-category.html name=title title=true %}
32
- {% elsif page.type == "tag" %}{% include item-tag.html name=title title=true %}
33
- {% else %}{{ title }}{% endif %}
60
+ {% if page.type == "category" %}
61
+ {% include chip.html type="category" text=title width=8 larger=true %}
62
+ {% elsif page.type == "tag" %}
63
+ {% include chip.html type="tag" text=title width=8 larger=true %}
64
+ {% else %}
65
+ {{ title }}
66
+ {% endif %}
34
67
  </div>
35
68
  <!-- description -->
36
69
  <div class="text-center text-base font-sans py-8">{{ description }}</div>
37
- <!-- categories/tags: list -->
70
+
71
+ <!-- categories.html & tags.html -->
38
72
  <div class="flex flex-wrap justify-center items-center content-center select-none">
39
73
  {% if page.permalink == "/categories.html" %}
40
- {% for name in list %}{% assign count = site.categories[name].size %}
41
- <div class="m-1 px-2 bg-{{ color }}-50 bg-opacity-75 rounded">{% include item-category.html name=name count=count %}</div>
74
+ {% for category in list %}{% assign count = site.categories[category].size %}
75
+ <div class="m-1 px-2 bg-{{ color }}-50 bg-opacity-75 rounded">
76
+ {% include chip.html type="category" text=category count=count width=4 %}
77
+ </div>
42
78
  {% endfor %}
43
79
  {% elsif page.permalink == "/tags.html" %}
44
- {% for name in list %}{% assign count = site.tags[name].size %}
45
- <div class="m-1 px-2 bg-{{ color }}-50 bg-opacity-75 rounded">{% include item-tag.html name=name count=count %}</div>
80
+ {% for tag in list %}{% assign count = site.tags[tag].size %}
81
+ <div class="m-1 px-2 bg-{{ color }}-50 bg-opacity-75 rounded">
82
+ {% include chip.html type="tag" text=tag count=count width=4 %}
83
+ </div>
46
84
  {% endfor %}
47
85
  {% endif %}
48
86
  </div>
49
-
50
- <!-- content -->
51
- {% if content != empty %}<article class="w-full my-4 mx-auto p-4 rounded-lg text-black bg-{{ color }}-50 bg-opacity-75 markdown-body">{{ content }}</article>{% endif %}
52
- <!-- posts -->
53
- {% if page.posts %}<div class="w-full p-4 flex flex-col space-y-4">{% include posts.html posts=page.posts %}</div>{% endif %}
54
-
55
87
  </div>
56
88
 
89
+ <!-- article -->
90
+ {% if page.type == "post" %}
91
+ <div class="flex flex-wrap">
92
+ <div class="flex-grow">
93
+ {% include chip.html type="date" text=page.date width=4 %}
94
+ </div>
95
+ <div class="flex flex-wrap">
96
+ {% for category in page.categories %}
97
+ {% include chip.html type="category" text=category width=4 %}
98
+ {% endfor %}
99
+ {% for tag in page.tags %}
100
+ {% include chip.html type="tag" text=tag width=4 %}
101
+ {% endfor %}
102
+ </div>
103
+ </div>
104
+ <article class="w-full my-4 mx-auto p-4 rounded-lg text-black bg-{{ color }}-50 bg-opacity-75 markdown-body">
105
+ <h1>{{ title }}</h1>
106
+ {% include toc.html html=content %}
107
+ {{ content }}
108
+ </article>
109
+ {% include flip.html %}
110
+ {% elsif content != empty %}
111
+ <article class="w-full my-4 mx-auto p-4 rounded-lg text-black bg-{{ color }}-50 bg-opacity-75 markdown-body">
112
+ {{ content }}
113
+ </article>
114
+ {% endif %}
115
+ <!-- posts -->
116
+ {% if page.type == "home" %}
117
+ <div class="w-full p-4 flex flex-col space-y-4">{% include posts.html posts=site.posts %}</div>
118
+ <div class="w-full p-4">{% include paginator.html %}</div>
119
+ {% elsif page.posts %}
120
+ <div class="w-full p-4 flex flex-col space-y-4">{% include posts.html posts=page.posts %}</div>
121
+ {% endif %}
57
122
  </div>
123
+ {% include footer.html %}
124
+ </body>
125
+ </html>
data/_sass/markdown.scss CHANGED
@@ -5,7 +5,7 @@
5
5
  .markdown-body h4,
6
6
  .markdown-body h5,
7
7
  .markdown-body h6 {
8
- color: var(--theme-900);
8
+ color: rgba(0, 0, 0, 0.75);
9
9
  }
10
10
 
11
11
  .markdown-body hr {
@@ -13,9 +13,8 @@
13
13
  }
14
14
 
15
15
  .markdown-body blockquote {
16
- color: var(--theme-700);
17
- border-left-color: var(--theme-700);
18
- opacity: 0.75;
16
+ color: var(--theme-800);
17
+ border-left-color: var(--theme-800);
19
18
  }
20
19
 
21
20
  .markdown-body code:not(.hljs) {
data/_sass/root.scss CHANGED
@@ -91,9 +91,6 @@
91
91
  .bg-blur {
92
92
  backdrop-filter: blur(8px);
93
93
  }
94
- .max-w-acg {
95
- max-width: MIN(90%, 768px);
96
- }
97
94
  .w-acg {
98
95
  width: MIN(90%, 768px);
99
96
  }
data/assets/404.md CHANGED
@@ -1,4 +1,3 @@
1
1
  ---
2
- title: 404
3
2
  permalink: /404.html
4
3
  ---
data/assets/about.md CHANGED
@@ -1,6 +1,4 @@
1
1
  ---
2
- title: About
3
- description: Info about this theme.
4
2
  permalink: /about.html
5
3
  ---
6
4
 
data/assets/categories.md CHANGED
@@ -1,4 +1,3 @@
1
1
  ---
2
- title: categories
3
2
  permalink: /categories.html
4
3
  ---
data/assets/friends.md ADDED
@@ -0,0 +1,6 @@
1
+ ---
2
+ permalink: /friends.html
3
+ ---
4
+ {% for friend in site.data.friends %}
5
+ - [{{ friend.name }}]({{ friend.link }}) {% if friend.description %}\| {{ friend.description }}{% endif %}
6
+ {% endfor %}
data/assets/tags.md CHANGED
@@ -1,4 +1,3 @@
1
1
  ---
2
- title: tags
3
2
  permalink: /tags.html
4
3
  ---
data/index.html CHANGED
@@ -1,3 +1,3 @@
1
1
  ---
2
- layout: home
2
+ # This is homepage of site.
3
3
  ---
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-acg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Coder Zhao
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-26 00:00:00.000000000 Z
11
+ date: 2021-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -165,18 +165,24 @@ files:
165
165
  - LICENSE
166
166
  - README.md
167
167
  - _config.yml
168
- - _includes/head-style.html
169
- - _includes/item-category.html
170
- - _includes/item-date.html
171
- - _includes/item-pin.html
172
- - _includes/item-tag.html
168
+ - _includes/chip.html
169
+ - _includes/custom-head.html
170
+ - _includes/flip.html
171
+ - _includes/footer.html
172
+ - _includes/head.html
173
+ - _includes/header.html
174
+ - _includes/paginator.html
173
175
  - _includes/posts.html
176
+ - _includes/svg-category.html
177
+ - _includes/svg-date.html
178
+ - _includes/svg-next.html
179
+ - _includes/svg-pin.html
180
+ - _includes/svg-prev.html
181
+ - _includes/svg-tag.html
174
182
  - _includes/toc-readme.md
175
183
  - _includes/toc.html
176
- - _layouts/default.html
177
- - _layouts/home.html
184
+ - _layouts/compress.html
178
185
  - _layouts/page.html
179
- - _layouts/post.html
180
186
  - _sass/markdown.scss
181
187
  - _sass/root.scss
182
188
  - _sass/scrollbar.scss
@@ -184,6 +190,7 @@ files:
184
190
  - assets/about.md
185
191
  - assets/categories.md
186
192
  - assets/css/style.scss
193
+ - assets/friends.md
187
194
  - assets/tags.md
188
195
  - index.html
189
196
  homepage: https://github.com/coderzhaoziwei/jekyll-theme-acg
@@ -1,22 +0,0 @@
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 -%}
@@ -1,25 +0,0 @@
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 }}
@@ -1,10 +0,0 @@
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>
@@ -1,2 +0,0 @@
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>
@@ -1,25 +0,0 @@
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 }}
@@ -1,72 +0,0 @@
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">
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>
72
- </html>
data/_layouts/home.html DELETED
@@ -1,54 +0,0 @@
1
- ---
2
- layout: default
3
- ---
4
- {% assign color = site.color %}
5
- {% assign title = site.title %}
6
- {% assign description = 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>
data/_layouts/post.html DELETED
@@ -1,36 +0,0 @@
1
- ---
2
- layout: default
3
- ---
4
- {% capture workspace %}
5
- {% assign color = page.color | default: site.color %}
6
- {% assign title = page.title %}
7
- {% assign description = page.description %}
8
- {% endcapture %}
9
-
10
- <div class="w-acg min-h-screen py-16">
11
- <div class="w-full py-32 text-{{ color }}-50 flex flex-col justify-center items-center content-center">
12
- <div class="text-center text-4xl font-serif py-8">{{ title }}</div>
13
- <div class="text-center text-base font-sans py-8">{{ description }}</div>
14
- <!-- article -->
15
- <article class="w-full my-4 mx-auto p-4 rounded-lg text-black bg-{{ color }}-50 bg-opacity-75 markdown-body">
16
- <h1>{{ title }}</h1>
17
- {% include toc.html html=content %}
18
- {{ content }}
19
- </article>
20
- <!-- footer -->
21
- <div class="w-full mx-auto flex justify-between space-x-4">
22
- <!-- prev -->
23
- {% if page.next and page.next.id %}
24
- <a class="w-1/2 p-4 flex items-center rounded-lg bg-{{ color }}-50 bg-opacity-75" href="{{ page.next.id | relative_url }}"><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"><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><span class="ml-4 text-black">{{ page.next.title | default: "" }}</span></a>
25
- {% else %}
26
- <a class="w-1/2 p-4 opacity-0"></a>
27
- {% endif %}
28
- <!-- next -->
29
- {% if page.previous and page.previous.id %}
30
- <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 }}"><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"><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><span class="mr-4 text-black">{{ page.previous.title | default: "" }}</span></a>
31
- {% else %}
32
- <a class="w-1/2 p-4 opacity-0"></a>
33
- {% endif %}
34
- </div>
35
- </div>
36
- </div>