jekyll-theme-chirpy-customized-upe 0.0.0 → 0.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b6c47d98594efa5430a8dbf532587f2a99241fbf792d76411488099bc919b8c6
4
- data.tar.gz: 798eb695f7ffbbe0990aa1ae3745292c57fdcb1a2b039947eca78e5c8f1b3eaf
3
+ metadata.gz: e0bb8657672f4f220046fe4e7f3080221f96b1a439c12096493b8ccf04950277
4
+ data.tar.gz: 1a7690c7e064b1cd4001e4c1340aceb5661bb9303b5255d146fa5c852e3a7715
5
5
  SHA512:
6
- metadata.gz: 98e70657aa06b036e34c37aeb6bc871b97573164eef0d398f486a2a36e15304a2b1f8419d5a0fb7d4ac6aefd099a28ac1924127b6d79880f2d906b3cde32dd20
7
- data.tar.gz: a5bdca64fdc1078148fc586b21f3f8a48a631551cc262d5b2e55ecfdeff530dbf63fa2f599cb168fd5845858b90a1160fc0bef4ddd631feb76d7d9947cd7866a
6
+ metadata.gz: 8708fff0ae948831fd9a5ed4248b03985705ba9d923821a29c2c04031afec0d4e30671beab8544f7aa8e01d03ecf835a1197e223df78de257cf0581bcb49c2ec
7
+ data.tar.gz: bf2754c8f47d1e646337f232c755a81afa3072d68f18b2089d32e29eeba637d8f169ca68324a3bf6d8f40bd2baf7b1b81e3c9ef46432e47621ba8edb586f9550
@@ -8,9 +8,7 @@
8
8
  <link rel="apple-touch-icon" sizes="180x180" href="{{ favicon_path }}/apple-touch-icon.png">
9
9
  <link rel="icon" type="image/png" sizes="32x32" href="{{ favicon_path }}/favicon-32x32.png">
10
10
  <link rel="icon" type="image/png" sizes="16x16" href="{{ favicon_path }}/favicon-16x16.png">
11
- {% if site.pwa.enabled %}
12
- <link rel="manifest" href="{{ favicon_path }}/site.webmanifest">
13
- {% endif %}
11
+ <link rel="manifest" href="{{ favicon_path }}/site.webmanifest">
14
12
  <link rel="shortcut icon" href="{{ favicon_path }}/favicon.ico">
15
13
  <meta name="apple-mobile-web-app-title" content="{{ site.title }}">
16
14
  <meta name="application-name" content="{{ site.title }}">
@@ -8,15 +8,9 @@
8
8
  "
9
9
  >
10
10
  <p>
11
- {{- '©' }}
11
+ {{ '©' }}
12
12
  <time>{{ 'now' | date: '%Y' }}</time>
13
-
14
- {% if site.social.links %}
15
- <a href="{{ site.social.links[0] }}">{{ site.social.name }}</a>.
16
- {% else %}
17
- <em class="fst-normal">{{ site.social.name }}</em>.
18
- {% endif %}
19
-
13
+ <a href="{{ site.social.links[0] }}">{{ site.social.name }}</a>.
20
14
  {% if site.data.locales[include.lang].copyright.brief %}
21
15
  <span
22
16
  data-bs-toggle="tooltip"
@@ -40,3 +34,5 @@
40
34
  {{ site.data.locales[include.lang].meta | replace: ':PLATFORM', _platform | replace: ':THEME', _theme }}
41
35
  </p>
42
36
  </footer>
37
+
38
+
data/_includes/head.html CHANGED
@@ -8,19 +8,18 @@
8
8
  name="viewport"
9
9
  content="width=device-width, user-scalable=no initial-scale=1, shrink-to-fit=no, viewport-fit=cover"
10
10
  >
11
+ <meta name="referrer" content="no-referrer" />
11
12
 
12
13
  {%- capture seo_tags -%}
13
14
  {% seo title=false %}
14
15
  {%- endcapture -%}
