jekyll-flant-theme 0.1.3 → 1.0.3
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/LICENSE.txt +1 -1
- data/_includes/head.html +1 -2
- data/_layouts/default.html +1 -1
- data/assets/css/core/main.scss +2 -0
- data/assets/css/core/mixins.scss +18 -0
- data/assets/css/core/snippetcut/snippetcut-style.scss +89 -71
- data/assets/js/core/snippetcut/snippetcut.js +13 -8
- data/assets/js/core/vars-i18n.js.liquid +1 -1
- metadata +4 -4
- data/assets/css/demo/demo.scss +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a0672b77288e53d6c3bc46a802acd8c861ab64c14a9a4a09b41a837d327ef23
|
4
|
+
data.tar.gz: 79b26befa111365846f760c42c55665df6a7147fbb9e5c22ba1b5a5c0e326102
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fb0c5eebef244356dea5796dea58809d4dab6cc994a4c0c1e8511a3ff51b570e776743ca7c5acbd16754b630ae07eba92e061c937b35513de3b2185a42a4917
|
7
|
+
data.tar.gz: 6de364782ec5370601b45122c29d01a7ed519da820cb211e0b88addc2107db787ccd20111589fb73ca5c0994211e320ae2b93bae60cc6596f303979a974393c6
|
data/LICENSE.txt
CHANGED
data/_includes/head.html
CHANGED
data/_layouts/default.html
CHANGED
data/assets/css/core/main.scss
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
@mixin pre {
|
2
|
+
padding: 10px;
|
3
|
+
overflow-x: auto;
|
4
|
+
margin: 5px 0 25px 0;
|
5
|
+
display: block;
|
6
|
+
font-size: 13px;
|
7
|
+
line-height: 1.428571429;
|
8
|
+
word-break: break-all;
|
9
|
+
word-wrap: break-word;
|
10
|
+
}
|
11
|
+
|
12
|
+
@mixin code {
|
13
|
+
padding: 0;
|
14
|
+
font-size: 100%;
|
15
|
+
background: transparent;
|
16
|
+
white-space: pre;
|
17
|
+
border-radius: 0;
|
18
|
+
}
|
@@ -1,85 +1,103 @@
|
|
1
|
-
|
2
|
-
padding: 10px;
|
3
|
-
overflow-x: auto;
|
4
|
-
margin: 5px 0 25px
|
5
|
-
display: block;
|
6
|
-
font-size: 13px;
|
7
|
-
line-height: 1.428571429;
|
8
|
-
word-break: break-all;
|
9
|
-
word-wrap: break-word;
|
10
|
-
}
|
11
|
-
|
12
|
-
|
13
|
-
padding: 0;
|
14
|
-
font-size: 100%;
|
15
|
-
background: transparent;
|
16
|
-
white-space: pre;
|
17
|
-
border-radius:
|
18
|
-
}
|
1
|
+
//.docs pre {
|
2
|
+
// padding: 10px;
|
3
|
+
// overflow-x: auto;
|
4
|
+
// margin: 5px 0 25px 0;
|
5
|
+
// display: block;
|
6
|
+
// font-size: 13px;
|
7
|
+
// line-height: 1.428571429;
|
8
|
+
// word-break: break-all;
|
9
|
+
// word-wrap: break-word;
|
10
|
+
//}
|
11
|
+
//
|
12
|
+
//.docs pre code {
|
13
|
+
// padding: 0;
|
14
|
+
// font-size: 100%;
|
15
|
+
// background: transparent;
|
16
|
+
// white-space: pre;
|
17
|
+
// border-radius: 0;
|
18
|
+
//}
|
19
19
|
|
20
20
|
/* Snippetcut styles */
|
21
|
-
.
|
22
|
-
display: none;
|
23
|
-
}
|
24
|
-
|
25
|
-
.docs .snippetcut {
|
21
|
+
.snippetcut {
|
26
22
|
margin-top: 10px;
|
27
|
-
}
|
28
23
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
flex-direction: row;
|
33
|
-
align-items: center;
|
34
|
-
max-width: 860px;
|
35
|
-
}
|
24
|
+
&__raw {
|
25
|
+
display: none;
|
26
|
+
}
|
36
27
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
28
|
+
& .snippetcut__title-btn {
|
29
|
+
display: inline-block;
|
30
|
+
padding: 2px 5px;
|
31
|
+
margin-left: 5px;
|
32
|
+
border-radius: 5px;
|
33
|
+
text-decoration: none !important;
|
34
|
+
font-size: 60%;
|
35
|
+
font-weight: 600;
|
36
|
+
font-style: normal;
|
37
|
+
font-stretch: normal;
|
38
|
+
letter-spacing: normal;
|
39
|
+
box-sizing: border-box;
|
40
|
+
border: 2px solid rgba(0,102,255,0.1);
|
41
|
+
color: #939fb1;
|
44
42
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
}
|
43
|
+
-webkit-touch-callout: none;
|
44
|
+
-webkit-user-select: none;
|
45
|
+
-khtml-user-select: none;
|
46
|
+
-moz-user-select: none;
|
47
|
+
-ms-user-select: none;
|
48
|
+
user-select: none;
|
49
|
+
}
|
52
50
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
text-decoration: none !important;
|
59
|
-
font-size: 60%;
|
60
|
-
font-weight: 600;
|
61
|
-
font-style: normal;
|
62
|
-
font-stretch: normal;
|
63
|
-
letter-spacing: normal;
|
64
|
-
box-sizing: border-box;
|
65
|
-
border: 2px solid rgba(0,102,255,0.1);
|
66
|
-
color: #939fb1;
|
51
|
+
& .snippetcut__title-btn:hover {
|
52
|
+
border: 2px solid #939fb1;
|
53
|
+
background-color: #939fb1;
|
54
|
+
color: white;
|
55
|
+
}
|
67
56
|
|
68
|
-
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
57
|
+
& .snippetcut__title-btn.button__success {
|
58
|
+
border-color: #28a745;
|
59
|
+
color: #28a745
|
60
|
+
}
|
61
|
+
|
62
|
+
& .snippetcut__title-btn.button__danger {
|
63
|
+
border-color: #dc3545;
|
64
|
+
color: #dc3545
|
65
|
+
}
|
66
|
+
|
67
|
+
& .snippetcut__title {
|
68
|
+
margin-bottom: 5px;
|
69
|
+
display: flex;
|
70
|
+
flex-direction: row;
|
71
|
+
align-items: center;
|
72
|
+
max-width: 860px;
|
73
|
+
}
|
74
|
+
|
75
|
+
& .snippetcut__title .snippetcut__title-name {
|
76
|
+
font-size: 75%;
|
77
|
+
font-family: monospace, monospace;
|
78
|
+
color: #0066FF;
|
79
|
+
white-space: nowrap;
|
80
|
+
margin-right: auto;
|
81
|
+
}
|
82
|
+
|
83
|
+
& .snippetcut__title .snippetcut__title-name-text {
|
84
|
+
font-size: 75%;
|
85
|
+
font-family: monospace, monospace;
|
86
|
+
color: #000000;
|
87
|
+
white-space: nowrap;
|
88
|
+
margin-right: auto;
|
89
|
+
}
|
90
|
+
|
91
|
+
pre {
|
92
|
+
@include pre;
|
93
|
+
}
|
75
94
|
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
color: white;
|
95
|
+
pre code {
|
96
|
+
@include code;
|
97
|
+
}
|
80
98
|
}
|
81
99
|
|
82
|
-
.
|
100
|
+
.snippetcut_limited pre.highlight {
|
83
101
|
max-height: 200px;
|
84
102
|
display: block;
|
85
103
|
}
|
@@ -17,26 +17,31 @@ function btnHandler(button, selector) {
|
|
17
17
|
const parent = e.target.closest('.snippetcut');
|
18
18
|
const text = parent.querySelector(selector).innerText;
|
19
19
|
const oldText = button.innerText;
|
20
|
+
const lang = document.documentElement.lang;
|
20
21
|
|
21
22
|
navigator.clipboard.writeText(`${text}`)
|
22
23
|
.then(() => {
|
23
|
-
//
|
24
|
-
|
25
|
-
|
24
|
+
// Success!
|
25
|
+
if (selector === '[data-snippetcut-text]') {
|
26
|
+
button.innerHTML = dataGlobalI18n.snippetcut.messages.content_copied[lang];
|
27
|
+
} else {
|
28
|
+
button.innerHTML = dataGlobalI18n.snippetcut.messages.filename_copied[lang];
|
29
|
+
}
|
30
|
+
button.classList.add('button__success');
|
26
31
|
|
27
32
|
setTimeout(()=> {
|
28
33
|
button.innerHTML = oldText;
|
29
|
-
button.
|
34
|
+
button.classList.remove('button__success');
|
30
35
|
}, 2000);
|
31
36
|
})
|
32
37
|
.catch(() => {
|
33
|
-
//
|
34
|
-
button.innerHTML =
|
35
|
-
button.
|
38
|
+
// Fail :(
|
39
|
+
button.innerHTML = dataGlobalI18n.snippetcut.messages.something_went_wrong[lang];
|
40
|
+
button.classList.add('button__danger');
|
36
41
|
|
37
42
|
setTimeout(()=> {
|
38
43
|
button.innerHTML = oldText;
|
39
|
-
button.
|
44
|
+
button.classList.remove('button__danger');
|
40
45
|
}, 2000);
|
41
46
|
});
|
42
47
|
});
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-flant-theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Artem Kladov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -38,9 +38,9 @@ files:
|
|
38
38
|
- _layouts/page.html
|
39
39
|
- _layouts/sidebar.html
|
40
40
|
- assets/css/core/main.scss
|
41
|
+
- assets/css/core/mixins.scss
|
41
42
|
- assets/css/core/snippetcut/highlight-code.scss
|
42
43
|
- assets/css/core/snippetcut/snippetcut-style.scss
|
43
|
-
- assets/css/demo/demo.scss
|
44
44
|
- assets/js/core/snippetcut/snippetcut.js
|
45
45
|
- assets/js/core/vars-i18n.js.liquid
|
46
46
|
homepage: https://github.com/flant/website-core
|
@@ -57,7 +57,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
57
57
|
requirements:
|
58
58
|
- - ">="
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version:
|
60
|
+
version: 2.7.0
|
61
61
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
62
62
|
requirements:
|
63
63
|
- - ">="
|