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.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/themes/j1/layouts/content_generator_blog_archive.html +15 -15
  3. data/_includes/themes/j1/modules/navigator/generator.html +1 -1
  4. data/_includes/themes/j1/procedures/global/create_word_cloud.proc +35 -59
  5. data/_includes/themes/j1/procedures/global/set_env_entry_document.proc +6 -0
  6. data/_includes/themes/j1/procedures/posts/collate_timeline.proc +34 -24
  7. data/_layouts/blog_archive.html +1 -1
  8. data/lib/j1/version.rb +1 -1
  9. data/lib/starter_web/Gemfile +1 -1
  10. data/lib/starter_web/_config.yml +1 -1
  11. data/lib/starter_web/_data/modules/j1_navigator_menu.yml +4 -4
  12. data/lib/starter_web/assets/data/panel.html +1 -1
  13. data/lib/starter_web/assets/themes/j1/core/css/theme_extensions.css +11 -72
  14. data/lib/starter_web/assets/themes/j1/core/css/theme_extensions.min.css +1 -1
  15. data/lib/starter_web/assets/themes/j1/core/css/uno.css +11 -72
  16. data/lib/starter_web/assets/themes/j1/core/css/uno.min.css +1 -1
  17. data/lib/starter_web/assets/themes/j1/core/js/adapter/algolia.js +5 -1
  18. data/lib/starter_web/collections/posts/premium/series/_posts/000_includes/documents/100-docker-using-shared-folders.asciidoc +3 -0
  19. data/lib/starter_web/collections/posts/premium/series/_posts/2018-11-01-docker-using-shared-folders.adoc +8 -9
  20. data/lib/starter_web/collections/posts/private/wikipedia/_posts/000_includes/attributes.asciidoc +46 -0
  21. data/lib/starter_web/collections/posts/private/wikipedia/_posts/000_includes/tables/debug_variables.asciidoc +48 -0
  22. data/lib/starter_web/collections/posts/private/wikipedia/_posts/2016-11-20-minneapolis.adoc +11 -8
  23. 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
  24. data/lib/starter_web/collections/posts/private/wikipedia/_posts/2016-11-26-columbia-river.adoc +13 -9
  25. data/lib/starter_web/collections/posts/public/featured/_posts/0000-00-00-welcome-to-j1-template.adoc.erb +29 -15
  26. data/lib/starter_web/collections/posts/public/featured/_posts/000_includes/attributes.asciidoc +2 -1
  27. 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
  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
  29. 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
  30. data/lib/starter_web/package.json +17 -1
  31. data/lib/starter_web/pages/public/blog/navigator/archive.html +26 -40
  32. data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +38 -48
  33. data/lib/starter_web/pages/public/blog/navigator/archive/dateview.html +21 -31
  34. data/lib/starter_web/pages/public/blog/navigator/archive/tagview.html +113 -115
  35. data/lib/starter_web/pages/public/blog/navigator/index.html +2 -2
  36. data/lib/starter_web/pages/public/instant_search_media.adoc +438 -0
  37. data/lib/starter_web/pages/public/start/roundtrip/100_present_images.adoc +1 -2
  38. data/lib/starter_web/pages/public/start/roundtrip/800_search_engine.adoc +34 -17
  39. metadata +9 -9
  40. data/_includes/themes/j1/modules/navigator/procedures/_unused/authclient.proc +0 -139
  41. data/_includes/themes/j1/modules/navigator/procedures/_unused/authclient.proc.org +0 -217
  42. data/lib/starter_web/collections/posts/premium/series/_posts/2018-11-01-docker-using-shared-folders.asciidoc +0 -86
@@ -1,10 +1,9 @@
1
1
  ---
2
2
  layout: page
3
3
 
4
- title: Blog Archive by Date
4
+ title: Posts by date
5
5
  tagline: Check out all blog posts grouped by month
6
6
 
7
- toc: true
8
7
  #permalink: /pages/private/blog/navigator/archive/dateview/
9
8
 
10
9
  resource_options:
@@ -19,13 +18,13 @@ regenerate: false
19
18
  ---
20
19
 
21
20
  {% comment %} Liquid procedures
22
- --------------------------------------------------------------- {% endcomment %}
21
+ -------------------------------------------------------------------------------- {% endcomment %}
23
22
  {% capture get_page_path %}themes/{{site.template.name}}/procedures/global/get_page_path.proc{% endcapture %}
24
23
  {% capture select_icon_size %}themes/{{site.template.name}}/procedures/global/select_icon_size.proc{% endcapture %}
25
24
  {% capture get_category_item %}themes/{{site.template.name}}/procedures/global/get_category_item.proc{% endcapture %}
26
25
 
27
26
  {% comment %} Variables
28
- --------------------------------------------------------------- {% endcomment %}
27
+ -------------------------------------------------------------------------------- {% endcomment %}
29
28
  {% assign view_config = site.data.builder.blog_navigator.date_view %}
30
29
  {% assign view_description = view_config.description %}