15
16
 
16
- <!-- Setup Open Graph image -->
17
-
18
17
  {% if page.image %}
19
- {% assign src = page.image.path | default: page.image %}
18
+ {% assign src = page.image.path | default: page.image %}
20
19
 
21
20
  {% unless src contains '://' %}
22
21
  {%- capture img_url -%}
23
- {% include img-url.html src=src img_path=page.img_path absolute=true %}
22
+ {% include img-url.html src=src img_path=page.img_path %}
24
23
  {%- endcapture -%}
25
24
 
26
25
  {%- capture old_url -%}{{ src | absolute_url }}{%- endcapture -%}
@@ -28,27 +27,21 @@
28
27
 
29
28
  {% assign seo_tags = seo_tags | replace: old_url, new_url %}
30
29
  {% endunless %}
31
-
30
+
32
31
  {% elsif site.social_preview_image %}
33
32
  {%- capture img_url -%}
34
- {% include img-url.html src=site.social_preview_image absolute=true %}
33
+ {% include img-url.html src=site.social_preview_image %}
35
34
  {%- endcapture -%}
36
35
 
37
36
  {%- capture og_image -%}
38
37
  <meta property="og:image" content="{{ img_url }}" />
39
38
  {%- endcapture -%}
40
39
 
41
- {%- capture twitter_image -%}
42
- <meta property="twitter:card" content="summary_large_image" />
43
- <meta property="twitter:image" content="{{ img_url }}" />
44
- {%- endcapture -%}
45
-
46
- {% assign old_meta_clip = '<meta name="twitter:card" content="summary" />' %}
47
- {% assign new_meta_clip = og_image | append: twitter_image %}
40
+ {% assign old_meta_clip = '<meta name="twitter:card"' %}
41
+ {% assign new_meta_clip = og_image | append: old_meta_clip %}
48
42
  {% assign seo_tags = seo_tags | replace: old_meta_clip, new_meta_clip %}
49
43
  {% endif %}
50
44
 
51
- {{ seo_tags }}
52
45
 
53
46
  <title>
54
47
  {%- unless page.layout == 'home' -%}
@@ -81,7 +74,7 @@
81
74
  {% endif %}
82
75
 
83
76
  <!-- Bootstrap -->
84
- <link rel="stylesheet" href="{{ site.data.origin[type].bootstrap.css | relative_url }}">
77
+ <link rel="stylesheet" href="{{ site.data.origin[type].bootstrap.css | relative_url}}">
85
78
 
86
79
  <!-- Font Awesome -->
87
80
  <link rel="stylesheet" href="{{ site.data.origin[type].fontawesome.css | relative_url }}">
@@ -101,6 +94,10 @@
101
94
  <link rel="stylesheet" href="{{ site.data.origin[type].magnific-popup.css | relative_url }}">
102
95
  {% endif %}
103
96
 
97
+ <!-- Fonts -->
98
+ <link href="https://fonts.font.im/css?family=Meie+Script" rel="stylesheet">
99
+ <link href="https://fonts.font.im/css?family=Galada" rel="stylesheet">
100
+
104
101
  <!-- JavaScript -->
105
102
 
106
103
  {% unless site.theme_mode %}
@@ -2,9 +2,8 @@
2
2
  Generate image final URL based on `site.img_cdn`, `page.img_path`
3
3
 
4
4
  Arguments:
5
- src - required, basic image path
6
- img_path - optional, relative path of image
7
- absolute - optional, boolean, if true, generate absolute URL
5
+ src - basic image path, required
6
+ img_path - relative path of image, optional
8
7
 
9
8
  Return:
10
9
  image URL
@@ -15,7 +14,7 @@
15
14
  {%- if url -%}
16
15
  {% unless url contains ':' %}
17
16
  {%- comment -%} CND URL {%- endcomment -%}
18
- {% assign prefix = site.img_cdn | default: '' %}
17
+ {% assign prefix = site.img_cdn | default: '' | relative_url %}
19
18
 
