j1-template 2021.0.15 → 2021.0.16

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: 69a105626faac6f4104455dd13ed5ebc494b1b3b26488e7f96a964dc7062f8fe
4
- data.tar.gz: f12c4f08f016ed4d7b163b4777692aff74263fc14d328de72ac1aa0758edff4e
3
+ metadata.gz: 4659d3d3e7e2ac9d5d2cec9f6a3fcfc1506f4c352353a11e46c64d782122ba3c
4
+ data.tar.gz: ba613e2cf7c07e5e21647630858ea418c476f4e08f9bb4d1d86713ab5a2b38a1
5
5
  SHA512:
6
- metadata.gz: 9805b0d9400996e4157a1c40bbad47a363e6cc08c06d4afb1406056610de6486b0d4e21812974d4e97b8c03cec2a44504555dc4547adb20ce468e2c6e7a0b792
7
- data.tar.gz: ec7da44135b8a8f59acda7326444e12030c73bafdfa8c159adf65651370458284c105bc7bc5b9f514606042e786e41d9be2095ead1662a70f4e9170d5f35adfd
6
+ metadata.gz: 8c6766374c1cbb1e73ebecdc2fe62df4837009cc001a475aefd1936af2f86739ef36916a6454155cdc0b8ab15810be5ead5e92c8eda8e6d2f7c9e73fb3f4a1b0
7
+ data.tar.gz: 0fe00a99304f4b51827568a00a57f6c58495ba57588a412587a846437db7c42056644591c70e0d84e519c9b95204dcce36e2d433331bd8294746d857e37f14c4
data/assets/data/fam.html CHANGED
@@ -100,10 +100,10 @@ regenerate: true
100
100
  <div id="{{menu.id}}">
101
101
  <div class="fam-btn" style="display: none">
102
102
  <!-- [DEBUG ] [j1.modules.fam.html ] [jadams, 2020-11-15: set href|link text (Google optimisation)] -->
103
- <a id="{{menu.id}}_button" href="#" class="btn-fab-floating btn-large btn-{{menu.color}} raised-z{{fam_options.raised_level}}"><i id="fam-icon" class="mdi mdi-{{menu.icon}}"></i>FAM button</a>
103
+ <a href="#void" id="{{menu.id}}_button" class="btn-fab-floating btn-large btn-{{menu.color}} raised-z{{fam_options.raised_level}}"><i id="fam-icon" class="mdi mdi-{{menu.icon}}"></i>FAM button</a>
104
104
  <ul id="{{menu.id}}_items">
105
105
  {% for item in menu.items %} {% if item.enabled %}
106
- <li><a id="{{item.id}}" href="#" class="btn-fab-floating btn-{{item.color}} raised-z{{fam_options.raised_level}}" style="display: none"><i id="fam-icon" class="mdi mdi-{{item.icon}} mdi-{{item.icon_properties}}"></i>{{item.id}}</a></li>
106
+ <li><a href="#void" id="{{item.id}}" class="btn-fab-floating btn-{{item.color}} raised-z{{fam_options.raised_level}}" style="display: none"><i id="fam-icon" class="mdi mdi-{{item.icon}} mdi-{{item.icon_properties}}"></i>{{item.id}}</a></li>
107
107
  {% endif %} {% endfor %}
108
108
  </ul>
109
109
  </div>