31
30
 
@@ -45,19 +44,10 @@ regenerate: false
45
44
  {% capture all_view %}{{page_path}}/{% endcapture %}
46
45
 
47
46
  {% comment %} Main
48
- --------------------------------------------------------------- {% endcomment %}
49
- <!-- <script>
50
- // TODO: Fix last_page settings and logging
51
- var logger = log4javascript.getLogger('j1.BlogNavigator');
52
- var cookieUserState = 'j1.user.state'
53
- j1_user_state.last_page = "{{browser_page_url}}"
54
- j1.setUserStateCookie( j1_user_state );
55
- logger.info('Save the current Post Browser page to cookie: ' +cookieUserState);
56
- </script> -->
57
-
47
+ -------------------------------------------------------------------------------- {% endcomment %}
58
48
  <!-- [INFO ] [ {{page.url}} ] [Generate HTML}] -->
59
49
  <div class="post-headline"> <h2 id="post-headline" class="mt-2">Posts By Date</h2></div>
60
- <div class="paginator">
50
+ <div class="paginator ml-3">
61
51
  <ul class="pagination raised-z0">
62
52
  <li class="page-item"><a class="page-link" href="{{navigator | prepend: site.baseurl}}" title="Blog View">Navigator</a></li>
63
53
  <li class="page-item"><a class="page-link" href="{{category_view | prepend: site.baseurl}}" title="View by Category">By Category</a></li>
@@ -80,19 +70,24 @@ regenerate: false
80
70
  {% capture monthHead %}
81
71
  {% if month != nmonth %}
82
72
  {% if forloop.index != 1 %}{{ closeList }}{%endif %}
83
- <h2 id="{{ 100000 | rand }}" class="toc-link mt-5 mb-4">{% if year != nyear %}<a id="{{ post.date | date: '%Y' }}"></a>{% endif %}<a id="{{ post.date | date: '%Y-%m' }}"></a><a title="Back to top" href="#"><i class="fa fa-calendar mr-3"></i></a>{{ post.date | date: '%B %Y' }}</h2>
73
+ <h3 id="{{ 100000 | rand }}" class="toc-link mt-5 mb-0">{% if year != nyear %}<a id="{{ post.date | date: '%Y' }}"></a>{% endif %}<a id="{{ post.date | date: '%Y-%m' }}"></a><a title="Back to top" href="#"><i class="fa fa-calendar mr-3"></i></a>{{ post.date | date: '%B %Y' }}</h3>
84
74
  {{ openList }}
85
75
  {% endif %}
86
76
  {% endcapture %}
87
77
 
88
78
  {% capture link %}
79
+ {% assign excerpt = post.excerpt | truncatewords: 50 | strip_html | strip_newlines | strip %}
89
80
  <li>
90
- <h3 id="{{ 100000 | rand }}" class="mt-3 mb-2"><a title="Read {{post.title|escape_once}}" href="{{site.baseurl}}{{post.url}}">{{post.title}}</a></h3>
91
- <small><time datetime="{{post.date|date_to_xmlschema}}"><i class="fa fa-calendar mr-2"></i>{{post.date|date: "%B %d, %Y"}}</time></small>
92
-
93
- <h5 class="notoc mt-4"><i class="fa fa-quote-left mr-3"></i>{{post.tagline}}</h5>
94
- <div class="service">
95
- <div class="desc"> <p>{{ post.excerpt }}</p> </div>
81
+ <div class="card card-flat">
82
+ <div class="card-body">
83
+ <!-- <span class="post-meta">{{post.date|date: "%B %d, %Y"}}</span> -->
84
+ <h4 id="{{ 100000 | rand }}" class="card-title">{{ post.title }}</h4>
85
+ <h5 class="notoc card-subtitle text-muted mb-2">{{ post.tagline }}</h5>
86
+ <div class="card-text"><p>{{ excerpt }}</p></div>
87
+ <div class="card-footer">
88
+ <a class="card-link" href="{{post.url}}#readmore" target="_blank">Read more ..</a>
89
+ </div>
90
+ </div>
96
91
  </div>
97
92
  </li>
98
93
  {% endcapture %}
@@ -105,19 +100,14 @@ regenerate: false
105
100
  </div>
106
101
 
107
102
  <!-- [INFO ] [j1.page.{{page.title}} ] [Save the current page to cookieUserState cookie: {{ browser_page_url }}] -->
103
+ {% comment %} Update cookie for lastpage
104
+ -------------------------------------------------------------------------------- {% endcomment %}
108
105
  <script type="text/javascript">
109
106
  function setLastPage() {
107
+ var logger = log4javascript.getLogger('j1.BlogNavigator');
110
108
  var user_state_last_page = "{{browser_page_url}}";
111
109
  j1.setUserStateCookie( {last_page:user_state_last_page} );
110
+ logger.info('Saved current Post Browser page to cookie: {{browser_page_url}}');
112
111
  }
113
112
  window.onload = setLastPage;
114
113
  </script>