20
19
  {%- comment -%} Add page image path prefix {%- endcomment -%}
21
20
  {% assign url = include.img_path | default: '' | append: '/' | append: url %}
@@ -27,12 +26,6 @@
27
26
  | replace: '//', '/'
28
27
  | replace: ':', ':/'
29
28
  %}
30
-
31
- {% if include.absolute %}
32
- {% assign url = url | absolute_url %}
33
- {% else %}
34
- {% assign url = url | relative_url %}
35
- {% endif %}
36
29
  {% endunless %}
37
30
  {%- endif -%}
38
31
 
@@ -11,8 +11,6 @@
11
11
 
12
12
  <!-- layout specified -->
13
13
 
14
- {% assign js_dist = '/assets/js/dist/' %}
15
-
16
14
  {% if page.layout == 'post' or page.layout == 'page' or page.layout == 'home' %}
17
15
  {% assign urls = urls | append: ',' | append: site.data.origin[type]['lazy-polyfill'].js %}
18
16
 
@@ -67,7 +65,7 @@
67
65
  {% assign js = 'commons' %}
68
66
  {% endcase %}
69
67
 
70
- {% capture script %}{{ js_dist }}{{ js }}.min.js{% endcapture %}
68
+ {% capture script %}/assets/js/dist/{{ js }}.min.js{% endcapture %}
71
69
  <script defer src="{{ script | relative_url }}"></script>
72
70
 
73
71
  {% if page.math %}
@@ -85,9 +83,7 @@
85
83
  displayMath: [
86
84
  ['$$', '$$'],
87
85
  ['\\[', '\\]']
88
- ],
89
- /* equation numbering */
90
- tags: 'ams'
86
+ ]
91
87
  }
92
88
  };
93
89
  </script>
@@ -98,16 +94,13 @@
98
94
  {% if jekyll.environment == 'production' %}
99
95
  <!-- PWA -->
100
96
  {% if site.pwa.enabled %}
101
- <script defer src="{{ 'app.min.js' | prepend: js_dist | relative_url }}"></script>
97
+ <script defer src="{{ '/app.js' | relative_url }}"></script>
98
+ {% else %}
99
+ <script defer src="{{ '/unregister.js' | relative_url }}"></script>
102
100
  {% endif %}
103
101
 
104
102
  <!-- GA -->
105
103
  {% if site.google_analytics.id != empty and site.google_analytics.id %}
106
104
  {% include google-analytics.html %}
107
105
  {% endif %}
108
-
109
- <!-- GoatCounter -->
110
- {% if site.goatcounter.id != empty and site.goatcounter.id %}
111
- {% include goatcounter.html %}
112
- {% endif %}
113
106
  {% endif %}
@@ -8,13 +8,15 @@
8
8
  {% assign url = page.url | absolute_url | url_encode %}
9
9
 
10
10
  {% for share in site.data.share.platforms -%}
11
- {%- capture tooltip -%}
12
- data-bs-toggle="tooltip" data-bs-placement="top" title="{{ share.type }}" aria-label="{{ share.type }}"
13
- {%- endcapture -%}
14
-
15
11
  {% if share.type == 'Mastodon' %}
16
12
  <script defer type="module" src="https://cdn.jsdelivr.net/npm/@justinribeiro/share-to-mastodon/+esm"></script>
17
- <button class="btn text-start" {{ tooltip }}>
13
+ <button
14
+ class="btn text-start"
15
+ data-bs-toggle="tooltip"
16
+ data-bs-placement="top"
17
+ title="{{ share.type }}"
18
+ aria-label="{{ share.type }}"
19
+ >
18
20
  <share-to-mastodon
19
21
  class="share-mastodon"
20
22
  message="{{ title }}"
@@ -23,7 +25,7 @@
23
25
  customInstanceList="{{ share.instances | jsonify | xml_escape }}"
24
26
  {%- endif %}
25
27
  >
