jekyll-flant-theme 0.1.0 → 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: 2b07c35de2484b7e388976b9e7c08886dfec4ffcc111c15c5ce9930c8c0290c7
4
- data.tar.gz: f68fff7d07af26d442951bea23289ce1aed2c22b616f2a5edd4d4f0a990019a7
3
+ metadata.gz: 3a0672b77288e53d6c3bc46a802acd8c861ab64c14a9a4a09b41a837d327ef23
4
+ data.tar.gz: 79b26befa111365846f760c42c55665df6a7147fbb9e5c22ba1b5a5c0e326102
5
5
  SHA512:
6
- metadata.gz: d8833292fe39cd3d29b3926d8a4d2f8c787c3be5a9939fc798d1106cec38717ad5b48ad9b50debb1738cf188102e9e2083c9d524daa068e8d7726a5ed553c6f1
7
- data.tar.gz: fef1f75e9289a5c14e83cec42a00c26ace636f3b203f90c06ff068dffc5ce070a240b49774b9e8b15f981b45a270f109a66152bf7f5c9fc6231eeeebbb482b6c
6
+ metadata.gz: 1fb0c5eebef244356dea5796dea58809d4dab6cc994a4c0c1e8511a3ff51b570e776743ca7c5acbd16754b630ae07eba92e061c937b35513de3b2185a42a4917
7
+ data.tar.gz: 6de364782ec5370601b45122c29d01a7ed519da820cb211e0b88addc2107db787ccd20111589fb73ca5c0994211e320ae2b93bae60cc6596f303979a974393c6
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 Flant JSC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # jekyll-flant-theme
2
+
3
+ This theme uses on the Flant Europe web sites.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your Jekyll site's `Gemfile`:
8
+
9
+ ```ruby
10
+ gem "jekyll-flant-theme"
11
+ ```
12
+
13
+ And add this line to your Jekyll site's `_config.yml`:
14
+
15
+ ```yaml
16
+ theme: jekyll-flant-theme
17
+ ```
18
+
19
+ And then execute:
20
+
21
+ $ bundle
22
+
23
+ Or install it yourself as:
24
+
25
+ $ gem install jekyll-flant-theme
26
+
27
+ ## Contributing
28
+
29
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/hello. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
30
+
31
+ ## Development
32
+
33
+ To set up your environment to develop this theme, run `bundle install`.
34
+
35
+ Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
36
+
37
+ When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
38
+ To add a custom directory to your theme-gem, please edit the regexp in `jekyll-flant-theme.gemspec` accordingly.
39
+
40
+ ## License
41
+
42
+ The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
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.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-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
@@ -31,14 +31,16 @@ executables: []
31
31
  extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
+ - LICENSE.txt
35
+ - README.md
34
36
  - _includes/head.html
35
37
  - _layouts/default.html
36
38
  - _layouts/page.html
37
39
  - _layouts/sidebar.html
38
40
  - assets/css/core/main.scss
41
+ - assets/css/core/mixins.scss
39
42
  - assets/css/core/snippetcut/highlight-code.scss
40
43
  - assets/css/core/snippetcut/snippetcut-style.scss
41
- - assets/css/demo/demo.scss
42
44
  - assets/js/core/snippetcut/snippetcut.js
43
45
  - assets/js/core/vars-i18n.js.liquid
44
46
  homepage: https://github.com/flant/website-core
@@ -55,14 +57,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
55
57
  requirements:
56
58
  - - ">="
57
59
  - !ruby/object:Gem::Version
58
- version: '0'
60
+ version: 2.7.0
59
61
  required_rubygems_version: !ruby/object:Gem::Requirement
60
62
  requirements:
61
63
  - - ">="
62
64
  - !ruby/object:Gem::Version
63
65
  version: '0'
64
66
  requirements: []
65
- rubygems_version: 3.1.4
67
+ rubygems_version: 3.1.6
66
68
  signing_key:
67
69
  specification_version: 4
68
70
  summary: The Jekyll Theme for using on the Flant Europe (flant.com) sites.
@@ -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
-