115
- <!--
116
- <script>
117
- /* Manage the current page settings */
118
- $(document).ready(function() {
119
- var user_state_last_page = "{{browser_page_url}}";
120
- j1.setUserStateCookie( {last_page:user_state_last_page} );
121
- });
122
- </script>
123
- -->
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  layout: page
3
3
 
4
- title: Blog Archive by Tag
4
+ title: Posts by tag
5
5
  tagline: Check out all blog posts by tag
6
-
7
- toc: true
8
6
  #permalink: /pages/private/blog/navigator/archive/tagview/
9
7
 
8
+ skip_words: [ posts ]
9
+
10
10
  resource_options:
11
11
 
12
12
  - masthead:
@@ -18,13 +18,11 @@ resource_options:
18
18
  regenerate: false
19
19
  ---
20
20
 
21
- {% comment %} TODO
22
- logic for "letter_group_written == false" to be fixed
23
- --------------------------------------------------------------- {% endcomment %}
24
-
21
+ {% comment %} TODO: logic for "letter_group_written == false" to be fixed
22
+ -------------------------------------------------------------------------------- {% endcomment %}
25
23
 
26
24
  {% comment %} Liquid procedures
27
- --------------------------------------------------------------- {% endcomment %}
25
+ -------------------------------------------------------------------------------- {% endcomment %}
28
26
  {% capture get_page_path %}themes/{{site.template.name}}/procedures/global/get_page_path.proc{% endcapture %}
29
27
  {% capture select_icon_size %}themes/{{site.template.name}}/procedures/global/select_icon_size.proc{% endcapture %}
30
28
  {% capture get_category %}themes/{{site.template.name}}/procedures/global/get_category.proc{% endcapture %}
@@ -32,9 +30,9 @@ logic for "letter_group_written == false" to be fixed
32
30
  {% capture create_word_cloud %}themes/{{site.template.name}}/procedures/global/create_word_cloud.proc{% endcapture %}
33
31
 
34
32
  {% comment %} Variables
35
- --------------------------------------------------------------- {% endcomment %}
36
- {% assign view_config = site.data.builder.blog_navigator.tag_view %}
37
- {% assign view_description = view_config.description %}
33
+ -------------------------------------------------------------------------------- {% endcomment %}
34
+ {% assign view_config = site.data.builder.blog_navigator.tag_view %}
35
+ {% assign view_description = view_config.description %}
38
36
 
39
37
  {% if site.permalink == 'none' %}
40
38
  {% capture browser_page_url %}{{ page.url }}.html{% endcapture %}
@@ -43,15 +41,12 @@ logic for "letter_group_written == false" to be fixed
43
41
  {% endif %}
44
42
 
45
43
  {% comment %} jadams: skip_words needs to be configured by yaml data file
46
- --------------------------------------------------------------- {% endcomment %}
47
- {% assign skip_words = "posts" %}
48
- {% assign skip_word_array = skip_words | split:',' | sort %}
49
-
50
- {% assign letter_groups = "ab, cd, ef, gh, ij, kl, mn, op, qr, st, uvw, xyz" %}
51
- {% assign letter_groups = letter_groups | remove: ' ' %}
52
- {% assign letter_group_array = letter_groups | split:',' %}
53
- {% assign letter_group_counter = 0 %}
54
- {% assign letter_group_written = false %}
44
+ -------------------------------------------------------------------------------- {% endcomment %}
45
+ {% assign letter_groups = "ab, cd, ef, gh, ij, kl, mn, op, qr, st, uvw, xyz" %}
46
+ {% assign letter_groups = letter_groups | remove: ' ' %}
47
+ {% assign letter_group_array = letter_groups | split:',' %}
48
+ {% assign letter_group_counter = 0 %}
49
+ {% assign letter_group_written = false %}
55
50
 
56
51
  {% include {{get_page_path}} mode='absolute' %}
57
52
  {% assign navigator_path = page_path | remove_first:'archive' %}
@@ -63,115 +58,118 @@ logic for "letter_group_written == false" to be fixed
63
58
  {% capture tag_view %}{{page_path}}/tagview/{% endcapture %}
64
59
  {% capture all_view %}{{page_path}}/{% endcapture %}
65
60
 
