jekyll-theme-satellite 1.0.0 → 1.1.0
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/pagination.html +3 -3
- data/_includes/search.html +1 -1
- data/_includes/search_event.html +217 -0
- data/_includes/sidebar.html +8 -1
- data/_layouts/default.html +10 -105
- data/_layouts/page.html +86 -0
- data/_sass/navigation.scss +0 -1
- data/_sass/pagination.scss +2 -4
- data/_sass/post.scss +1 -3
- data/_sass/search.scss +3 -3
- 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/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 +197 -0
- data/assets/js/search.js +168 -0
- data/assets/js/subject.js +132 -0
- metadata +58 -5
- 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: f61521ac4ceb6e2957520d1c92d27f2c1c34d42d585a34e202f422496416d5b9
|
4
|
+
data.tar.gz: c1456cb304615bcf4aae2c4d67628faddb16a126923c816cf3b66f13773aba13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6798782d1a8b76ffd229e6cb33cd8bebf688004d042c46149e9ac32ba4e1c26c0cf143639a4b55d700a870e00134e8feaf0afa346bddf96bde1bac8a62681152
|
7
|
+
data.tar.gz: 635fd4e98d98b4f7ec34aab3f0d22f1dc21ee9f5f3a98209ced7d09c18177e03b5b73c5891833280d368695f45a140d97d0474b58469c06cb7f0ae46db35fa63
|
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 way 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 in [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/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/docs/Posting%20guide.md)|
|
106
|
+
|Enabling ***comment system***|[link](https://github.com/byanko55/jekyll-theme-satellite/docs/Comment%20system.md)|
|
107
|
+
|Enabling ***Visitor counter***|[link](https://github.com/byanko55/jekyll-theme-satellite/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/docs/Contribution%20Guidelines.md) 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/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
8
|
{{ page.title }}
|
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/search.html
CHANGED
@@ -0,0 +1,217 @@
|
|
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
|
+
|
45
|
+
/*
|
46
|
+
$('#search-input').on('keyup', function () {
|
47
|
+
var keyword = this.value.toLowerCase();
|
48
|
+
var searchResult = [];
|
49
|
+
|
50
|
+
if (keyword.length > 0) {
|
51
|
+
$('#search-result').show();
|
52
|
+
$('#btn-clear').show();
|
53
|
+
} else {
|
54
|
+
$('#search-result').hide();
|
55
|
+
$('#btn-clear').hide();
|
56
|
+
}
|
57
|
+
|
58
|
+
$('.result-item').remove();
|
59
|
+
|
60
|
+
for (var i = 0; i < posts.length; i++) {
|
61
|
+
var post = posts[i];
|
62
|
+
|
63
|
+
if (post.title === 'Home' && post.type == 'category') continue;
|
64
|
+
|
65
|
+
if (post.title.toLowerCase().indexOf(keyword) >= 0
|
66
|
+
|| post.path.toLowerCase().indexOf(keyword) >= 0
|
67
|
+
|| post.tags.toLowerCase().indexOf(keyword) >= 0){
|
68
|
+
searchResult.push(post);
|
69
|
+
}
|
70
|
+
}
|
71
|
+
|
72
|
+
if (searchResult.length === 0) {
|
73
|
+
$('#search-result').append(
|
74
|
+
'<li class="result-item"><span class="description">There is no search result.</span></li>'
|
75
|
+
);
|
76
|
+
|
77
|
+
return;
|
78
|
+
}
|
79
|
+
|
80
|
+
searchResult.sort(function (a, b) {
|
81
|
+
if (a.type == 'category') return 1;
|
82
|
+
|
83
|
+
return -1;
|
84
|
+
});
|
85
|
+
|
86
|
+
for (var i = 0; i < searchResult.length; i++) {
|
87
|
+
var highlighted_path = highlightKeyword(searchResult[i].path, keyword);
|
88
|
+
|
89
|
+
if (highlighted_path === '')
|
90
|
+
highlighted_path = "Home";
|
91
|
+
|
92
|
+
if (searchResult[i].type === 'post'){
|
93
|
+
var highlighted_title = highlightKeyword(searchResult[i].title, keyword);
|
94
|
+
var highlighted_tags = highlightKeyword(searchResult[i].tags, keyword);
|
95
|
+
|
96
|
+
if (highlighted_tags === '')
|
97
|
+
highlighted_tags = "none";
|
98
|
+
|
99
|
+
$('#search-result').append(
|
100
|
+
'<li class="result-item"><a href="' +
|
101
|
+
searchResult[i].url +
|
102
|
+
'"><table><thead><tr><th><svg class="ico-book"></svg></th><th>' + highlighted_title +
|
103
|
+
'</th></tr></thead><tbody><tr><td><svg class="ico-folder"></svg></td><td>' + highlighted_path +
|
104
|
+
'</td></tr><tr><td><svg class="ico-tags"></svg></td><td>' + highlighted_tags +
|
105
|
+
'</td></tr><tr><td><svg class="ico-calendar"></svg></td><td>' + searchResult[i].date +
|
106
|
+
'</td></tr></tbody></table></a></li>'
|
107
|
+
);
|
108
|
+
}
|
109
|
+
else {
|
110
|
+
$('#search-result').append(
|
111
|
+
'<li class="result-item"><a href="' +
|
112
|
+
searchResult[i].url +
|
113
|
+
'"><table><thead><tr><th><svg class="ico-folder"></svg></th><th>' + highlighted_path +
|
114
|
+
'</th></tr></thead></table></a></li>'
|
115
|
+
);
|
116
|
+
}
|
117
|
+
}
|
118
|
+
});
|
119
|
+
|
120
|
+
function highlightKeyword(txt, keyword) {
|
121
|
+
var index = txt.toLowerCase().lastIndexOf(keyword);
|
122
|
+
|
123
|
+
if (index >= 0) {
|
124
|
+
out = txt.substring(0, index) +
|
125
|
+
"<span class='highlight'>" +
|
126
|
+
txt.substring(index, index+keyword.length) +
|
127
|
+
"</span>" +
|
128
|
+
txt.substring(index + keyword.length);
|
129
|
+
return out;
|
130
|
+
}
|
131
|
+
|
132
|
+
return txt;
|
133
|
+
}
|
134
|
+
|
135
|
+
{% if page_type == "post" %}
|
136
|
+
displayRelatedPosts(posts);
|
137
|
+
{% endif %}
|
138
|
+
|
139
|
+
function displayRelatedPosts(pages){
|
140
|
+
const refBox = document.getElementById('related-box');
|
141
|
+
|
142
|
+
if (!refBox) return;
|
143
|
+
|
144
|
+
var relatedPosts = [];
|
145
|
+
var currPost = pages.find(obj => {return obj.url === location.pathname});
|
146
|
+
|
147
|
+
let currTags = currPost.tags.split(', ');
|
148
|
+
let currCategory = currPost.path.split(' > ').pop();
|
149
|
+
|
150
|
+
for (var i = 0; i < pages.length; i++) {
|
151
|
+
let page = pages[i];
|
152
|
+
|
153
|
+
if (page.type === 'category') continue;
|
154
|
+
|
155
|
+
if (page.title === currPost.title) continue;
|
156
|
+
|
157
|
+
let tags = page.tags.split(', ');
|
158
|
+
let category = page.path.split(' > ').pop();
|
159
|
+
let correlationScore = 0;
|
160
|
+
|
161
|
+
for (var j = 0; j < currTags.length; j++){
|
162
|
+
if (tags.indexOf(currTags[j]) != -1) correlationScore += 1;
|
163
|
+
}
|
164
|
+
|
165
|
+
if (category === currCategory) correlationScore += 1;
|
166
|
+
|
167
|
+
if (correlationScore == 0) continue;
|
168
|
+
|
169
|
+
relatedPosts.push({
|
170
|
+
'title': page.title,
|
171
|
+
'date': page.date,
|
172
|
+
'category': category,
|
173
|
+
'url': page.url,
|
174
|
+
'thumbnail': page.image,
|
175
|
+
'score': correlationScore
|
176
|
+
});
|
177
|
+
}
|
178
|
+
|
179
|
+
relatedPosts.sort(function (a, b) {
|
180
|
+
if(a.hasOwnProperty('score')){
|
181
|
+
return b.score - a.score;
|
182
|
+
}
|
183
|
+
});
|
184
|
+
|
185
|
+
if (relatedPosts.length == 0){
|
186
|
+
$('#related-box').hide();
|
187
|
+
return;
|
188
|
+
}
|
189
|
+
|
190
|
+
for (var i = 0; i < Math.min(relatedPosts.length, 6); i++){
|
191
|
+
let post = relatedPosts[i];
|
192
|
+
let date = '-';
|
193
|
+
let category = 'No category';
|
194
|
+
|
195
|
+
if (post.date !== '1900-01-01'){
|
196
|
+
date = new Date(post.date);
|
197
|
+
date = date.toLocaleString('en-US', {day: 'numeric', month:'long', year:'numeric'});
|
198
|
+
}
|
199
|
+
|
200
|
+
if (post.category !== '') category = post.category;
|
201
|
+
|
202
|
+
if (post.thumbnail === ''){
|
203
|
+
post.thumbnail = "/assets/img/thumbnail/empty.jpg";
|
204
|
+
}
|
205
|
+
|
206
|
+
$('#related-posts').append(
|
207
|
+
'<li class="related-item"><a href="' + post.url +
|
208
|
+
'"><img src="' + post.thumbnail +
|
209
|
+
'"/><p class="category">' + category +
|
210
|
+
'</p><p class="title">' + post.title +
|
211
|
+
'</p><p class="date">' + date +
|
212
|
+
'</p></a></li>'
|
213
|
+
);
|
214
|
+
}
|
215
|
+
}
|
216
|
+
*/
|
217
|
+
</script>
|
data/_includes/sidebar.html
CHANGED
@@ -1,7 +1,14 @@
|
|
1
|
+
{%- assign page_tree = page.path | remove_first: "_pages/" | split: "/" -%}
|
2
|
+
{%- assign page_level = page_tree.size -%}
|
3
|
+
{% if page_tree.last == "index.md" %}
|
4
|
+
{%- assign page_type = "category" -%}
|
5
|
+
{% else %}
|
6
|
+
{%- assign page_type = "post" -%}
|
7
|
+
{% endif %}
|
1
8
|
<div class="sidebar sidebar-left">
|
2
9
|
<div class="side-banner">
|
3
10
|
<h1 class="site-name">
|
4
|
-
<a href="/"><
|
11
|
+
<a href="/"><mark class="highlight">example.com</mark></a>
|
5
12
|
<button id="btn-brightness" aria-label="brightness-button">
|
6
13
|
<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
14
|
<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>
|