26
- <i class="fa-fw {{ share.icon }}"></i>
28
+ <i class="{{ share.icon }}"></i>
27
29
  </share-to-mastodon>
28
30
  </button>
29
31
 
@@ -32,7 +34,15 @@
32
34
 
33
35
  {% assign link = share.link | replace: 'TITLE', title | replace: 'URL', url %}
34
36
 
35
- <a href="{{ link }}" target="_blank" rel="noopener" {{ tooltip }}>
37
+ <a
38
+ href="{{ link }}"
39
+ data-bs-toggle="tooltip"
40
+ data-bs-placement="top"
41
+ title="{{ share.type }}"
42
+ target="_blank"
43
+ rel="noopener"
44
+ aria-label="{{ share.type }}"
45
+ >
36
46
  <i class="fa-fw {{ share.icon }}"></i>
37
47
  </a>
38
48
  {% endfor %}
@@ -48,6 +48,8 @@
48
48
  {% assign _img_content = null %}
49
49
  {% assign _img_snippets = _content | split: IMG_TAG %}
50
50
 
51
+
52
+
51
53
  {% for _img_snippet in _img_snippets %}
52
54
  {% if forloop.first %}
53
55
  {% assign _img_content = _img_snippet %}
@@ -1,19 +1,116 @@
1
1
  <!-- The Side Bar -->
2
+ <style>
3
+ #InfoForm {
4
+ display: none;
5
+ justify-content: center;
6
+ align-items: center;
7
+ position: absolute;
8
+ top: 50%;
9
+ left: 50%;
10
+ transform: translate(-50%, -50%);
11
+ z-index: 9999;
12
+ animation: appear 0.3s ease-in-out;
13
+ transition: 0.3s;
14
+ }
15
+
16
+ @keyframes appear {
17
+ from {
18
+ opacity: 0;
19
+ transform: translate(-50%, -60%);
20
+ }
21
+ to {
22
+ opacity: 1;
23
+ transform: translate(-50%, -50%);
24
+ }
25
+ }
26
+
27
+ .form-changeInfo input[type="text"],
28
+ input[type="url"]
29
+ {
30
+ margin: 10px 0 0 0;
31
+ width: 100%;
32
+ box-sizing: border-box;
33
+ border-radius: 5px;
34
+ border: transparent;
35
+ }
36
+ .validatemsg {
37
+ font-size: 12px;
38
+ color: gray;
39
+ }
40
+ .form-nickname {
41
+ margin-bottom: 10px;
42
+ }
43
+ #avatar::placeholder, #nickname::placeholder {
44
+ color: rgba(172, 172, 172, 0.733);
45
+ }
46
+ .form-buttons {
47
+ display: flex;
48
+ justify-content: space-evenly;
49
+ }
50
+ .form-submit {
51
+ margin: 0 20px;
52
+ }
53
+ .submitChange
54
+ {
55
+ background: rgba(0, 123, 255, 0.8);
56
+ color: #fff;
57
+ border-radius: 5px;
58
+ border: transparent;
59
+ }
60
+ .form-cancel {
61
+ margin: 0 20px;
62
+ }
63
+ .cancelChange
64
+ {
65
+ background: rgba(112, 112, 112, 0.679);
66
+ color: #fff;
67
+ border-radius: 5px;
68
+ border: transparent;
69
+ }
70
+ </style>
2
71
 
