jekyll-theme-satellite 1.2.6 → 1.4.0

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: 448e295e716ec32f2dad173b791fcee9e42c264e229fb39d3501cf82ea2418c0
4
- data.tar.gz: a71ec9b39495b1c87e58ff2b7d26a4a0663f3ce59e563b2d481a81940106b450
3
+ metadata.gz: 88e7781c8395a3d197e679cb194837023bdd47bd514e55a486681c8f2f4030d8
4
+ data.tar.gz: 24860694b55ec99e9df72a6b52fc069ee754defd7f90cb3fa4b36ed83becefb7
5
5
  SHA512:
6
- metadata.gz: 455e709bf4dc456025224c65cd9002641a06bc3fade886f8c95245279cd3516abbd5e8dda06ee8815e180081f509130dc0fc2a5e0eaa637d72422b34027c5886
7
- data.tar.gz: 562522fda3c17408b3a23b3ee38fb30fbeb5cdef7236998ad600f00d8227bb22571970a6b7f783913fe8be51244826a7fff3debbbe1e3097ef97c14fd86daeca
6
+ metadata.gz: 0bf9f629f4b52ce457820883971cd203158e74a5a904ed3c6264b3f10982dde925478e8b46c2bd69d1115a625e1fe7c1ab324edb78d2389545ebdc24d37fbd65
7
+ data.tar.gz: 29e931b62cc4baaed26aa6924d42811982a57413d869604c29284527aaeb7f9a6e40f9261470dd5dc777784b4cd6029f61f2773d1b615beb04c383b912313acc
data/README.md CHANGED
@@ -2,6 +2,13 @@
2
2
  [![License: MIT](https://img.shields.io/badge/License-MIT-orange.svg)](https://opensource.org/licenses/MIT)
3
3
  [![Jekyll](https://img.shields.io/badge/jekyll-%3E%3D%204.3.2-green.svg)](https://jekyllrb.com/)
4
4
  [![Jekyll](https://img.shields.io/badge/gem%20version-3.2.33-blue.svg)](gem)
5
+ <a href="https://jekyll-themes.com/byanko55/jekyll-theme-satellite">
6
+ <img
7
+ src="https://img.shields.io/badge/featured%20on-JT-red.svg"
8
+ height="20"
9
+ alt="Jekyll Themes Shield"
10
+ />
11
+ </a>
5
12
 
6
13
  # Satellite🛰️ - Jekyll blog theme
7
14
  An emotional and adorable blog theme powered by ***Jekyll***.
@@ -11,10 +18,10 @@ Live demo is available [here](https://byanko55.github.io)
11
18
  ![Demo Page](https://i.ibb.co/h1QF06V/demo.webp)
12
19
 
13
20
  ### Light Mode
14
- ![Demo Page-light](https://i.ibb.co/PtTbM1V/image-4.webp)
21
+ ![Demo Page-light](https://i.ibb.co/DtDPCpR/white.webp)
15
22
 
16
23
  ### Dark Mode
17
- ![Demo Page-dark](https://i.ibb.co/cY6hwG4/image-5.webp)
24
+ ![Demo Page-dark](https://i.ibb.co/BjsrWg2/dark.webp)
18
25
 
19
26
  ### Fresh and Attractive Design
20
27
  <p>
@@ -49,20 +56,27 @@ There are two ways to setup this theme:
49
56
  Fork [this repository](https://github.com/byanko55/jekyll-theme-satellite) or download the [source](https://github.com/byanko55/jekyll-theme-satellite/releases) as a zip.
50
57
 
51
58
  If you use as destination a repository named USERNAME.github.io, then your url will be https://USERNAME.github.io/.
59
+
60
+ Otherwise (let's say `myblog`), you need to edit the '*baseurl*' parameter in `_config.yml`. In this case, the root page will be served to "https://USERNAME.github.io/myblog/".
61
+
62
+ ```yml
63
+ # set baseurl as "/<repo-name>". ex) baseurl: /myblog
64
+ baseurl: /myblog
65
+ ```
52
66
  <br></br>
53
67
 
68
+
54
69
  ### Method 2: Utilize Gem package
55
70
  Create a clean site directory (Follow the **Instruction 1~4** described [here](https://jekyllrb.com/docs/)).
56
71
 
57
72
  The following materials are redundant, so remove them.
58
73
  * index.markdown
59
74
  * about.markdown
60
- * 404.html
61
75
  <br></br>
62
76
 
63
77
  Then, add this line to your Jekyll site's `Gemfile`:
64
78
 
65
- ```
79
+ ```bash
66
80
  gem "jekyll-theme-satellite"
67
81
  ```
68
82
 
@@ -73,7 +87,7 @@ You need to replace the initial `_config.yml` file with the [prepared one](https
73
87
 
74
88
  Now fill in the **site variable** such as blog name, profile image, and social accounts in `_config.yml`.
75
89
 
76
- ```
90
+ ```yml
77
91
  title: Example.com
78
92
  description: "Satellite - jekyll blog theme"
79
93
  logo_img: "/assets/img/favicon.webp"
@@ -122,4 +136,4 @@ If you would like to report a bug or request a new feature, please open [an issu
122
136
  <br></br>
123
137
 
124
138
  ## License
125
- © 2024 *Yankos*. This theme is available as open source under the terms of the [MIT License](https://opensource.org/license/mit/).
139
+ © 2024 *Yankos*. This theme is available as open source under the terms of the [MIT License](https://opensource.org/license/mit/).
@@ -5,7 +5,7 @@
5
5
  {%- assign search_tree = page.path | remove: "/index.md" | split: "/" -%}
6
6
  {%- for sub_tree in search_tree -%}
7
7
  {% if forloop.first %}
8
- <a href="/">Home</a>
8
+ <a href="{{ site.baseurl | append: '/' }}">Home</a>
9
9
  >
10
10
  {% elsif forloop.last %}
11
11
  {% if page_type == "category" %}
@@ -15,7 +15,7 @@
15
15
  {% endif %}
16
16
  {% else %}
17
17
  {%- assign page_link = page_link | append: sub_tree | append: "/" -%}
18
- <a href="{{ page_link }}">{{ sub_tree }}</a>
18
+ <a href="{{ page_link | prepend: site.baseurl }}">{{ sub_tree }}</a>
19
19
  >
20
20
  {% endif %}
21
21
  {%- endfor -%}
@@ -1,4 +1,4 @@
1
- <script defer src="{{ '/assets/js/background.js' }}"></script>
1
+ <script defer src="{{ '/assets/js/background.js' | prepend: site.baseurl }}"></script>
2
2
  <script defer src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
3
3
  <script>
4
4
  window.dataLayer = window.dataLayer || [];
data/_includes/head.html CHANGED
@@ -12,7 +12,7 @@
12
12
  </title>
13
13
  {% seo %}
14
14
 
15
- <link rel="shortcut icon" type="image/png" href="{{ site.logo_img }}">
15
+ <link rel="shortcut icon" type="image/png" href="{{ site.logo_img | prepend: site.baseurl }}">
16
16
  <style>
17
17
  @font-face {
18
18
  font-family: 'Nunito Sans';
@@ -20,7 +20,7 @@
20
20
  font-weight: 400;
21
21
  font-display: optional;
22
22
  src: local('Nunito Sans'),
23
- url(/assets/fonts/NunitoSans-Regular.woff2) format("woff2");
23
+ url("{{ site.baseurl }}/assets/fonts/NunitoSans-Regular.woff2") format("woff2");
24
24
  }
25
25
 
26
26
  @font-face {
@@ -29,7 +29,7 @@
29
29
  font-weight: 600;
30
30
  font-display: optional;
31
31
  src: local('Righteous'),
32
- url(/assets/fonts/Righteous-Regular.woff2) format("woff2");
32
+ url("{{ site.baseurl }}/assets/fonts/Righteous-Regular.woff2") format("woff2");
33
33
  }
34
34
 
35
35
  @font-face {
@@ -38,11 +38,11 @@
38
38
  font-weight: 400;
39
39
  font-display: optional;
40
40
  src: local('Lato'),
41
- url(/assets/fonts/Lato-Regular.woff2) format("woff2");
41
+ url("{{ site.baseurl }}/assets/fonts/Lato-Regular.woff2") format("woff2");
42
42
  }
43
43
  </style>
44
44
 
45
- <script src="{{ '/assets/js/fontfaceobserver.js' }}" type="text/javascript"></script>
45
+ <script src="{{ '/assets/js/fontfaceobserver.js' | prepend: site.baseurl }}" type="text/javascript"></script>
46
46
  <script type="text/javascript">
47
47
  const nunitoObserver = new FontFaceObserver('Nunito Sans');
48
48
  const righteousObserver = new FontFaceObserver('Righteous');
@@ -57,6 +57,7 @@
57
57
  });
58
58
  </script>
59
59
 
60
+ <meta name="baseurl" content="{{ site.baseurl }}">
60
61
  <meta
61
62
  name="description"
62
63
  content="{% if page.description %}{{ page.description | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
@@ -1,6 +1,6 @@
1
1
  <div id="loading">
2
2
  <div class="loading_box">
3
- <img src="{{ '/assets/img/loading.webp' }}">
3
+ <img src="{{ '/assets/img/loading.webp' | prepend: site.baseurl }}">
4
4
  <p>Now Loading ...</p>
5
5
  </div>
6
6
  </div>
@@ -44,7 +44,7 @@
44
44
  {%- assign num_children = children_list | size -%}
45
45
  <li id="nav-first" aria-label="{{ node_title }}">
46
46
  <div class="nav-item">
47
- <a href="{{ node_url }}" class="nav-list-link nav-lh">
47
+ <a href="{{ node_url | prepend: site.baseurl }}" class="nav-list-link nav-lh">
48
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>
49
49
  <span>{{ node_title }}</span>
50
50
  </a>
@@ -64,7 +64,7 @@
64
64
  {%- assign num_grand_children = grand_children_list | size -%}
65
65
  <li id="nav-second" aria-label="{{ child_title }}">
66
66
  <div class="nav-item">
67
- <a href="{{ child_url }}" class="nav-list-link nav-sh">
67
+ <a href="{{ child_url | prepend: site.baseurl }}" class="nav-list-link nav-sh">
68
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>
69
69
  <span>{{ child_title }}</span>
70
70
  </a>
@@ -80,7 +80,7 @@
80
80
  {%- assign grand_child_title = grand_child.path | remove: 'index.md' | split: "/" | last | remove: '.md' -%}
81
81
  <li id="nav-third" aria-label="{{ grand_child_title }}">
82
82
  <div class="nav-item">
83
- <a href="{{ grand_child.url | relative_url }}" class="nav-list-link nav-sh">
83
+ <a href="{{ grand_child.url | prepend: site.baseurl }}" class="nav-list-link nav-sh">
84
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
85
  <span>{{ grand_child_title }}</span>
86
86
  </a>
@@ -19,21 +19,25 @@
19
19
  <div id="article_content">
20
20
  <div class="thumbnail_zone">
21
21
  {% if sub_page.thumbnail != nil %}
22
- <a href="{{ sub_page.url }}" class="thumbnail_post" loading="lazy" aria-label="thumbnail_post" style="background-image:url('{{ sub_page.thumbnail }}') !important"></a>
22
+ {%- assign thumbnail_url = sub_page.thumbnail -%}
23
+ {%- assign check_localasset = thumbnail_url | split:'/' -%}
24
+ {% if check_localasset[0] == '' %}
25
+ {%- assign thumbnail_url = thumbnail_url | prepend: site.baseurl -%}
26
+ {% endif %}
27
+ <a href="{{ sub_page.url | prepend: site.baseurl }}" class="thumbnail_post" loading="lazy" aria-label="thumbnail_post" style="background-image:url('{{ thumbnail_url }}') !important"></a>
23
28
  {% else %}
24
- <a href="{{ sub_page.url }}" class="thumbnail_post empty" loading="lazy" aria-label="thumbnail_post" style="background-image:url('/assets/img/thumbnail/empty.jpg') !important"></a>
29
+ <a href="{{ sub_page.url | prepend: site.baseurl }}" class="thumbnail_post empty" loading="lazy" aria-label="thumbnail_post" style="background-image:url('{{ '/assets/img/thumbnail/empty.jpg' | prepend: site.baseurl }}') !important"></a>
25
30
  {% endif %}
26
31
  </div>
27
-
28
32
  <div class="box_contents">
29
- <a href="{{ sub_page.url }}"><h1 class="title_post">{{ sub_page.title }}</h1></a>
30
- <a href="{{ sub_page.url }}" class="txt_post">
33
+ <a href="{{ sub_page.url | prepend: site.baseurl }}"><h1 class="title_post">{{ sub_page.title }}</h1></a>
34
+ <a href="{{ sub_page.url | prepend: site.baseurl }}" class="txt_post">
31
35
  {{ sub_page.content | markdownify | strip_html }}
32
36
  </a>
33
37
  <div class="info-post">
34
38
  {%- assign sub_page_tree = sub_page.path | split: "/" -%}
35
39
  {% if sub_page_tree.size > 2 %}
36
- <a href="{{ '/' | append: sub_page_tree[1] }}" class="category">{{ sub_page_tree[1] }}</a>
40
+ <a href="{{ '/' | append: sub_page_tree[1] | prepend: site.baseurl }}" class="category">{{ sub_page_tree[1] }}</a>
37
41
  {% else %}
38
42
  <span class="category">None</span>
39
43
  {% endif %}
@@ -51,7 +55,7 @@
51
55
  </ul>
52
56
  {% if post_counts == 0 %}
53
57
  <div class="no-posts">
54
- <img src="{{ '/assets/img/sorry.png'' }}"></img>
58
+ <img src="{{ '/assets/img/sorry.png'' | prepend: site.baseurl }}"></img>
55
59
  <h1>Sorry, No posts found</h1>
56
60
  </div>
57
61
  {% endif %}
data/_includes/post.html CHANGED
@@ -6,7 +6,7 @@
6
6
  {% endif %}
7
7
  <div class="post-info">
8
8
  {% if page_level > 2 %}
9
- <a class="info-box category-box" href="{{ '/' | append: page_tree[0] }}">
9
+ <a class="info-box category-box" href="{{ '/' | append: page_tree[0] | prepend: site.baseurl }}">
10
10
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M384 480h48c11.4 0 21.9-6 27.6-15.9l112-192c5.8-9.9 5.8-22.1 .1-32.1S555.5 224 544 224H144c-11.4 0-21.9 6-27.6 15.9L48 357.1V96c0-8.8 7.2-16 16-16H181.5c4.2 0 8.3 1.7 11.3 4.7l26.5 26.5c21 21 49.5 32.8 79.2 32.8H416c8.8 0 16 7.2 16 16v32h48V160c0-35.3-28.7-64-64-64H298.5c-17 0-33.3-6.7-45.3-18.7L226.7 50.7c-12-12-28.3-18.7-45.3-18.7H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H87.7 384z"/></svg>
11
11
  <span>{{ page_tree[0] }}</span>
12
12
  </a>
@@ -24,13 +24,24 @@
24
24
  {% endif %}
25
25
  {%- endfor -%}
26
26
 
27
+ {%- assign thumbnail_url = page.thumbnail -%}
28
+
29
+ {% if thumbnail_url != nil %}
30
+ {%- assign check_localasset = thumbnail_url | split:'/' -%}
31
+ {% if check_localasset[0] == '' %}
32
+ {%- assign thumbnail_url = thumbnail_url | prepend: site.baseurl -%}
33
+ {% endif %}
34
+ {% else %}
35
+ {%- assign thumbnail_url = '/assets/img/thumbnail/empty.jpg' | prepend: site.baseurl -%}
36
+ {% endif %}
37
+
27
38
  posts.push({
28
39
  'title' : "{{ page.title | escape }}",
29
40
  'path' : "{{ p_link }}",
30
41
  'type' : "{{ p_type }}",
31
42
  'tags' : "{{ page.tags | join: ', ' }}",
32
- 'url' : "{{ site.baseurl }}{{ page.url }}",
33
- 'image' : "{{ page.thumbnail }}",
43
+ 'url' : "{{ page.url | prepend: site.baseurl }}",
44
+ 'image' : "{{ thumbnail_url }}",
34
45
  'date' : "{{ page.date | date: '%Y-%m-%d' }}"
35
46
  });
36
47
  {% endfor %}
@@ -1,8 +1,8 @@
1
1
  <div class="sidebar sidebar-left">
2
2
  <div class="side-banner">
3
3
  <h1 class="site-tab">
4
- <a href="/" class="site-name">
5
- <img src="{{ '/assets/img/icon/house.webp' }}" alt="">
4
+ <a href="{{ site.baseurl | append: '/' }}" class="site-name">
5
+ <img src="{{ '/assets/img/icon/house.webp' | prepend: site.baseurl }}" alt="">
6
6
  <mark>{{ site.title }}</mark>
7
7
  </a>
8
8
  <button id="btn-brightness" aria-label="brightness-button">
@@ -16,8 +16,8 @@
16
16
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"/></svg>
17
17
  </button>
18
18
  </h1>
19
- <a href="/" class="site-avatar" aria-label="site-avatar">
20
- <img src="{{ site.profile_img }}" loading="lazy" alt="homepage" aria-label="homepage-button">
19
+ <a href="{{ site.baseurl | append: '/' }}" class="site-avatar" aria-label="site-avatar">
20
+ <img src="{{ site.profile_img | prepend: site.baseurl }}" loading="lazy" alt="homepage" aria-label="homepage-button">
21
21
  </a>
22
22
  </div>
23
23
  <div class="side-info">
@@ -32,7 +32,7 @@
32
32
  </a></li>
33
33
  {% endif %}
34
34
  {% if site.email %}
35
- <li><a aria-label="My Email" href="{{ site.email }}">
35
+ <li><a aria-label="My Email" href="mailto:{{ site.email }}">
36
36
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48H48zM0 176V384c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V176L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z"/></svg>
37
37
  </a></li>
38
38
  {% endif %}
@@ -2,11 +2,11 @@
2
2
  <html lang="en">
3
3
  <head>
4
4
  {% include head.html %}
5
- <link rel="stylesheet" href="{{ '/assets/css/404.css' }}">
5
+ <link rel="stylesheet" href="{{ '/assets/css/404.css' | prepend: site.baseurl }}">
6
6
  </head>
7
7
  <body>
8
8
  <div class="blank-page">
9
- <a href="/" class="go-home">↩️ GO HOME</a>
9
+ <a href="{{ '/' | prepend: site.baseurl }}" class="go-home">↩️ GO HOME</a>
10
10
  <div class="not-found-msg">
11
11
  <h1 class="sour-face">`Φ ⌒ `Φ ?</h1>
12
12
  <p style="font-size:1.75rem; color:#fa4251;">404: Page not found</p>
@@ -14,5 +14,5 @@
14
14
  </div>
15
15
  </div>
16
16
  </body>
17
- <script src="{{ '/assets/js/404.js' }}"></script>
17
+ <script src="{{ '/assets/js/404.js' | prepend: site.baseurl }}"></script>
18
18
  </html>
data/_layouts/page.html CHANGED
@@ -10,8 +10,8 @@
10
10
  {% endif %}
11
11
  <head>
12
12
  {% include head.html %}
13
- <link rel="preload" href="{{ site.profile_img }}" as="image">
14
- <link rel="stylesheet" href="{{ '/assets/css/style.css' }}">
13
+ <link rel="preload" href="{{ site.profile_img | prepend: site.baseurl }}" as="image">
14
+ <link rel="stylesheet" href="{{ '/assets/css/style.css' | prepend: site.baseurl }}">
15
15
  {% if page_type == "post" %}
16
16
  {% if site.goatcounter_code %}
17
17
  <script data-goatcounter="https://{{ site.goatcounter_code }}.goatcounter.com/count"
@@ -25,9 +25,16 @@
25
25
 
26
26
  {% if page.thumbnail %}
27
27
  <style>
28
- .thumbnail {
29
- background-image: url("{{ page.thumbnail }}");
30
- }
28
+ {%- assign check_localasset = page.thumbnail | split:'/' -%}
29
+ {% if check_localasset[0] == '' %}
30
+ .thumbnail {
31
+ background-image: url("{{ page.thumbnail | prepend: site.baseurl }}");
32
+ }
33
+ {% else %}
34
+ .thumbnail {
35
+ background-image: url("{{ page.thumbnail }}");
36
+ }
37
+ {% endif %}
31
38
  </style>
32
39
  {% else %}
33
40
  <style>
@@ -73,13 +80,13 @@
73
80
  </body>
74
81
  {% include footer.html %}
75
82
  {% if page_type == "category" %}
76
- <script src="{{ '/assets/js/subject.js' }}"></script>
83
+ <script src="{{ '/assets/js/subject.js' | prepend: site.baseurl }}"></script>
77
84
  {% else %}
78
- <script src="{{ '/assets/js/post.js' }}"></script>
79
- <link rel="preload" href="{{ '/assets/css/highlight.min.css' }}" as="style" onload="this.onload=null;this.rel='stylesheet'">
80
- <noscript><link rel="stylesheet" href="{{ '/assets/css/highlight.min.css' }}"></noscript>
81
- <script defer src="{{ '/assets/js/highlight.min.js' }}"></script>
85
+ <script src="{{ '/assets/js/post.js' | prepend: site.baseurl }}"></script>
86
+ <link rel="preload" href="{{ '/assets/css/highlight.min.css' | prepend: site.baseurl }}" as="style" onload="this.onload=null;this.rel='stylesheet'">
87
+ <noscript><link rel="stylesheet" href="{{ '/assets/css/highlight.min.css' | prepend: site.baseurl }}"></noscript>
88
+ <script defer src="{{ '/assets/js/highlight.min.js' | prepend: site.baseurl }}"></script>
82
89
  {% endif %}
83
- <script src="{{ '/assets/js/common.js' }}"></script>
90
+ <script src="{{ '/assets/js/common.js' | prepend: site.baseurl }}"></script>
84
91
  {% include search_event.html %}
85
92
  </html>
@@ -189,7 +189,7 @@
189
189
  margin:auto 0 auto -5rem;
190
190
  padding:8px 24px;
191
191
  background-color:rgba(255,255,255,0.95);
192
- background-image:url(/assets/img/tile.png);
192
+ background-image:url($baseurl + "/assets/img/tile.png");
193
193
  border-radius:6px;
194
194
  }
195
195
 
data/_sass/post.scss CHANGED
@@ -268,9 +268,9 @@ main {
268
268
  border-radius:4px;
269
269
 
270
270
  svg {
271
- background-color:darkslategrey !important;
272
- -webkit-mask-image:url(/assets/img/icon/clipboard-regular.svg);
273
- mask-image:url(/assets/img/icon/clipboard-regular.svg);
271
+ -webkit-mask-image:url($baseurl + '/assets/img/icon/clipboard-regular.svg');
272
+ mask-image:url($baseurl + '/assets/img/icon/clipboard-regular.svg');
273
+ background-color:#555 !important;
274
274
  mask-repeat:no-repeat;
275
275
  mask-position:center;
276
276
  mask-size:80%;
data/_sass/search.scss CHANGED
@@ -105,7 +105,7 @@
105
105
  z-index:-1;
106
106
  }
107
107
  &:before { background:#fff; }
108
- &:after { background-image:url('/assets/img/tile.png'); }
108
+ &:after { background-image:url($baseurl + '/assets/img/tile.png'); }
109
109
 
110
110
  button {
111
111
  position:absolute;
@@ -145,7 +145,7 @@
145
145
  td { font-size:0.875rem; }
146
146
 
147
147
  svg {
148
- background-color:darkslategrey;
148
+ background-color:darkslategrey;
149
149
  mask-repeat:no-repeat;
150
150
  display:inline-flex;
151
151
  width:14px;
@@ -154,20 +154,20 @@
154
154
  }
155
155
  .ico-book {
156
156
  background-color:dodgerblue !important;
157
- -webkit-mask-image:url(/assets/img/icon/book-solid.svg);
158
- mask-image:url(/assets/img/icon/book-solid.svg);
157
+ -webkit-mask-image:url($baseurl + '/assets/img/icon/book-solid.svg');
158
+ mask-image:url($baseurl + '/assets/img/icon/book-solid.svg');
159
159
  }
160
160
  .ico-folder {
161
- -webkit-mask-image:url(/assets/img/icon/folder-open-regular.svg);
162
- mask-image:url(/assets/img/icon/folder-open-regular.svg);
161
+ -webkit-mask-image:url($baseurl + '/assets/img/icon/folder-open-regular.svg');
162
+ mask-image:url($baseurl + '/assets/img/icon/folder-open-regular.svg');
163
163
  }
164
164
  .ico-tags {
165
- -webkit-mask-image:url(/assets/img/icon/tags-solid.svg);
166
- mask-image:url(/assets/img/icon/tags-solid.svg);
165
+ -webkit-mask-image:url($baseurl + '/assets/img/icon/tags-solid.svg');
166
+ mask-image:url($baseurl + '/assets/img/icon/tags-solid.svg');
167
167
  }
168
168
  .ico-calendar {
169
- -webkit-mask-image:url(/assets/img/icon/calendar-days-regular.svg);
170
- mask-image:url(/assets/img/icon/calendar-days-regular.svg);
169
+ -webkit-mask-image:url($baseurl + '/assets/img/icon/calendar-days-regular.svg');
170
+ mask-image:url($baseurl + '/assets/img/icon/calendar-days-regular.svg');
171
171
  }
172
172
  .ico-book, th .ico-folder { width:18px; }
173
173
  th .ico-folder { background-color:mediumseagreen !important; }
data/_sass/sidebar.scss CHANGED
@@ -302,14 +302,18 @@
302
302
  }
303
303
  }
304
304
 
305
+ .sidebar-right{
306
+ display:flex;
307
+ height:100%;
308
+ margin-left:calc(var(--pagewidth-desktop) + #{$sidebarwd}/2);
309
+ }
310
+
305
311
  }
306
312
 
307
313
  @include mq(wide){
308
314
 
309
315
  .sidebar-left{ width:calc((100vw - #{$contentwd})/2); }
310
316
  .sidebar-right{
311
- display:flex;
312
- height:100%;
313
317
  width:calc((100vw - #{$contentwd})/2);
314
318
  margin-left:calc(#{$contentwd} + (100vw - #{$contentwd})/2);
315
319
  }
data/_sass/toc.scss CHANGED
@@ -1,6 +1,7 @@
1
1
  .toc {
2
2
  position:fixed;
3
3
  top:6rem;
4
+ display: none;
4
5
  }
5
6
 
6
7
  .toc-header {
@@ -55,4 +56,8 @@
55
56
  color:indianred !important;
56
57
  font-weight:950;
57
58
  }
59
+ }
60
+
61
+ @include mq(wide){
62
+ .toc{ display: block; }
58
63
  }
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  ---
3
+ $baseurl: "{{ site.baseurl }}";
3
4
 
4
5
  html, body {
5
6
  margin:0;
data/assets/js/common.js CHANGED
@@ -1,3 +1,5 @@
1
+ var baseurl = document.querySelector('meta[name="baseurl"]').content;
2
+
1
3
  document.addEventListener('DOMContentLoaded', function(){
2
4
  // Init theme
3
5
  let currentTheme = localStorage.getItem('theme');
@@ -33,6 +35,7 @@ document.addEventListener('DOMContentLoaded', function(){
33
35
  // kept nav opened
34
36
  var firstNavs = document.querySelectorAll('#nav-first');
35
37
  var page_path = window.location.pathname.replace(/%20/g, " ");
38
+ page_path = page_path.replace(baseurl, "");
36
39
  var page_tree = page_path.split('/');
37
40
 
38
41
  Array.prototype.forEach.call(firstNavs, function (nav_first) {
@@ -89,6 +92,7 @@ document.addEventListener('DOMContentLoaded', function(){
89
92
  btn.addEventListener('click', function() {
90
93
  const moonIcons = document.querySelectorAll(".ico-dark");
91
94
  const sunIcons = document.querySelectorAll(".ico-light");
95
+ const codeblocks = innerContent != null ? innerContent.querySelectorAll('pre') : null;
92
96
 
93
97
  moonIcons.forEach((ico) => {
94
98
  ico.classList.toggle('active');
@@ -103,18 +107,24 @@ document.addEventListener('DOMContentLoaded', function(){
103
107
  if (isDarkMode){
104
108
  localStorage.setItem('theme', 'default');
105
109
  // Disable highlighter dark color theme
106
- Array.from(innerContent.querySelectorAll('pre')).forEach(function (codeblock){
107
- codeblock.classList.remove('pre-dark');
108
- });
110
+ if (codeblocks) {
111
+ Array.from(codeblocks).forEach(function (codeblock){
112
+ codeblock.classList.remove('pre-dark');
113
+ });
114
+ }
115
+
109
116
  changeGiscusTheme('light');
110
117
  isDarkMode = false;
111
118
  }
112
119
  else {
113
120
  localStorage.setItem('theme', 'dark');
114
121
  // Disable highlighter default color theme
115
- Array.from(innerContent.querySelectorAll('pre')).forEach(function (codeblock){
116
- codeblock.classList.add('pre-dark');
117
- });
122
+ if (codeblocks) {
123
+ Array.from(codeblocks).forEach(function (codeblock){
124
+ codeblock.classList.add('pre-dark');
125
+ });
126
+ }
127
+
118
128
  changeGiscusTheme('noborder_gray');
119
129
  isDarkMode = true;
120
130
  }
@@ -334,10 +344,6 @@ function searchRelated(pages){
334
344
 
335
345
  if (post.category !== '') category = post.category;
336
346
 
337
- if (post.thumbnail === ''){
338
- post.thumbnail = "/assets/img/thumbnail/empty.jpg";
339
- }
340
-
341
347
  let contents = document.createElement("li");
342
348
  contents.classList.add("related-item");
343
349
  contents.innerHTML = '<a href="' + post.url +
data/assets/js/post.js CHANGED
@@ -25,8 +25,6 @@ document.addEventListener('DOMContentLoaded', function(){
25
25
  });
26
26
  });
27
27
 
28
- console.log(heading.textContent, heading.getBoundingClientRect().top);
29
-
30
28
  if (heading.tagName == 'H1'){
31
29
  itemLink.classList.add("node-name--H1");
32
30
  prevHead = tocItem;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-satellite
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.6
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yankos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-19 00:00:00.000000000 Z
11
+ date: 2024-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll