jekyll-theme-lcsb-default 0.4.9 → 0.4.10

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: 94b136322892156b54a1d7b66ebc7175c17277d42349cff976a518df1e611035
4
- data.tar.gz: 20bf5cb92ace75f44207a5dabdff0fa1a2a165a8dc41c9f08e6b3b6a020161eb
3
+ metadata.gz: c5e452027052492e1a67b16b62f3abae24b164806df720b1e39cfb1fd4c3171d
4
+ data.tar.gz: afc8935fc44274c8dc43356d5a479c43d518b01a59e52a4f807f4aee9490e492
5
5
  SHA512:
6
- metadata.gz: 73f2b698efb04bd0c38a5690a5ca370439ec53745b3953549b086f6ee1e7472c42e351a93a2e417c2e602eca5409e11394928f572e2e9a59569f689cdcfc7401
7
- data.tar.gz: a6a4fcab8bbdb629fc57a219270d1321e01870688045d4c3f1219f49fc1ea95d404ba7b1855160a8c442d37ddfc7cffad55dd303596e15a0fc898f6d9988c17b
6
+ metadata.gz: 2190622f449dfd11effd55ba357f1c0b7ccd5888ead6e7983ec4f7adfb7db64736b17e5c8ac39549b25dc0daca3785c0ae1c21d3117bea082af0e517b379c1e8
7
+ data.tar.gz: 1d248fbe170117b8ebc25fe9e45f139d2634514eddb29db9b5f948702882c32721bf03e45e12c213edd3a438e3b9a135aef4b292d8df289fdbfe0f341450f8a4
@@ -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>
@@ -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
  }
@@ -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.9"
6
+ VERSION = "0.4.10"
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.9
4
+ version: 0.4.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trefex
@@ -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