72
+ <div id = "InfoForm">
73
+ <div class = "info">
74
+ <form target="_self" class="form-changeInfo">
75
+ <div class="form-avatar">
76
+ <label for="avatar">请提供新头像的URL:</label>
77
+ <input type="url" name="avatar" placeholder="Optional" id="newAvatar" onblur="formValidate.checkAvatar()"/>
78
+ <span class="validatemsg" id="isAvatarValid"></span>
79
+ </div>
80
+ <div class="form-nickname">
81
+ <label for="nickname">请输入您的新昵称: </label>
82
+ <input type="text" name="nickname" maxlength="15" placeholder="Optional" id="newNickname" onblur="formValidate.checkNickname()"/>
83
+ <span class="validatemsg" id="isNicknameValid"></span>
84
+ </div>
85
+ <div class="form-buttons">
86
+ <div class="form-submit">
87
+ <input type="button" class="submitChange" value="Submit" onclick="updateUserInfo()"/>
88
+ </div>
89
+ <div class="form-cancel">
90
+ <input type="button" class="cancelChange" value="Cancel"/>
91
+ </div>
92
+ </div>
93
+ </form>
94
+ </div>
95
+ </div>
96
+ <div class="gal-info"></div>
3
97
  <aside aria-label="Sidebar" id="sidebar" class="d-flex flex-column align-items-end">
98
+ <a href="javascript:void(0)" id="changeInfo" onclick="document.getElementById('InfoForm').style.display = 'flex'; document.querySelector('.gal-info').classList.add('active');" style="position: absolute; top: 140px; left: 150px;">
99
+ <i class="fa-fw fas fa-pen-to-square"></i>
100
+ </a>
4
101
  <header class="profile-wrapper">
5
- <a href="{{ '/' | relative_url }}" id="avatar" class="rounded-circle">
102
+ <a href="{{ site.baseurl }}" id="avatar" class="rounded-circle">
6
103
  {%- if site.avatar != empty and site.avatar -%}
7
- {%- capture avatar_url -%}
8
- {% include img-url.html src=site.avatar %}
9
- {%- endcapture -%}
104
+ {%- capture avatar_url -%}
105
+ {% include img-url.html src=site.avatar %}
106
+ {%- endcapture -%}
10
107
  <img src="{{- avatar_url -}}" width="112" height="112" alt="avatar" onerror="this.style.display='none'">
11
- {%- endif -%}
108
+ {%- endif -%}
12
109
  </a>
13
110
 
14
- <h1 class="site-title">
15
- <a href="{{ '/' | relative_url }}">{{ site.title }}</a>
16
- </h1>
111
+ <div class="site-title">
112
+ <a href="{{ site.baseurl }}">Hi Guest!</a>
113
+ </div>
17
114
  <p class="site-subtitle fst-italic mb-0">{{ site.tagline }}</p>
18
115
  </header>
19
116
  <!-- .profile-wrapper -->
@@ -29,16 +126,16 @@
29
126
  </li>
30
127
  <!-- the real tabs -->
31
128
  {% for tab in site.tabs %}
32
- <li class="nav-item{% if tab.url == page.url %}{{ " active" }}{% endif %}">
33
- <a href="{{ tab.url | relative_url }}" class="nav-link">
34
- <i class="fa-fw {{ tab.icon }}"></i>
35
- {% capture tab_name %}{{ tab.url | split: '/' }}{% endcapture %}
36
-
37
- <span>{{ site.data.locales[include.lang].tabs.[tab_name] | default: tab.title | upcase }}</span>
38
- </a>
39
- </li>
40
- <!-- .nav-item -->
41
- {% endfor %}
129
+ <li class="nav-item{% if tab.url == page.url %}{{ " active" }}{% endif %}">
130
+ <a href="{{ tab.url | relative_url }}" class="nav-link">
131
+ <i class="fa-fw {{ tab.icon }}"></i>
132
+ {% capture tab_name %}{{ tab.url | split: '/' }}{% endcapture %}
133
+
134
+ <span>{{ site.data.locales[include.lang].tabs.[tab_name] | default: tab.title | upcase }}</span>
135
+ </a>
136
+ </li>
137
+ <!-- .nav-item -->
138
+ {% endfor %}
42
139
  </ul>
43
140
  </nav>
44
141
 
@@ -93,7 +190,75 @@
93
190
  </a>
94
191
  {% endif %}
95
192
  {% endfor %}
