moonwalk-tokyonight 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/404.html +38 -0
- data/LICENSE +23 -0
- data/README.md +60 -0
- data/_config.yml +49 -0
- data/_data/home.yml +104 -0
- data/_includes/back_to_top.html +53 -0
- data/_includes/card_list.html +26 -0
- data/_includes/code_copy.html +31 -0
- data/_includes/custom_head.html +3 -0
- data/_includes/date_and_social_share.html +32 -0
- data/_includes/footnotes.html +39 -0
- data/_includes/github_alerts.html +41 -0
- data/_includes/head.html +42 -0
- data/_includes/horizontal_list.html +10 -0
- data/_includes/link_preview.html +56 -0
- data/_includes/post_list.html +12 -0
- data/_includes/post_nav.html +10 -0
- data/_includes/progress_bar.html +25 -0
- data/_includes/search.html +61 -0
- data/_includes/toc.html +42 -0
- data/_includes/toggle_theme_button.html +16 -0
- data/_includes/toggle_theme_js.html +36 -0
- data/_includes/vertical_list.html +19 -0
- data/_layouts/blog.html +14 -0
- data/_layouts/default.html +47 -0
- data/_layouts/home.html +45 -0
- data/_layouts/post.html +23 -0
- data/_sass/list.scss +75 -0
- data/_sass/moonwalk-tokyonight.scss +897 -0
- data/_sass/syntax.scss +171 -0
- data/assets/css/main.scss +8 -0
- data/assets/images/favicon/android-chrome-192x192.png +0 -0
- data/assets/images/favicon/android-chrome-256x256.png +0 -0
- data/assets/images/favicon/apple-touch-icon.png +0 -0
- data/assets/images/favicon/browserconfig.xml +9 -0
- data/assets/images/favicon/favicon-16x16.png +0 -0
- data/assets/images/favicon/favicon-32x32.png +0 -0
- data/assets/images/favicon/favicon.ico +0 -0
- data/assets/images/favicon/mstile-150x150.png +0 -0
- data/assets/images/favicon/safari-pinned-tab.svg +19 -0
- data/assets/images/favicon/site.webmanifest +19 -0
- data/search.json +15 -0
- metadata +174 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 9cc4f6fde8045b14b6f42bfab068c004094cd0fc29a979e91c7aaac6814bf1b1
|
|
4
|
+
data.tar.gz: eca404908f4ada4c60bb859fc77f26b14a749176208780335d0f7c9ec09a9a98
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 672efbb10e5de655e1d4325e202689da8d3451849241d59724fd94a9cdf7c8535b4076892ed58db93977777e608c89a21875628b74e254b4567bd34a62c9789a
|
|
7
|
+
data.tar.gz: 566315d860f54ca23f7698aac759bbf05189d98ac0982ad4a7518de21194339114d2196d321780c8af2a54f33a228ed4a234d6e11a63ce1a9ad51293f8b8f85e
|
data/404.html
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: default
|
|
3
|
+
title: Page not found
|
|
4
|
+
permalink: /404.html
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<div class="not-found">
|
|
8
|
+
<div class="not-found-code">404</div>
|
|
9
|
+
<h1 class="not-found-title">You took a wrong turn.</h1>
|
|
10
|
+
<p class="not-found-lede">
|
|
11
|
+
The page you were looking for is not here. Maybe it moved, maybe it never existed,
|
|
12
|
+
maybe the moon ate it.
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
<div class="not-found-actions">
|
|
16
|
+
<a href="{{ "/" | relative_url }}" class="not-found-cta">← Head back home</a>
|
|
17
|
+
{% if site.posts.size > 0 %}
|
|
18
|
+
{% assign random_post = site.posts | sample %}
|
|
19
|
+
<a href="{{ random_post.url | relative_url }}" class="not-found-cta not-found-cta-secondary">
|
|
20
|
+
Read something random →
|
|
21
|
+
</a>
|
|
22
|
+
{% endif %}
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
{% if site.posts.size > 0 %}
|
|
26
|
+
<div class="not-found-recent">
|
|
27
|
+
<h3>Or pick one of these:</h3>
|
|
28
|
+
<ul>
|
|
29
|
+
{% for post in site.posts limit:5 %}
|
|
30
|
+
<li class="post-list-item">
|
|
31
|
+
<span class="home-date">{{ post.date | date: site.theme_config.date_format }}»</span>
|
|
32
|
+
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
|
33
|
+
</li>
|
|
34
|
+
{% endfor %}
|
|
35
|
+
</ul>
|
|
36
|
+
</div>
|
|
37
|
+
{% endif %}
|
|
38
|
+
</div>
|
data/LICENSE
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Santiago Zarate
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
PS: This is based on the work by Abhinav Saxena
|
data/README.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Moonwalk Tokyo Night
|
|
2
|
+
|
|
3
|
+
A minimal Jekyll theme based on moonwalk by @abhinavs compatible with `jekyll-remote-theme` using [Tokyo Night](https://tokyonight.org/) as a color palette (specifically `moon` variant).
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
### Using with GitHub Pages via `jekyll-remote-theme` plugin:
|
|
8
|
+
|
|
9
|
+
If your site uses the `github-pages` gem or you publish via GitHub Pages, it should be enough to have this
|
|
10
|
+
in your site’s `_config.yml`:
|
|
11
|
+
|
|
12
|
+
```yml
|
|
13
|
+
remote_theme: foursixnine/moonwalk-tokyonight
|
|
14
|
+
plugins:
|
|
15
|
+
- jekyll-remote-theme
|
|
16
|
+
- jekyll-feed
|
|
17
|
+
- jekyll-sitemap
|
|
18
|
+
- jekyll-seo-tag
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Might not be needed (ymmv, but I haven't yested yet)
|
|
22
|
+
|
|
23
|
+
In your site’s `Gemfile`, keep `github-pages` and add `jekyll-remote-theme` if needed:
|
|
24
|
+
|
|
25
|
+
```ruby
|
|
26
|
+
source "https://rubygems.org"
|
|
27
|
+
|
|
28
|
+
gem "github-pages", "~> 232", group: :jekyll_plugins
|
|
29
|
+
gem "jekyll-remote-theme", group: :jekyll_plugins
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
Optional theme settings:
|
|
34
|
+
|
|
35
|
+
```yml
|
|
36
|
+
theme_config:
|
|
37
|
+
appearance: dark # light, dark, auto
|
|
38
|
+
appearance_toggle: true
|
|
39
|
+
palette: moon # current Tokyo Night palette
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Notes
|
|
43
|
+
|
|
44
|
+
- This theme is based on the original [Moonwalk](https://github.com/abhinavs/moonwalk) theme by Abhinav Saxena.
|
|
45
|
+
- This adaptation is published as `moonwalk-tokyonight`.
|
|
46
|
+
- Attribution to the original author is preserved in the codebase and this README.
|
|
47
|
+
- This update was assisted by GPT-5.4 via Zed’s coding agent tooling.
|
|
48
|
+
|
|
49
|
+
## Development
|
|
50
|
+
|
|
51
|
+
### Theme repository
|
|
52
|
+
|
|
53
|
+
Use the included `Gemfile` for local development, `local-dev-environment.sh` has some other environment variables that
|
|
54
|
+
might help with development of the theme.
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
bin/bootstrap
|
|
58
|
+
bin/start
|
|
59
|
+
```
|
|
60
|
+
|
data/_config.yml
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
title: Moonwalk Tokyo Night
|
|
2
|
+
description: >
|
|
3
|
+
A Tokyo Night-flavoured Jekyll theme designed for remote-theme use.
|
|
4
|
+
|
|
5
|
+
permalink: /:slug
|
|
6
|
+
|
|
7
|
+
twitter:
|
|
8
|
+
card: summary_large_image
|
|
9
|
+
|
|
10
|
+
theme_config:
|
|
11
|
+
appearance: "dark" # can be "light", "dark" or "auto"
|
|
12
|
+
palette: "moon" # currently supported: moon, groundwork added for day/full Tokyo Night support
|
|
13
|
+
appearance_toggle: true # if appearance can be switched by user
|
|
14
|
+
date_format: "%Y-%m-%d" # customize how date is formatted
|
|
15
|
+
show_description: true # show blog description
|
|
16
|
+
show_navbar: true # show horizontal navbar
|
|
17
|
+
show_footer: true # show footer links in home page,add in _data/home.yml
|
|
18
|
+
show_copyright: true # show copyright notice in footer
|
|
19
|
+
# following keys are using to create home layout
|
|
20
|
+
show_projects: false # show projects as cards, add in _data/home.yml
|
|
21
|
+
show_blog: true # show blog posts added in _posts
|
|
22
|
+
show_old_projects: false # show old projects as cards, add in _data/home.yml
|
|
23
|
+
show_misc_list: false # show generic vertical list for misc details, add _data/home.yml
|
|
24
|
+
show_reading_time: true # show number of words and reading time in the blog posts
|
|
25
|
+
show_tags: true # show tags in a blog posts
|
|
26
|
+
show_code_copy: true # show copy button on code blocks
|
|
27
|
+
show_progress_bar: true # show reading progress bar on posts
|
|
28
|
+
show_back_to_top: true # show back-to-top button
|
|
29
|
+
show_post_nav: true # show prev/next links on posts
|
|
30
|
+
show_toc: true # allow per-post table of contents via toc: true front matter
|
|
31
|
+
show_footnote_tooltips: true # show footnote text on hover instead of scrolling to bottom
|
|
32
|
+
show_link_previews: true # show preview cards when hovering internal post links
|
|
33
|
+
# options for "home" page
|
|
34
|
+
home:
|
|
35
|
+
title_projects: Portfolio
|
|
36
|
+
title_misc_list: Details
|
|
37
|
+
title_blog: Blog
|
|
38
|
+
title_old_projects: Old Projects
|
|
39
|
+
|
|
40
|
+
highlighter: rouge
|
|
41
|
+
|
|
42
|
+
sass:
|
|
43
|
+
style: compressed
|
|
44
|
+
|
|
45
|
+
plugins:
|
|
46
|
+
- jekyll-feed
|
|
47
|
+
- jekyll-sitemap
|
|
48
|
+
- jekyll-seo-tag
|
|
49
|
+
|
data/_data/home.yml
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
navbar_entries:
|
|
2
|
+
- title: about
|
|
3
|
+
url: about
|
|
4
|
+
|
|
5
|
+
- title: blog
|
|
6
|
+
url: blog
|
|
7
|
+
|
|
8
|
+
- title: website
|
|
9
|
+
url: https://www.abhinav.co
|
|
10
|
+
|
|
11
|
+
project_entries:
|
|
12
|
+
- title: Project 1
|
|
13
|
+
url: overview-post
|
|
14
|
+
desc: This is an example project, configured in _data/home.yml
|
|
15
|
+
|
|
16
|
+
- title: Project 2
|
|
17
|
+
url: overview-post
|
|
18
|
+
desc: Projects are shown in card layout
|
|
19
|
+
|
|
20
|
+
- title: Project 3
|
|
21
|
+
url: overview-post
|
|
22
|
+
desc: You can control visibility from _config.yml file
|
|
23
|
+
|
|
24
|
+
- title: Project 4
|
|
25
|
+
url: overview-post
|
|
26
|
+
desc: This project uses highlight markup, configured in _data/home.yml
|
|
27
|
+
highlight: WIP
|
|
28
|
+
|
|
29
|
+
- title: Project 5
|
|
30
|
+
url: overview-post
|
|
31
|
+
desc: Tokyo Night also has horizontal list support for header and footer
|
|
32
|
+
highlight: WIP
|
|
33
|
+
|
|
34
|
+
- title: Project 6
|
|
35
|
+
url: overview-post
|
|
36
|
+
desc: It also has a scalable vertical list (in case you need it)
|
|
37
|
+
|
|
38
|
+
old_project_entries:
|
|
39
|
+
- title: Soopr
|
|
40
|
+
url: https://www.soopr.co
|
|
41
|
+
desc: Delight your readers - add beautiful share and like buttons easily to your websites
|
|
42
|
+
highlight: NEW
|
|
43
|
+
|
|
44
|
+
- title: Cookie
|
|
45
|
+
url: https://github.com/abhinavs/cookie
|
|
46
|
+
desc: An open source landing website with supporting pages and integrated blog
|
|
47
|
+
|
|
48
|
+
- title: Moonwalk Tokyo Night
|
|
49
|
+
url: https://github.com/foursixnine/moonwalk-tokyonight
|
|
50
|
+
desc: A Tokyo Night-flavoured Moonwalk fork for remote-theme use
|
|
51
|
+
|
|
52
|
+
- title: Humangous
|
|
53
|
+
url: https://www.humangous.co
|
|
54
|
+
desc: The better people know you, the better they collaborate
|
|
55
|
+
|
|
56
|
+
footer_entries:
|
|
57
|
+
- title: abhinav's homepage
|
|
58
|
+
url: https://www.abhinav.co
|
|
59
|
+
|
|
60
|
+
- title: twitter
|
|
61
|
+
url: https://twitter.com/abhinav
|
|
62
|
+
|
|
63
|
+
- title: github
|
|
64
|
+
url: https://github.com/abhinavs
|
|
65
|
+
|
|
66
|
+
- title: feed
|
|
67
|
+
url: feed.xml
|
|
68
|
+
|
|
69
|
+
- title: llms.txt
|
|
70
|
+
url: llms.txt
|
|
71
|
+
|
|
72
|
+
misc_entries:
|
|
73
|
+
- title: this is an example vertical list
|
|
74
|
+
url: false
|
|
75
|
+
|
|
76
|
+
- title: you can show or hide using a boolean flag in _config.yml
|
|
77
|
+
url: false
|
|
78
|
+
|
|
79
|
+
- title: and you can add data in _data/home.yml
|
|
80
|
+
url: false
|
|
81
|
+
|
|
82
|
+
- title: Blog posts
|
|
83
|
+
post_list: true
|
|
84
|
+
url: false
|
|
85
|
+
|
|
86
|
+
- title: tokyo night on the Internet
|
|
87
|
+
url: false
|
|
88
|
+
entries:
|
|
89
|
+
- title: on Github
|
|
90
|
+
url: https://github.com/abhinavs/moonwalk
|
|
91
|
+
|
|
92
|
+
- title: originally built for abhinav's homepage
|
|
93
|
+
url: https://www.abhinav.co
|
|
94
|
+
|
|
95
|
+
- title: this list is scalable and can be nested
|
|
96
|
+
url: false
|
|
97
|
+
entries:
|
|
98
|
+
- title: this is nested inside a nested list
|
|
99
|
+
url: false
|
|
100
|
+
|
|
101
|
+
- title: it is easy to use, see _data/home.yml to see how to configure it.
|
|
102
|
+
url: false
|
|
103
|
+
|
|
104
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<button class="back-to-top" aria-label="Back to top" onclick="window.scrollTo({top:0,behavior:'smooth'})">
|
|
2
|
+
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
3
|
+
<polyline points="18 15 12 9 6 15"></polyline>
|
|
4
|
+
</svg>
|
|
5
|
+
</button>
|
|
6
|
+
<style>
|
|
7
|
+
.back-to-top {
|
|
8
|
+
position: fixed;
|
|
9
|
+
bottom: 2em;
|
|
10
|
+
right: 2em;
|
|
11
|
+
width: 40px;
|
|
12
|
+
height: 40px;
|
|
13
|
+
border-radius: 50%;
|
|
14
|
+
border: 1px solid var(--border);
|
|
15
|
+
background: var(--bg-secondary);
|
|
16
|
+
color: var(--text);
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
opacity: 0;
|
|
19
|
+
pointer-events: none;
|
|
20
|
+
transition: opacity 0.3s ease;
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
z-index: 50;
|
|
25
|
+
}
|
|
26
|
+
.back-to-top.visible {
|
|
27
|
+
opacity: 1;
|
|
28
|
+
pointer-events: auto;
|
|
29
|
+
}
|
|
30
|
+
.back-to-top:hover {
|
|
31
|
+
color: var(--links);
|
|
32
|
+
}
|
|
33
|
+
@media screen and (max-width: 600px) {
|
|
34
|
+
.back-to-top {
|
|
35
|
+
bottom: 1em;
|
|
36
|
+
right: 1em;
|
|
37
|
+
width: 36px;
|
|
38
|
+
height: 36px;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
</style>
|
|
42
|
+
<script>
|
|
43
|
+
(function() {
|
|
44
|
+
var btn = document.querySelector('.back-to-top');
|
|
45
|
+
window.addEventListener('scroll', function() {
|
|
46
|
+
if (window.scrollY > 400) {
|
|
47
|
+
btn.classList.add('visible');
|
|
48
|
+
} else {
|
|
49
|
+
btn.classList.remove('visible');
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
})();
|
|
53
|
+
</script>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<ul class="horizontal-list">
|
|
2
|
+
{% for item in include.collection %}
|
|
3
|
+
|
|
4
|
+
<li class="card">
|
|
5
|
+
<a href="{{ item.url }}">
|
|
6
|
+
<span class="header">
|
|
7
|
+
{{ item.title }}
|
|
8
|
+
|
|
9
|
+
{% if item.highlight %}
|
|
10
|
+
<mark>{{ item.highlight }}</mark>
|
|
11
|
+
{% endif %}
|
|
12
|
+
|
|
13
|
+
</span>
|
|
14
|
+
|
|
15
|
+
<hr />
|
|
16
|
+
|
|
17
|
+
{% if item.desc != false %}
|
|
18
|
+
<p class="body">
|
|
19
|
+
{{ item.desc }}
|
|
20
|
+
</p>
|
|
21
|
+
{% endif %}
|
|
22
|
+
</a>
|
|
23
|
+
</li>
|
|
24
|
+
|
|
25
|
+
{% endfor %}
|
|
26
|
+
</ul>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
(function() {
|
|
3
|
+
document.querySelectorAll('div.highlighter-rouge').forEach(function(block) {
|
|
4
|
+
block.style.position = 'relative';
|
|
5
|
+
|
|
6
|
+
// Language label derived from rouge's language-* class
|
|
7
|
+
var langClass = Array.from(block.classList).find(function(c) {
|
|
8
|
+
return c.indexOf('language-') === 0 && c !== 'language-plaintext';
|
|
9
|
+
});
|
|
10
|
+
if (langClass) {
|
|
11
|
+
var label = document.createElement('span');
|
|
12
|
+
label.className = 'code-lang';
|
|
13
|
+
label.textContent = langClass.replace('language-', '');
|
|
14
|
+
block.appendChild(label);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
var btn = document.createElement('button');
|
|
18
|
+
btn.className = 'code-copy';
|
|
19
|
+
btn.setAttribute('aria-label', 'Copy code to clipboard');
|
|
20
|
+
btn.textContent = 'copy';
|
|
21
|
+
btn.addEventListener('click', function() {
|
|
22
|
+
var code = block.querySelector('code');
|
|
23
|
+
navigator.clipboard.writeText(code.innerText).then(function() {
|
|
24
|
+
btn.textContent = 'copied!';
|
|
25
|
+
setTimeout(function() { btn.textContent = 'copy'; }, 2000);
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
block.appendChild(btn);
|
|
29
|
+
});
|
|
30
|
+
})();
|
|
31
|
+
</script>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<div class="post-meta">
|
|
2
|
+
<div class="post-meta-line">
|
|
3
|
+
{% if page.author %}
|
|
4
|
+
<span class="post-meta-author">{{ page.author }}</span>
|
|
5
|
+
<span class="post-meta-sep">·</span>
|
|
6
|
+
{% endif %}
|
|
7
|
+
{% if page.date %}
|
|
8
|
+
<time class="post-meta-date" datetime="{{ page.date | date_to_xmlschema }}">
|
|
9
|
+
{{ page.date | date: "%B %-d, %Y" }}
|
|
10
|
+
</time>
|
|
11
|
+
{% endif %}
|
|
12
|
+
{% if site.theme_config.show_reading_time == true %}
|
|
13
|
+
{% capture words %}{{ content | number_of_words | minus: 180 }}{% endcapture %}
|
|
14
|
+
{% unless words contains '-' %}
|
|
15
|
+
<span class="post-meta-sep">·</span>
|
|
16
|
+
<span class="post-meta-reading">{{ words | plus: 180 | divided_by: 180 }} min read</span>
|
|
17
|
+
{% endunless %}
|
|
18
|
+
{% endif %}
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
{% if site.theme_config.show_tags == true and page.tags %}
|
|
22
|
+
<div class="post-meta-tags">
|
|
23
|
+
{% for tag in page.tags %}
|
|
24
|
+
<a href="{{ "/tags" | relative_url }}#{{ tag | slugify }}" class="tag">{{ tag }}</a>
|
|
25
|
+
{% endfor %}
|
|
26
|
+
</div>
|
|
27
|
+
{% endif %}
|
|
28
|
+
|
|
29
|
+
<div class="soopr-btn"
|
|
30
|
+
{% if site.twitter.username %}data-twitter="{{ site.twitter.username }}"{% endif %}
|
|
31
|
+
></div>
|
|
32
|
+
</div>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
(function() {
|
|
3
|
+
// Render a small tooltip preview when hovering/tapping kramdown-generated
|
|
4
|
+
// footnote refs (e.g. <a href="#fn:1">1</a>) so readers don't have to
|
|
5
|
+
// scroll to the bottom of the post.
|
|
6
|
+
var refs = document.querySelectorAll('a.footnote, sup a[href^="#fn"]');
|
|
7
|
+
if (!refs.length) return;
|
|
8
|
+
|
|
9
|
+
var tip = document.createElement('div');
|
|
10
|
+
tip.className = 'fn-tooltip';
|
|
11
|
+
tip.setAttribute('role', 'tooltip');
|
|
12
|
+
document.body.appendChild(tip);
|
|
13
|
+
|
|
14
|
+
function show(ref) {
|
|
15
|
+
var id = ref.getAttribute('href').slice(1);
|
|
16
|
+
var fn = document.getElementById(id);
|
|
17
|
+
if (!fn) return;
|
|
18
|
+
var clone = fn.cloneNode(true);
|
|
19
|
+
var back = clone.querySelector('.reversefootnote, a[href^="#fnref"]');
|
|
20
|
+
if (back) back.remove();
|
|
21
|
+
tip.innerHTML = clone.innerHTML;
|
|
22
|
+
|
|
23
|
+
var rect = ref.getBoundingClientRect();
|
|
24
|
+
var top = window.scrollY + rect.bottom + 8;
|
|
25
|
+
var left = Math.max(12, window.scrollX + rect.left - 12);
|
|
26
|
+
tip.style.top = top + 'px';
|
|
27
|
+
tip.style.left = left + 'px';
|
|
28
|
+
tip.classList.add('visible');
|
|
29
|
+
}
|
|
30
|
+
function hide() { tip.classList.remove('visible'); }
|
|
31
|
+
|
|
32
|
+
refs.forEach(function(ref) {
|
|
33
|
+
ref.addEventListener('mouseenter', function() { show(ref); });
|
|
34
|
+
ref.addEventListener('mouseleave', hide);
|
|
35
|
+
ref.addEventListener('focus', function() { show(ref); });
|
|
36
|
+
ref.addEventListener('blur', hide);
|
|
37
|
+
});
|
|
38
|
+
})();
|
|
39
|
+
</script>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
document.addEventListener("DOMContentLoaded", function () {
|
|
3
|
+
var defined_alerts = {
|
|
4
|
+
NOTE: { icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>', label: 'Note' },
|
|
5
|
+
TIP: { icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z"></path></svg>', label: 'Tip' },
|
|
6
|
+
IMPORTANT: { icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>', label: 'Important' },
|
|
7
|
+
WARNING: { icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>', label: 'Warning' },
|
|
8
|
+
CAUTION: { icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>', label: 'Caution' }
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
var blockquotes = document.querySelectorAll("blockquote");
|
|
12
|
+
for (var i = 0; i < blockquotes.length; i++) {
|
|
13
|
+
var bq = blockquotes[i];
|
|
14
|
+
var firstP = bq.querySelector("p:first-child");
|
|
15
|
+
if (!firstP) continue;
|
|
16
|
+
|
|
17
|
+
var text = firstP.innerHTML;
|
|
18
|
+
var match = text.match(/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]\s*(<br\s*\/?>)?/);
|
|
19
|
+
if (!match) continue;
|
|
20
|
+
|
|
21
|
+
var type = match[1];
|
|
22
|
+
var alert = defined_alerts[type];
|
|
23
|
+
|
|
24
|
+
// Remove the marker from the paragraph text
|
|
25
|
+
firstP.innerHTML = text.replace(match[0], "").trim();
|
|
26
|
+
|
|
27
|
+
// If the paragraph is now empty, remove it
|
|
28
|
+
if (!firstP.innerHTML) {
|
|
29
|
+
firstP.remove();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Build the alert title
|
|
33
|
+
var title = document.createElement("p");
|
|
34
|
+
title.className = "markdown-alert-title";
|
|
35
|
+
title.innerHTML = alert.icon + " " + alert.label;
|
|
36
|
+
bq.insertBefore(title, bq.firstChild);
|
|
37
|
+
|
|
38
|
+
bq.classList.add("markdown-alert", "markdown-alert-" + type.toLowerCase());
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
</script>
|
data/_includes/head.html
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<head>
|
|
2
|
+
<meta charset="utf-8" />
|
|
3
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
4
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
5
|
+
|
|
6
|
+
<title>
|
|
7
|
+
{% if page.title %}
|
|
8
|
+
{{ page.title }}
|
|
9
|
+
{% else %}
|
|
10
|
+
{{ site.title }}
|
|
11
|
+
{% endif %}
|
|
12
|
+
</title>
|
|
13
|
+
|
|
14
|
+
{% seo title=false %}
|
|
15
|
+
{% feed_meta %}
|
|
16
|
+
|
|
17
|
+
<!-- Favicon -->
|
|
18
|
+
<link rel="apple-touch-icon" sizes="180x180" href="{{ "/assets/images/favicon/apple-touch-icon.png" | relative_url }}">
|
|
19
|
+
<link rel="icon" type="image/png" sizes="32x32" href="{{ "/assets/images/favicon/favicon-32x32.png" | relative_url }}">
|
|
20
|
+
<link rel="icon" type="image/png" sizes="16x16" href="{{ "/assets/images/favicon/favicon-16x16.png" | relative_url }}">
|
|
21
|
+
<link rel="manifest" href="{{ "/assets/images/favicon/site.webmanifest" | relative_url }}">
|
|
22
|
+
<link rel="mask-icon" href="{{ "/assets/images/favicon/safari-pinned-tab.svg" | relative_url }}" color="#5bbad5">
|
|
23
|
+
<link rel="shortcut icon" href="{{ "/assets/images/favicon/favicon.ico" | relative_url }}">
|
|
24
|
+
<meta name="msapplication-TileColor" content="#00aba9">
|
|
25
|
+
<meta name="msapplication-config" content="{{ "/assets/images/favicon/browserconfig.xml" | relative_url }}">
|
|
26
|
+
<meta name="theme-color" content="{% if site.theme_config.palette == 'moon' %}#222436{% elsif site.theme_config.palette == 'day' %}#e6e7ed{% else %}#222436{% endif %}">
|
|
27
|
+
<!-- Favicon -->
|
|
28
|
+
|
|
29
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
30
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
31
|
+
<link href="https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500&display=swap" rel="stylesheet">
|
|
32
|
+
{%- if site.soopr -%}
|
|
33
|
+
<link rel="dns-prefetch" href="https://sdk.soopr.co">
|
|
34
|
+
{%- endif -%}
|
|
35
|
+
|
|
36
|
+
<link rel="stylesheet" href="{{ "/assets/css/main.css" | relative_url }}" />
|
|
37
|
+
{% if site.theme_config.appearance_toggle %}
|
|
38
|
+
{% include toggle_theme_js.html %}
|
|
39
|
+
{% endif %}
|
|
40
|
+
|
|
41
|
+
{%- include custom_head.html -%}
|
|
42
|
+
</head>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
(function() {
|
|
3
|
+
// Hover any internal post link to see a small preview card with title,
|
|
4
|
+
// excerpt and date. Pulls from /search.json which is a Jekyll-generated
|
|
5
|
+
// index of all posts.
|
|
6
|
+
var postIndex = null;
|
|
7
|
+
var loading = null;
|
|
8
|
+
|
|
9
|
+
function loadIndex() {
|
|
10
|
+
if (loading) return loading;
|
|
11
|
+
loading = fetch('{{ "/search.json" | relative_url }}')
|
|
12
|
+
.then(function(r) { return r.ok ? r.json() : []; })
|
|
13
|
+
.then(function(data) { postIndex = data; return data; })
|
|
14
|
+
.catch(function() { postIndex = []; return []; });
|
|
15
|
+
return loading;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
var card = document.createElement('div');
|
|
19
|
+
card.className = 'link-preview';
|
|
20
|
+
document.body.appendChild(card);
|
|
21
|
+
var hideTimer;
|
|
22
|
+
|
|
23
|
+
function show(link, post) {
|
|
24
|
+
card.innerHTML =
|
|
25
|
+
'<div class="lp-title">' + escape(post.title) + '</div>' +
|
|
26
|
+
(post.excerpt ? '<div class="lp-excerpt">' + escape(post.excerpt) + '</div>' : '') +
|
|
27
|
+
'<div class="lp-meta">' + escape(post.date || '') + '</div>';
|
|
28
|
+
var rect = link.getBoundingClientRect();
|
|
29
|
+
card.style.top = (window.scrollY + rect.bottom + 8) + 'px';
|
|
30
|
+
card.style.left = Math.max(12, window.scrollX + rect.left) + 'px';
|
|
31
|
+
card.classList.add('visible');
|
|
32
|
+
}
|
|
33
|
+
function hide() {
|
|
34
|
+
hideTimer = setTimeout(function() { card.classList.remove('visible'); }, 100);
|
|
35
|
+
}
|
|
36
|
+
function escape(s) {
|
|
37
|
+
return String(s || '').replace(/[&<>"']/g, function(c) {
|
|
38
|
+
return { '&':'&','<':'<','>':'>','"':'"',"'":''' }[c];
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
document.querySelectorAll('.page-content a[href^="/"], .page-content a[href^="{{ site.url }}"]').forEach(function(link) {
|
|
43
|
+
link.addEventListener('mouseenter', function() {
|
|
44
|
+
clearTimeout(hideTimer);
|
|
45
|
+
loadIndex().then(function(idx) {
|
|
46
|
+
var href = link.getAttribute('href').replace('{{ site.url }}', '');
|
|
47
|
+
var match = idx.find(function(p) { return p.url === href || p.url === href + '/'; });
|
|
48
|
+
if (match) show(link, match);
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
link.addEventListener('mouseleave', hide);
|
|
52
|
+
});
|
|
53
|
+
card.addEventListener('mouseenter', function() { clearTimeout(hideTimer); });
|
|
54
|
+
card.addEventListener('mouseleave', hide);
|
|
55
|
+
})();
|
|
56
|
+
</script>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{% if site.posts.size > 0 %}
|
|
2
|
+
<ul>
|
|
3
|
+
{% for post in site.posts %}
|
|
4
|
+
<li class="post-list-item">
|
|
5
|
+
<span class="home-date">
|
|
6
|
+
{{ post.date | date: site.theme_config.date_format }}»
|
|
7
|
+
</span>
|
|
8
|
+
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
|
9
|
+
</li>
|
|
10
|
+
{% endfor %}
|
|
11
|
+
</ul>
|
|
12
|
+
{% endif %}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{% if page.previous or page.next %}
|
|
2
|
+
<nav class="post-nav" aria-label="Post navigation">
|
|
3
|
+
{% if page.previous %}
|
|
4
|
+
<a class="post-nav-prev" href="{{ page.previous.url | relative_url }}">← {{ page.previous.title }}</a>
|
|
5
|
+
{% endif %}
|
|
6
|
+
{% if page.next %}
|
|
7
|
+
<a class="post-nav-next" href="{{ page.next.url | relative_url }}">{{ page.next.title }} →</a>
|
|
8
|
+
{% endif %}
|
|
9
|
+
</nav>
|
|
10
|
+
{% endif %}
|