j1-template 2020.0.1 → 2020.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/themes/j1/layouts/content_generator_blog_archive.html +22 -18
- data/_includes/themes/j1/layouts/content_generator_collection.html +15 -12
- data/_includes/themes/j1/layouts/content_generator_page.html +16 -17
- data/_includes/themes/j1/layouts/content_generator_post.html +19 -24
- data/_includes/themes/j1/modules/navigator/generator.html +62 -40
- data/assets/data/menu.html +6 -5
- data/assets/data/mmenu.html +455 -0
- data/assets/data/{sidebar.html → mmenu_sidebar.html} +24 -18
- data/assets/data/mmenu_toc.html +45 -0
- data/assets/data/quicklinks.html +9 -4
- data/assets/data/ssm.html +227 -0
- data/assets/error_pages/HTTP204.html +3 -3
- data/assets/themes/j1/core/css/bootstrap.css +116 -93
- data/assets/themes/j1/core/css/bootstrap.min.css +4 -4
- data/assets/themes/j1/core/css/globals.css +1 -1
- data/assets/themes/j1/core/css/theme_extensions.css +186 -96
- data/assets/themes/j1/core/css/theme_extensions.min.css +1 -1
- data/assets/themes/j1/core/css/uno.css +186 -96
- data/assets/themes/j1/core/css/uno.min.css +1 -1
- data/assets/themes/j1/core/css/vendor.css +130 -104
- data/assets/themes/j1/core/css/vendor.min.css +4 -4
- data/assets/themes/j1/core/js/template.js +296 -24
- data/assets/themes/j1/core/js/template.js.map +1 -1
- data/assets/themes/j1/core/js/template.min.js +1 -1
- data/lib/j1/version.rb +1 -1
- data/lib/j1_app/j1_auth_manager/auth_manager.rb +21 -17
- data/lib/j1_app/j1_auth_manager/config.rb +13 -9
- data/lib/j1_app/j1_site_manager/static_site.rb +1 -1
- data/lib/starter_web/Gemfile +2 -2
- data/lib/starter_web/_config.yml +12 -139
- data/lib/starter_web/_data/modules/authentication.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/navigator.yml +25 -24
- data/lib/starter_web/_data/modules/defaults/ssm.yml +50 -0
- data/lib/starter_web/_data/modules/defaults/toccer.yml +14 -15
- data/lib/starter_web/_data/modules/navigator.yml +164 -97
- data/lib/starter_web/_data/modules/ssm.yml +133 -0
- data/lib/starter_web/_data/modules/toccer.yml +20 -62
- data/lib/starter_web/_data/resources.yml +74 -51
- data/lib/starter_web/_data/template_settings.yml +13 -13
- data/lib/starter_web/_plugins/uglify.rb +41 -0
- data/lib/starter_web/apps/public/{cc → cc/cc.yml} +0 -0
- data/lib/starter_web/apps/public/cc/index.adoc +107 -0
- data/lib/starter_web/assets/images/modules/icons/j1/{j1..ico → j1.ico} +0 -0
- data/lib/starter_web/assets/themes/j1/adapter/js/algolia.js +321 -0
- data/lib/starter_web/assets/themes/j1/adapter/js/attic.js +4 -4
- data/lib/starter_web/assets/themes/j1/adapter/js/carousel.js +3 -3
- data/lib/starter_web/assets/themes/j1/adapter/js/framer.js +3 -3
- data/lib/starter_web/assets/themes/j1/adapter/js/j1.js +19 -60
- data/lib/starter_web/assets/themes/j1/adapter/js/mmenu.js +452 -0
- data/lib/starter_web/assets/themes/j1/adapter/js/navigator.js +50 -50
- data/lib/starter_web/assets/themes/j1/adapter/js/ssm.js +498 -0
- data/lib/starter_web/assets/themes/j1/adapter/js/themer.js +1 -1
- data/lib/starter_web/assets/themes/j1/adapter/js/toccer.js +40 -43
- data/lib/starter_web/assets/themes/j1/extensions/mmenu-light/css/mmenu-light.css +384 -0
- data/lib/starter_web/assets/themes/j1/extensions/mmenu-light/css/mmenu-light.min.css +384 -0
- data/lib/starter_web/assets/themes/j1/extensions/mmenu-light/css/themes/uno.css +153 -0
- data/lib/starter_web/assets/themes/j1/extensions/mmenu-light/css/themes/uno.min.css +153 -0
- data/lib/starter_web/assets/themes/j1/extensions/mmenu-light/js/mmenu-light.js +11 -0
- data/lib/starter_web/assets/themes/j1/extensions/mmenu-light/js/mmenu-light.min.js +11 -0
- data/lib/starter_web/assets/themes/j1/extensions/mmenu-light/js/mmenu-light.polyfills.js +118 -0
- data/lib/starter_web/assets/themes/j1/extensions/mmenu-light/js/mmenu-light.polyfills.min.js +118 -0
- data/lib/starter_web/collections/posts/public/{jekyll → featured}/_posts/2018-05-01-confusion-about-base-url.adoc +0 -0
- data/lib/starter_web/package.json +1 -1
- data/lib/starter_web/pages/public/learn/floating_sidebar.adoc +199 -0
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.adoc +2 -2
- data/lib/starter_web/pages/public/learn/roundtrip/200_typography.adoc +2 -2
- data/lib/starter_web/pages/public/learn/whats_up.adoc +12 -11
- data/lib/starter_web/pages/public/legal/en/500_support.adoc +1 -1
- data/lib/starter_web/pages/public/previewer/000_includes/tables/mdi_icons/200_rotate.asciidoc +1 -1
- data/lib/starter_web/pages/public/previewer/mdi_icons_preview.adoc +2 -3
- data/lib/starter_web/pages/public/previewer/twitter_emoji_preview.adoc +3 -3
- data/lib/starter_web/pages/public/site_search.adoc +196 -0
- data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
- data/lib/starter_web/utilsrv/package.json +1 -1
- metadata +26 -13
- data/assets/themes/j1/core/css/globals.scss +0 -28
- data/lib/starter_web/_data/modules/back2top.yml +0 -40
- data/lib/starter_web/_data/modules/defaults/back2top.yml +0 -147
- data/lib/starter_web/_data/modules/defaults/smooth_scroll.yml +0 -169
- data/lib/starter_web/_data/modules/smooth_scroll.yml +0 -169
- data/lib/starter_web/assets/themes/j1/adapter/js/back2top.js +0 -227
- data/lib/starter_web/assets/themes/j1/adapter/js/scroller.js +0 -177
@@ -0,0 +1,153 @@
|
|
1
|
+
/*
|
2
|
+
# -----------------------------------------------------------------------------
|
3
|
+
# ~/assets/themes/j1/extensions/mmenu-light/css/theme/uno.css
|
4
|
+
# Provides MobileMenu styles for J1 Theme Uno
|
5
|
+
#
|
6
|
+
# Product/Info:
|
7
|
+
# https://jekyll.one
|
8
|
+
#
|
9
|
+
# Copyright (C) 2020 Juergen Adams
|
10
|
+
#
|
11
|
+
# J1 Template is licensed under the MIT License.
|
12
|
+
# See: https://github.com/jekyll-one-org/J1 Template/blob/master/LICENSE
|
13
|
+
#
|
14
|
+
# -----------------------------------------------------------------------------
|
15
|
+
*/
|
16
|
+
|
17
|
+
/*
|
18
|
+
jadams, 2020-06-20: CSS/Offset to the NAV bar should be calculated
|
19
|
+
at runtime as a dyn style
|
20
|
+
*/
|
21
|
+
|
22
|
+
/* CSS overwrites
|
23
|
+
----------------------------------------------------------------------------- */
|
24
|
+
|
25
|
+
/* Drawer */
|
26
|
+
/* .mm-ocd {
|
27
|
+
top: 80px; /* jadams, 2020-06-20: offset to the NAV bar */
|
28
|
+
} */
|
29
|
+
|
30
|
+
.mm-ocd--left .mm-ocd__content {
|
31
|
+
background-color: #212121;
|
32
|
+
}
|
33
|
+
|
34
|
+
.mm-ocd--right .mm-ocd__content {
|
35
|
+
background-color: #212121;
|
36
|
+
}
|
37
|
+
|
38
|
+
/* Responsive */
|
39
|
+
/* jadams, 2020-07-02: media query for MMenu
|
40
|
+
--------------------------------------------------------------------------------
|
41
|
+
NOTE: For unknown reason, style "mm-ocd--left" is NOT applied correctly
|
42
|
+
like "mm-ocd--right" what cause the wrong background-color
|
43
|
+
As a workaround, the background-color is added to the media
|
44
|
+
queries as well (but MUST be removed if fixed!!!)
|
45
|
+
-------------------------------------------------------------------------------- */
|
46
|
+
|
47
|
+
/* Large desktop */
|
48
|
+
@media only screen and (min-width: 1200px) {
|
49
|
+
.mm-ocd {
|
50
|
+
top: 80px; /* drawer top offset to NAV bar */
|
51
|
+
}
|
52
|
+
.mm-ocd__content {
|
53
|
+
background-color: #212121;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
/* Desktop */
|
58
|
+
@media only screen and (min-width: 992px) {
|
59
|
+
.mm-ocd {
|
60
|
+
top: 80px; /* drawer top offset to NAV bar */
|
61
|
+
}
|
62
|
+
.mm-ocd__content {
|
63
|
+
background-color: #212121;
|
64
|
+
}
|
65
|
+
}
|
66
|
+
|
67
|
+
/* Desktop 2 (intermediate|responsive size) */
|
68
|
+
@media only screen and (min-width: 768px) and (max-width: 992px) {
|
69
|
+
.mm-ocd {
|
70
|
+
top: 68px; /* drawer top offset to NAV bar */
|
71
|
+
}
|
72
|
+
.mm-ocd__content {
|
73
|
+
background-color: #212121;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
/* Landscape iPad, 768px */
|
77
|
+
@media only screen and (min-width: 576px) and (max-width: 768px){
|
78
|
+
.mm-ocd {
|
79
|
+
top: 68px; /* drawer top offset to NAV bar */
|
80
|
+
}
|
81
|
+
.mm-ocd__content {
|
82
|
+
background-color: #212121;
|
83
|
+
}
|
84
|
+
}
|
85
|
+
|
86
|
+
/* Small devices (landscape phones, up to 576px) */
|
87
|
+
@media only screen and (max-width: 576px) {
|
88
|
+
.mm-ocd {
|
89
|
+
top: 68px; /* drawer top offset to NAV bar */
|
90
|
+
}
|
91
|
+
.mm-ocd__content {
|
92
|
+
background-color: #212121;
|
93
|
+
}
|
94
|
+
}
|
95
|
+
|
96
|
+
/* Navigator */
|
97
|
+
.mm-spn.mm-spn--navbar:after {
|
98
|
+
text-align: left; /* jadams, 2020-06-20: set menu title to the left */
|
99
|
+
font-size: x-large; /* jadams, 2020-06-20: increase size of the menu title */
|
100
|
+
}
|
101
|
+
|
102
|
+
/* Themes */
|
103
|
+
/* jadams, 2020-06-20: set j1 template colors (dark theme) */
|
104
|
+
.mm-spn.mm-spn--dark {
|
105
|
+
color: #e3e3e3;
|
106
|
+
background: #191919
|
107
|
+
}
|
108
|
+
|
109
|
+
/* Sidebar
|
110
|
+
----------------------------------------------------------------------------- */
|
111
|
+
.mm-side {
|
112
|
+
margin: 1.5rem;
|
113
|
+
}
|
114
|
+
|
115
|
+
.mm-side .widget {
|
116
|
+
position: relative;
|
117
|
+
z-index: 1;
|
118
|
+
margin-bottom: 25px
|
119
|
+
}
|
120
|
+
|
121
|
+
.mm-side .widget .title {
|
122
|
+
color: #fff;
|
123
|
+
margin-bottom: 15px;
|
124
|
+
border-left: 3px solid #204a87;
|
125
|
+
padding-left: 5px
|
126
|
+
}
|
127
|
+
|
128
|
+
.mm-side .widget .heading {
|
129
|
+
text-align: left;
|
130
|
+
color: #eee;
|
131
|
+
font-size: 18px;
|
132
|
+
text-transform: uppercase;
|
133
|
+
position: relative;
|
134
|
+
margin-bottom: 10px;
|
135
|
+
padding-bottom: 10px
|
136
|
+
}
|
137
|
+
|
138
|
+
.mm-side .widget ul.link {
|
139
|
+
font-family: Open Sans,Helvetica Neue,Helvetica,Arial,sans-serif;
|
140
|
+
font-size: 14px;
|
141
|
+
padding: 0;
|
142
|
+
margin: 0;
|
143
|
+
list-style: none
|
144
|
+
}
|
145
|
+
|
146
|
+
.mm-side .widget ul.link li a {
|
147
|
+
color: #aaa
|
148
|
+
}
|
149
|
+
|
150
|
+
.mm-side .widget ul.link li a:focus,.mm-side .widget ul.link li a:hover {
|
151
|
+
color: #fafafa;
|
152
|
+
text-decoration: none
|
153
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/*!
|
2
|
+
* Mmenu Light
|
3
|
+
* mmenujs.com/mmenu-light v3.0.5
|
4
|
+
*
|
5
|
+
* Copyright (c) Fred Heusschen
|
6
|
+
* www.frebsite.nl
|
7
|
+
*
|
8
|
+
* License: CC-BY-4.0
|
9
|
+
* http://creativecommons.org/licenses/by/4.0/
|
10
|
+
*/
|
11
|
+
!function(t){var e={};function n(i){if(e[i])return e[i].exports;var s=e[i]={i:i,l:!1,exports:{}};return t[i].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(i,s,function(e){return t[e]}.bind(null,s));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";n.r(e);var i=function(){function t(t){var e=this;this.listener=function(t){(t.matches?e.matchFns:e.unmatchFns).forEach((function(t){t()}))},this.toggler=window.matchMedia(t),this.toggler.addListener(this.listener),this.matchFns=[],this.unmatchFns=[]}return t.prototype.add=function(t,e){this.matchFns.push(t),this.unmatchFns.push(e),(this.toggler.matches?t:e)()},t}(),s=function(t){return Array.prototype.slice.call(t)},o=function(t,e){return s((e||document).querySelectorAll(t))},r=("ontouchstart"in window||navigator.msMaxTouchPoints,navigator.userAgent.indexOf("MSIE")>-1||navigator.appVersion.indexOf("Trident/")>-1),a="mm-spn",c=function(){function t(t,e,n,i,s){this.node=t,this.title=e,this.slidingSubmenus=i,this.selectedClass=n,this.node.classList.add(a),r&&(this.slidingSubmenus=!1),this.node.classList.add(a+"--"+s),this.node.classList.add(a+"--"+(this.slidingSubmenus?"navbar":"vertical")),this._setSelectedl(),this._initAnchors()}return Object.defineProperty(t.prototype,"prefix",{get:function(){return a},enumerable:!0,configurable:!0}),t.prototype.openPanel=function(t){var e=t.parentElement;if(this.slidingSubmenus){var n=t.dataset.mmSpnTitle;e===this.node?this.node.classList.add(a+"--main"):(this.node.classList.remove(a+"--main"),n||s(e.children).forEach((function(t){t.matches("a, span")&&(n=t.textContent)}))),n||(n=this.title),this.node.dataset.mmSpnTitle=n,o("."+a+"--open",this.node).forEach((function(t){t.classList.remove(a+"--open"),t.classList.remove(a+"--parent")})),t.classList.add(a+"--open"),t.classList.remove(a+"--parent");for(var i=t.parentElement.closest("ul");i;)i.classList.add(a+"--open"),i.classList.add(a+"--parent"),i=i.parentElement.closest("ul")}else{var r=t.matches("."+a+"--open");o("."+a+"--open",this.node).forEach((function(t){t.classList.remove(a+"--open")})),t.classList[r?"remove":"add"](a+"--open");for(var c=t.parentElement.closest("ul");c;)c.classList.add(a+"--open"),c=c.parentElement.closest("ul")}},t.prototype._setSelectedl=function(){var t=o("."+this.selectedClass,this.node),e=t[t.length-1],n=null;e&&(n=e.closest("ul")),n||(n=this.node.querySelector("ul")),this.openPanel(n)},t.prototype._initAnchors=function(){var t=this;this.node.addEventListener("click",(function(e){var n=e.target,i=!1;(i=(i=(i=i||function(t){return!!t.matches("a")}(n))||function(e){var n;return!!(n=e.closest("span")?e.parentElement:!!e.closest("li")&&e)&&(s(n.children).forEach((function(e){e.matches("ul")&&t.openPanel(e)})),!0)}(n))||function(e){var n=o("."+a+"--open",e),i=n[n.length-1];if(i){var s=i.parentElement.closest("ul");if(s)return t.openPanel(s),!0}return!1}(n))&&e.stopImmediatePropagation()}))},t}(),d="mm-ocd",u=function(){function t(t,e){var n=this;void 0===t&&(t=null),this.wrapper=document.createElement("div"),this.wrapper.classList.add(""+d),this.wrapper.classList.add(d+"--"+e),this.content=document.createElement("div"),this.content.classList.add(d+"__content"),this.wrapper.append(this.content),this.backdrop=document.createElement("div"),this.backdrop.classList.add(d+"__backdrop"),this.wrapper.append(this.backdrop),document.body.append(this.wrapper),t&&this.content.append(t);var i=function(t){n.close(),t.stopImmediatePropagation()};this.backdrop.addEventListener("touchstart",i,{passive:!0}),this.backdrop.addEventListener("mousedown",i,{passive:!0})}return Object.defineProperty(t.prototype,"prefix",{get:function(){return d},enumerable:!0,configurable:!0}),t.prototype.open=function(){this.wrapper.classList.add(d+"--open"),document.body.classList.add(d+"-opened")},t.prototype.close=function(){this.wrapper.classList.remove(d+"--open"),document.body.classList.remove(d+"-opened")},t}(),l=function(){function t(t,e){void 0===e&&(e="all"),this.menu=t,this.toggler=new i(e)}return t.prototype.navigation=function(t){var e=this;if(!this.navigator){var n=(t=t||{}).title,i=void 0===n?"Menu":n,s=t.selectedClass,o=void 0===s?"Selected":s,r=t.slidingSubmenus,a=void 0===r||r,d=t.theme,u=void 0===d?"light":d;this.navigator=new c(this.menu,i,o,a,u),this.toggler.add((function(){return e.menu.classList.add(e.navigator.prefix)}),(function(){return e.menu.classList.remove(e.navigator.prefix)}))}return this.navigator},t.prototype.offcanvas=function(t){var e=this;if(!this.drawer){var n=(t=t||{}).position,i=void 0===n?"left":n;this.drawer=new u(null,i);var s=document.createComment("original menu location");this.menu.after(s),this.toggler.add((function(){e.drawer.content.append(e.menu)}),(function(){e.drawer.close(),s.after(e.menu)}))}return this.drawer},t}();e.default=l;window.MmenuLight=l}]);
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/*!
|
2
|
+
* Mmenu Light
|
3
|
+
* mmenujs.com/mmenu-light v3.0.5
|
4
|
+
*
|
5
|
+
* Copyright (c) Fred Heusschen
|
6
|
+
* www.frebsite.nl
|
7
|
+
*
|
8
|
+
* License: CC-BY-4.0
|
9
|
+
* http://creativecommons.org/licenses/by/4.0/
|
10
|
+
*/
|
11
|
+
!function(t){var e={};function n(i){if(e[i])return e[i].exports;var s=e[i]={i:i,l:!1,exports:{}};return t[i].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(i,s,function(e){return t[e]}.bind(null,s));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";n.r(e);var i=function(){function t(t){var e=this;this.listener=function(t){(t.matches?e.matchFns:e.unmatchFns).forEach((function(t){t()}))},this.toggler=window.matchMedia(t),this.toggler.addListener(this.listener),this.matchFns=[],this.unmatchFns=[]}return t.prototype.add=function(t,e){this.matchFns.push(t),this.unmatchFns.push(e),(this.toggler.matches?t:e)()},t}(),s=function(t){return Array.prototype.slice.call(t)},o=function(t,e){return s((e||document).querySelectorAll(t))},r=("ontouchstart"in window||navigator.msMaxTouchPoints,navigator.userAgent.indexOf("MSIE")>-1||navigator.appVersion.indexOf("Trident/")>-1),a="mm-spn",c=function(){function t(t,e,n,i,s){this.node=t,this.title=e,this.slidingSubmenus=i,this.selectedClass=n,this.node.classList.add(a),r&&(this.slidingSubmenus=!1),this.node.classList.add(a+"--"+s),this.node.classList.add(a+"--"+(this.slidingSubmenus?"navbar":"vertical")),this._setSelectedl(),this._initAnchors()}return Object.defineProperty(t.prototype,"prefix",{get:function(){return a},enumerable:!0,configurable:!0}),t.prototype.openPanel=function(t){var e=t.parentElement;if(this.slidingSubmenus){var n=t.dataset.mmSpnTitle;e===this.node?this.node.classList.add(a+"--main"):(this.node.classList.remove(a+"--main"),n||s(e.children).forEach((function(t){t.matches("a, span")&&(n=t.textContent)}))),n||(n=this.title),this.node.dataset.mmSpnTitle=n,o("."+a+"--open",this.node).forEach((function(t){t.classList.remove(a+"--open"),t.classList.remove(a+"--parent")})),t.classList.add(a+"--open"),t.classList.remove(a+"--parent");for(var i=t.parentElement.closest("ul");i;)i.classList.add(a+"--open"),i.classList.add(a+"--parent"),i=i.parentElement.closest("ul")}else{var r=t.matches("."+a+"--open");o("."+a+"--open",this.node).forEach((function(t){t.classList.remove(a+"--open")})),t.classList[r?"remove":"add"](a+"--open");for(var c=t.parentElement.closest("ul");c;)c.classList.add(a+"--open"),c=c.parentElement.closest("ul")}},t.prototype._setSelectedl=function(){var t=o("."+this.selectedClass,this.node),e=t[t.length-1],n=null;e&&(n=e.closest("ul")),n||(n=this.node.querySelector("ul")),this.openPanel(n)},t.prototype._initAnchors=function(){var t=this;this.node.addEventListener("click",(function(e){var n=e.target,i=!1;(i=(i=(i=i||function(t){return!!t.matches("a")}(n))||function(e){var n;return!!(n=e.closest("span")?e.parentElement:!!e.closest("li")&&e)&&(s(n.children).forEach((function(e){e.matches("ul")&&t.openPanel(e)})),!0)}(n))||function(e){var n=o("."+a+"--open",e),i=n[n.length-1];if(i){var s=i.parentElement.closest("ul");if(s)return t.openPanel(s),!0}return!1}(n))&&e.stopImmediatePropagation()}))},t}(),d="mm-ocd",u=function(){function t(t,e){var n=this;void 0===t&&(t=null),this.wrapper=document.createElement("div"),this.wrapper.classList.add(""+d),this.wrapper.classList.add(d+"--"+e),this.content=document.createElement("div"),this.content.classList.add(d+"__content"),this.wrapper.append(this.content),this.backdrop=document.createElement("div"),this.backdrop.classList.add(d+"__backdrop"),this.wrapper.append(this.backdrop),document.body.append(this.wrapper),t&&this.content.append(t);var i=function(t){n.close(),t.stopImmediatePropagation()};this.backdrop.addEventListener("touchstart",i,{passive:!0}),this.backdrop.addEventListener("mousedown",i,{passive:!0})}return Object.defineProperty(t.prototype,"prefix",{get:function(){return d},enumerable:!0,configurable:!0}),t.prototype.open=function(){this.wrapper.classList.add(d+"--open"),document.body.classList.add(d+"-opened")},t.prototype.close=function(){this.wrapper.classList.remove(d+"--open"),document.body.classList.remove(d+"-opened")},t}(),l=function(){function t(t,e){void 0===e&&(e="all"),this.menu=t,this.toggler=new i(e)}return t.prototype.navigation=function(t){var e=this;if(!this.navigator){var n=(t=t||{}).title,i=void 0===n?"Menu":n,s=t.selectedClass,o=void 0===s?"Selected":s,r=t.slidingSubmenus,a=void 0===r||r,d=t.theme,u=void 0===d?"light":d;this.navigator=new c(this.menu,i,o,a,u),this.toggler.add((function(){return e.menu.classList.add(e.navigator.prefix)}),(function(){return e.menu.classList.remove(e.navigator.prefix)}))}return this.navigator},t.prototype.offcanvas=function(t){var e=this;if(!this.drawer){var n=(t=t||{}).position,i=void 0===n?"left":n;this.drawer=new u(null,i);var s=document.createComment("original menu location");this.menu.after(s),this.toggler.add((function(){e.drawer.content.append(e.menu)}),(function(){e.drawer.close(),s.after(e.menu)}))}return this.drawer},t}();e.default=l;window.MmenuLight=l}]);
|
@@ -0,0 +1,118 @@
|
|
1
|
+
// Source: https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach
|
2
|
+
if (window.NodeList && !NodeList.prototype.forEach) {
|
3
|
+
NodeList.prototype.forEach = function(callback, thisArg) {
|
4
|
+
thisArg = thisArg || window;
|
5
|
+
for (var i = 0; i < this.length; i++) {
|
6
|
+
callback.call(thisArg, this[i], i, this);
|
7
|
+
}
|
8
|
+
};
|
9
|
+
}
|
10
|
+
|
11
|
+
// Source: https://developer.mozilla.org/en-US/docs/Web/API/Element/matches
|
12
|
+
if (!Element.prototype.matches) {
|
13
|
+
Element.prototype.matches =
|
14
|
+
Element.prototype.matchesSelector ||
|
15
|
+
Element.prototype.mozMatchesSelector ||
|
16
|
+
Element.prototype.msMatchesSelector ||
|
17
|
+
Element.prototype.oMatchesSelector ||
|
18
|
+
Element.prototype.webkitMatchesSelector ||
|
19
|
+
function(s) {
|
20
|
+
var matches = (
|
21
|
+
this.document || this.ownerDocument
|
22
|
+
).querySelectorAll(s),
|
23
|
+
i = matches.length;
|
24
|
+
while (--i >= 0 && matches.item(i) !== this) {}
|
25
|
+
return i > -1;
|
26
|
+
};
|
27
|
+
}
|
28
|
+
|
29
|
+
// Source: https://developer.mozilla.org/en-US/docs/Web/API/Element/closest
|
30
|
+
if (!Element.prototype.matches) {
|
31
|
+
Element.prototype.matches =
|
32
|
+
Element.prototype.msMatchesSelector ||
|
33
|
+
Element.prototype.webkitMatchesSelector;
|
34
|
+
}
|
35
|
+
|
36
|
+
if (!Element.prototype.closest) {
|
37
|
+
Element.prototype.closest = function(s) {
|
38
|
+
var el = this;
|
39
|
+
|
40
|
+
do {
|
41
|
+
if (el.matches(s)) return el;
|
42
|
+
el = el.parentElement || el.parentNode;
|
43
|
+
} while (el !== null && el.nodeType === 1);
|
44
|
+
return null;
|
45
|
+
};
|
46
|
+
}
|
47
|
+
|
48
|
+
// from: https://github.com/jserz/js_piece/blob/master/DOM/ChildNode/after()/after().md
|
49
|
+
(function(arr) {
|
50
|
+
arr.forEach(function(item) {
|
51
|
+
if (item.hasOwnProperty('after')) {
|
52
|
+
return;
|
53
|
+
}
|
54
|
+
Object.defineProperty(item, 'after', {
|
55
|
+
configurable: true,
|
56
|
+
enumerable: true,
|
57
|
+
writable: true,
|
58
|
+
value: function after() {
|
59
|
+
var argArr = Array.prototype.slice.call(arguments),
|
60
|
+
docFrag = document.createDocumentFragment();
|
61
|
+
|
62
|
+
argArr.forEach(function(argItem) {
|
63
|
+
var isNode = argItem instanceof Node;
|
64
|
+
docFrag.appendChild(
|
65
|
+
isNode
|
66
|
+
? argItem
|
67
|
+
: document.createTextNode(String(argItem))
|
68
|
+
);
|
69
|
+
});
|
70
|
+
|
71
|
+
this.parentNode.insertBefore(docFrag, this.nextSibling);
|
72
|
+
}
|
73
|
+
});
|
74
|
+
});
|
75
|
+
})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);
|
76
|
+
|
77
|
+
// Source: https://github.com/jserz/js_piece/blob/master/DOM/ParentNode/append()/append().md
|
78
|
+
(function(arr) {
|
79
|
+
arr.forEach(function(item) {
|
80
|
+
if (item.hasOwnProperty('append')) {
|
81
|
+
return;
|
82
|
+
}
|
83
|
+
Object.defineProperty(item, 'append', {
|
84
|
+
configurable: true,
|
85
|
+
enumerable: true,
|
86
|
+
writable: true,
|
87
|
+
value: function append() {
|
88
|
+
var argArr = Array.prototype.slice.call(arguments),
|
89
|
+
docFrag = document.createDocumentFragment();
|
90
|
+
|
91
|
+
argArr.forEach(function(argItem) {
|
92
|
+
var isNode = argItem instanceof Node;
|
93
|
+
docFrag.appendChild(
|
94
|
+
isNode
|
95
|
+
? argItem
|
96
|
+
: document.createTextNode(String(argItem))
|
97
|
+
);
|
98
|
+
});
|
99
|
+
|
100
|
+
this.appendChild(docFrag);
|
101
|
+
}
|
102
|
+
});
|
103
|
+
});
|
104
|
+
})([Element.prototype, Document.prototype, DocumentFragment.prototype]);
|
105
|
+
|
106
|
+
// from: https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent
|
107
|
+
(function() {
|
108
|
+
if (typeof window.Event === 'function') return false;
|
109
|
+
|
110
|
+
function Event(event, params) {
|
111
|
+
params = params || { bubbles: false, cancelable: false };
|
112
|
+
var evt = document.createEvent('Event');
|
113
|
+
evt.initEvent(event, params.bubbles, params.cancelable);
|
114
|
+
return evt;
|
115
|
+
}
|
116
|
+
|
117
|
+
window.Event = Event;
|
118
|
+
})();
|
@@ -0,0 +1,118 @@
|
|
1
|
+
// Source: https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach
|
2
|
+
if (window.NodeList && !NodeList.prototype.forEach) {
|
3
|
+
NodeList.prototype.forEach = function(callback, thisArg) {
|
4
|
+
thisArg = thisArg || window;
|
5
|
+
for (var i = 0; i < this.length; i++) {
|
6
|
+
callback.call(thisArg, this[i], i, this);
|
7
|
+
}
|
8
|
+
};
|
9
|
+
}
|
10
|
+
|
11
|
+
// Source: https://developer.mozilla.org/en-US/docs/Web/API/Element/matches
|
12
|
+
if (!Element.prototype.matches) {
|
13
|
+
Element.prototype.matches =
|
14
|
+
Element.prototype.matchesSelector ||
|
15
|
+
Element.prototype.mozMatchesSelector ||
|
16
|
+
Element.prototype.msMatchesSelector ||
|
17
|
+
Element.prototype.oMatchesSelector ||
|
18
|
+
Element.prototype.webkitMatchesSelector ||
|
19
|
+
function(s) {
|
20
|
+
var matches = (
|
21
|
+
this.document || this.ownerDocument
|
22
|
+
).querySelectorAll(s),
|
23
|
+
i = matches.length;
|
24
|
+
while (--i >= 0 && matches.item(i) !== this) {}
|
25
|
+
return i > -1;
|
26
|
+
};
|
27
|
+
}
|
28
|
+
|
29
|
+
// Source: https://developer.mozilla.org/en-US/docs/Web/API/Element/closest
|
30
|
+
if (!Element.prototype.matches) {
|
31
|
+
Element.prototype.matches =
|
32
|
+
Element.prototype.msMatchesSelector ||
|
33
|
+
Element.prototype.webkitMatchesSelector;
|
34
|
+
}
|
35
|
+
|
36
|
+
if (!Element.prototype.closest) {
|
37
|
+
Element.prototype.closest = function(s) {
|
38
|
+
var el = this;
|
39
|
+
|
40
|
+
do {
|
41
|
+
if (el.matches(s)) return el;
|
42
|
+
el = el.parentElement || el.parentNode;
|
43
|
+
} while (el !== null && el.nodeType === 1);
|
44
|
+
return null;
|
45
|
+
};
|
46
|
+
}
|
47
|
+
|
48
|
+
// from: https://github.com/jserz/js_piece/blob/master/DOM/ChildNode/after()/after().md
|
49
|
+
(function(arr) {
|
50
|
+
arr.forEach(function(item) {
|
51
|
+
if (item.hasOwnProperty('after')) {
|
52
|
+
return;
|
53
|
+
}
|
54
|
+
Object.defineProperty(item, 'after', {
|
55
|
+
configurable: true,
|
56
|
+
enumerable: true,
|
57
|
+
writable: true,
|
58
|
+
value: function after() {
|
59
|
+
var argArr = Array.prototype.slice.call(arguments),
|
60
|
+
docFrag = document.createDocumentFragment();
|
61
|
+
|
62
|
+
argArr.forEach(function(argItem) {
|
63
|
+
var isNode = argItem instanceof Node;
|
64
|
+
docFrag.appendChild(
|
65
|
+
isNode
|
66
|
+
? argItem
|
67
|
+
: document.createTextNode(String(argItem))
|
68
|
+
);
|
69
|
+
});
|
70
|
+
|
71
|
+
this.parentNode.insertBefore(docFrag, this.nextSibling);
|
72
|
+
}
|
73
|
+
});
|
74
|
+
});
|
75
|
+
})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);
|
76
|
+
|
77
|
+
// Source: https://github.com/jserz/js_piece/blob/master/DOM/ParentNode/append()/append().md
|
78
|
+
(function(arr) {
|
79
|
+
arr.forEach(function(item) {
|
80
|
+
if (item.hasOwnProperty('append')) {
|
81
|
+
return;
|
82
|
+
}
|
83
|
+
Object.defineProperty(item, 'append', {
|
84
|
+
configurable: true,
|
85
|
+
enumerable: true,
|
86
|
+
writable: true,
|
87
|
+
value: function append() {
|
88
|
+
var argArr = Array.prototype.slice.call(arguments),
|
89
|
+
docFrag = document.createDocumentFragment();
|
90
|
+
|
91
|
+
argArr.forEach(function(argItem) {
|
92
|
+
var isNode = argItem instanceof Node;
|
93
|
+
docFrag.appendChild(
|
94
|
+
isNode
|
95
|
+
? argItem
|
96
|
+
: document.createTextNode(String(argItem))
|
97
|
+
);
|
98
|
+
});
|
99
|
+
|
100
|
+
this.appendChild(docFrag);
|
101
|
+
}
|
102
|
+
});
|
103
|
+
});
|
104
|
+
})([Element.prototype, Document.prototype, DocumentFragment.prototype]);
|
105
|
+
|
106
|
+
// from: https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent
|
107
|
+
(function() {
|
108
|
+
if (typeof window.Event === 'function') return false;
|
109
|
+
|
110
|
+
function Event(event, params) {
|
111
|
+
params = params || { bubbles: false, cancelable: false };
|
112
|
+
var evt = document.createEvent('Event');
|
113
|
+
evt.initEvent(event, params.bubbles, params.cancelable);
|
114
|
+
return evt;
|
115
|
+
}
|
116
|
+
|
117
|
+
window.Event = Event;
|
118
|
+
})();
|
File without changes
|
@@ -0,0 +1,199 @@
|
|
1
|
+
---
|
2
|
+
title: Floating SideBar
|
3
|
+
tagline: where to go
|
4
|
+
description: Where to go
|
5
|
+
|
6
|
+
tags: [ Page, Roundtrip ]
|
7
|
+
index: [ Start, Template, Whats, Up, Readme, TL;DR ]
|
8
|
+
categories: [ pages ]
|
9
|
+
|
10
|
+
permalink: /pages/public/learn/fsb/
|
11
|
+
regenerate: false
|
12
|
+
|
13
|
+
resources: [ lightbox ]
|
14
|
+
resource_options:
|
15
|
+
- attic:
|
16
|
+
padding_top: 400
|
17
|
+
padding_bottom: 50
|
18
|
+
opacity: 0.5
|
19
|
+
slides:
|
20
|
+
- url: /assets/images/modules/attics/runner-1920x1200-bw.jpg
|
21
|
+
alt: Photo by Alexander Redl on Unsplash
|
22
|
+
badge:
|
23
|
+
type: unsplash
|
24
|
+
author: Alexander Redl
|
25
|
+
href: https://unsplash.com/@alexanderredl
|
26
|
+
---
|
27
|
+
|
28
|
+
// Enable the Liquid Preprocessor
|
29
|
+
// -----------------------------------------------------------------------------
|
30
|
+
:page-liquid:
|
31
|
+
|
32
|
+
|
33
|
+
// Set other global page attributes here
|
34
|
+
// -----------------------------------------------------------------------------
|
35
|
+
//:my-asciidoc-attribute:
|
36
|
+
|
37
|
+
// Load Liquid procedures
|
38
|
+
// -----------------------------------------------------------------------------
|
39
|
+
{% capture set_env_entry_document %}themes/{{site.template.name}}/procedures/global/set_env_entry_document.proc{%endcapture%}
|
40
|
+
|
41
|
+
|
42
|
+
// Initialize entry document environmental attributes
|
43
|
+
// -----------------------------------------------------------------------------
|
44
|
+
{% include {{set_env_entry_document}} %}
|
45
|
+
|
46
|
+
// Load tag, url and data attributes
|
47
|
+
// -----------------------------------------------------------------------------
|
48
|
+
// include::{includedir}/attributes.asciidoc[tag=tags]
|
49
|
+
// include::{includedir}/attributes.asciidoc[tag=urls]
|
50
|
+
// include::{includedir}/attributes.asciidoc[tag=data]
|
51
|
+
|
52
|
+
// Set local page attributes
|
53
|
+
// -----------------------------------------------------------------------------
|
54
|
+
// :images-dir: {imagesdir}/path/to/page/images
|
55
|
+
|
56
|
+
|
57
|
+
// Page content
|
58
|
+
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
59
|
+
|
60
|
+
// Include sub-documents
|
61
|
+
// -----------------------------------------------------------------------------
|
62
|
+
|
63
|
+
++++
|
64
|
+
<div class="sidebar">
|
65
|
+
<div class="floating-div">
|
66
|
+
<p>This "floating div" could be a form, a call to action, an ad,
|
67
|
+
or whatever other content you want to float in sidebar as the user
|
68
|
+
scrolls up and down the page.
|
69
|
+
</p>
|
70
|
+
</div>
|
71
|
+
</div>
|
72
|
+
++++
|
73
|
+
|
74
|
+
Welcome to the pages of J1 Template. If your here first time,
|
75
|
+
hopefully you get on that page first. For sure, there is no better
|
76
|
+
place to step in.
|
77
|
+
|
78
|
+
Having a menu system is great. We hope the the navigator module of J1 will
|
79
|
+
support you to explore this site, find what your are looking for. The site
|
80
|
+
of J1 has grown over the last month a lot. Many documents were seeking for
|
81
|
+
a home. And we have really a bunch of them.
|
82
|
+
|
83
|
+
To get better orientated, the site is organized for *natural reading*. As we
|
84
|
+
use the English language for our international vistors (we are German),
|
85
|
+
*natural reading* means for a western language, reading from the left to the
|
86
|
+
right (LTR), and from top to down a page. The same to all menus, sections
|
87
|
+
and pages.
|
88
|
+
|
89
|
+
To read the site it is recommended to go for LTR. Other languages, other
|
90
|
+
countries and cultures go for RTL, but currently we've *no* support for RTL
|
91
|
+
implemented.
|
92
|
+
|
93
|
+
For that reason, it was a good decision to start from here.
|
94
|
+
|
95
|
+
== Whats up
|
96
|
+
|
97
|
+
First of all, you've started already! The important first step in to find
|
98
|
+
your way to Jekyll is done. Congratiulations.
|
99
|
+
|
100
|
+
The *Learn* section contains all you need to learn what Jekyll and J1 can do
|
101
|
+
for your website. For your new static web - if you like.
|
102
|
+
|
103
|
+
With this section you'll find a:
|
104
|
+
|
105
|
+
. *Roundtrip* to show some of the main features of the template system
|
106
|
+
*J1*.
|
107
|
+
|
108
|
+
. *Kickstarter* are Tutorials. The most important one to start is *Web in a Day*.
|
109
|
+
This tutorial guides you through all the steps to build a website using
|
110
|
+
the template system Jekyll One - your site using Jekyll and the template J1.
|
111
|
+
|
112
|
+
== Where to go
|
113
|
+
|
114
|
+
You should go for the *Roundtrip* first. See what you will get. As an overview
|
115
|
+
of some of the main features of *J1*. The roundtrip is a *visual* tour. No
|
116
|
+
technical stuff, nothing academic.
|
117
|
+
|
118
|
+
Let's go more deeper and make things real - and your hands dirty. We
|
119
|
+
recomment to work on the Kickstarter *Web in a Day*. A nice one-day journey
|
120
|
+
diving into the world of Jekyll. You'll learn a lot and at the end of that day
|
121
|
+
you know what Jekyll, static webs and the template system J1 is all about.
|
122
|
+
|
123
|
+
You're welcome!
|
124
|
+
|
125
|
+
If you like, continue by walking through the roundtrip examples
|
126
|
+
link:/pages/public/learn/roundtrip/present_images/[by starting the tour here].
|
127
|
+
|
128
|
+
++++
|
129
|
+
<style>
|
130
|
+
|
131
|
+
.sidebar {
|
132
|
+
width:33.33%;
|
133
|
+
float:left;
|
134
|
+
padding: 0 10px;
|
135
|
+
}
|
136
|
+
|
137
|
+
.floating-div {
|
138
|
+
background-color: #333;
|
139
|
+
padding: 10px 50px;
|
140
|
+
color:#EEE;
|
141
|
+
font-size: 20px;
|
142
|
+
margin-top:10px;
|
143
|
+
position: absolute;
|
144
|
+
right: -40px;
|
145
|
+
}
|
146
|
+
|
147
|
+
.sticky {
|
148
|
+
position: fixed;
|
149
|
+
top: 150px;
|
150
|
+
right:-40px;
|
151
|
+
margin: 0;
|
152
|
+
width:calc(33.33% - 25px);
|
153
|
+
}
|
154
|
+
|
155
|
+
.abs {
|
156
|
+
position: absolute;
|
157
|
+
bottom: 10px;
|
158
|
+
right:10px;
|
159
|
+
width:calc(33.33% - 20px);
|
160
|
+
}
|
161
|
+
</style>
|
162
|
+
|
163
|
+
<script>
|
164
|
+
$(document).ready(function() {
|
165
|
+
var dependencies_met_core = setInterval(function() {
|
166
|
+
if (j1.getState() == 'finished') {
|
167
|
+
// variables
|
168
|
+
var main_content = $('.js-toc-content');
|
169
|
+
var m = $(main_content).offset().top;
|
170
|
+
var topPosition = $('.floating-div').offset().top - 10;
|
171
|
+
var floatingDivHeight = $('.floating-div').outerHeight();
|
172
|
+
var footer = $('#j1_footer');
|
173
|
+
var footerFromTop = $('#j1_footer').offset().top;
|
174
|
+
var absPosition = footerFromTop - floatingDivHeight - 20;
|
175
|
+
var win = $(window);
|
176
|
+
var floatingDiv = $('.floating-div');
|
177
|
+
|
178
|
+
win.scroll(function() {
|
179
|
+
if (window.matchMedia('(min-width: 768px)').matches) {
|
180
|
+
if ((win.scrollTop() > topPosition) && (win.scrollTop() < absPosition)) {
|
181
|
+
floatingDiv.addClass('sticky');
|
182
|
+
floatingDiv.removeClass('abs');
|
183
|
+
|
184
|
+
} else if ((win.scrollTop() > topPosition) && (win.scrollTop() > absPosition)) {
|
185
|
+
floatingDiv.removeClass('sticky');
|
186
|
+
floatingDiv.addClass('abs');
|
187
|
+
|
188
|
+
} else {
|
189
|
+
floatingDiv.removeClass('sticky');
|
190
|
+
floatingDiv.removeClass('abs');
|
191
|
+
}
|
192
|
+
}
|
193
|
+
});
|
194
|
+
clearInterval(dependencies_met_core);
|
195
|
+
}
|
196
|
+
}, 25);
|
197
|
+
});
|
198
|
+
</script>
|
199
|
+
++++
|