jekyll-theme-lcsb-default 0.4.8 → 0.4.12

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: 0a3128af0e78170d70b922444d398857d3a8aa10d449eb266c740455f5dddde9
4
- data.tar.gz: a5116540379a7f20a84b9fdd188c6599dd3c46730c7dba75f9d347a8d5450c6f
3
+ metadata.gz: 4704be501eb9b662f9ea6e937886126c5bfbd928a4c54acac2d1a759adfb589c
4
+ data.tar.gz: b76c14876bc498415bba918c69c57f6a7ac46d8b254a0c6c7ea9ad62ea0de123
5
5
  SHA512:
6
- metadata.gz: bc4078b83bb77b2a896f4babdd48082890bdcf7ee8d7a13bfbc6a2d3f9ad2193ce782c4721c56a09413d977b16e4af2c94df25c302ed715648fca1dcc06f3d12
7
- data.tar.gz: 067fcd78d31c9449aa7f4ef56f688212ad6b7ee4fb398e585ac8105b5da2da3f8a481bb0ce4d458d8264f33c0522ab59084cb707aabcde605e7c524bfef0d831
6
+ metadata.gz: 293c90ab8a8d51bb600cbd1bf15ff6577019fdb817bb0a84bfb9b67831402e97e99d525c4ef7c332e0c65729fed133f07a916c5ca4f22d9534eccee3d9287414
7
+ data.tar.gz: 7f49afc582ef60ac187f72e136289924daebb42a1a65463dec6495797633a2f6b2ba8928847aa55180e95767e86887416b58e59e6307491e85ceca58a7047606
@@ -0,0 +1,52 @@
1
+ <script>
2
+ window.show_bookmark = function(el) {
3
+ var browser = detect_browser();
4
+ var os = detect_os();
5
+ var message = 'Please click "Add Bookmark" in the bookmarks bar to add the bookmark'
6
+
7
+ if (os == 'Mac OS' || os == 'undefined') {
8
+ message = 'In order to add the bookmark, please tap COMMAND + D on your keyboard, and click "Done!"';
9
+ } else if (os == 'Windows' || os == 'Linux') {
10
+ message = 'In order to add the bookmark, please tap Windows + D on your keyboard, and click "Done!"';
11
+ } else if (os == 'Android') {
12
+ message = 'Please tap the "Menu" icon (top right), then "Add bookmark" icon (at the top)'
13
+ }
14
+
15
+ alert(message);
16
+ }
17
+
18
+ function detect_browser() {
19
+ var isIE = /*@cc_on!@*/false || !!document.documentMode;
20
+
21
+ if (!!window.chrome) return 'chrome'
22
+ if (typeof InstallTrigger !== 'undefined') return 'firefox';
23
+ if (!!window.safari) return 'safari';
24
+ if (!!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0) return 'opera';
25
+ if (!isIE && !!window.StyleMedia) return 'edge';
26
+ if (isIE) return 'ie';
27
+
28
+ return 'undefined';
29
+ }
30
+
31
+ function detect_os() {
32
+ var userAgent = window.navigator.userAgent;
33
+ var platform = window.navigator.platform;
34
+ var macs = ['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'];
35
+ var windowses = ['Win32', 'Win64', 'Windows', 'WinCE'];
36
+ var ioses = ['iPhone', 'iPad', 'iPod'];
37
+
38
+ if (macs.indexOf(platform) !== -1) {
39
+ return 'Mac OS';
40
+ } else if (ioses.indexOf(platform) !== -1) {
41
+ return 'iOS';
42
+ } else if (windowses.indexOf(platform) !== -1) {
43
+ return 'Windows';
44
+ } else if (/Android/.test(userAgent)) {
45
+ return 'Android';
46
+ } else if (!os && /Linux/.test(platform)) {
47
+ return 'Linux';
48
+ } else {
49
+ return 'undefined';
50
+ }
51
+ }
52
+ </script>
@@ -9,12 +9,20 @@
9
9
  {%- include header.html -%}
10
10
  <main class="page-content" aria-label="Content">
11
11
  <div class="wrapper">
12
- {%- if page.show_print_button -%}
13
- <div class="print-button">
14
- <img src="{{ "assets/pdf.svg" | relative_url }}">
15
- <a href="javascript:window.print()"><span>Print the page</span></a>
12
+ <div class="wrapper-menu-right">
13
+ {%- if site.bookmarks_enabled and page.show_bookmark_button -%}
14
+ <div>
15
+ <img src="{{ "assets/bookmark.svg" | relative_url }}">
16
+ <a href="#" onclick=show_bookmark()><span>Add to bookmarks</span></a>
17
+ </div>
18
+ {%- endif -%}
19
+ {%- if page.show_print_button -%}
20
+ <div>
21
+ <img src="{{ "assets/pdf.svg" | relative_url }}">
22
+ <a href="javascript:window.print()"><span>Print the page</span></a>
23
+ </div>
24
+ {%- endif -%}
16
25
  </div>