66
- {% capture site_tag_list %}{% for tag in site.tags %}{{ tag | first }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}
67
- {% assign site_tag_list_array = site_tag_list | split:',' | sort %}
68
-
69
- {% comment %} Main
70
- --------------------------------------------------------------- {% endcomment %}
71
- <!-- <script>
72
- // TODO: Fix last_page settings and logging
73
- var logger = log4javascript.getLogger('j1.BlogNavigator');
74
- var cookieUserState = 'j1.user.state'
75
- j1_user_state.last_page = "{{browser_page_url}}"
76
- j1.setUserStateCookie( j1_user_state );
77
- logger.info('Save the current Post Browser page to cookie: ' +cookieUserState);
78
- </script> -->
79
-
80
- <!-- [INFO ] [ {{page.url}} ] [Generate HTML}] -->
81
- {% include {{create_word_cloud}} word_list=site_tag_list source="tags" skip_words=skip_words %}
61
+ {% comment %} TODO: skip_words should configured by yaml data file?
62
+ -------------------------------------------------------------------------------- {% endcomment %}
63
+ {% assign tags = site.tags | sort %}
64
+ {% capture site_tag_word_list %}{% for tag in site.tags %}{{ tag | first }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}
65
+ {% assign tags = site_tag_word_list | split:',' %}
66
+
67
+ {% for tag in tags %}
68
+ {% if page.skip_words contains tag %} {% continue %} {% endif %}
69
+ {% capture tag_list %}{{ tag_list | append: tag }}{% unless forloop.last %},{% endunless %}{% endcapture %}
70
+ {% endfor %}
71
+
72
+
73
+ {% comment %} Main
74
+ -------------------------------------------------------------------------------- {% endcomment %}
75
+ <!-- [INFO ] [ {{page.url}} ] [Generate HTML}] -->
76
+ {% include {{create_word_cloud}} word_list=tag_list source="tags" %}
77
+
78
+ <div class="paginator ml-3">
79
+ <ul class="pagination raised-z0">
80
+ <li class="page-item"><a class="page-link" href="{{navigator | prepend: site.baseurl}}" title="Blog View">Navigator</a></li>
81
+ <li class="page-item"><a class="page-link" href="{{date_view | prepend: site.baseurl}}" title="View by Date">By Date</a></li>
82
+ <li class="page-item"><a class="page-link" href="{{category_view | prepend: site.baseurl}}" title="View by Category">By Category</a></li>
83
+ <li class="page-item"><a class="page-link" href="{{all_view | prepend: site.baseurl}}" title="View All">All Posts</a></li>
84
+ </ul>
85
+ </div>
86
+
87
+ <div class="post-search-results col-md-10 col-sm-10 col-xs-11">
88
+ <div class="view-description mb-1">{{view_description}}</div>
89
+ <div class="post-headline"> <h2 id="post-headline" class="mt-5">Posts By Tag</h2></div>
90
+ {% assign letter_group = letter_group_array[letter_group_counter] %}
82
91
 
83
- <div class="post-headline"> <h2 id="post-headline" class="mt-2">Posts By Tag</h2></div>
84
- <div class="paginator">
85
- <ul class="pagination raised-z0">
86
- <li class="page-item"><a class="page-link" href="{{navigator | prepend: site.baseurl}}" title="Blog View">Navigator</a></li>
87
- <li class="page-item"><a class="page-link" href="{{date_view | prepend: site.baseurl}}" title="View by Date">By Date</a></li>
88
- <li class="page-item"><a class="page-link" href="{{category_view | prepend: site.baseurl}}" title="View by Category">By Category</a></li>
89
- <li class="page-item"><a class="page-link" href="{{all_view | prepend: site.baseurl}}" title="View All">All Posts</a></li>
90
- </ul>
91
- </div>
92
+ {% for item in (0..site.tags.size) %}{% unless forloop.last %}
93
+ {% capture this_word %}{{ word_array[item] | strip_newlines }}{% endcapture %}
92
94
 
93
- <div class="post-search-results col-md-10 col-sm-10 col-xs-11">
95
+ {% for skip_word in skip_word_array %}
96
+ {% if skip_word contains this_word %} {% assign skip = true %} {% else %} {% assign skip = false %} {% endif %}
97
+ {% if skip %} {% break %} {% endif %}
98
+ {% endfor %}
94
99
 
95
- <div class="view-description mb-5">{{view_description}}</div>
100
+ {% if skip %} {% continue %} {% endif %}
96
101
 
97
- {% assign letter_group = letter_group_array[letter_group_counter] %}
102
+ {% assign first_letter = this_word | slice: 0, 1 %}
103
+ {% assign first_letter = first_letter | downcase %}
98
104
 
