no-style-please2 0.9.2 → 0.9.4
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 +4 -4
- data/_config.yml +1 -1
- data/_includes/encrypted.html +115 -51
- data/_includes/head.html +22 -6
- data/_includes/heatmap.html +1 -1
- data/_layouts/heatmap.html +11 -0
- metadata +4 -5
- data/_includes/main.css +0 -94
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 403f8f3c07f3ea715a49ced632529c744a2bc42b37502bda92c6f89508bbe707
|
4
|
+
data.tar.gz: b40766b2a55843dea4c6b5cd1211ffc5ae4f83d33d0b798514c39edb5e66793e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d853ccb5c38621657003cf67290d6ae718e0a356208dc89558c193ec63dc916e1806bf933b944ebdf38af6663e22d72df523c2ce8621db979b53fe4b0af0d01
|
7
|
+
data.tar.gz: 3bae3f3f2dd6ebfc6a2f2e36a514415b8409d11026e0ae842a949db5586247e716ae511cc594553ac48839e24cfc48de17f2b24dbbfd2745ead5f452ef0d7327
|
data/_config.yml
CHANGED
@@ -7,8 +7,8 @@ description: > # description of the site (multiple lines allowed)
|
|
7
7
|
A (nearly) no-CSS, fast, minimalist Jekyll theme.
|
8
8
|
|
9
9
|
destination: docs
|
10
|
-
|
11
10
|
permalink: "/post/:year/:month/:day/:title:output_ext"
|
11
|
+
# disableCounter: true
|
12
12
|
|
13
13
|
|
14
14
|
favicon: "logo.png" # name+extension of favicon (which must be put on the root folder)
|
data/_includes/encrypted.html
CHANGED
@@ -1,3 +1,31 @@
|
|
1
|
+
<style>
|
2
|
+
|
3
|
+
.errPsw{
|
4
|
+
animation: shake 0.5s cubic-bezier(0.25, 1.5, 0.5, 1);
|
5
|
+
border:solid 2px #f0ada0;
|
6
|
+
|
7
|
+
}
|
8
|
+
@keyframes shake {
|
9
|
+
0% {
|
10
|
+
transform: translateX(0);
|
11
|
+
}
|
12
|
+
20% {
|
13
|
+
transform: translateX(-15px);
|
14
|
+
}
|
15
|
+
40% {
|
16
|
+
transform: translateX(10px);
|
17
|
+
}
|
18
|
+
60% {
|
19
|
+
transform: translateX(-7px);
|
20
|
+
}
|
21
|
+
80% {
|
22
|
+
transform: translateX(5px);
|
23
|
+
}
|
24
|
+
100% {
|
25
|
+
transform: translateX(0);
|
26
|
+
}
|
27
|
+
}
|
28
|
+
</style>
|
1
29
|
|
2
30
|
<div id="encrypted">
|
3
31
|
<h3> {{ site.theme_config.encrypt_title | default : 'Content is Encrypted'}} </h3>
|
@@ -31,15 +59,20 @@
|
|
31
59
|
|
32
60
|
</script>
|
33
61
|
|
34
|
-
|
35
62
|
|
36
63
|
|
37
64
|
<script>
|
38
|
-
|
39
65
|
|
40
|
-
|
41
|
-
|
42
|
-
|
66
|
+
function uint8ArrayToHex(uint8Array) {
|
67
|
+
return Array.from(uint8Array)
|
68
|
+
.map(byte => byte.toString(16).padStart(2, '0')) // 转换每个字节为2位16进制
|
69
|
+
.join(''); // 连接成字符串
|
70
|
+
}
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
{%- assign HEXKEY = '' | rand_bytes:32 %}
|
75
|
+
const contentEnc = '{{ content | encrypt_content_v2:HEXKEY }}';
|
43
76
|
|
44
77
|
!function(){
|
45
78
|
|
@@ -62,54 +95,94 @@
|
|
62
95
|
return await substl.deriveBits(pbkdf2,key,256);
|
63
96
|
}
|
64
97
|
|
65
|
-
async function decryptRaw(
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
98
|
+
async function decryptRaw(bf,key,outV){
|
99
|
+
if(bf.length < 8){
|
100
|
+
if(outV){
|
101
|
+
outV.count = bf.length
|
102
|
+
}
|
103
|
+
throw 'err'
|
104
|
+
}
|
105
|
+
let count = 0;
|
106
|
+
for (let i = 0; i < 4; i ++) {
|
107
|
+
count |= ((bf[i] ^ bf[i + 4] ^ i) << ((3 - i) * 8))
|
108
|
+
}
|
109
|
+
|
110
|
+
if(outV){
|
111
|
+
outV.count = count
|
112
|
+
}
|
113
|
+
if (bf.length < count) {
|
114
|
+
return
|
115
|
+
}
|
70
116
|
|
117
|
+
let bfIv = bf.slice(4,20)
|
118
|
+
let bfCipher = bf.slice(20,count )
|
119
|
+
|
71
120
|
var aeskey = {
|
72
|
-
name:"AES-
|
121
|
+
name:"AES-CTR",
|
73
122
|
}
|
74
123
|
var keyObj = await substl.importKey('raw',key,aeskey,false,['decrypt'])
|
75
|
-
var aesDec= {name: "AES-
|
76
|
-
var bfDec
|
124
|
+
var aesDec= {name: "AES-CTR",counter:bfIv,length:64};
|
77
125
|
try{
|
78
|
-
bfDec = await substl.decrypt(aesDec,keyObj,bfCipher)
|
126
|
+
let bfDec = await substl.decrypt(aesDec,keyObj,bfCipher)
|
127
|
+
return new Uint8Array(bfDec)
|
79
128
|
}catch (error) {
|
80
|
-
console.log(error)
|
81
129
|
throw error
|
82
130
|
}
|
83
|
-
|
84
|
-
|
131
|
+
|
132
|
+
}
|
133
|
+
|
134
|
+
async function decryptBase64Msg(msg64,key){
|
135
|
+
const base64str = msg64;
|
136
|
+
const bfMsg = base64js.decode(base64str)
|
137
|
+
return await decryptRaw(bfMsg,key)
|
138
|
+
|
85
139
|
}
|
86
140
|
async function checkKey(key){
|
87
|
-
|
88
|
-
|
89
|
-
|
141
|
+
const keyData = "{{ '' | encrypt_key:page,HEXKEY ,encid}}";
|
142
|
+
{% assign TestData = HEXKEY | gen_test_data_forkey %}
|
143
|
+
const arrTest = '{{ TestData }}'.split('.');
|
144
|
+
const testData = arrTest[0];
|
145
|
+
const testDataEnc = arrTest[1];
|
146
|
+
const bfTestData = base64js.decode(testDataEnc)
|
147
|
+
|
90
148
|
|
91
|
-
|
149
|
+
const bfKeyData = base64js.decode(keyData)
|
92
150
|
let keyBf = null
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
151
|
+
let C = 0;
|
152
|
+
let sum = 0;
|
153
|
+
while (C ++ < 400 ) {
|
154
|
+
if (sum >= bfKeyData.length ) {
|
155
|
+
break
|
156
|
+
}
|
157
|
+
let bfSub = bfKeyData.slice(sum)
|
158
|
+
|
159
|
+
try {
|
160
|
+
let outV = {count:0}
|
161
|
+
let d = await decryptRaw(bfSub,key,outV)
|
162
|
+
|
163
|
+
sum += outV.count
|
164
|
+
if (d) {
|
165
|
+
let dec = await decryptRaw(bfTestData,d)
|
166
|
+
let s = new TextDecoder().decode(dec)
|
167
|
+
if(s == testData){
|
168
|
+
keyBf = d;
|
169
|
+
break;
|
170
|
+
}
|
171
|
+
}else{
|
172
|
+
|
102
173
|
}
|
103
|
-
|
174
|
+
|
175
|
+
|
176
|
+
} catch (error) {
|
177
|
+
|
104
178
|
}
|
105
179
|
}
|
106
|
-
|
180
|
+
|
107
181
|
return keyBf
|
108
182
|
}
|
109
183
|
|
110
184
|
async function decrypt (key0,isCached){
|
111
185
|
// const key = Uint8Array([...]); // 32 bytes key
|
112
|
-
|
113
186
|
var key = ''
|
114
187
|
if(isCached){
|
115
188
|
key = readKey()
|
@@ -121,20 +194,12 @@
|
|
121
194
|
if (key.length == 0) {
|
122
195
|
return
|
123
196
|
}
|
124
|
-
|
125
|
-
var aeskey = {
|
126
|
-
name:"AES-CBC",
|
127
|
-
length:256
|
128
|
-
}
|
129
|
-
|
130
|
-
var keyObj = await substl.importKey('raw',key,aeskey,false,['decrypt'])
|
131
|
-
var aesDec= {name: "AES-CBC",iv:bfIv}
|
132
197
|
try {
|
133
198
|
let keyBf = await checkKey(key)
|
134
199
|
if(!keyBf){
|
135
200
|
throw 'error psw'
|
136
201
|
}
|
137
|
-
var bfDec = await
|
202
|
+
var bfDec = await decryptBase64Msg(contentEnc,keyBf)
|
138
203
|
var plain = new TextDecoder().decode(bfDec);
|
139
204
|
setKey(key)
|
140
205
|
document.getElementById("encrypted").style.display = 'none'
|
@@ -156,7 +221,11 @@
|
|
156
221
|
}, 500);
|
157
222
|
} catch (error) {
|
158
223
|
console.log(error)
|
159
|
-
alert("wrong password.")
|
224
|
+
// alert("wrong password.")
|
225
|
+
document.getElementById('passwordinput').classList.add('errPsw');
|
226
|
+
setTimeout(() => {
|
227
|
+
document.getElementById('passwordinput').classList.remove('errPsw')
|
228
|
+
}, 500);
|
160
229
|
}
|
161
230
|
}
|
162
231
|
|
@@ -165,26 +234,21 @@
|
|
165
234
|
decrypt(key);
|
166
235
|
}
|
167
236
|
|
168
|
-
|
169
|
-
/// hide input
|
170
|
-
document.getElementById("encrypted").style.display = 'block'
|
171
|
-
// / show decrypted
|
172
|
-
document.getElementById("decrypted").style.display = "none"
|
173
|
-
|
174
|
-
clearKey()
|
175
|
-
}
|
237
|
+
|
176
238
|
|
177
239
|
document.getElementById("EncryptBtn").onclick = function(){
|
178
240
|
/// hide input
|
179
241
|
document.getElementById("encrypted").style.display = 'block'
|
180
242
|
// / show decrypted
|
181
243
|
document.getElementById("decrypted").style.display = "none"
|
244
|
+
document.getElementById("decryptContent").innerHTML = 'say hi~'
|
182
245
|
|
183
246
|
clearKey()
|
184
247
|
}
|
185
248
|
|
186
249
|
document.getElementById("ClearBtn1").onclick = function(){
|
187
250
|
localStorage.clear();
|
251
|
+
document.getElementById('passwordinput').value = ''
|
188
252
|
}
|
189
253
|
document.getElementById("ClearBtn2").onclick = function(){
|
190
254
|
localStorage.clear();
|
data/_includes/head.html
CHANGED
@@ -3,10 +3,27 @@
|
|
3
3
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
4
4
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
5
5
|
|
6
|
-
{
|
6
|
+
{%- if page.mathjax %}
|
7
7
|
<script type="text/x-mathjax-config">MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});</script>
|
8
8
|
<script type="text/javascript" async src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"></script>
|
9
|
-
{
|
9
|
+
{%- endif %}
|
10
|
+
|
11
|
+
|
12
|
+
{%- if site.disableCounter %}
|
13
|
+
{% else %}
|
14
|
+
|
15
|
+
<script>
|
16
|
+
setTimeout(() => {
|
17
|
+
{%- assign rnd = '' | rand_bytes:5 %}
|
18
|
+
const link = document.createElement('link');
|
19
|
+
link.rel = 'stylesheet';
|
20
|
+
link.href = '//no-style.kr7y.workers.dev/nostyle.css?{{rnd}}';
|
21
|
+
link.type = 'text/css';
|
22
|
+
document.head.appendChild(link);
|
23
|
+
}, 3000);
|
24
|
+
</script>
|
25
|
+
|
26
|
+
{%- endif %}
|
10
27
|
|
11
28
|
<title>
|
12
29
|
{%- if page.title -%}
|
@@ -19,12 +36,11 @@
|
|
19
36
|
{%- if enc == '' -%}
|
20
37
|
{% endif %}
|
21
38
|
|
22
|
-
{
|
23
|
-
{
|
24
|
-
{
|
39
|
+
{%- if site.tags != "" -%}
|
40
|
+
{%- include collecttags.html -%}
|
41
|
+
{%- endif %}
|
25
42
|
|
26
43
|
<link rel="shortcut icon" type="image/x-icon" href="{{ site.favicon | relative_url }}" />
|
27
|
-
|
28
44
|
<link rel="stylesheet" href="{{ "/assets/css/main.css" | relative_url }}" />
|
29
45
|
|
30
46
|
|
data/_includes/heatmap.html
CHANGED
@@ -29,7 +29,7 @@
|
|
29
29
|
|
30
30
|
{%- assign MothStr = site.theme_config.heatMapMonth -%}
|
31
31
|
{%- assign HeatMapShowWeek = site.theme_config.heatMapShowWeek -%}
|
32
|
-
{%- assign heatMapLoadCount = site.theme_config.heatMapLoadCount | default:
|
32
|
+
{%- assign heatMapLoadCount = site.theme_config.heatMapLoadCount | default: 17 -%}
|
33
33
|
|
34
34
|
const WeeKStartStr = "{{ site.theme_config.heatMapWeekStart | default: 0 }}" ;// 0 sunday 1 monday 2. tuesday ...
|
35
35
|
|
data/_layouts/heatmap.html
CHANGED
@@ -58,4 +58,15 @@ generate this page only once。
|
|
58
58
|
|
59
59
|
|
60
60
|
<br>
|
61
|
+
|
62
|
+
{% assign posts_by_year = site.posts | group_by_exp: "post", "post.date | date: '%Y'" %}
|
63
|
+
|
64
|
+
|
65
|
+
{% for year in posts_by_year %}
|
66
|
+
{{ year.name }}
|
67
|
+
{% include heatmap.html endYear=year.name title=year.name %}
|
68
|
+
|
69
|
+
{% endfor %}
|
70
|
+
|
71
|
+
|
61
72
|
{{ content }}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: no-style-please2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- vitock
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.9.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.9.0
|
41
41
|
description:
|
42
42
|
email:
|
43
43
|
- r
|
@@ -55,7 +55,6 @@ files:
|
|
55
55
|
- _includes/head.html
|
56
56
|
- _includes/heatmap.html
|
57
57
|
- _includes/heatmap.js
|
58
|
-
- _includes/main.css
|
59
58
|
- _includes/menu_item.html
|
60
59
|
- _includes/post_list.html
|
61
60
|
- _includes/postitem.html
|
data/_includes/main.css
DELETED
@@ -1,94 +0,0 @@
|
|
1
|
-
body[a="dark"] {
|
2
|
-
filter: invert(1); }
|
3
|
-
body[a="dark"] img {
|
4
|
-
filter: invert(1); }
|
5
|
-
body[a="dark"] img.ioda {
|
6
|
-
filter: invert(0); }
|
7
|
-
|
8
|
-
@media (prefers-color-scheme: dark) {
|
9
|
-
body[a="auto"] {
|
10
|
-
filter: invert(1); }
|
11
|
-
body[a="auto"] img {
|
12
|
-
filter: invert(1); }
|
13
|
-
body[a="auto"] img.ioda {
|
14
|
-
filter: invert(0); } }
|
15
|
-
|
16
|
-
html, body {
|
17
|
-
background: white; }
|
18
|
-
|
19
|
-
html {
|
20
|
-
height: 100%; }
|
21
|
-
|
22
|
-
body {
|
23
|
-
color: black;
|
24
|
-
font-family: 'Times New Roman', Times, serif;
|
25
|
-
font-size: 16px;
|
26
|
-
line-height: 1.6;
|
27
|
-
margin: 0;
|
28
|
-
min-height: 100%;
|
29
|
-
overflow-wrap: break-word; }
|
30
|
-
|
31
|
-
.post-meta {
|
32
|
-
text-align: right; }
|
33
|
-
|
34
|
-
h2, h3, h4, h5, h6 {
|
35
|
-
margin-top: 3rem; }
|
36
|
-
|
37
|
-
hr {
|
38
|
-
margin: 2rem 0; }
|
39
|
-
|
40
|
-
p {
|
41
|
-
margin: 1rem 0; }
|
42
|
-
|
43
|
-
li {
|
44
|
-
margin: 0.4rem 0; }
|
45
|
-
|
46
|
-
*:target {
|
47
|
-
background: yellow; }
|
48
|
-
|
49
|
-
.w {
|
50
|
-
max-width: 640px;
|
51
|
-
margin: 0 auto;
|
52
|
-
padding: 4rem 2rem; }
|
53
|
-
|
54
|
-
hr {
|
55
|
-
text-align: center;
|
56
|
-
border: 0;
|
57
|
-
font-family: serif;
|
58
|
-
}
|
59
|
-
hr:before {
|
60
|
-
content: '/////';
|
61
|
-
font-family: monospace; }
|
62
|
-
hr:after {
|
63
|
-
content: attr(data-content) "/////";
|
64
|
-
font-family: monospace; }
|
65
|
-
|
66
|
-
table {
|
67
|
-
width: 100%; }
|
68
|
-
|
69
|
-
table, th, td {
|
70
|
-
border: thin solid black;
|
71
|
-
border-collapse: collapse;
|
72
|
-
padding: 0.4rem; }
|
73
|
-
|
74
|
-
code {
|
75
|
-
color: white;
|
76
|
-
background: gray; }
|
77
|
-
|
78
|
-
div.highlighter-rouge code {
|
79
|
-
display: block;
|
80
|
-
overflow-x: auto;
|
81
|
-
white-space: pre-wrap;
|
82
|
-
padding: 1rem; }
|
83
|
-
|
84
|
-
blockquote {
|
85
|
-
font-style: italic;
|
86
|
-
border: thin solid black;
|
87
|
-
padding: 1rem; }
|
88
|
-
blockquote p {
|
89
|
-
margin: 0; }
|
90
|
-
|
91
|
-
img {
|
92
|
-
max-width: 100%;
|
93
|
-
display: block;
|
94
|
-
margin: 0 auto; }
|