j1_template_mde 2018.4.19 → 2018.4.20
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 +15 -15
- data/_includes/themes/j1/modules/navigator/generator.html +1 -1
- data/_includes/themes/j1/procedures/global/create_word_cloud.proc +35 -59
- data/_includes/themes/j1/procedures/global/set_env_entry_document.proc +6 -0
- data/_includes/themes/j1/procedures/posts/collate_timeline.proc +34 -24
- data/_layouts/blog_archive.html +1 -1
- data/lib/j1/version.rb +1 -1
- data/lib/starter_web/Gemfile +1 -1
- data/lib/starter_web/_config.yml +1 -1
- data/lib/starter_web/_data/modules/j1_navigator_menu.yml +4 -4
- data/lib/starter_web/assets/data/panel.html +1 -1
- data/lib/starter_web/assets/themes/j1/core/css/theme_extensions.css +11 -72
- data/lib/starter_web/assets/themes/j1/core/css/theme_extensions.min.css +1 -1
- data/lib/starter_web/assets/themes/j1/core/css/uno.css +11 -72
- data/lib/starter_web/assets/themes/j1/core/css/uno.min.css +1 -1
- data/lib/starter_web/assets/themes/j1/core/js/adapter/algolia.js +5 -1
- data/lib/starter_web/collections/posts/premium/series/_posts/000_includes/documents/100-docker-using-shared-folders.asciidoc +3 -0
- data/lib/starter_web/collections/posts/premium/series/_posts/2018-11-01-docker-using-shared-folders.adoc +8 -9
- data/lib/starter_web/collections/posts/private/wikipedia/_posts/000_includes/attributes.asciidoc +46 -0
- data/lib/starter_web/collections/posts/private/wikipedia/_posts/000_includes/tables/debug_variables.asciidoc +48 -0
- data/lib/starter_web/collections/posts/private/wikipedia/_posts/2016-11-20-minneapolis.adoc +11 -8
- data/lib/starter_web/collections/posts/private/wikipedia/_posts/{2016-11-24-narcisse-snake-pits.adoc → 2016-11-24-narcisse-snake-dens.adoc} +10 -15
- data/lib/starter_web/collections/posts/private/wikipedia/_posts/2016-11-26-columbia-river.adoc +13 -9
- data/lib/starter_web/collections/posts/public/featured/_posts/0000-00-00-welcome-to-j1-template.adoc.erb +29 -15
- data/lib/starter_web/collections/posts/public/featured/_posts/000_includes/attributes.asciidoc +2 -1
- data/lib/starter_web/collections/posts/public/featured/_posts/{2017-05-01-confusion-about-base-url.adoc → 2018-05-01-confusion-about-base-url.adoc} +5 -28
- data/lib/starter_web/collections/posts/public/featured/_posts/{2017-06-01-top-open-source-static-site-generators.adoc → 2018-06-01-top-open-source-static-site-generators.adoc} +7 -28
- data/lib/starter_web/collections/posts/public/featured/_posts/{2017-07-01-what-is-a-static-site.adoc → 2018-07-01-what-is-a-static-site.adoc} +5 -27
- data/lib/starter_web/package.json +17 -1
- data/lib/starter_web/pages/public/blog/navigator/archive.html +26 -40
- data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +38 -48
- data/lib/starter_web/pages/public/blog/navigator/archive/dateview.html +21 -31
- data/lib/starter_web/pages/public/blog/navigator/archive/tagview.html +113 -115
- data/lib/starter_web/pages/public/blog/navigator/index.html +2 -2
- data/lib/starter_web/pages/public/instant_search_media.adoc +438 -0
- data/lib/starter_web/pages/public/start/roundtrip/100_present_images.adoc +1 -2
- data/lib/starter_web/pages/public/start/roundtrip/800_search_engine.adoc +34 -17
- metadata +9 -9
- data/_includes/themes/j1/modules/navigator/procedures/_unused/authclient.proc +0 -139
- data/_includes/themes/j1/modules/navigator/procedures/_unused/authclient.proc.org +0 -217
- data/lib/starter_web/collections/posts/premium/series/_posts/2018-11-01-docker-using-shared-folders.asciidoc +0 -86
@@ -74,14 +74,13 @@ include::{includedir}/attributes.asciidoc[tag=data]
|
|
74
74
|
// -----------------------------------------------------------------------------
|
75
75
|
:images-dir: {imagesdir}/pages/roundtrip/100_present_images
|
76
76
|
|
77
|
-
// Place an excerpt at the most top position
|
77
|
+
// NOTE: Place an excerpt at the most top position
|
78
78
|
// -----------------------------------------------------------------------------
|
79
79
|
// Page excerpt text ..
|
80
80
|
//
|
81
81
|
// [role="clearfix mb-3"]
|
82
82
|
// excerpt__end
|
83
83
|
|
84
|
-
|
85
84
|
// Page content
|
86
85
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
87
86
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
---
|
2
|
-
title: Search
|
2
|
+
title: Site Search
|
3
3
|
tagline: Algolia Online Search
|
4
4
|
description: Using Algolia Index API for static sites
|
5
5
|
|
@@ -29,9 +29,21 @@ regenerate: true
|
|
29
29
|
// -------------------------------------------------------------------
|
30
30
|
|
31
31
|
|
32
|
-
|
32
|
+
The module *Site Search* is based on an _Elasticsearch_ Index hostet at
|
33
|
+
_Algolia_. To access the `Algolia index`, the Javascript library
|
34
|
+
_InstantSearch_ (instansearch.js) is fully integrated with _J1_. *Site Search*
|
35
|
+
is bundled with the template like all other modules, e.g. *Toccer*, *Header*
|
36
|
+
or *Navigator* -- simple to use as only a configuration is need to make this
|
37
|
+
functionality available with a site.
|
38
|
+
|
39
|
+
J1 Template integrates the `jekyll-algolia` Gem, a data collector create the
|
40
|
+
search *record data* needed and push the content in an Algolia index in a
|
41
|
+
single step.
|
42
|
+
|
43
|
+
Find the default search client below; packed with the *Site Search* module as
|
44
|
+
well.
|
33
45
|
|
34
|
-
|
46
|
+
== Site Search
|
35
47
|
|
36
48
|
++++
|
37
49
|
<!-- CurrentRefinedValues widget -->
|
@@ -43,13 +55,9 @@ lorem:sentences[2]
|
|
43
55
|
<!-- SearchBox widget -->
|
44
56
|
<div id="search-searchbar" class="mb-4"> </div>
|
45
57
|
|
46
|
-
|
47
58
|
<!-- HitsPerPage widget -->
|
48
59
|
<!-- div id="hits-per-page-selector"></div -->
|
49
60
|
|
50
|
-
++++
|
51
|
-
|
52
|
-
++++
|
53
61
|
<div id="searcher" class"row">
|
54
62
|
<div class="col-md-4 col-xs-6">
|
55
63
|
<!-- CurrentRefinedValues widget -->
|
@@ -76,22 +84,21 @@ lorem:sentences[2]
|
|
76
84
|
<style>
|
77
85
|
|
78
86
|
input:focus{
|
79
|
-
|
80
|
-
//
|
81
|
-
|
87
|
+
outline: none;
|
88
|
+
// box-shadow: 0px 0px 5px #61C5FA;
|
89
|
+
border: 1px solid #424242;
|
82
90
|
}
|
83
91
|
|
84
92
|
input:hover {
|
85
|
-
|
86
|
-
|
93
|
+
border: 1px solid #424242;
|
94
|
+
border-radius: 5px;
|
87
95
|
}
|
88
96
|
|
89
97
|
input:focus:hover{
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
98
|
+
outline: none;
|
99
|
+
box-shadow: 0px 0px 5px #424242;
|
100
|
+
border: 1px solid #3f51b5;
|
101
|
+
border-radius:0;
|
95
102
|
}
|
96
103
|
|
97
104
|
.limit-y {
|
@@ -99,6 +106,16 @@ input:focus:hover{
|
|
99
106
|
overflow-y: auto;
|
100
107
|
}
|
101
108
|
|
109
|
+
.ais-pagination {
|
110
|
+
-webkit-box-shadow: 0 !important;
|
111
|
+
box-shadow: 0 !important;
|
112
|
+
width: 100%;
|
113
|
+
}
|
114
|
+
|
115
|
+
.ais-refinement-list {
|
116
|
+
margin-top: 1.25rem;
|
117
|
+
}
|
118
|
+
|
102
119
|
.search-result-item {
|
103
120
|
margin-bottom: 0px;
|
104
121
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: j1_template_mde
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2018.4.
|
4
|
+
version: 2018.4.20
|
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: 2019-01-
|
11
|
+
date: 2019-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dotenv
|
@@ -78,8 +78,6 @@ files:
|
|
78
78
|
- _includes/themes/j1/modules/footers/footer_light_generator.html
|
79
79
|
- _includes/themes/j1/modules/headers/master_header_generator.html
|
80
80
|
- _includes/themes/j1/modules/navigator/generator.html
|
81
|
-
- _includes/themes/j1/modules/navigator/procedures/_unused/authclient.proc
|
82
|
-
- _includes/themes/j1/modules/navigator/procedures/_unused/authclient.proc.org
|
83
81
|
- _includes/themes/j1/modules/navigator/procedures/quicklinks.proc
|
84
82
|
- _includes/themes/j1/modules/navigator/procedures/sidebar.proc
|
85
83
|
- _includes/themes/j1/modules/navigator/procedures/topsearch.proc
|
@@ -827,15 +825,16 @@ files:
|
|
827
825
|
- lib/starter_web/collections/posts/premium/series/_posts/000_includes/documents/loop.sh
|
828
826
|
- lib/starter_web/collections/posts/premium/series/_posts/000_includes/tables/debug_variables.asciidoc
|
829
827
|
- lib/starter_web/collections/posts/premium/series/_posts/2018-11-01-docker-using-shared-folders.adoc
|
830
|
-
- lib/starter_web/collections/posts/
|
828
|
+
- lib/starter_web/collections/posts/private/wikipedia/_posts/000_includes/attributes.asciidoc
|
829
|
+
- lib/starter_web/collections/posts/private/wikipedia/_posts/000_includes/tables/debug_variables.asciidoc
|
831
830
|
- lib/starter_web/collections/posts/private/wikipedia/_posts/2016-11-20-minneapolis.adoc
|
832
|
-
- lib/starter_web/collections/posts/private/wikipedia/_posts/2016-11-24-narcisse-snake-
|
831
|
+
- lib/starter_web/collections/posts/private/wikipedia/_posts/2016-11-24-narcisse-snake-dens.adoc
|
833
832
|
- lib/starter_web/collections/posts/private/wikipedia/_posts/2016-11-26-columbia-river.adoc
|
834
833
|
- lib/starter_web/collections/posts/public/featured/_posts/0000-00-00-welcome-to-j1-template.adoc.erb
|
835
834
|
- lib/starter_web/collections/posts/public/featured/_posts/000_includes/attributes.asciidoc
|
836
|
-
- lib/starter_web/collections/posts/public/featured/_posts/
|
837
|
-
- lib/starter_web/collections/posts/public/featured/_posts/
|
838
|
-
- lib/starter_web/collections/posts/public/featured/_posts/
|
835
|
+
- lib/starter_web/collections/posts/public/featured/_posts/2018-05-01-confusion-about-base-url.adoc
|
836
|
+
- lib/starter_web/collections/posts/public/featured/_posts/2018-06-01-top-open-source-static-site-generators.adoc
|
837
|
+
- lib/starter_web/collections/posts/public/featured/_posts/2018-07-01-what-is-a-static-site.adoc
|
839
838
|
- lib/starter_web/favicon.ico
|
840
839
|
- lib/starter_web/index.html
|
841
840
|
- lib/starter_web/package.json
|
@@ -870,6 +869,7 @@ files:
|
|
870
869
|
- lib/starter_web/pages/public/blog/navigator/archive/dateview.html
|
871
870
|
- lib/starter_web/pages/public/blog/navigator/archive/tagview.html
|
872
871
|
- lib/starter_web/pages/public/blog/navigator/index.html
|
872
|
+
- lib/starter_web/pages/public/instant_search_media.adoc
|
873
873
|
- lib/starter_web/pages/public/legal/de/100_impress.adoc
|
874
874
|
- lib/starter_web/pages/public/legal/de/200_terms_of_use.adoc
|
875
875
|
- lib/starter_web/pages/public/legal/de/300_privacy.adoc
|
@@ -1,139 +0,0 @@
|
|
1
|
-
{% comment %}
|
2
|
-
# -----------------------------------------------------------------------------
|
3
|
-
# ~/_includes/templates/j1/modules/navigator/procedures/authclient.proc
|
4
|
-
# Liquid PROCEDURE template to create a signin modal for the quicklink bar
|
5
|
-
#
|
6
|
-
# Product/Info:
|
7
|
-
# https://jekyll-one.com
|
8
|
-
#
|
9
|
-
# Copyright (C) 2019 Juergen Adams
|
10
|
-
#
|
11
|
-
# J1 Template is licensed under the MIT License.
|
12
|
-
# See: https://github.com/jekyll-one/j1_template_mde/blob/master/LICENSE
|
13
|
-
#
|
14
|
-
# -----------------------------------------------------------------------------
|
15
|
-
# Test data:
|
16
|
-
# liquid_var: {{ liquid_var | debug }}
|
17
|
-
# signin_options: {{ signin_options | debug }}
|
18
|
-
# -----------------------------------------------------------------------------
|
19
|
-
{% endcomment %}
|
20
|
-
|
21
|
-
{% comment %} Liquid procedure parameter|s
|
22
|
-
-------------------------------------------------------------------------------- {% endcomment %}
|
23
|
-
{% assign signin_options = include.options %}
|
24
|
-
|
25
|
-
|
26
|
-
{% comment %} Liquid procedures
|
27
|
-
-------------------------------------------------------------------------------- {% endcomment %}
|
28
|
-
{% capture select_color %}themes/{{site.template.name}}/procedures/global/select_color.proc{% endcapture %}
|
29
|
-
{% capture select_icon_size %}themes/{{site.template.name}}/procedures/global/select_icon_size.proc{% endcapture %}
|
30
|
-
|
31
|
-
|
32
|
-
{% comment %} Liquid var initialization
|
33
|
-
-------------------------------------------------------------------------------- {% endcomment %}
|
34
|
-
|
35
|
-
{% comment %} Set config files
|
36
|
-
------------------------------------------------------------------------------ {% endcomment %}
|
37
|
-
|
38
|
-
{% comment %} Set quicksearch properties
|
39
|
-
------------------------------------------------------------------------------ {% endcomment %}
|
40
|
-
{% assign icon_family = signin_options.icon_family | downcase %}
|
41
|
-
{% assign signin_icon = signin_options.signin_icon %}
|
42
|
-
{% assign signout_icon = signin_options.signout_icon %}
|
43
|
-
|
44
|
-
{% assign auth_facebook = signin_options.auth_facebook.enabled %}
|
45
|
-
{% assign auth_facebook_title = signin_options.auth_facebook.title | downcase %}
|
46
|
-
{% assign auth_facebook_text = signin_options.auth_facebook.text %}
|
47
|
-
{% assign auth_github = signin_options.auth_github.enabled %}
|
48
|
-
{% assign auth_github_title = signin_options.auth_github.title | downcase %}
|
49
|
-
{% assign auth_github_text = signin_options.auth_github.text %}
|
50
|
-
{% assign auth_patreon = signin_options.auth_patreon.enabled %}
|
51
|
-
{% assign auth_auth_patreon_title = signin_options.auth_auth_patreon.title | downcase %}
|
52
|
-
{% assign auth_auth_patreon_text = signin_options.auth_auth_patreon.text %}
|
53
|
-
|
54
|
-
{% if signin_options.icon_family == 'FontAwesome' or signin_options.icon_family == 'FontAwesome4' or signin_options.icon_family == 'FontAwesome5' %}
|
55
|
-
{% assign icon_family = 'fa' %}
|
56
|
-
{% elsif signin_options.icon_family == 'MDI' or signin_options.icon_family == 'Material Design Icons'%}
|
57
|
-
{% assign icon_family = 'mdi' %}
|
58
|
-
{% else %}
|
59
|
-
{% assign icon_family = 'mdi' %}
|
60
|
-
{% endif %}
|
61
|
-
|
62
|
-
{% include {{select_color}} color=signin_options.icon_color fallback="#9E9E9E" %}
|
63
|
-
{% capture icon_color %}style="color:{{color}}"{% endcapture %}
|
64
|
-
|
65
|
-
{% include {{select_icon_size}} family=signin_options.icon_family size=signin_options.icon_size %}
|
66
|
-
{% assign icon_size = size %}
|
67
|
-
|
68
|
-
|
69
|
-
{% comment %} Main
|
70
|
-
-------------------------------------------------------------------------------- {% endcomment %}
|
71
|
-
{% if signin_options.enabled %}
|
72
|
-
|
73
|
-
{% comment %} HTMl code (of the Modal) for login dialog
|
74
|
-
---------------------------------------------------------------------------- {% endcomment %}
|
75
|
-
<!-- [INFO ] [j1.layout.default.html ] [START default_writer processing: Modal signin|signup] -->
|
76
|
-
<div class="modal fade" id="modalOmniLogin" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
77
|
-
<div class="modal-dialog modal-notify modal-info modal-lg" role="document">
|
78
|
-
<!-- Content -->
|
79
|
-
<div class="modal-content">
|
80
|
-
<!--Header-->
|
81
|
-
<div class="modal-header">
|
82
|
-
<p class="lead">SignIn</p>
|
83
|
-
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
84
|
-
<i class="mdi mdi-close mdi-light mdi-48px"></i>
|
85
|
-
</button>
|
86
|
-
</div>
|
87
|
-
<!-- Body -->
|
88
|
-
<div class="modal-body mb-0">
|
89
|
-
<!-- Modal nav pills -->
|
90
|
-
<div class="row ml-2 mr-2">
|
91
|
-
<ul class="nav nav-pills nav-pills-icons mt-2" role="tablist">
|
92
|
-
<li class="nav-item">
|
93
|
-
<a class="nav-link active" href="#h-tabs-1" role="tab" data-toggle="tab" aria-expanded="false" aria-selected="true">
|
94
|
-
<i class="mdi mdi-github-circle mt-1 mb-2"></i> Github
|
95
|
-
</a>
|
96
|
-
</li>
|
97
|
-
<li class="nav-item">
|
98
|
-
<a class="nav-link" href="#h-tabs-2" role="tab" data-toggle="tab" aria-expanded="false" aria-selected="false">
|
99
|
-
<i class="mdi mdi-facebook mt-1 mb-2"></i> Facebook
|
100
|
-
</a>
|
101
|
-
</li>
|
102
|
-
<li class="nav-item">
|
103
|
-
<a class="nav-link" href="#h-tabs-3" role="tab" data-toggle="tab" aria-expanded="true" aria-selected="false">
|
104
|
-
<i class="mdi mdi-format-paragraph mt-1 mb-2"></i> Patreon
|
105
|
-
</a>
|
106
|
-
</li>
|
107
|
-
</ul>
|
108
|
-
<div class="tab-content tab-space">
|
109
|
-
<div class="tab-pane active" id="h-tabs-1">
|
110
|
-
To get access to all <b>PRIVATE</b> content pages, login to Github or Facebook
|
111
|
-
</div>
|
112
|
-
<div class="tab-pane" id="h-tabs-2">
|
113
|
-
To get access to all <b>PRIVATE</b> content pages, login to Github or Facebook
|
114
|
-
</div>
|
115
|
-
<div class="tab-pane" id="h-tabs-3">
|
116
|
-
To get access to all <b>PREMIUM</b> content pages, login to Patreon
|
117
|
-
</div>
|
118
|
-
</div>
|
119
|
-
</div>
|
120
|
-
</div>
|
121
|
-
<!-- Footer -->
|
122
|
-
<div class="modal-footer justify-content-right">
|
123
|
-
<button type="button" id="loginButton" class="btn btn-primary-modal mr-2" data-dismiss="modal">
|
124
|
-
<i class="mdi mdi-18px mdi-light mdi-login"></i>
|
125
|
-
Yes, please
|
126
|
-
</button>
|
127
|
-
<button type="button" id="exitButton" class="btn btn-outline-secondary-modal" data-dismiss="modal">
|
128
|
-
No, thanks
|
129
|
-
</button>
|
130
|
-
</div>
|
131
|
-
</div>
|
132
|
-
<!-- END Content -->
|
133
|
-
</div>
|
134
|
-
</div>
|
135
|
-
<!-- [INFO ] [j1.layout.default.html ] [end default_writer processing: Modal signin|signup] -->
|
136
|
-
<!-- [INFO ] [j1.layout.default.html ] [JS code for Modal moved to 200_template_js/js/navigator/navigator.js ] -->
|
137
|
-
<!-- [INFO ] [j1.layout.default.html ] [end default_writer processing: Initialize Login Modal] -->
|
138
|
-
|
139
|
-
{% endif %}
|
@@ -1,217 +0,0 @@
|
|
1
|
-
{% comment %}
|
2
|
-
# -----------------------------------------------------------------------------
|
3
|
-
# ~/_includes/templates/j1/modules/navigator/procedures/authclient.proc
|
4
|
-
# Liquid PROCEDURE template to create a signin modal for the quicklink bar
|
5
|
-
#
|
6
|
-
# Product/Info:
|
7
|
-
# https://jekyll-one.com
|
8
|
-
#
|
9
|
-
# Copyright (C) 2019 Juergen Adams
|
10
|
-
#
|
11
|
-
# J1 Template is licensed under the MIT License.
|
12
|
-
# See: https://github.com/jekyll-one/j1_template_mde/blob/master/LICENSE
|
13
|
-
#
|
14
|
-
# -----------------------------------------------------------------------------
|
15
|
-
# Test data:
|
16
|
-
# liquid_var: {{ liquid_var | debug }}
|
17
|
-
# signin_options: {{ signin_options | debug }}
|
18
|
-
# -----------------------------------------------------------------------------
|
19
|
-
{% endcomment %}
|
20
|
-
|
21
|
-
{% comment %} Liquid procedure parameter|s
|
22
|
-
-------------------------------------------------------------------------------- {% endcomment %}
|
23
|
-
{% assign signin_options = include.options %}
|
24
|
-
|
25
|
-
|
26
|
-
{% comment %} Liquid procedures
|
27
|
-
-------------------------------------------------------------------------------- {% endcomment %}
|
28
|
-
{% capture select_color %}themes/{{site.template.name}}/procedures/global/select_color.proc{% endcapture %}
|
29
|
-
{% capture select_icon_size %}themes/{{site.template.name}}/procedures/global/select_icon_size.proc{% endcapture %}
|
30
|
-
|
31
|
-
|
32
|
-
{% comment %} Liquid var initialization
|
33
|
-
-------------------------------------------------------------------------------- {% endcomment %}
|
34
|
-
|
35
|
-
{% comment %} Set config files
|
36
|
-
------------------------------------------------------------------------------ {% endcomment %}
|
37
|
-
|
38
|
-
{% comment %} Set quicksearch properties
|
39
|
-
------------------------------------------------------------------------------ {% endcomment %}
|
40
|
-
{% assign icon_family = signin_options.icon_family | downcase %}
|
41
|
-
{% assign signin_icon = signin_options.signin_icon %}
|
42
|
-
{% assign signout_icon = signin_options.signout_icon %}
|
43
|
-
|
44
|
-
{% assign auth_facebook = signin_options.auth_facebook.enabled %}
|
45
|
-
{% assign auth_facebook_title = signin_options.auth_facebook.title | downcase %}
|
46
|
-
{% assign auth_facebook_text = signin_options.auth_facebook.text %}
|
47
|
-
{% assign auth_github = signin_options.auth_github.enabled %}
|
48
|
-
{% assign auth_github_title = signin_options.auth_github.title | downcase %}
|
49
|
-
{% assign auth_github_text = signin_options.auth_github.text %}
|
50
|
-
{% assign auth_patreon = signin_options.auth_patreon.enabled %}
|
51
|
-
{% assign auth_auth_patreon_title = signin_options.auth_auth_patreon.title | downcase %}
|
52
|
-
{% assign auth_auth_patreon_text = signin_options.auth_auth_patreon.text %}
|
53
|
-
|
54
|
-
{% if signin_options.icon_family == 'FontAwesome' or signin_options.icon_family == 'FontAwesome4' or signin_options.icon_family == 'FontAwesome5' %}
|
55
|
-
{% assign icon_family = 'fa' %}
|
56
|
-
{% elsif signin_options.icon_family == 'MDI' or signin_options.icon_family == 'Material Design Icons'%}
|
57
|
-
{% assign icon_family = 'mdi' %}
|
58
|
-
{% else %}
|
59
|
-
{% assign icon_family = 'mdi' %}
|
60
|
-
{% endif %}
|
61
|
-
|
62
|
-
{% include {{select_color}} color=signin_options.icon_color fallback="#9E9E9E" %}
|
63
|
-
{% capture icon_color %}style="color:{{color}}"{% endcapture %}
|
64
|
-
|
65
|
-
{% include {{select_icon_size}} family=signin_options.icon_family size=signin_options.icon_size %}
|
66
|
-
{% assign icon_size = size %}
|
67
|
-
|
68
|
-
|
69
|
-
{% comment %} Main
|
70
|
-
-------------------------------------------------------------------------------- {% endcomment %}
|
71
|
-
{% if signin_options.enabled %}
|
72
|
-
|
73
|
-
{% comment %} HTMl code (of the Modal) for login dialog
|
74
|
-
---------------------------------------------------------------------------- {% endcomment %}
|
75
|
-
<!-- [INFO ] [j1.layout.default.html ] [START default_writer processing: Modal signin|signup] -->
|
76
|
-
<div class="modal fade" id="modalOmniLogin" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
77
|
-
<div class="modal-dialog modal-notify modal-info modal-lg" role="document">
|
78
|
-
<!-- Content -->
|
79
|
-
<div class="modal-content">
|
80
|
-
<!--Header-->
|
81
|
-
<div class="modal-header">
|
82
|
-
<p class="lead">SignIn</p>
|
83
|
-
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
84
|
-
<i class="mdi mdi-close mdi-light mdi-48px"></i>
|
85
|
-
</button>
|
86
|
-
</div>
|
87
|
-
<!-- Body -->
|
88
|
-
<div class="modal-body mb-0">
|
89
|
-
<!-- Modal nav pills -->
|
90
|
-
<div class="row ml-2 mr-2">
|
91
|
-
<ul class="nav nav-pills nav-pills-icons mt-2" role="tablist">
|
92
|
-
<li class="nav-item">
|
93
|
-
<a class="nav-link active" href="#h-tabs-1" role="tab" data-toggle="tab" aria-expanded="false" aria-selected="true">
|
94
|
-
<i class="mdi mdi-github-circle mt-1 mb-2"></i> Github
|
95
|
-
</a>
|
96
|
-
</li>
|
97
|
-
<li class="nav-item">
|
98
|
-
<a class="nav-link" href="#h-tabs-2" role="tab" data-toggle="tab" aria-expanded="false" aria-selected="false">
|
99
|
-
<i class="mdi mdi-facebook mt-1 mb-2"></i> Facebook
|
100
|
-
</a>
|
101
|
-
</li>
|
102
|
-
<li class="nav-item">
|
103
|
-
<a class="nav-link" href="#h-tabs-3" role="tab" data-toggle="tab" aria-expanded="true" aria-selected="false">
|
104
|
-
<i class="mdi mdi-format-paragraph mt-1 mb-2"></i> Patreon
|
105
|
-
</a>
|
106
|
-
</li>
|
107
|
-
</ul>
|
108
|
-
<div class="tab-content tab-space">
|
109
|
-
<div class="tab-pane active" id="h-tabs-1">
|
110
|
-
To get access to all <b>PRIVATE</b> content pages, login to Github or Facebook
|
111
|
-
</div>
|
112
|
-
<div class="tab-pane" id="h-tabs-2">
|
113
|
-
To get access to all <b>PRIVATE</b> content pages, login to Github or Facebook
|
114
|
-
</div>
|
115
|
-
<div class="tab-pane" id="h-tabs-3">
|
116
|
-
To get access to all <b>PREMIUM</b> content pages, login to Patreon
|
117
|
-
</div>
|
118
|
-
</div>
|
119
|
-
</div>
|
120
|
-
</div>
|
121
|
-
<!-- Footer -->
|
122
|
-
<div class="modal-footer justify-content-right">
|
123
|
-
<button type="button" id="loginButton" class="btn btn-primary-modal mr-2" data-dismiss="modal">
|
124
|
-
<i class="mdi mdi-18px mdi-light mdi-login"></i>
|
125
|
-
Yes, please
|
126
|
-
</button>
|
127
|
-
<button type="button" id="exitButton" class="btn btn-outline-secondary-modal" data-dismiss="modal">
|
128
|
-
No, thanks
|
129
|
-
</button>
|
130
|
-
</div>
|
131
|
-
</div>
|
132
|
-
<!-- END Content -->
|
133
|
-
</div>
|
134
|
-
</div>
|
135
|
-
<!-- [INFO ] [j1.layout.default.html ] [end default_writer processing: Modal signin|signup] -->
|
136
|
-
|
137
|
-
{% comment %} Javacript code (of the Modal) for login dialog
|
138
|
-
------------------------------------------------------------------------------ {% endcomment %}
|
139
|
-
<!-- [INFO ] [j1.layout.default.html ] [start default_writer processing: Initialize Login Modal] -->
|
140
|
-
<script>
|
141
|
-
$(function() {
|
142
|
-
var logger;
|
143
|
-
var logText;
|
144
|
-
var route;
|
145
|
-
var provider = 'unkonown';
|
146
|
-
var j1_session_cookie;
|
147
|
-
var j1_session;
|
148
|
-
|
149
|
-
var signIn = {
|
150
|
-
provider: 'Github',
|
151
|
-
login: false
|
152
|
-
}
|
153
|
-
|
154
|
-
logger = log4javascript.getLogger('j1.AuthClient');
|
155
|
-
state = 'started';
|
156
|
-
logger.info('state: ' + state); // Set|Log status
|
157
|
-
|
158
|
-
$('ul.nav-pills > li').click(function (e) {
|
159
|
-
e.preventDefault();
|
160
|
-
signIn.provider = $(this).text().trim();
|
161
|
-
signIn.provider = signIn.provider.toLowerCase();
|
162
|
-
});
|
163
|
-
|
164
|
-
$("button").click(function() {
|
165
|
-
if (this.id === "loginButton") {
|
166
|
-
signIn.login = true;
|
167
|
-
} else {
|
168
|
-
signIn.login = false;
|
169
|
-
}
|
170
|
-
});
|
171
|
-
|
172
|
-
$("#modalOmniLogin").on('hidden.bs.modal', function() {
|
173
|
-
if (signIn.login == true) {
|
174
|
-
provider = signIn.provider.toLowerCase();
|
175
|
-
logText = 'Provider detected: ' + provider;
|
176
|
-
logger.info(logText);
|
177
|
-
logText = 'Login for ' +provider+ ' accepted';
|
178
|
-
logger.info(logText);
|
179
|
-
var route = '/authentication?requestType=signin&provider=' + provider;
|
180
|
-
logText = 'Call middleware for route ' +route+ ' for signin';
|
181
|
-
logger.info(logText);
|
182
|
-
window.location.href = route;
|
183
|
-
} else {
|
184
|
-
/*
|
185
|
-
# Rack::Session::Cookie provides simple cookie based session management.
|
186
|
-
# By default, the session is a Ruby Hash stored as base64 encoded marshalled
|
187
|
-
# data set to :key (default: rack.session). The object that encodes the
|
188
|
-
# session data is configurable and must respond to +encode+ and +decode+.
|
189
|
-
# Both methods must take a string and return a string.
|
190
|
-
#
|
191
|
-
# When the secret key is set, cookie data is checked for data integrity.
|
192
|
-
# The old secret key is also accepted and allows graceful secret rotation.
|
193
|
-
#
|
194
|
-
# Example:
|
195
|
-
#
|
196
|
-
# use Rack::Session::Cookie, :key => 'rack.session',
|
197
|
-
# :domain => 'foo.com',
|
198
|
-
# :path => '/',
|
199
|
-
# :expire_after => 2592000,
|
200
|
-
# :secret => 'change_me',
|
201
|
-
# :old_secret => 'also_change_me'
|
202
|
-
*/
|
203
|
-
provider = signIn.provider.toLowerCase();
|
204
|
-
logText = 'Provider detected: ' + provider;
|
205
|
-
logger.info(logText);
|
206
|
-
logText = 'Login for ' +provider+ " declined";
|
207
|
-
logger.info(logText);
|
208
|
-
}
|
209
|
-
j1_session_cookie = window.atob(Cookies.get('j1.session'));
|
210
|
-
j1_session = JSON.parse(j1_session_cookie);
|
211
|
-
logger.info(j1_session_cookie);
|
212
|
-
});
|
213
|
-
});
|
214
|
-
</script>
|
215
|
-
<!-- [INFO ] [j1.layout.default.html ] [end default_writer processing: Initialize Login Modal] -->
|
216
|
-
|
217
|
-
{% endif %}
|