99
- {% for item in (0..site.tags.size) %}{% unless forloop.last %}
100
- {% capture this_word %}{{ word_array[item] | strip_newlines }}{% endcapture %}
101
-
102
- {% for skip_word in skip_word_array %}
103
- {% if skip_word contains this_word %} {% assign skip = true %} {% else %} {% assign skip = false %} {% endif %}
104
- {% if skip %} {% break %} {% endif %}
105
- {% endfor %}
106
-
107
- {% if skip %} {% continue %} {% endif %}
108
-
109
- {% assign first_letter = this_word | slice: 0, 1 %}
110
- {% assign first_letter = first_letter | downcase %}
111
-
112
- {% if letter_group contains first_letter %}
113
- {% comment %} jadams, 2018-01-17: logic seems NOT work. Disabled.
114
- {% if letter_group_written == false %}
115
- <h2 id="id_{{letter_group}}" class="toc-link mt-5 mb-5"><a title="Back to top" href="#"><i class="fa fa-tags mr-2"></i></a>{{ letter_group | upcase }}</h2>
116
- {% assign letter_group_written = true %}
117
- {% endif %}
118
- ------------------------------------------------------- {% endcomment %}
119
- {% else %}
120
- {% assign letter_group_counter = letter_group_counter | plus:1 %}
121
- {% assign letter_group = letter_group_array[letter_group_counter] %}
122
- {% comment %} jadams, 2018-01-17: logic seems NOT work. Added workaround by checking if letter_group has a value {% endcomment %}
123
- {% if letter_group %}
124
- <h2 id="id_{{letter_group}}" class="toc-link mb-3"><a title="Back to top" href="#"><i class="fa fa-tags mr-2"></i></a>{{ letter_group | upcase }}</h2>
125
- {% endif %}
105
+ {% if letter_group contains first_letter %}
106
+ {% comment %} jadams, 2018-01-17: logic seems NOT work. Disabled.
107
+ --------------------------------------------------------------------------
108
+ <!-- jadams, 2018-01-17: logic seems NOT work. Disabled. -->
109
+ {% if letter_group_written == false %}
110
+ <h3 id="id_{{letter_group}}" class="toc-link mt-5 mb-5"><a title="Back to top" href="#"><i class="fa fa-tags mr-2"></i></a>{{ letter_group | upcase }}</h3>
126
111
  {% assign letter_group_written = true %}
127
112
  {% endif %}
128
-
129
- {% comment %}
130
- letter_group: {{ letter_group | debug }}
131
- this_word: {{ this_word | debug }}
132
- first_letter: {{ first_letter | debug }}
133
- {% endcomment %}
134
-
135
- <h3 id="{{this_word | replace: '+','_' | replace: ' ','_' | downcase }}" class="toc-link"><a title="Back to top" href="#"><i class="fa fa-tag mr-2"></i></a>{{ this_word }}</h3>
136
- <ul class="list-unstyled link-news">
137
- {% for post in site.tags[this_word] %}{% if post.title != null %}
138
- <li>
139
- {% include {{get_category}} post=post %}
140
- {% assign category = _category %}
141
-
142
- {% include {{get_category_item}} category=category %}
143
- {% include {{select_icon_size}} family=icon_family size=icon_size %}
144
- {% assign icon_size = size %}
145
-
146
- <!-- span class="post-category-icon"><i class="{{icon_family}} {{icon_family}}-{{icon_name}} {{icon_size}}"></i></span -->
147
- <h4 id="{{ 100000 | rand }}" class="mt-3 mb-2"><a title="Read {{post.title|escape_once}}" href="{{site.baseurl}}{{post.url}}">{{post.title}}</a></h4>
148
- <small><time datetime="{{post.date|date_to_xmlschema}}"><i class="fa fa-calendar mr-2"></i>{{post.date|date: "%B %d, %Y"}}</time></small>
149
-
150
- <h5 class="notoc mt-4"><i class="fa fa-quote-left mr-2"></i>{{post.tagline}}</h5>
151
- <div class="service">
152
- <div class="desc"> <p>{{ post.excerpt }}</p> </div>
153
- </div>
154
-
155
- </li>
156
- {% endif %}{% endfor %}
157
- </ul>
113
+ -------------------------------------------------------------------------- {% endcomment %}
114
+ {% else %}
115
+ {% assign letter_group_counter = letter_group_counter | plus:1 %}
116
+ {% assign letter_group = letter_group_array[letter_group_counter] %}
117
+
118
+ {% comment %} jadams, 2018-01-17: logic seems NOT work.
119
+ Added workaround by checking if letter_group has a value
120
+ -------------------------------------------------------------------------- {% endcomment %}
121
+ {% if letter_group %}
122
+ <h3 id="id_{{letter_group}}" class="toc-link mb-3">
123
+ <a title="Back to top" href="#">
124
+ <i class="fa fa-tags mr-2"></i>
125
+ </a>{{ letter_group | upcase }}
126
+ </h3>
127
+ {% endif %}
128
+ {% assign letter_group_written = true %}
129
+ {% endif %}
130
+
131
+ {% comment %}
132
+ letter_group: {{ letter_group | debug }}
133
+ this_word: {{ this_word | debug }}
134
+ first_letter: {{ first_letter | debug }}
135
+ {% endcomment %}
136
+
137
+ <h4 id="{{this_word | replace: '+','_' | replace: ' ','_' | downcase }}" class="toc-link"><a title="Back to top" href="#"><i class="fa fa-tag mr-2"></i></a>{{ this_word }}</h4>
138
+
139
+ {% for post in site.tags[this_word] %}{% if post.title != null %}
140
+ {% include {{get_category}} post=post %}
141
+ {% assign category = _category %}
142
+
143
+ {% include {{get_category_item}} category=category %}
144
+ {% include {{select_icon_size}} family=icon_family size=icon_size %}
145
+ {% assign icon_size = size %}
146
+
147
+ {% assign excerpt = post.excerpt | truncatewords: 50 | strip_html | strip_newlines | strip %}
148
+
149
+ <!-- place post -->
150
+ <div class="card card-flat">
151
+ <div class="card-body">
152
+ <!-- <span class="post-meta">{{post.date|date: "%B %d, %Y"}}</span> -->
153
+ <h5 id="{{ 100000 | rand }}" class="card-title">{{ post.title }}</h5>
154
+ <h6 class="notoc card-subtitle text-muted mb-2">{{ post.tagline }}</h6>
155
+ <div class="card-text"><p>{{ excerpt }}</p></div>
156
+ <div class="card-footer">
157
+ <a class="card-link" href="{{post.url}}#readmore" target="_blank">Read more ..</a>
158
+ </div>
159
+ </div>
160
+ </div>
161
+ {% endif %}{% endfor %}
158
162
  {% endunless %}{% endfor %}