17
- {%- endif -%}
18
26
  {{ content }}
19
27
  </div>
20
28
  </main>
@@ -23,4 +31,7 @@
23
31
  </div>
24
32
  </body>
25
33
  {%- include scripts.html -%}
34
+ {%- if site.bookmarks_enabled -%}
35
+ {%- include script_add_bookmark.html -%}
36
+ {%- endif -%}
26
37
  </html>
@@ -103,6 +103,8 @@ li {
103
103
  > ol {
104
104
  margin-bottom: 0;
105
105
  }
106
+
107
+ padding-bottom: 10px;
106
108
  }
107
109
 
108
110
 
@@ -110,15 +112,37 @@ li {
110
112
  /**
111
113
  * Headings
112
114
  */
113
- h1, h2 {
115
+ h1, h2, h3 {
114
116
  font-weight: $base-font-weight;
115
117
  }
116
118
 
117
- h3, h4, h5, h6 {
119
+ h4, h5, h6 {
118
120
  font-weight: $base-font-weight + 300;
119
121
  }
120
122
 
123
+ h1 {
124
+ font-size: 2.35em;
125
+ }
126
+
127
+ h2 {
128
+ font-size: 2em;
129
+ }
130
+
131
+ h3 {
132
+ font-size: 1.8em;
133
+ }
121
134
 
135
+ h4 {
136
+ font-size: 1.6em;
137
+ }
138
+
139
+ h5 {
140
+ font-size: 1.5em;
141
+ }
142
+
143
+ h6 {
144
+ font-size: 1.3em;
145
+ }
122
146
 
123
147
  /**
124
148
  * Links
@@ -416,21 +416,27 @@ html {
416
416
  display: block;
417
417
  }
418
418
 
419
- .print-button {
419
+ .wrapper-menu-right {
420
+ // Print button, add to bookmarks, etc.
421
+ float: right;
422
+ margin: 14px -2.5% 25px 10%;
423
+ padding-bottom: 5px;
424
+ color: #252525;
425
+
420
426
  @media print {
421
427
  display: none;
422
428
  }
423
429
 
424
- float: right;
425
- color: #252525;
426
- margin-right: -2.5%;
427
- margin-top: 14px;
428
-
429
430
  @include media-query($on-palm) {
430
431
  display: none;
431
432
  }
432
433
 
433
- span {
434
- padding-left: 5px;
434
+ div {
435
+ display: inline;
436
+ margin-right: 20px;
437
+
438
+ span {
439
+ padding-left: 2px;
440
+ }
435
441
  }
436
442
  }
@@ -117,6 +117,8 @@ div.alert.primary {
117
117
  float: right;
118
118
  padding-right: 7%;
119
119
  padding-top: 0.5em;
120
+ position: sticky;
121
+ z-index: 100;
120
122
  }
121
123
 
122
124
  .svg-icon {
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><rect fill="none" height="24" width="24"/><path d="M17,11v6.97l-5-2.14l-5,2.14V5h6V3H7C5.9,3,5,3.9,5,5v16l7-3l7,3V11H17z M21,7h-2v2h-2V7h-2V5h2V3h2v2h2V7z"/></svg>
@@ -3,5 +3,5 @@
3
3
  # Note: keep the format of NUMBER.NUMBER.NUMBER (where NUMBER is [0-9]+);
4
4
  # Otherwise Gitlab-CI could fail to detect the version (see .gitlab-ci.yml) and auto-tag the job
5
5
  module Theme
6
- VERSION = "0.4.8"
6
+ VERSION = "0.4.12"
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-lcsb-default
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
4
+ version: 0.4.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trefex
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-07-19 00:00:00.000000000 Z
12
+ date: 2021-07-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jekyll
@@ -81,6 +81,7 @@ files:
81
81
  - _includes/head.html
82
82
  - _includes/header.html
83
83
  - _includes/policy.html
84
+ - _includes/script_add_bookmark.html
84
85
  - _includes/scripts.html
85
86
  - _includes/social.html
86
87
  - _layouts/default.html
@@ -108,6 +109,7 @@ files:
108
109
  - assets/banners/r3-logo.svg
109
110
  - assets/banners/uni-logo.svg
110
111
  - assets/bg-overlay.svg
112
+ - assets/bookmark.svg
111
113
  - assets/favicon/android-chrome-192x192.png
112
114
  - assets/favicon/android-chrome-512x512.png
113
115
  - assets/favicon/apple-touch-icon.png