jekyll-theme-satellite 1.0.0 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +113 -0
- data/_includes/category.html +23 -0
- data/_includes/footer.html +10 -0
- data/_includes/head.html +33 -0
- data/_includes/navigation.html +45 -30
- data/_includes/pagination.html +4 -4
- data/_includes/post.html +2 -2
- data/_includes/search.html +1 -1
- data/_includes/search_event.html +44 -0
- data/_includes/sidebar.html +1 -1
- data/_layouts/default.html +10 -105
- data/_layouts/page.html +86 -0
- data/_sass/darkmode.scss +1 -1
- data/_sass/navigation.scss +2 -3
- data/_sass/pagination.scss +2 -4
- data/_sass/post.scss +32 -25
- data/_sass/search.scss +4 -4
- data/_sass/sidebar.scss +16 -7
- data/_sass/toc.scss +6 -0
- data/assets/css/404.scss +47 -0
- data/assets/css/fonts.scss +29 -0
- data/assets/css/style.scss +23 -25
- data/assets/img/favicon.webp +0 -0
- data/assets/js/{stars.js → background.js} +2 -2
- data/assets/js/common.js +179 -0
- data/assets/js/fontfaceobserver.js +12 -0
- data/assets/js/post.js +191 -0
- data/assets/js/search.js +168 -0
- data/assets/js/subject.js +132 -0
- metadata +94 -7
- data/_config.yml +0 -82
- data/assets/js/main.js +0 -709
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a500e53a72b35809de612f591c923834f7316197a310d89a005b25b4195ad96e
|
4
|
+
data.tar.gz: 6c0fa7b0991fcdcd1a426eef7b2c9426d82b4b467872e74a1a44b39d11bdee1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3078471481814c98235d2ecb7800ddae35837d5555ec49738d89c310e163807ae99dafd5a0de534e1c3b5e83d829da89c091893e1678a0732c0b9b01761710cb
|
7
|
+
data.tar.gz: 39a32049e2333b2d15d75cac2a8061f27bf7c81313a52bed1e4e325038b8318a925742ddf1babf1a1808d3a82634408ab07e10aae8c3c195cbfb918368623ae0
|
data/README.md
ADDED
@@ -0,0 +1,113 @@
|
|
1
|
+
[![CI](https://img.shields.io/badge/Github%20Pages-passing-gold.svg?logo=github)](ci)
|
2
|
+
[![License: MIT](https://img.shields.io/badge/License-MIT-orange.svg)](https://opensource.org/licenses/MIT)
|
3
|
+
[![Jekyll](https://img.shields.io/badge/jekyll-%3E%3D%204.3.2-green.svg)](https://jekyllrb.com/)
|
4
|
+
[![Jekyll](https://img.shields.io/badge/gem%20version-3.2.33-blue.svg)](gem)
|
5
|
+
|
6
|
+
# Satellite🛰️ - Jekyll blog theme
|
7
|
+
An emotional and adorable blog theme powered by ***Jekyll***. Live demo is available here: [https://byanko55.github.io](https://byanko55.github.io)
|
8
|
+
|
9
|
+
![Demo Page](https://i.ibb.co/h1QF06V/demo.webp)
|
10
|
+
|
11
|
+
### Light Mode
|
12
|
+
![Demo Page-light](https://i.ibb.co/PtTbM1V/image-4.webp)
|
13
|
+
|
14
|
+
### Dark Mode
|
15
|
+
![Demo Page-dark](https://i.ibb.co/cY6hwG4/image-5.webp)
|
16
|
+
|
17
|
+
### Fresh and Attractive Design
|
18
|
+
<p>
|
19
|
+
<img src="https://i.ibb.co/4NwrTyj/image-2.webp" height="400px" align="center"/>
|
20
|
+
<img src="https://i.ibb.co/WvyBzkL/Animation.gif" height="400px" align="center"/>
|
21
|
+
</p>
|
22
|
+
|
23
|
+
## Features
|
24
|
+
|
25
|
+
* Comment System using *giscus*
|
26
|
+
* Copy contents of Code Block
|
27
|
+
* Dark/Light Theme
|
28
|
+
* Google Analytics
|
29
|
+
* Hierarchical Categorization
|
30
|
+
* Mobile friendly design
|
31
|
+
* Related Posts
|
32
|
+
* RSS/Sitemap support
|
33
|
+
* Search Post by Title or Tags
|
34
|
+
* Syntax Highlighter (*highlight.js*)
|
35
|
+
* Table of Contents
|
36
|
+
* Visitor Counter (*goatcounter*)
|
37
|
+
|
38
|
+
## Installation
|
39
|
+
|
40
|
+
There are two ways to setup this theme:
|
41
|
+
|
42
|
+
### Method 1: Build from source (Recommended)
|
43
|
+
Fork this repository or download the [source](https://github.com/byanko55/jekyll-theme-satellite/releases) as a zip.
|
44
|
+
|
45
|
+
If you use as destination a repository named USERNAME.github.io, then your url will be https://USERNAME.github.io/.
|
46
|
+
|
47
|
+
|
48
|
+
### Method 2: Utilize Gem package
|
49
|
+
Create a clean site directory (Follow the **Instruction 1~4** described [here](https://jekyllrb.com/docs/)).
|
50
|
+
|
51
|
+
The following materials are redundant, so remove them.
|
52
|
+
* index.markdown
|
53
|
+
* about.markdown
|
54
|
+
* 404.html
|
55
|
+
|
56
|
+
Then, add this line to your Jekyll site's `Gemfile`:
|
57
|
+
|
58
|
+
```
|
59
|
+
gem "jekyll-theme-satellite"
|
60
|
+
```
|
61
|
+
|
62
|
+
You need to replace the initial `_config.yml` file with the [prepared one](https://github.com/byanko55/jekyll-theme-satellite/blob/master/docs/_config.yml).
|
63
|
+
|
64
|
+
### Modify your site setting
|
65
|
+
|
66
|
+
Now fill in the **site variable** such as blog name, profile image, and social accounts in `_config.yml`.
|
67
|
+
|
68
|
+
```
|
69
|
+
title: Example.com
|
70
|
+
description: "Satellite - jekyll blog theme"
|
71
|
+
logo_img: "/assets/img/favicon.webp"
|
72
|
+
profile_img: "/assets/img/profile.jpg"
|
73
|
+
|
74
|
+
# Social Links
|
75
|
+
email: example@gmail.com
|
76
|
+
github_username: github
|
77
|
+
twitter_username: twitter
|
78
|
+
instagram_username: instagram
|
79
|
+
linkedin_username: linkedin
|
80
|
+
facebook_username: facebook
|
81
|
+
```
|
82
|
+
|
83
|
+
### Run site locally
|
84
|
+
|
85
|
+
From the site root directory, install the dependencies:
|
86
|
+
|
87
|
+
```
|
88
|
+
bundle install
|
89
|
+
```
|
90
|
+
|
91
|
+
Start a Jekyll service.
|
92
|
+
|
93
|
+
```
|
94
|
+
bundle exec jekyll serve
|
95
|
+
```
|
96
|
+
|
97
|
+
Now open [http://localhost:4000](http://localhost:4000) in your browser.
|
98
|
+
|
99
|
+
## Customizing
|
100
|
+
|
101
|
+
You can find useful manuals for customizing your site from the below table:
|
102
|
+
|
103
|
+
|||
|
104
|
+
|---|---|
|
105
|
+
|Posting guidelines|[link](https://github.com/byanko55/jekyll-theme-satellite/blob/master/docs/Posting%20Guide.md)|
|
106
|
+
|Enabling ***comment system***|[link](https://github.com/byanko55/jekyll-theme-satellite/blob/master/docs/Comment%20System.md)|
|
107
|
+
|Enabling ***Visitor counter***|[link](https://github.com/byanko55/jekyll-theme-satellite/blob/master/docs/Visitor%20Counter.md)|
|
108
|
+
|
109
|
+
## Contribution
|
110
|
+
If you would like to report a bug or request a new feature, please open [an issue](https://github.com/byanko55/jekyll-theme-satellite/issues) We are open to any kind of feedback or collaboration.
|
111
|
+
|
112
|
+
## License
|
113
|
+
© 2024 *Yankos*. This theme is available as open source under the terms of the [MIT License](https://opensource.org/license/mit/).
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<div class="category-tree">
|
2
|
+
{%- assign page_link = "/" -%}
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M575.8 255.5c0 18-15 32.1-32 32.1h-32l.7 160.2c0 2.7-.2 5.4-.5 8.1V472c0 22.1-17.9 40-40 40H456c-1.1 0-2.2 0-3.3-.1c-1.4 .1-2.8 .1-4.2 .1H416 392c-22.1 0-40-17.9-40-40V448 384c0-17.7-14.3-32-32-32H256c-17.7 0-32 14.3-32 32v64 24c0 22.1-17.9 40-40 40H160 128.1c-1.5 0-3-.1-4.5-.2c-1.2 .1-2.4 .2-3.6 .2H104c-22.1 0-40-17.9-40-40V360c0-.9 0-1.9 .1-2.8V287.6H32c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L564.8 231.5c8 7 12 15 11 24z"/></svg>
|
4
|
+
<p>
|
5
|
+
{%- assign search_tree = page.path | remove: "/index.md" | split: "/" -%}
|
6
|
+
{%- for sub_tree in search_tree -%}
|
7
|
+
{% if forloop.first %}
|
8
|
+
<a href="/">Home</a>
|
9
|
+
>
|
10
|
+
{% elsif forloop.last %}
|
11
|
+
{% if page_type == "category" %}
|
12
|
+
{{ sub_tree }}
|
13
|
+
{% else %}
|
14
|
+
{{ page.title }}
|
15
|
+
{% endif %}
|
16
|
+
{% else %}
|
17
|
+
{%- assign page_link = page_link | append: sub_tree | append: "/" -%}
|
18
|
+
<a href="{{ page_link }}">{{ sub_tree }}</a>
|
19
|
+
>
|
20
|
+
{% endif %}
|
21
|
+
{%- endfor -%}
|
22
|
+
</p>
|
23
|
+
</div>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
|
2
|
+
<script src="{{ '/assets/js/background.js' }}"></script>
|
3
|
+
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
|
4
|
+
<script>
|
5
|
+
window.dataLayer = window.dataLayer || [];
|
6
|
+
function gtag(){ dataLayer.push(arguments); }
|
7
|
+
|
8
|
+
gtag('js', new Date());
|
9
|
+
gtag('config', '{{ site.google_analytics }}');
|
10
|
+
</script>
|
data/_includes/head.html
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
<meta charset="utf-8">
|
2
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
3
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
4
|
+
{% seo %}
|
5
|
+
|
6
|
+
<link rel="shortcut icon" type="image/png" href="{{ site.logo_img }}">
|
7
|
+
<link rel="preload" href="{{ '/assets/css/fonts.css' }}" as="style" onload="this.onload=null; this.rel='stylesheet'">
|
8
|
+
<link rel="stylesheet" href="{{ '/assets/css/fonts.css' }}">
|
9
|
+
|
10
|
+
<script src="{{ '/assets/js/fontfaceobserver.js' }}" type="text/javascript"></script>
|
11
|
+
<script type="text/javascript">
|
12
|
+
const nunitoObserver = new FontFaceObserver('Nunito Sans');
|
13
|
+
const righteousObserver = new FontFaceObserver('Righteous');
|
14
|
+
const latoObserver = new FontFaceObserver('Lato');
|
15
|
+
|
16
|
+
Promise.all([
|
17
|
+
nunitoObserver.load(),
|
18
|
+
righteousObserver.load(),
|
19
|
+
latoObserver.load(),
|
20
|
+
]).then(function(){
|
21
|
+
document.documentElement.className += " fonts-loaded";
|
22
|
+
});
|
23
|
+
</script>
|
24
|
+
|
25
|
+
<title>
|
26
|
+
{% if page.title %}{{ page.title }}
|
27
|
+
{% else %}{{ site.title }}
|
28
|
+
{% endif %}
|
29
|
+
</title>
|
30
|
+
|
31
|
+
<meta
|
32
|
+
name="description"
|
33
|
+
content="{% if page.description %}{{ page.description | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
|
data/_includes/navigation.html
CHANGED
@@ -1,41 +1,55 @@
|
|
1
1
|
<nav id="navigation">
|
2
|
-
{%- assign nav_pages = site.pages
|
3
|
-
| where_exp: "item", "item.title != nil"
|
4
|
-
| where_exp: "item", "item.bookmark == true"
|
5
|
-
| sort: 'title' -%}
|
6
|
-
|
7
2
|
{% assign first_level_pages = "" | split, "" %}
|
8
3
|
{% assign second_level_pages = "" | split, "" %}
|
9
4
|
{% assign third_level_pages = "" | split, "" %}
|
10
5
|
|
11
|
-
{% for p in
|
6
|
+
{% for p in site.pages %}
|
12
7
|
{%- assign p_tree = p.url | remove_first: "/" | split: "/" -%}
|
8
|
+
{%- assign p_name = p_tree | last -%}
|
13
9
|
{%- assign p_level = p_tree | size -%}
|
14
10
|
|
15
|
-
{% if
|
16
|
-
{%
|
17
|
-
{%
|
18
|
-
|
19
|
-
{%
|
20
|
-
{%
|
11
|
+
{% if p.bookmark == nil and p_name != 'index.html' %}
|
12
|
+
{% continue %}
|
13
|
+
{% endif %}
|
14
|
+
|
15
|
+
{% if p.bookmark %}
|
16
|
+
{% if p_level == 1 %}
|
17
|
+
{% assign first_level_pages = first_level_pages | push:p %}
|
18
|
+
{% elsif p_level == 2 %}
|
19
|
+
{% assign second_level_pages = second_level_pages | push:p %}
|
20
|
+
{% elsif p_level == 3 %}
|
21
|
+
{% assign third_level_pages = third_level_pages | push:p %}
|
22
|
+
{% endif %}
|
23
|
+
{% else %}
|
24
|
+
{% if p_level <= 2 %}
|
25
|
+
{% assign first_level_pages = first_level_pages | push:p %}
|
26
|
+
{% elsif p_level == 3 %}
|
27
|
+
{% assign second_level_pages = second_level_pages | push:p %}
|
28
|
+
{% elsif p_level == 4 %}
|
29
|
+
{% assign third_level_pages = third_level_pages | push:p %}
|
30
|
+
{% endif %}
|
21
31
|
{% endif %}
|
22
32
|
{% endfor %}
|
23
33
|
|
34
|
+
{% assign first_level_pages = first_level_pages | sort: 'url' %}
|
35
|
+
{% assign second_level_pages = second_level_pages | sort: 'url' %}
|
36
|
+
{% assign third_level_pages = third_level_pages | sort: 'url' %}
|
37
|
+
|
24
38
|
<ul class="nav-list">
|
25
39
|
{%- for node in first_level_pages -%}
|
26
40
|
{%- assign node_url = node.url | remove: 'index.html' -%}
|
41
|
+
{%- assign node_title = node.path | remove: 'index.md' | split: "/" | last | remove: '.md' | replace: "_pages", "Home" -%}
|
27
42
|
{%- assign children_list = second_level_pages
|
28
|
-
| where_exp: "item", "item.url contains node_url"
|
29
|
-
| sort: 'title' -%}
|
43
|
+
| where_exp: "item", "item.url contains node_url" -%}
|
30
44
|
{%- assign num_children = children_list | size -%}
|
31
|
-
<li id="nav-first" aria-label="{{
|
45
|
+
<li id="nav-first" aria-label="{{ node_title }}">
|
32
46
|
<div class="nav-item">
|
33
47
|
<a href="{{ node_url }}" class="nav-list-link nav-lh">
|
34
48
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M181.3 32.4c17.4 2.9 29.2 19.4 26.3 36.8L197.8 128h95.1l11.5-69.3c2.9-17.4 19.4-29.2 36.8-26.3s29.2 19.4 26.3 36.8L357.8 128H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H347.1L325.8 320H384c17.7 0 32 14.3 32 32s-14.3 32-32 32H315.1l-11.5 69.3c-2.9 17.4-19.4 29.2-36.8 26.3s-29.2-19.4-26.3-36.8l9.8-58.7H155.1l-11.5 69.3c-2.9 17.4-19.4 29.2-36.8 26.3s-29.2-19.4-26.3-36.8L90.2 384H32c-17.7 0-32-14.3-32-32s14.3-32 32-32h68.9l21.3-128H64c-17.7 0-32-14.3-32-32s14.3-32 32-32h68.9l11.5-69.3c2.9-17.4 19.4-29.2 36.8-26.3zM187.1 192L165.8 320h95.1l21.3-128H187.1z"/></svg>
|
35
|
-
<span>{{
|
49
|
+
<span>{{ node_title }}</span>
|
36
50
|
</a>
|
37
51
|
{%- if num_children > 0 and node_url != "/" -%}
|
38
|
-
<button class="nav-list-expander" aria-label="toggle items in {{
|
52
|
+
<button class="nav-list-expander" aria-label="toggle items in {{ node_title }} category" aria-pressed="false">
|
39
53
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M201.4 342.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 274.7 86.6 137.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"/></svg>
|
40
54
|
</button>
|
41
55
|
{%- endif -%}
|
@@ -44,18 +58,18 @@
|
|
44
58
|
<ul class="nav-list">
|
45
59
|
{%- for child in children_list -%}
|
46
60
|
{%- assign child_url = child.url | remove: 'index.html' -%}
|
61
|
+
{%- assign child_title = child.path | remove: 'index.md' | split: "/" | last | remove: '.md' -%}
|
47
62
|
{%- assign grand_children_list = third_level_pages
|
48
|
-
| where_exp: "item", "item.url contains child_url"
|
49
|
-
| sort: 'title' -%}
|
63
|
+
| where_exp: "item", "item.url contains child_url" -%}
|
50
64
|
{%- assign num_grand_children = grand_children_list | size -%}
|
51
|
-
<li id="nav-second" aria-label="{{
|
65
|
+
<li id="nav-second" aria-label="{{ child_title }}">
|
52
66
|
<div class="nav-item">
|
53
67
|
<a href="{{ child_url }}" class="nav-list-link nav-sh">
|
54
68
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M432 256c0 17.7-14.3 32-32 32L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l352 0c17.7 0 32 14.3 32 32z"/></svg>
|
55
|
-
<span>{{
|
69
|
+
<span>{{ child_title }}</span>
|
56
70
|
</a>
|
57
71
|
{%- if num_grand_children > 0 -%}
|
58
|
-
<button class="nav-list-expander" aria-label="toggle items in {{
|
72
|
+
<button class="nav-list-expander" aria-label="toggle items in {{ child_title }} category" aria-pressed="false">
|
59
73
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M201.4 342.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 274.7 86.6 137.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"/></svg>
|
60
74
|
</button>
|
61
75
|
{%- endif -%}
|
@@ -63,14 +77,15 @@
|
|
63
77
|
{%- if num_grand_children > 0 -%}
|
64
78
|
<ul class="nav-list">
|
65
79
|
{%- for grand_child in grand_children_list -%}
|
66
|
-
|
67
|
-
<
|
68
|
-
<
|
69
|
-
<
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
80
|
+
{%- assign grand_child_title = grand_child.path | remove: 'index.md' | split: "/" | last | remove: '.md' -%}
|
81
|
+
<li id="nav-third" aria-label="{{ grand_child_title }}">
|
82
|
+
<div class="nav-item">
|
83
|
+
<a href="{{ grand_child.url | relative_url }}" class="nav-list-link nav-sh">
|
84
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M432 256c0 17.7-14.3 32-32 32L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l352 0c17.7 0 32 14.3 32 32z"/></svg>
|
85
|
+
<span>{{ grand_child_title }}</span>
|
86
|
+
</a>
|
87
|
+
</div>
|
88
|
+
</li>
|
74
89
|
{%- endfor -%}
|
75
90
|
</ul>
|
76
91
|
{%- endif -%}
|
data/_includes/pagination.html
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
{%- assign list_pages = site.pages | sort:"date" | reverse -%}
|
2
2
|
{%- assign post_counts = 0 -%}
|
3
3
|
|
4
|
-
<
|
4
|
+
<h1 class="category-header">
|
5
5
|
{% if page_level == 1 %}
|
6
6
|
All Posts
|
7
7
|
{% else %}
|
8
|
-
{{ page.
|
8
|
+
{{ page.path | remove: 'index.md' | split: "/" | last }}
|
9
9
|
{% endif %}
|
10
|
-
</
|
10
|
+
</h1>
|
11
11
|
<div id="category-list">
|
12
12
|
<ul class="paginated-list" data-current-page="1" aria-live="polite">
|
13
13
|
{%- for sub_page in list_pages -%}
|
@@ -26,7 +26,7 @@
|
|
26
26
|
</div>
|
27
27
|
|
28
28
|
<div class="box_contents">
|
29
|
-
<a href="{{ sub_page.url }}" class="title_post">{{ sub_page.title }}</a>
|
29
|
+
<a href="{{ sub_page.url }}"><h1 class="title_post">{{ sub_page.title }}</h1></a>
|
30
30
|
<a href="{{ sub_page.url }}" class="txt_post">
|
31
31
|
{{ sub_page.content | markdownify | strip_html }}
|
32
32
|
</a>
|
data/_includes/post.html
CHANGED
@@ -41,9 +41,9 @@
|
|
41
41
|
</div>
|
42
42
|
</div>
|
43
43
|
</div>
|
44
|
-
<div class="
|
44
|
+
<div class="tag-box">
|
45
45
|
{%- for page_tag in page.tags -%}
|
46
|
-
<span class="tag
|
46
|
+
<span class="tag theme-{{ forloop.index0 | modulo: 3 }}" contentID="{{ page_tag }}">
|
47
47
|
{{ page_tag }}
|
48
48
|
</span>
|
49
49
|
{%- endfor -%}
|
data/_includes/search.html
CHANGED
@@ -0,0 +1,44 @@
|
|
1
|
+
{%- assign page_list = site.pages
|
2
|
+
| where_exp: "item", "item.title != nil"
|
3
|
+
-%}
|
4
|
+
<script src="{{ '/assets/js/search.js' }}" type="text/javascript"></script>
|
5
|
+
<script>
|
6
|
+
var posts = [];
|
7
|
+
|
8
|
+
{% for page in page_list %}
|
9
|
+
{%- assign psearch_tree = page.path | split: "/" -%}
|
10
|
+
|
11
|
+
{% if psearch_tree.last == "index.md" %}
|
12
|
+
{%- assign p_type = "category" -%}
|
13
|
+
{% else %}
|
14
|
+
{%- assign p_type = "post" -%}
|
15
|
+
{% endif %}
|
16
|
+
|
17
|
+
{%- assign tree_len = psearch_tree.size | minus: 2 -%}
|
18
|
+
{%- assign psearch_tree = psearch_tree | slice:1, tree_len -%}
|
19
|
+
{%- assign p_link = "" -%}
|
20
|
+
{%- for sub_tree in psearch_tree -%}
|
21
|
+
{% if forloop.last %}
|
22
|
+
{%- assign p_link = p_link | append: sub_tree -%}
|
23
|
+
{% else %}
|
24
|
+
{%- assign p_link = p_link | append: sub_tree | append: " > " -%}
|
25
|
+
{% endif %}
|
26
|
+
{%- endfor -%}
|
27
|
+
|
28
|
+
posts.push({
|
29
|
+
'title' : "{{ page.title | escape }}",
|
30
|
+
'path' : "{{ p_link }}",
|
31
|
+
'type' : "{{ p_type }}",
|
32
|
+
'tags' : "{{ page.tags | join: ', ' }}",
|
33
|
+
'url' : "{{ site.baseurl }}{{ page.url }}",
|
34
|
+
'image' : "{{ page.thumbnail }}",
|
35
|
+
'date' : "{{ page.date | date: '%Y-%m-%d' }}"
|
36
|
+
});
|
37
|
+
{% endfor %}
|
38
|
+
|
39
|
+
searchPost(posts);
|
40
|
+
|
41
|
+
{% if page_type == "post" %}
|
42
|
+
searchRelated(posts);
|
43
|
+
{% endif %}
|
44
|
+
</script>
|
data/_includes/sidebar.html
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
<div class="sidebar sidebar-left">
|
2
2
|
<div class="side-banner">
|
3
3
|
<h1 class="site-name">
|
4
|
-
<a href="/"><
|
4
|
+
<a href="/"><mark class="highlight">example.com</mark></a>
|
5
5
|
<button id="btn-brightness" aria-label="brightness-button">
|
6
6
|
<svg class='ico-dark' xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M223.5 32C100 32 0 132.3 0 256S100 480 223.5 480c60.6 0 115.5-24.2 155.8-63.4c5-4.9 6.3-12.5 3.1-18.7s-10.1-9.7-17-8.5c-9.8 1.7-19.8 2.6-30.1 2.6c-96.9 0-175.5-78.8-175.5-176c0-65.8 36-123.1 89.3-153.3c6.1-3.5 9.2-10.5 7.7-17.3s-7.3-11.9-14.3-12.5c-6.3-.5-12.6-.8-19-.8z"/></svg>
|
7
7
|
<svg class='ico-light' xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M361.5 1.2c5 2.1 8.6 6.6 9.6 11.9L391 121l107.9 19.8c5.3 1 9.8 4.6 11.9 9.6s1.5 10.7-1.6 15.2L446.9 256l62.3 90.3c3.1 4.5 3.7 10.2 1.6 15.2s-6.6 8.6-11.9 9.6L391 391 371.1 498.9c-1 5.3-4.6 9.8-9.6 11.9s-10.7 1.5-15.2-1.6L256 446.9l-90.3 62.3c-4.5 3.1-10.2 3.7-15.2 1.6s-8.6-6.6-9.6-11.9L121 391 13.1 371.1c-5.3-1-9.8-4.6-11.9-9.6s-1.5-10.7 1.6-15.2L65.1 256 2.8 165.7c-3.1-4.5-3.7-10.2-1.6-15.2s6.6-8.6 11.9-9.6L121 121 140.9 13.1c1-5.3 4.6-9.8 9.6-11.9s10.7-1.5 15.2 1.6L256 65.1 346.3 2.8c4.5-3.1 10.2-3.7 15.2-1.6zM160 256a96 96 0 1 1 192 0 96 96 0 1 1 -192 0zm224 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0z"/></svg>
|
data/_layouts/default.html
CHANGED
@@ -1,113 +1,18 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html lang="en">
|
3
3
|
<head>
|
4
|
-
|
5
|
-
<
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
7
|
-
{% seo %}
|
8
|
-
<link rel="shortcut icon" type="image/png" href="{{ '/assets/img/favicon.webp' }}">
|
9
|
-
<link rel="preload" href="{{ '/assets/img/favicon.webp' }}" as="image">
|
10
|
-
{% if site.goatcounter_code %}
|
11
|
-
<script data-goatcounter="https://{{ site.goatcounter_code }}.goatcounter.com/count"
|
12
|
-
async src="//gc.zgo.at/count.js"></script>
|
13
|
-
{% endif %}
|
14
|
-
|
15
|
-
<title>
|
16
|
-
{% if page.title %}{{ page.title }}
|
17
|
-
{% else %}{{ site.title }}
|
18
|
-
{% endif %}
|
19
|
-
</title>
|
20
|
-
|
21
|
-
<meta
|
22
|
-
name="description"
|
23
|
-
content="{% if page.description %}{{ page.description | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
|
24
|
-
|
25
|
-
<link rel="stylesheet" href="{{ '/assets/css/style.css' }}">
|
26
|
-
{% if page.thumbnail %}
|
27
|
-
<style>
|
28
|
-
.thumbnail {
|
29
|
-
background-image: url("{{ page.thumbnail }}");
|
30
|
-
}
|
31
|
-
</style>
|
32
|
-
{% else %}
|
33
|
-
<style>
|
34
|
-
.thumbnail {
|
35
|
-
aspect-ratio: auto !important;
|
36
|
-
}
|
37
|
-
.transbox {
|
38
|
-
transform: none;
|
39
|
-
position: relative;
|
40
|
-
margin: auto;
|
41
|
-
left: 0;
|
42
|
-
top: 0;
|
43
|
-
}
|
44
|
-
</style>
|
45
|
-
{% endif %}
|
46
|
-
<script src="{{ '/assets/js/tocbot.min.js' }}"></script>
|
47
|
-
<script src="{{ '/assets/js/sweet-scroll.min.js' }}"></script>
|
4
|
+
{% include head.html %}
|
5
|
+
<link rel="stylesheet" href="{{ '/assets/css/404.css' }}">
|
48
6
|
</head>
|
49
7
|
<body>
|
50
|
-
<
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
{% endif %}
|
58
|
-
{% include sidebar.html %}
|
59
|
-
<div id="post">
|
60
|
-
<div class="inner-header">
|
61
|
-
<span class="dot" style="background-color: #F86158;"></span>
|
62
|
-
<span class="dot" style="background-color: #FBBF2D;"></span>
|
63
|
-
<span class="dot" style="background-color: #2ACB45;"></span>
|
64
|
-
</div>
|
65
|
-
<div class="inner-content">
|
66
|
-
<div class="category-tree">
|
67
|
-
{%- assign page_link = "/" -%}
|
68
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M575.8 255.5c0 18-15 32.1-32 32.1h-32l.7 160.2c0 2.7-.2 5.4-.5 8.1V472c0 22.1-17.9 40-40 40H456c-1.1 0-2.2 0-3.3-.1c-1.4 .1-2.8 .1-4.2 .1H416 392c-22.1 0-40-17.9-40-40V448 384c0-17.7-14.3-32-32-32H256c-17.7 0-32 14.3-32 32v64 24c0 22.1-17.9 40-40 40H160 128.1c-1.5 0-3-.1-4.5-.2c-1.2 .1-2.4 .2-3.6 .2H104c-22.1 0-40-17.9-40-40V360c0-.9 0-1.9 .1-2.8V287.6H32c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L564.8 231.5c8 7 12 15 11 24z"/></svg>
|
69
|
-
<p>
|
70
|
-
{%- assign search_tree = page.path | remove: "/index.md" | split: "/" -%}
|
71
|
-
{%- for sub_tree in search_tree -%}
|
72
|
-
{% if forloop.first %}
|
73
|
-
<a href="/">Home</a>
|
74
|
-
>
|
75
|
-
{% elsif forloop.last %}
|
76
|
-
{% if page_type == "category" %}
|
77
|
-
{{ sub_tree }}
|
78
|
-
{% else %}
|
79
|
-
{{ page.title }}
|
80
|
-
{% endif %}
|
81
|
-
{% else %}
|
82
|
-
{%- assign page_link = page_link | append: sub_tree | append: "/" -%}
|
83
|
-
<a href="{{ page_link }}">{{ sub_tree }}</a>
|
84
|
-
>
|
85
|
-
{% endif %}
|
86
|
-
{%- endfor -%}
|
87
|
-
</p>
|
88
|
-
</div>
|
89
|
-
{% if page_type == "category" %}
|
90
|
-
{% include loading.html %}
|
91
|
-
{% include pagination.html %}
|
92
|
-
{% else %}
|
93
|
-
{% include post.html %}
|
94
|
-
{% endif %}
|
95
|
-
</div>
|
8
|
+
<div class="blank-page">
|
9
|
+
<a href="/" class="go-home">↩️ GO HOME</a>
|
10
|
+
<div class="not-found-msg">
|
11
|
+
<h1 class="sour-face">`Φ ⌒ `Φ ?</h1>
|
12
|
+
<p style="font-size:1.75rem; color:#fa4251;">404: Page not found</p>
|
13
|
+
<p style="font-size:1.25rem;">D-Data breach...?    No such thing allowed!</p>
|
14
|
+
</div>
|
96
15
|
</div>
|
97
|
-
{% include search.html %}
|
98
16
|
</body>
|
99
|
-
<script src="
|
100
|
-
<script src="{{ '/assets/js/highlight.min.js' }}"></script>
|
101
|
-
<link id="highlight-default" rel="stylesheet" href="{{ '/assets/css/highlight-default.min.css' }}">
|
102
|
-
<link id="highlight-dark" rel="stylesheet" href="{{ '/assets/css/highlight-dark.min.css' }}">
|
103
|
-
<script src="{{ '/assets/js/stars.js' }}"></script>
|
104
|
-
<script src="{{ '/assets/js/main.js' }}"></script>
|
105
|
-
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
|
106
|
-
<script>
|
107
|
-
window.dataLayer = window.dataLayer || [];
|
108
|
-
function gtag(){ dataLayer.push(arguments); }
|
109
|
-
|
110
|
-
gtag('js', new Date());
|
111
|
-
gtag('config', '{{ site.google_analytics }}');
|
112
|
-
</script>
|
17
|
+
<script src="{{ '/assets/js/404.js' }}"></script>
|
113
18
|
</html>
|
data/_layouts/page.html
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
{%- assign page_tree = page.path | remove_first: "_pages/" | split: "/" -%}
|
4
|
+
{%- assign page_level = page_tree.size -%}
|
5
|
+
{% if page_tree.last == "index.md" %}
|
6
|
+
{%- assign page_type = "category" -%}
|
7
|
+
{% else %}
|
8
|
+
{%- assign page_type = "post" -%}
|
9
|
+
{% endif %}
|
10
|
+
<head>
|
11
|
+
{% include head.html %}
|
12
|
+
<link rel="preload" href="{{ site.profile_img }}" as="image">
|
13
|
+
<link rel="stylesheet" href="{{ '/assets/css/style.css' }}">
|
14
|
+
{% if page_type == "post" %}
|
15
|
+
{% if site.goatcounter_code %}
|
16
|
+
<script data-goatcounter="https://{{ site.goatcounter_code }}.goatcounter.com/count"
|
17
|
+
async src="//gc.zgo.at/count.js"></script>
|
18
|
+
{% endif %}
|
19
|
+
|
20
|
+
<meta name="giscus_repo" content="{{ site.giscus_repo }}">
|
21
|
+
<meta name="giscus_repoId" content="{{ site.giscus_repoId }}">
|
22
|
+
<meta name="giscus_category" content="{{ site.giscus_category }}">
|
23
|
+
<meta name="giscus_categoryId" content="{{ site.giscus_categoryId }}">
|
24
|
+
|
25
|
+
{% if page.thumbnail %}
|
26
|
+
<style>
|
27
|
+
.thumbnail {
|
28
|
+
background-image: url("{{ page.thumbnail }}");
|
29
|
+
}
|
30
|
+
</style>
|
31
|
+
{% else %}
|
32
|
+
<style>
|
33
|
+
.thumbnail {
|
34
|
+
aspect-ratio: auto !important;
|
35
|
+
}
|
36
|
+
.transbox {
|
37
|
+
transform: none;
|
38
|
+
position: relative;
|
39
|
+
margin: auto;
|
40
|
+
left: 0;
|
41
|
+
top: 0;
|
42
|
+
}
|
43
|
+
</style>
|
44
|
+
{% endif %}
|
45
|
+
{% endif %}
|
46
|
+
</head>
|
47
|
+
<body>
|
48
|
+
<script type="text/javascript">
|
49
|
+
let currentTheme = localStorage.getItem('theme');
|
50
|
+
|
51
|
+
document.body.classList[currentTheme === 'dark' ? 'add' : 'remove']('dark-theme');
|
52
|
+
</script>
|
53
|
+
<canvas id="stars" width="100%" height="100%"></canvas>
|
54
|
+
{% include sidebar.html %}
|
55
|
+
<div id="post">
|
56
|
+
<div class="inner-header">
|
57
|
+
<span class="dot" style="background-color: #F86158;"></span>
|
58
|
+
<span class="dot" style="background-color: #FBBF2D;"></span>
|
59
|
+
<span class="dot" style="background-color: #2ACB45;"></span>
|
60
|
+
</div>
|
61
|
+
<div class="inner-content">
|
62
|
+
{% include category.html %}
|
63
|
+
{% if page_type == "category" %}
|
64
|
+
{% include loading.html %}
|
65
|
+
{% include pagination.html %}
|
66
|
+
{% else %}
|
67
|
+
{% include post.html %}
|
68
|
+
{% endif %}
|
69
|
+
</div>
|
70
|
+
</div>
|
71
|
+
{% include search.html %}
|
72
|
+
</body>
|
73
|
+
{% include footer.html %}
|
74
|
+
{% if page_type == "category" %}
|
75
|
+
<script src="{{ '/assets/js/subject.js' }}"></script>
|
76
|
+
{% else %}
|
77
|
+
<script src="{{ '/assets/js/tocbot.min.js' }}"></script>
|
78
|
+
<script src="{{ '/assets/js/sweet-scroll.min.js' }}"></script>
|
79
|
+
<script src="{{ '/assets/js/highlight.min.js' }}"></script>
|
80
|
+
<link id="highlight-default" rel="stylesheet" href="{{ '/assets/css/highlight-default.min.css' }}">
|
81
|
+
<link id="highlight-dark" rel="stylesheet" href="{{ '/assets/css/highlight-dark.min.css' }}">
|
82
|
+
<script src="{{ '/assets/js/post.js' }}"></script>
|
83
|
+
{% endif %}
|
84
|
+
{% include search_event.html %}
|
85
|
+
<script src="{{ '/assets/js/common.js' }}"></script>
|
86
|
+
</html>
|