159
- </div>
163
+ </div>
160
164
 
161
165
  <!-- [INFO ] [j1.page.{{page.title}} ] [Save the current page to cookieUserState cookie: {{ browser_page_url }}] -->
162
166
  <script type="text/javascript">
163
167
  function setLastPage() {
168
+ var logger = log4javascript.getLogger('j1.BlogNavigator');
164
169
  var user_state_last_page = "{{browser_page_url}}";
165
170
  j1.setUserStateCookie( {last_page:user_state_last_page} );
171
+ logger.info('Saved current Post Browser page to cookie: {{browser_page_url}}');
166
172
  }
167
173
  window.onload = setLastPage;
168
174
  </script>
169
- <!--
170
- <script>
171
- /* Manage the current page settings */
172
- $(document).ready(function() {
173
- var user_state_last_page = "{{browser_page_url}}";
174
- j1.setUserStateCookie( {last_page:user_state_last_page} );
175
- });
176
- </script>
177
- -->
175
+
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  layout: blog_archive
3
3
 
4
- title: Article Navigator
5
- tagline: Navigate all Blog Posts throughout this Site
4
+ title: Blog Navigator
5
+ tagline: Explore posts this site
6
6
  description: Page Generator
7
7
 
8
8
  tags: [ Blog, Navigator ]
