jekyll-flant-theme 0.1.3 → 1.0.3

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: 56fc4ab4c530b921fd3f55722a94d5605bf8d73f9c785a4696c1dcacfe706b26
4
- data.tar.gz: 0ab3e532aca816c8b531c3767ef525968a2db8ddcbedc697781f897ccf3f86f8
3
+ metadata.gz: 3a0672b77288e53d6c3bc46a802acd8c861ab64c14a9a4a09b41a837d327ef23
4
+ data.tar.gz: 79b26befa111365846f760c42c55665df6a7147fbb9e5c22ba1b5a5c0e326102
5
5
  SHA512:
6
- metadata.gz: 24a4f05c6e7d99b59057c7fb2efce9e8039f2b79f256b8d57ea19aed2ac081bd275634cbcf0522e0a2519cd3e9a47375695fa01e808823c24d6447f4f70fc19f
7
- data.tar.gz: 9893b016fa30dee72851d073b010ac593863f992273ce1ba41b641017d21d6b9152ec4fdcce94db011197dd912deaa89e8f7416be5426945883821bd1b991166
6
+ metadata.gz: 1fb0c5eebef244356dea5796dea58809d4dab6cc994a4c0c1e8511a3ff51b570e776743ca7c5acbd16754b630ae07eba92e061c937b35513de3b2185a42a4917
7
+ data.tar.gz: 6de364782ec5370601b45122c29d01a7ed519da820cb211e0b88addc2107db787ccd20111589fb73ca5c0994211e320ae2b93bae60cc6596f303979a974393c6
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2022 Artem Kladov
3
+ Copyright (c) 2022 Flant JSC
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/_includes/head.html CHANGED
@@ -52,7 +52,6 @@
52
52
 
53
53
  <!-- Custom CSS -->
54
54
  {% asset core/main.css %}
55
- {% asset demo/demo.css %}
56
55
 
56
+ {% asset core/vars-i18n.js %}
57
57
  {% asset core/snippetcut/snippetcut.js %}
58
-
@@ -1,5 +1,5 @@
1
1
  <!DOCTYPE html>
2
- <html lang="{% if site.site_lang == "ru" %}ru{% else %}en{% endif %}">
2
+ <html lang="{% if page.lang == 'ru' %}ru{% else %}en{% endif %}">
3
3
  <head>
4
4
 
5
5
  {%- include head.html %}
@@ -1,2 +1,4 @@
1
+ @import "mixins.scss";
2
+
1
3
  @import "snippetcut/highlight-code.scss";
2
4
  @import "snippetcut/snippetcut-style.scss";
@@ -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
- .docs pre {
2
- padding: 10px;
3
- overflow-x: auto;
4
- margin: 5px 0 25px 0px;
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: 0px;
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
- .docs .snippetcut__raw {
22
- display: none;
23
- }
24
-
25
- .docs .snippetcut {
21
+ .snippetcut {
26
22
  margin-top: 10px;
27
- }
28
23
 
29
- .docs .snippetcut .snippetcut__title {
30
- margin-bottom: 5px;
31
- display: flex;
32
- flex-direction: row;
33
- align-items: center;
34
- max-width: 860px;
35
- }
24
+ &__raw {
25
+ display: none;
26
+ }
36
27
 
37
- .docs .snippetcut .snippetcut__title .snippetcut__title-name {
38
- font-size: 75%;
39
- font-family: monospace, monospace;
40
- color: #0066FF;
41
- white-space: nowrap;
42
- margin-right: auto;
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
- .docs .snippetcut .snippetcut__title .snippetcut__title-name-text {
46
- font-size: 75%;
47
- font-family: monospace, monospace;
48
- color: #000000;
49
- white-space: nowrap;
50
- margin-right: auto;
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
- .docs .snippetcut .snippetcut__title .snippetcut__title-btn {
54
- display: inline-block;
55
- padding: 2px 5px;
56
- margin-left: 5px;
57
- border-radius: 5px;
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
- -webkit-touch-callout: none;
69
- -webkit-user-select: none;
70
- -khtml-user-select: none;
71
- -moz-user-select: none;
72
- -ms-user-select: none;
73
- user-select: none;
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
- .docs .snippetcut .snippetcut__title .snippetcut__title-btn:hover {
77
- border: 2px solid #939fb1;
78
- background-color: #939fb1;
79
- color: white;
95
+ pre code {
96
+ @include code;
97
+ }
80
98
  }
81
99
 
82
- .docs .snippetcut_limited pre.highlight {
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
- button.innerHTML = selector === '[data-snippetcut-text]' ? 'Text copied' : 'Filename copied';
25
- button.style.cssText = 'border-color: #28a745; color: #28a745';
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.removeAttribute('style');
34
+ button.classList.remove('button__success');
30
35
  }, 2000);
31
36
  })
32
37
  .catch(() => {
33
- // Неудача :(
34
- button.innerHTML = 'Something went wrong';
35
- button.style.cssText = 'border-color: #dc3545; color: #dc3545';
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.removeAttribute('style');
44
+ button.classList.remove('button__danger');
40
45
  }, 2000);
41
46
  });
42
47
  });
@@ -3,4 +3,4 @@ layout: none
3
3
  permalink: /assets/js/global/i18n.js
4
4
  ---
5
5
 
6
- var dataGlobalI18n = [{{ site.data.global.i18n | jsonify }}]
6
+ var dataGlobalI18n = {{ site.data.global.i18n | jsonify }}
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.1.3
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-04 00:00:00.000000000 Z
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: '0'
60
+ version: 2.7.0
61
61
  required_rubygems_version: !ruby/object:Gem::Requirement
62
62
  requirements:
63
63
  - - ">="
@@ -1,13 +0,0 @@
1
- @import url(https://fonts.bunny.net/css?family=montserrat:400,500,700);
2
-
3
- html,
4
- body {
5
- font-family: Montserrat;
6
- margin: 0;
7
- padding: 0;
8
- }
9
-
10
- .container {
11
- padding: 0 50px;
12
- }
13
-