193
+ <a href="javascript:void(0);" onclick="AV.User.logOut();setTimeout(function() { window.location.reload(); }, 1000)">
194
+ <i class="fas fa-right-from-bracket" style="color: rgb(181, 27, 27);"></i>
195
+ </a>
96
196
  </div>
97
197
  <!-- .sidebar-bottom -->
98
198
  </aside>
99
199
  <!-- #sidebar -->
200
+
201
+ <script>
202
+ document.querySelector('.site-subtitle').addEventListener('dblclick', function() {
203
+ window.location.href = '{{ site.baseurl }}';
204
+ });
205
+ </script>
206
+ <script>
207
+ var formValidate = {
208
+ checkNickname: function() {
209
+ if (document.getElementById('newNickname').value.trim() != ''){
210
+ document.getElementById('isNicknameValid').innerHTML = '<i class="fa-fw fas fa-check"></i>';
211
+ document.getElementById('isNicknameValid').style.color = 'green';
212
+ return true;
213
+ } else {
214
+ document.getElementById('isNicknameValid').innerHTML = '';
215
+ return true;
216
+ }
217
+ },
218
+ checkAvatar: function() {
219
+ if (document.getElementById('newAvatar').value.trim().startsWith('https://') || document.getElementById('newAvatar').value.trim().startsWith('http://')) {
220
+ document.getElementById('isAvatarValid').innerHTML = '<i class="fa-fw fas fa-check"></i>';
221
+ document.getElementById('isAvatarValid').style.color = 'green';
222
+ return true;
223
+ } else if (document.getElementById('newAvatar').value.trim() !='') {
224
+ document.getElementById('isAvatarValid').innerHTML = '<i class="fa-fw fas fa-xmark"></i>Invalid URL';
225
+ document.getElementById('isAvatarValid').style.color = 'red';
226
+ } else {
227
+ document.getElementById('isAvatarValid').innerHTML = '';
228
+ return true;
229
+ }
230
+ },
231
+ };
232
+ </script>
233
+ <script>
234
+ function updateUserInfo() {
235
+
236
+ var newAvatar = document.getElementById('newAvatar').value.trim();
237
+ var newNickname = document.getElementById('newNickname').value.trim();
238
+
239
+ if (newNickname != ''){
240
+ currentUser.set("nickname", newNickname);
241
+ }
242
+ if (newAvatar != '') {
243
+ currentUser.set("avatar", newAvatar);
244
+ }
245
+ currentUser.save().then((user) => {
246
+ console.log('保存成功!');
247
+ if (newAvatar != '' || newNickname != '') {
248
+ alert("Save Successfully!");
249
+ window.location.reload();
250
+ }
251
+ }).catch((error) => {
252
+ console.log(error.message);
253
+ });
254
+
255
+ }
256
+ </script>
257
+ <script>
258
+ document.querySelector('.cancelChange').addEventListener('click', () => {
259
+ document.getElementById('InfoForm').style.display = 'none';
260
+ document.querySelector('.gal-info').classList.remove('active');
261
+ event.preventDefault();
262
+ });
263
+ </script>
264
+
@@ -17,7 +17,7 @@
17
17
  {% if forloop.first %}
18
18
  <span>
19
19
  <a href="{{ '/' | relative_url }}">
20
- {{- site.data.locales[include.lang].tabs.home | capitalize -}}
20
+ {{ site.data.locales[include.lang].tabs.home | capitalize }}
21
21
  </a>
22
22
  </span>
23
23
 
@@ -30,8 +30,8 @@
30
30
 
31
31
  {% elsif page.layout == 'category' or page.layout == 'tag' %}
32
32
  <span>
33
- <a href="{{ item | append: '/' | relative_url }}">
34
- {{- site.data.locales[include.lang].tabs[item] | default: page.title -}}
33
+ <a href="{{ item | relative_url }}">
34
+ {{ site.data.locales[include.lang].tabs[item] | default: page.title }}
35
35
  </a>
36
36
  </span>
37
37
  {% endif %}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-chirpy-customized-upe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jo Cruise