@@ -0,0 +1,438 @@
1
+ ---
2
+ title: InstantSearch
3
+ tagline: Example Media
4
+ description: Using Algolia Index API for static sites
5
+
6
+ tags: []
7
+ resources: [ algolia ]
8
+ permalink: /pages/public/instantsearch/media/
9
+
10
+ resource_options:
11
+
12
+ - toccer:
13
+ collapseDepth: 2
14
+
15
+ - masthead:
16
+ opacity: 0.2
17
+ slides:
18
+ - url: /assets/images/widescreen/featured-1920x800.jpg
19
+ alt: featured-1920x800
20
+
21
+ regenerate: true
22
+ ---
23
+
24
+ // Enable the Liquid Preprocessor
25
+ //
26
+ //:page-liquid:
27
+
28
+ // Set other global page attributes here
29
+ // -------------------------------------------------------------------
30
+
31
+
32
+ == Site Search
33
+
34
+ lorem:sentences[2]
35
+
36
+ ++++
37
+ <header class="row">
38
+ <div><a href="https://community.algolia.com/instantsearch.js/" class="is-logo"><img src="logo-is.png" width="40"></a><a href="./" class="logo">You<i class="fa fa-youtube-play"></i></a></div>
39
+ <div class="searchbox-container">
40
+ <div class="input-group">
41
+ <input id="q" type="text" class="form-control"><span class="input-group-btn">
42
+ <button class="btn btn-default"><i class="fa fa-search"></i></button></span>
43
+ </div>
44
+ </div>
45
+ </header>
46
+ <section>
47
+ <aside>
48
+ <ul class="nav nav-list">
49
+ <li><a href=""><i class="fa fa-home"></i> Home</a></li>
50
+ <li class="separator"></li>
51
+ </ul>
52
+ <h5><i class="fa fa-chevron-right"></i> Genres</h5>
53
+ <div id="genres"></div>
54
+ <h5><i class="fa fa-chevron-right"></i> Ratings</h5>
55
+ <div id="ratings"></div>
56
+ <div class="thank-you">Data courtesy of <a href="https://www.imdb.com/">imdb.com</a></div>
57
+ </aside>
58
+ <article>
59
+ <div id="stats" class="text-right text-muted"></div>
60
+ <hr>
61
+ <div id="hits"></div>
62
+ <div id="pagination" class="text-center"></div>
63
+ </article>
64
+ </section>
65
+ ++++
66
+
67
+ ++++
68
+ <script>
69
+
70
+ var search = instantsearch({
71
+ appId: 'latency',
72
+ apiKey: '6be0576ff61c053d5f9a3225e2a90f76',
73
+ indexName: 'movies',
74
+ routing: true
75
+ });
76
+
77
+ search.addWidget(
78
+ instantsearch.widgets.searchBox({
79
+ container: '#q'
80
+ })
81
+ );
82
+
83
+ search.addWidget(
84
+ instantsearch.widgets.stats({
85
+ container: '#stats'
86
+ })
87
+ );
88
+
89
+ var hitTemplate =
90
+ '<div class="hit media">' +
91
+ '<div class="media-left">' +
92
+ '<div class="media-object" style="background-image: url(\'{{image}}\');"></div>' +
93
+ '</div>' +
94
+ '<div class="media-body">' +
95
+ '<h4 class="media-heading">{{{_highlightResult.title.value}}} {{#stars}}<span class="ais-star-rating--star{{^.}}__empty{{/.}}"></span>{{/stars}}</h4>' +
96
+ '<p class="year">{{year}}</p><p class="genre">{{#genre}}<span class="badge">{{.}}</span> {{/genre}}</p>' +
97
+ '</div>' +
98
+ '</div>';
99
+
100
+ var noResultsTemplate =
101
+ '<div class="text-center">No results found matching <strong>{{query}}</strong>.</div>';
102
+
103
+ search.addWidget(
104
+ instantsearch.widgets.hits({
105
+ container: '#hits',
106
+ hitsPerPage: 10,
107
+ templates: {
108
+ empty: noResultsTemplate,
109
+ item: hitTemplate
110
+ },
111
+ transformData: function(hit) {
112
+ hit.stars = [];
113
+ for (var i = 1; i <= 5; ++i) {
114
+ hit.stars.push(i <= hit.rating);
115
+ }
116
+ return hit;
117
+ }
118
+ })
119
+ );
120
+
121
+ search.addWidget(
122
+ instantsearch.widgets.pagination({
123
+ container: '#pagination',
124
+ cssClasses: {
125
+ root: 'pagination',
126
+ active: 'active'
127
+ }
128
+ })
129
+ );
130
+
131
+ search.addWidget(
132
+ instantsearch.widgets.refinementList({
133
+ container: '#genres',
134
+ attributeName: 'genre',
135
+ operator: 'and',
136
+ limit: 10,
137
+ cssClasses: {
138
+ list: 'nav nav-list',
139
+ count: 'badge pull-right',
140
+ active: 'active'
141
+ }
142
+ })
143
+ );
144
+
145
+ search.addWidget(
146
+ instantsearch.widgets.starRating({
147
+ container: '#ratings',
148
+ attributeName: 'rating',
149
+ cssClasses: {
150
+ list: 'nav',
151
+ count: 'badge pull-right'
152
+ }
153
+ })
154
+ );
155
+
156
+ search.start();
157
+
158
+ </script>
159
+ ++++
160
+
161
+
162
+ ++++
163
+ <style>
164
+
165
+ body {
166
+ min-height: 100%;
167
+ font-family: Roboto;
168
+ background: #F1F1F1;
169
+ }
170
+
171
+ a {
172
+ color: #333333;
173
+ }
174
+
175
+ hr {
176
+ margin: 10px 14px;
177
+ }
178
+
179
+ .is-logo {
180
+ float: left;
181
+ margin-left: 18px;
182
+ }
183
+
184
+ .logo {
185
+ margin-left: 15px;
186
+ font-size: 30px;
187
+ font-weight: bold;
188
+ float: left;
189
+ }
190
+
191
+ .logo:hover {
192
+ text-decoration: none;
193
+ }
194
+
195
+ .logo i {
196
+ margin-left: 5px;
197
+ color: #E91D00;
198
+ }
199
+
200
+ header {
201
+ background: #FFFFFF;
202
+ padding: 10px;
203
+ border-bottom: 1px solid #E8E8E8;
204
+ position: fixed;
205
+ top: 0;
206
+ left: 0;
207
+ right: 0;
208
+ z-index: 2;
209
+ }
210
+
211
+ header .searchbox-container {
212
+ margin-left: 240px;
213
+ max-width: 400px;
214
+ }
215
+
216
+ header .searchbox-container .ais-search-box {
217
+ max-width: inherit;
218
+ }
219
+
220
+ header .searchbox-container .ais-search-box #q {
221
+ border-radius: 0;
222
+ padding-bottom: 7px;
223
+ }
224
+
225
+ header .searchbox-container .input-group {
226
+ margin-top: 5px;
227
+ }
228
+
229
+ header .searchbox-container .input-group .form-control:focus {
230
+ outline: none;
231
+ box-shadow: none;
232
+ }
233
+
234
+ header .searchbox-container .input-group .input-group-btn button {
235
+ padding-left: 20px;
236
+ padding-right: 20px;
237
+ background: #F8F8F8;
238
+ border-radius: 0;
239
+ }
240
+
241
+ section {
242
+ background: #F1F1F1;
243
+ min-height: 100%;
244
+ z-index: 1;
245
+ }
246
+
247
+ section aside {
248
+ position: fixed;
249
+ top: 70px;
250
+ left: 0;
251
+ bottom: 10px;
252
+ width: 230px;
253
+ background: #FFFFFF;
254
+ border-right: 1px solid #E8E8E8;
255
+ }
256
+
257
+ section aside .nav {
258
+ margin: 0 20px;
259
+ }
260
+
261
+ section aside .nav li a {
262
+ display: block;
263
+ padding: 2px 10px;
264
+ margin: 10px 0;
265
+ }
266
+
267
+ section aside .nav li a:hover {
268
+ color: #FFFFFF;
269
+ background: #333333;
270
+ }
271
+
272
+ section aside .nav li.separator {
273
+ height: 1px;
274
+ background: #E8E8E8;
275
+ }
276
+
277
+ section aside h5 {
278
+ color: #CE1312;
279
+ margin-left: 30px;
280
+ text-transform: uppercase;
281
+ font-size: 10px;
282
+ margin-top: 20px;
283
+ }
284
+
285
+ section aside .badge {
286
+ font-size: .8em;
287
+ background: #BBBBBB;
288
+ position: relative;
289
+ top: 1px;
290
+ }
291
+
292
+ section aside #genres label {
293
+ display: block;
294
+ cursor: pointer;
295
+ padding: 4px 4px 4px 8px;
296
+ font-weight: normal;
297
+ font-size: .9em;
298
+ margin: 0 0 -1px;
299
+ }
300
+
301
+ section aside #genres label:hover {
302
+ color: #FFFFFF;
303
+ background: #333333;
304
+ }
305
+
306
+ section aside #genres label input {
307
+ display: none;
308
+ }
309
+
310
+ section aside #genres .active label {
311
+ border: 1px solid #CE1312;
312
+ margin-top: -1px;
313
+ }
314
+
315
+ section aside #genres .active .badge {
316
+ background: #333333;
317
+ }
318
+
319
+ section aside #ratings {
320
+ margin-left: 10px;
321
+ }
322
+
323
+ section aside #ratings .ais-stars-list--link {
324
+ font-size: .9em;
325
+ }
326
+
327
+ section aside #ratings .ais-stars-list--link:hover,
328
+ section aside #ratings .ais-stars-list--link:active,
329
+ section aside #ratings .ais-stars-list--link:focus {
330
+ text-decoration: none;
331
+ }
332
+
333
+ section aside #ratings .ais-stars-list--count {
334
+ font-size: 8px;
335
+ }
336
+
337
+ section aside #ratings .ais-star-rating--item {
338
+ margin-bottom: 6px;
339
+ }
340
+
341
+ section aside #ratings .ais-star-rating--item__active a {
342
+ color: #CE1312;
343
+ }
344
+
345
+ section article {
346
+ margin-top: 70px;
347
+ margin-bottom: 10px;
348
+ margin-left: 237px;
349
+ margin-right: 10px;
350
+ padding: 10px 0;
351
+ max-width: 100%;
352
+ background: #FFFFFF;
353
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
354
+ }
355
+
356
+ section article #stats {
357
+ padding-right: 14px;
358
+ font-size: .8em;
359
+ line-height: 24px;
360
+ }
361
+
362
+ section article #hits {
363
+ padding: 0 15px;
364
+ }
365
+
366
+ section article #pagination .pagination a {
367
+ background: #F8F8F8;
368
+ padding: 3px 8px;
369
+ color: #333333;
370
+ margin-right: 4px;
371
+ }
372
+
373
+ section article #pagination .pagination a.active {
374
+ border-color: #b5b5b5;
375
+ background: #E8E8E8;
376
+ }
377
+
378
+ section article #pagination .pagination a:hover {
379
+ border-color: #cfcfcf;
380
+ background: #ebebeb;
381
+ }
382
+
383
+ section article .hit {
384
+ margin-bottom: 10px;
385
+ height: 130px;
386
+ border: 1px solid #F3F3F3;
387
+ }
388
+
389
+ section article .hit em {
390
+ font-style: normal;
391
+ background: #FFFFD4;
392
+ text-decoration: underline;
393
+ }
394
+
395
+ section article .hit .media-object {
396
+ height: 130px;
397
+ width: 130px;
398
+ overflow: hidden;
399
+ background-size: contain;
400
+ background-repeat: no-repeat;
401
+ background-position: center center;
402
+ }
403
+
404
+ section article .hit .media-heading {
405
+ color: #167AC6;
406
+ font-weight: normal;
407
+ font-size: 18px;
408
+ }
409
+
410
+ section .thank-you {
411
+ font-size: .8em;
412
+ margin-top: 18px;
413
+ margin-left: 30px;
414
+ }
415
+
416
+ section .thank-you a {
417
+ color: #CE1312;
418
+ }
419
+
420
+ .ais-search-box--input {
421
+ padding-left: 14px;
422
+ }
423
+
424
+ .genre,
425
+ .year {
426
+ margin: 12px 0;
427
+ }
428
+
429
+ .year {
430
+ font-weight: bold;
431
+ }
432
+
433
+ .genre .badge {
434
+ background: #BBBBBB;
435
+ }
436
+
437
+ </style>
438
+ ++++