@@ -226,6 +226,14 @@ j1.adapter['fam'] = (function (j1, window) {
226
226
  var floatingActionOptions = famOptions.menu_options;
227
227
  var famButtons = document.querySelectorAll('.fam-btn');
228
228
 
229
+ // bind click event to all links with "#void" to suppress default action
230
+ // See: https://stackoverflow.com/questions/134845/which-href-value-should-i-use-for-javascript-links-or-javascriptvoid0
231
+ //
232
+ $('a[href="#void"]').click(function(e) {
233
+ e.preventDefault ? e.preventDefault() : e.returnValue = false;
234
+ logger.info('bound click event to "#void", suppress default action');
235
+ });
236
+
229
237
  // check if multiple buttons detected
230
238
  if ( famButtons.length == 1 ) {
231
239
  _this.setState('processing');
@@ -1022,13 +1022,40 @@ var j1 = (function () {
1022
1022
  var anchor_id = '#' + anchor;
1023
1023
  var selector;
1024
1024
 
1025
- if (anchor && anchor_id) {
1025
+ var logger = log4javascript.getLogger('j1.scrollTo');
1026
+
1027
+ var toccerScrollDuration = {{toccer_options.scrollSmoothDuration}};
1028
+ var toccerScrollOffset = {{toccer_options.scrollSmoothOffset}};
1029
+
1030
+ // calculate offset for correct (smooth) scroll position
1031
+ //
1032
+ var $pagehead = $('.attic');
1033
+ var $navbar = $('nav.navbar');
1034
+ var $adblock = $('#adblock');
1035
+
1036
+ var navbarType = $navbar.hasClass('navbar-fixed') ? 'fixed' : 'scrolled';
1037
+ var fontSize = $('body').css('font-size').replace('px','');
1038
+ var start = window.pageYOffset;
1039
+
1040
+ var l = parseInt(fontSize);
1041
+
1042
+ var h = $pagehead.length ? $pagehead.height() : 0;
1043
+ var n = $navbar.length ? $navbar.height() : 0;
1044
+ var a = $adblock.length ? $adblock.height() : 0;
1045
+
1046
+ var scrollOffset = navbarType == 'fixed' ? -1*(n + a + l) : -1*(h + n + a + l);
1047
+
1048
+ // static offset, to be checked why this is needed
1049
+ //
1050
+ scrollOffset = scrollOffset + toccerScrollOffset;
1051
+
1052
+ if (anchor_id && anchor_id !== '#') {
1026
1053
  // scroll only, if an anchor is given with URL
1027
1054
  selector = $(anchor_id);
1028
1055
  if (selector.length) {
1029
1056
  j1.core.scrollSmooth.scroll( anchor_id, {
1030
- duration: {{toccer_options.scrollSmoothDuration}},
1031
- offset: {{toccer_options.scrollSmoothOffset}},
1057
+ duration: toccerScrollDuration,
1058
+ offset: scrollOffset,
1032
1059
  callback: null
1033
1060
  });
1034
1061
  } else {
@@ -1039,6 +1066,11 @@ var j1 = (function () {
1039
1066
  $(window).scrollTop($(window).scrollTop()+1);
1040
1067
  $(window).scrollTop($(window).scrollTop()-1);
1041
1068
  } // END if anchor_id
1069
+ } else if (anchor_id === '#') {
1070
+ logger.info('bound click event to "#", suppress default action');
1071
+ $(window).scrollTop($(window).scrollTop()+1);
1072
+ $(window).scrollTop($(window).scrollTop()-1);
1073
+ return false;
1042
1074
  }
1043
1075
  }, // END scrollTo
1044
1076
 
@@ -207,6 +207,7 @@ j1.adapter['themer'] = (function (j1, window) {
207
207
  // load list of remote themes
208
208
  //
209
209
  if ( $('#remote_themes').length ) {
210
+ var themes_count;
210
211
  var interval_count = 0;
211
212
  var max_count = themerOptions.retries;
212
213
 
@@ -233,52 +234,30 @@ j1.adapter['themer'] = (function (j1, window) {
233
234
  }
234
235
  /* eslint-enable */
235
236
 
236
- // jadams, 2021-02-16: load checking disabled. Seem does NOT
237
- // solve the problem
238
-
239
- // var dependencies_met_remote_themes_loaded = setInterval(function() {
240
- // interval_count += 1;
241
- // if ( document.getElementById("remote_themes").getElementsByTagName("li").length == 0 ) {
242
- // /* eslint-disable */
243
- // // initialize Bootswatch Theme Switcher
244
- // $('#remote_themes').bootstrapThemeSwitcher.defaults = {
245
- // debug: themerOptions.debug,
246
- // saveToCookie: themerOptions.saveToCookie,
247
- // cssThemeLink: themerOptions.cssThemeLink,
248
- // cookieThemeName: themerOptions.cookieThemeName,
249
- // cookieDefaultThemeName: themerOptions.cookieDefaultThemeName,
250
- // cookieThemeCss: themerOptions.cookieThemeCss,
251
- // cookieThemeExtensionCss: themerOptions.cookieThemeExtensionCss,
252
- // cookieExpiration: themerOptions.cookieExpiration,
253
- // cookiePath: themerOptions.cookiePath,
254
- // defaultCssFile: themerOptions.defaultCssFile,
255
- // bootswatchApiUrl: themerOptions.bootswatchApiUrl,
256
- // bootswatchApiVersion: themerOptions.bootswatchApiVersion,
257
- // loadFromBootswatch: themerOptions.loadFromBootswatch,
258
- // localFeed: themerOptions.localThemes,
259
- // excludeBootswatch: themerOptions.excludeBootswatch,
260
- // includeBootswatch: themerOptions.includeBootswatch,
261
- // skipIncludeBootswatch: themerOptions.skipIncludeBootswatch
262
- // }
263
- // /* eslint-enable */
264
- // } else {
265
- // logger.info('remote themes loaded: successfully');
266
- // logger.debug('remote themes loaded: successfully after: ' + interval_count * 25 + ' ms');
267
- // clearInterval(dependencies_met_remote_themes_loaded);
268
- // }
269
- // if (interval_count > max_count) {
270
- // logger.warn('remote themes loading: failed');
271
- // logger.warn('continue processing');
272
- // clearInterval(dependencies_met_remote_themes_loaded);
273
- // }
274
- // }, 25);
237
+ var dependencies_met_remote_themes_loaded = setInterval(function() {
238
+ interval_count += 1;
239
+ themes_count = document.getElementById("remote_themes").getElementsByTagName("li").length;
240
+ if ( themes_count > 0 ) {
241
+ logger.info('remote themes loaded: successfully');
242
+ logger.info('remote themes loaded: successfully after: ' + interval_count * 25 + ' ms');
243
+
244
+ clearInterval(dependencies_met_remote_themes_loaded);
245
+ } else {
246
+ logger.debug('wait for theme to be loaded: ' + user_state.theme_name);
247
+ }
248
+ if (interval_count > max_count) {
249
+ logger.warn('remote themes loading: failed');
250
+ logger.warn('continue processing');
251
+ clearInterval(dependencies_met_remote_themes_loaded);
252
+ }
253
+ }, 25);
275
254
 
276
255
  logger.info('theme loaded: ' + user_state.theme_name);
277
256
  logger.info('theme css file: ' + user_state.theme_css);
278
257
  _this.setState('finished');
279
258
  logger.info('state: ' + _this.getState());
280
259
  logger.info('module initialized successfully');
281
- logger.info('met dependencies for: navigator');
260
+ logger.info('met dependencies for: j1.adapter');
282
261
  }
283
262
  } else {
284
263
  _this.setState('finished');
data/lib/j1/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module J1
2
- VERSION = '2021.0.15'
2
+ VERSION = '2021.0.16'
3
3
  end
@@ -54,7 +54,7 @@ gem 'jekyll', '~> 4.2'
54
54
 
55
55
  # Theme Rubies, default: J1 Template
56
56
  #
57
- gem 'j1-template', '~> 2021.0.15'
57
+ gem 'j1-template', '~> 2021.0.16'
58
58
 
59
59
  # ------------------------------------------------------------------------------
60
60
  # PRODUCTION: Gem needed for the Jekyll and J1 prod environment
@@ -53,7 +53,7 @@ environment: production
53
53
  # ------------------------------------------------------------------------------
54
54
  # Sets the build version of J1 Template Gem
55
55
  #
56
- version: 2021.0.15
56
+ version: 2021.0.16
57
57
 
58
58
  # version
59
59
  # ------------------------------------------------------------------------------
@@ -187,7 +187,7 @@ settings:
187
187
  icon: download
188
188
  icon_color: md_white
189
189
  icon_size: 24px
190
- href: "https://rubygems.org/gems/j1-template/versions/2021.0.15"
190
+ href: "https://rubygems.org/gems/j1-template/versions/2021.0.16"
191
191
  target: _blank
192
192
 
193
193
  # - name: Patreon button
@@ -148,10 +148,11 @@ tag::urls[]
148
148
  :url-iframe-resizer--gh-repo: https://github.com/davidjbradshaw/iframe-resizer
149
149
 
150
150
  :url-j1--home: https://jekyll.one/
151
- :url-j1--download: https://rubygems.org/gems/j1-template/versions/2021.0.15
152
- :url-j1-rubydoc--home: https://www.rubydoc.info/gems/j1-template/2021.0.15
151
+ :url-j1--download: https://rubygems.org/gems/j1-template/versions/2021.0.16
152
+ :url-j1-rubydoc--home: https://www.rubydoc.info/gems/j1-template/2021.0.16
153
153
  :url-j1--preview: https://preview.jekyll.one/
154
154
 
155
+ :url-j1-kickstarter--web-in-a-day: https://jekyll.one/pages/public/learn/kickstarter/web_in_a_day/meet_and_greet/
155
156
  :url-j1-web-in-a-day--meet-and-greet: https://jekyll.one/pages/public/learn/kickstarter/web_in_a_day/meet_and_greet/
156
157
 
157
158
  :url-j1-quick-references--jekyll: /pages/protected/manuals/quick_references/jekyll/
@@ -400,7 +401,7 @@ end::tables[]
400
401
  // -----------------------------------------------------------------------------
401
402
  tag::products[]
402
403
  :j1-license: MIT License
403
- :j1-version: 2021.0.15
404
+ :j1-version: 2021.0.16
404
405
  end::products[]
405
406
 
406
407
 
@@ -345,6 +345,6 @@ end
345
345
 
346
346
  module Jekyll
347
347
  module J1LunrSearch
348
- VERSION = '2021.0.15'
348
+ VERSION = '2021.0.16'
349
349
  end
350
350
  end
@@ -14,7 +14,7 @@
14
14
  version="1.1"
15
15
  inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
16
16
  sodipodi:docname="d1.svg"
17
- inkscape:export-filename="C:\Temp\d10n-2021.0.15\assets\images\modules\icons\d1\d1-256x256.png"
17
+ inkscape:export-filename="C:\Temp\d10n-2021.0.16\assets\images\modules\icons\d1\d1-256x256.png"
18
18
  inkscape:export-xdpi="49.152"
19
19
  inkscape:export-ydpi="49.152">
20
20
  <title
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": true,
3
3
  "name": "j1_starter",
4
- "version": "2021.0.15",
4
+ "version": "2021.0.16",
5
5
  "description": "J1 Template Starter Web",
6
6
  "homepage": "https://your.site",
7
7
  "author": {
@@ -10,7 +10,7 @@ description: >
10
10
  tags: [ Overview ]
11
11
  categories: [ Software, Platforms, Contributers ]
12
12
 
13
- scrollbar: true
13
+ scrollbar: false
14
14
 
15
15
  permalink: /pages/public/about/site/
16
16
  regenerate: false
@@ -430,4 +430,4 @@ guides you through all the steps on how to build a website. Your site using
430
430
  Jekyll and the template system J1. It's really a pleasant journey to learn what
431
431
  modern static webs can offer today.
432
432
 
433
- // Start your journey from here: link:{kickstarter-web-in-a-day}[Web in a day].
433
+ Start your journey from here: link:{url-j1-kickstarter--web-in-a-day}[Web in a day, {browser-window--new}].
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": true,
3
3
  "name": "utls",
4
- "version": "2021.0.15",
4
+ "version": "2021.0.16",
5
5
  "description": "J1 Template Utility Server",
6
6
  "homepage": "https://jekyll.one",
7
7
  "author": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": true,
3
3
  "name": "utls",
4
- "version": "2021.0.15",
4
+ "version": "2021.0.16",
5
5
  "description": "J1 Template Utility Server",
6
6
  "homepage": "https://jekyll.one",
7
7
  "author": {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: j1-template
3
3
  version: !ruby/object:Gem::Version
4
- version: 2021.0.15
4
+ version: 2021.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - juergen_jekyll_one
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-06 00:00:00.000000000 Z
11
+ date: 2021-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll