type-on-strap 2.4.6 → 2.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +44 -34
  3. data/_data/language.yml +3 -1
  4. data/_includes/blog/post_footer.liquid +57 -0
  5. data/_includes/default/head.liquid +13 -13
  6. data/_includes/default/navbar.liquid +9 -7
  7. data/_includes/default/search_input.liquid +50 -0
  8. data/_includes/social/cusdis.liquid +1 -1
  9. data/_layouts/default.html +7 -4
  10. data/_layouts/home.liquid +2 -4
  11. data/_layouts/page.liquid +24 -29
  12. data/_layouts/post.liquid +24 -74
  13. data/_sass/external/_font-awesome.scss +8 -16
  14. data/_sass/external/_katex.scss +5 -1146
  15. data/_sass/external/font-awesome/_animated.scss +142 -9
  16. data/_sass/external/font-awesome/_bordered-pulled.scss +13 -13
  17. data/_sass/external/font-awesome/_core.scss +28 -6
  18. data/_sass/external/font-awesome/_fixed-width.scss +2 -1
  19. data/_sass/external/font-awesome/_functions.scss +57 -0
  20. data/_sass/external/font-awesome/_icons.scss +7 -1459
  21. data/_sass/external/font-awesome/_list.scss +4 -4
  22. data/_sass/external/font-awesome/_mixins.scss +53 -34
  23. data/_sass/external/font-awesome/_rotated-flipped.scss +25 -18
  24. data/_sass/external/font-awesome/_screen-reader.scss +12 -3
  25. data/_sass/external/font-awesome/_shims.scss +640 -664
  26. data/_sass/external/font-awesome/_sizing.scss +16 -0
  27. data/_sass/external/font-awesome/_stacked.scss +5 -4
  28. data/_sass/external/font-awesome/_variables.scss +4923 -1409
  29. data/_sass/external/font-awesome/brands.scss +30 -0
  30. data/_sass/external/font-awesome/fontawesome.scss +21 -0
  31. data/_sass/external/font-awesome/regular.scss +26 -0
  32. data/_sass/external/font-awesome/solid.scss +26 -0
  33. data/_sass/external/font-awesome/v4-shims.scss +6 -1
  34. data/_sass/external/katex/katex.scss +1414 -0
  35. data/_sass/includes/_navbar.scss +6 -4
  36. data/_sass/includes/_share_buttons.scss +1 -1
  37. data/_sass/layouts/_posts.scss +1 -1
  38. data/assets/data/search.liquid +6 -27
  39. data/assets/fonts/font-awesome/fa-brands-400.ttf +0 -0
  40. data/assets/fonts/font-awesome/fa-brands-400.woff2 +0 -0
  41. data/assets/fonts/font-awesome/fa-regular-400.ttf +0 -0
  42. data/assets/fonts/font-awesome/fa-regular-400.woff2 +0 -0
  43. data/assets/fonts/font-awesome/fa-solid-900.ttf +0 -0
  44. data/assets/fonts/font-awesome/fa-solid-900.woff2 +0 -0
  45. data/assets/fonts/font-awesome/fa-v4compatibility.ttf +0 -0
  46. data/assets/fonts/font-awesome/fa-v4compatibility.woff2 +0 -0
  47. data/assets/js/main.min.js +5 -4
  48. data/assets/js/partials/cookie_consent_init.js +5 -0
  49. data/assets/js/partials/dark-mode.js +28 -18
  50. data/assets/js/vendor/katex.auto-render.min.js +1 -0
  51. data/assets/js/vendor/katex.min.js +1 -1
  52. data/assets/js/vendor/mermaid.min.js +830 -772
  53. metadata +14 -16
  54. data/_sass/external/font-awesome/_brands.scss +0 -23
  55. data/_sass/external/font-awesome/_larger.scss +0 -23
  56. data/_sass/external/font-awesome/_regular.scss +0 -23
  57. data/_sass/external/font-awesome/_solid.scss +0 -24
  58. data/assets/fonts/font-awesome/fa-brands-400.eot +0 -0
  59. data/assets/fonts/font-awesome/fa-brands-400.svg +0 -3717
  60. data/assets/fonts/font-awesome/fa-brands-400.woff +0 -0
  61. data/assets/fonts/font-awesome/fa-regular-400.eot +0 -0
  62. data/assets/fonts/font-awesome/fa-regular-400.svg +0 -801
  63. data/assets/fonts/font-awesome/fa-regular-400.woff +0 -0
  64. data/assets/fonts/font-awesome/fa-solid-900.eot +0 -0
  65. data/assets/fonts/font-awesome/fa-solid-900.svg +0 -5028
  66. data/assets/fonts/font-awesome/fa-solid-900.woff +0 -0
  67. data/assets/js/vendor/auto-render.min.js +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5ace9770fb50b11260a1db0d08ebe8ed2c4449d2fcb2d395366182842f84171f
4
- data.tar.gz: 108a885ba09192f3fbdb8211ba66430503bd1b552764ee90ab1654381891d002
3
+ metadata.gz: dba3ab6a8c633aac793ffc8297817c5e43c8d3178d60379b2fd93158a61e063f
4
+ data.tar.gz: 3a63ffd7c2a16ca9d784b14703c60405f68a4bdf19a2a8589b58a60864015954
5
5
  SHA512:
6
- metadata.gz: 0c3017dd0c517f2089252307095e838b557be3418941cb92908f439693bd1b7668fa6b8dd9fc3e587d5c63bc63d1ed45a379ad0fdf9c513b194cdbdac187c58c
7
- data.tar.gz: 14f34def7f989e3d753ba045e939c9824037d39b8a08e93cb337c3b5318ba6ccb774c4350e5ad1ad7a3e2a64971073c2a98575a9ebb16dd3c24a9a7bfe4346fb
6
+ metadata.gz: 159db5d9f28dcc7ce897b4a7cf4e36116f7a6d61e772096f7fd86fc5296b25757991c076106c2076cae10bf0684e753ac4508a420d23c0cd5c980f9c6b5c63ad
7
+ data.tar.gz: 077ebef49c8f68ed554d23075ff34ab66002fe6aa9fc28982805dde020feab142e922b6fbc05018395c4c49418b27099c968f92b85fd8fc44c3113f395b546f7
data/README.md CHANGED
@@ -6,7 +6,8 @@
6
6
 
7
7
  [![Default Type on Strap blog](https://github.com/Sylhare/Type-on-Strap/blob/master/assets/img/screenshot.png?raw=true)](https://sylhare.github.io/Type-on-Strap/)
8
8
 
9
- A free and open-source [Jekyll](https://jekyllrb.com) theme. Based on Rohan Chandra [type-theme](https://github.com/rohanchandra/type-theme) packed with extra features and easily customizable:
9
+ A free and open-source [Jekyll](https://jekyllrb.com) theme.
10
+ Based on Rohan Chandra [type-theme](https://github.com/rohanchandra/type-theme) packed with extra features and easily customizable:
10
11
 
11
12
  * Responsive design on all devices (🖥, 💻, 📱, ...)
12
13
  * Portfolio 🗂, Gallery 🖼 pages for your projects
@@ -46,7 +47,7 @@ Check out this tutorial: [Use as Ruby Gem](#use-as-ruby-gem-)
46
47
  Here are the main files of the template
47
48
 
48
49
  ```shell
49
- Type-on-Strap
50
+ ./Type-on-Strap
50
51
  ├── _includes # Theme includes
51
52
  ├── _layouts # Theme layouts (see below for details)
52
53
  ├── _portfolio # Collection of articles for the portfolio page
@@ -116,8 +117,8 @@ To configure the blog part and default plugins. Those plugins are validated by G
116
117
 
117
118
  #### Meta and Branding
118
119
 
119
- Meta variables hold basic information about your Jekyll site which will be used throughout the site
120
- and as meta properties that are used for search engines, browsers, and the site's RSS feed.
120
+ _Meta variables_ hold basic information about your Jekyll site, which will be used throughout the site
121
+ and as _meta properties_ that are used for search engines, browsers, and the site's RSS feed.
121
122
 
122
123
  Change these variables in `_config.yml`:
123
124
 
@@ -135,7 +136,7 @@ Using _auto_ you'll have a tiny icon in the navbar allowing the use to manually
135
136
 
136
137
  ### Theme customization 🎨
137
138
 
138
- #### Footer and Header's text
139
+ #### Footer and Header text
139
140
 
140
141
  Customize your site header/footer with these variables in `_config.yml`:
141
142
 
@@ -164,7 +165,7 @@ with suffix `-small` (620x320) and `-medium` (1240x640) to display on smaller sc
164
165
  Localization string is a way to quickly change the template language for text like *Next Post* or *Follow on*, ...
165
166
  You can find all the properties in `_data/language.yml`.
166
167
 
167
- By default, it is in english, but you can easily add your own language.
168
+ By default, it is in English, but you can easily add your own language.
168
169
 
169
170
  ### Google Analytics
170
171
 
@@ -193,10 +194,10 @@ comments:
193
194
 
194
195
  #### Cusdis
195
196
 
196
- [Cusdis](https://cusdis.com/) is an open source alternative to Disqus.
197
+ [Cusdis](https://cusdis.com/) is an open-source alternative to Disqus.
197
198
  You can read more about it in the [documentation](https://cusdis.com/doc#/)
198
199
 
199
- To enable it, set your cusdis name in `_config.yml`:
200
+ To enable it, set your Cusdis name in `_config.yml`:
200
201
 
201
202
  ```yaml
202
203
  comments:
@@ -275,7 +276,7 @@ You can also enable RSS.
275
276
  The site icons come from [Font Awesome](https://fontawesome.com/).
276
277
 
277
278
  In `_data/icons.yml` you can set the footer icon that will appear at the bottom of the page.
278
- They will redirect the user on your profile on the other platform like Twitter, GitHub and so many more!
279
+ They will redirect the user on your profile on to other platforms like Twitter, GitHub and so many more!
279
280
 
280
281
  ### Cookie consent
281
282
 
@@ -285,8 +286,8 @@ Once the user clicks on "Approve" the cookies will be created for Google Analyti
285
286
 
286
287
  #### Share in article
287
288
 
288
- The share icons are the one at the bottom of the blog page if enabled,
289
- to share the article on those platform.
289
+ The share icons are the one at the bottom of the blog page if enabled.
290
+ They will on click redirect you to the logo's platform to share the article.
290
291
 
291
292
  #### Footer
292
293
 
@@ -306,34 +307,39 @@ Please refer to the [Jekyll docs for writing posts](https://jekyllrb.com/docs/po
306
307
 
307
308
  #### Layout: Post
308
309
 
309
- These are the basic features you can use with the `post` layout.
310
+ These are the basic features you can use with the `post` layout, in the comment the `Opt` means that
311
+ it is optional.
310
312
 
311
313
  ```yml
312
314
 
313
315
  ---
314
316
  layout: post
315
317
  title: Hello World # Title of the page
316
- hide_title: true # Hide the title when displaying the post, but shown in lists of posts
317
- feature-img: "assets/img/sample.png" # Add a feature-image to the post
318
- thumbnail: "assets/img/thumbnails/sample-th.png" # Add a thumbnail image on blog view
319
- color: rgb(80,140,22) # Add the specified color as feature image, and change link colors in post
320
- bootstrap: true # Add bootstrap to the page
321
- tags: [sample, markdown, html]
318
+ hide_title: true # [Opt] Hide the title when displaying the post, but shown in lists of posts
319
+ feature-img: "assets/img/sample.png" # [Opt] Add a feature-image to the post
320
+ thumbnail: "assets/img/thumbnails/sample-th.png" # [Opt] Add a thumbnail image on blog view
321
+ color: rgb(80,140,22) # [Opt] Add the specified colour as feature image, and change link colors in post
322
+ position: 1 # [Opt] Set position on the menu navigation bar
323
+ tags: [sample, markdown, html] # [Opt] Add tags to the page
322
324
  ---
323
325
  ```
324
326
 
325
327
  With `thumbnail`, you can add a smaller image than the `feature-img`.
326
- If you don't have a thumbnail you can still use the same image as the feature one. Or use the gulp task to create it.
328
+ If you don't have a thumbnail, you can still use the same image as the feature one. Or use the gulp task to create it.
329
+
330
+ If you don't use a feature image, but `color`, the transparent background is set comes from `lineart.png`.
331
+ You can edit it in the config file (`_config.yml > color_image`). If you want another one, put it in `/assets/img` as well.
327
332
 
328
- The background used when `color` is set comes from `lineart.png` from [xukimseven](https://github.com/xukimseven)
329
- you can edit it in the config file (`_config.yml > color_image`). If you want another one, put it in `/assets/img` as well.
333
+ For position, if not set on all pages, it will be by alphabetical order without `position` then by `position` order.
334
+ If two pages have the same position number, the order is decided by alphabetical order on the page title.
330
335
 
331
- The **bootstrap** is not mandatory and is only useful if you want to add bootstrapped content in your page.
336
+ There's also `bootstrap: true` which is not mandatory and only useful if you want to add HTML content in your page that
337
+ requires [bootstrap](http://getbootstrap.com/).
332
338
  It will respect the page and theme layout, mind the padding on the sides.
333
339
 
334
340
  #### Post excerpt
335
341
 
336
- The [excerpt](https://jekyllrb.com/docs/posts/#post-excerpts) are the first lines of an article that is display on the blog page.
342
+ The [excerpt](https://jekyllrb.com/docs/posts/#post-excerpts) are the first lines of an article that is displayed on the blog page.
337
343
  The length of the excerpt has a default of around `250` characters or can be manually set in the post using:
338
344
 
339
345
  in `conflig.yml`:
@@ -407,7 +413,7 @@ If your posts are not displaying ensure that you have added the line `paginate:
407
413
 
408
414
  ### Layout: Page 📄
409
415
 
410
- The page layout have a bit more features explained here.
416
+ The page layout has a bit more features explained here.
411
417
 
412
418
  ```yml
413
419
 
@@ -423,7 +429,7 @@ tags: [sample, markdown, html]
423
429
  ---
424
430
  ```
425
431
 
426
- The hide only hides your page from the navigation bar, it is however still generated and can be access through its link.
432
+ The hide only hides your page from the navigation bar, it is, however, still generated and can be accessed through its link.
427
433
 
428
434
  ### Feature: Portfolio 🗂
429
435
 
@@ -443,9 +449,11 @@ title : Portfolio
443
449
 
444
450
  #### Portfolio posts
445
451
 
446
- You can format the portfolio posts in the `_portfolio` folder using the `post layout`. Here are little explaination on some of the possible feature you can use and what they will do.
452
+ You can format the portfolio posts in the `_portfolio` folder using the `post layout`.
453
+ Here is a little explanation on some of the possible features you can use.
447
454
 
448
- If you decide to use a date, please be sure to use one that can be parsed such as `yyyy-mm-dd`. You can see more format example on the demo posts that are available for the theme:
455
+ If you decide to use a date, please be sure to use one that can be parsed such as `yyyy-mm-dd`.
456
+ You can see more format examples in the demo posts that are available for the theme:
449
457
 
450
458
  ```yml
451
459
 
@@ -474,7 +482,7 @@ This creates the collection for Jekyll, so it can find and display your portfoli
474
482
 
475
483
  ### Feature: Gallery 🖼
476
484
 
477
- You can create a gallery using [Masonry JS](https://masonry.desandro.com/) which will placing the pictures in optimal position
485
+ You can create a gallery using [Masonry JS](https://masonry.desandro.com/) which will placing the pictures at the optimal position
478
486
  based on available vertical space.
479
487
  You need to specify the `gallery_path` which will be used to find the pictures to render.
480
488
  It will take all the pictures under that directory. Then use the `include` to add it in your page.
@@ -494,10 +502,12 @@ gallery: "assets/img/pexels"
494
502
 
495
503
  The search feature is based on [Simple-Jekyll-search](https://github.com/christian-fei/Simple-Jekyll-Search)
496
504
  there is a `search.liquid` file that will create a list of all the site posts, pages and portfolios.
505
+ Then there's a script displaying the formatted results in the _search page_.
497
506
 
498
- Then there's a `search.js` displaying the formatted results in the "search page".
499
-
500
- The search page can be hidden with the `hide` option. You can remove the icon by removing `icon`:
507
+ To exclude contents from the search add the `exclude: true` option in the markdown header.
508
+ By default, all posts, pages, and collections are available in the search.
509
+ Hide the search page from the navigation bar with the `hide: true` option.
510
+ You can remove the icon by removing `icon`:
501
511
 
502
512
  ```yml
503
513
 
@@ -526,7 +536,7 @@ tags: [sample, markdown, html]
526
536
 
527
537
  > Tags are case-sensitive `Tag_nAme` ≠ `tag_name`
528
538
 
529
- All the tags will be listed the tags page with a link toward the pages or posts.
539
+ All the tags will be listed on the "tags" page with a link toward the pages or posts.
530
540
  The Tag page can be hidden with the `hide` option. You can remove the icon by removing `icon` (like for the search page).
531
541
 
532
542
  ## Advanced
@@ -618,7 +628,7 @@ Then you can start adding content like:
618
628
 
619
629
  ### Remote Theme
620
630
 
621
- Now you can use any theme gem with GitHub pages with [29/11/2017 Github Pages Broadcast](https://github.com/blog/2464-use-any-theme-with-github-pages).
631
+ Now you can use any theme gem with GitHub pages with [29/11/2017 GitHub Pages Broadcast](https://github.com/blog/2464-use-any-theme-with-github-pages).
622
632
  For that remove all `theme:` attributes from `_config.yml` and add instead:
623
633
 
624
634
  ```yml
@@ -627,7 +637,7 @@ remote_theme: sylhare/Type-on-Strap
627
637
 
628
638
  ## License
629
639
 
630
- This theme is licensed under the [The MIT License (MIT)](/LICENSE)
640
+ This theme is licensed under the [MIT License (MIT)](/LICENSE)
631
641
 
632
642
  - Pictures from [Pexels](https://www.pexels.com/) are under Creative Commons Zero (CC0) license
633
643
  - Fonts are licensed under the [SIL Open Font License (OFL)](https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL)
data/_data/language.yml CHANGED
@@ -15,6 +15,8 @@ str_no_result_found: "No result found"
15
15
  str_cookie_approve: "Approve"
16
16
  str_cookie_disclaimer: "We would like to use third party cookies and scripts to improve the functionality of this website."
17
17
  str_months: [January, February, March, April, May, June, July, August, September, October, November, December]
18
+ str_dark: 'Dark'
19
+ str_light: 'Light'
18
20
 
19
- # Localization settings
21
+ # Localization settings
20
22
  cusdis_lang: # zh-cn, es, tr, pt-BR
@@ -0,0 +1,57 @@
1
+ {% assign color = include.color %}
2
+ {% assign img = include.img %}
3
+ {% capture _post_footer %}
4
+ <!-- To change color of links in the page -->
5
+ <style>
6
+ header#main {
7
+ background-size: cover;
8
+ background-repeat: no-repeat;
9
+ background-position: center;
10
+ }
11
+
12
+ {% if color != nil %}
13
+ .post-content a { color: {{ color }} !important; }
14
+ .share-buttons a { color: {{ color }} !important; }
15
+ .tag-list a:not(:hover) { color: {{ color }} !important; }
16
+ div#post-nav a { color: {{ color }} !important; }
17
+ footer a { color: {{ color }} !important; }
18
+ .site-header nav a:hover { color: {{ color }} !important; }
19
+ a.button:hover {
20
+ background: {{ color }} !important;
21
+ border: 1px solid {{ color }} !important;
22
+ color: white;
23
+ text-decoration: none;
24
+ filter: none;
25
+ }
26
+ header#main {
27
+ background-color: {{ color }} !important;
28
+ background-image: url('{{ site.color_image | relative_url }}');
29
+ }
30
+ {% endif %}
31
+
32
+ {% if img != nil %}
33
+ header#main { background-image: url('{{ img | relative_url }}'); }
34
+ {% endif %}
35
+ </style>
36
+
37
+ <!-- Post navigation -->
38
+ {% if site.post_navigation or site.theme_settings.post_navigation %}
39
+ {% include blog/post_nav.liquid %}
40
+ {% endif %}
41
+
42
+ <!--Utterances-->
43
+ {% if site.comments.utterances.repo and site.comments.utterances.issue-term %}
44
+ {% include social/utterances.liquid %}
45
+ {% endif %}
46
+
47
+ <!-- Cusdis -->
48
+ {% if site.comments.cusdis_app_id or site.cusdis_app_id %}
49
+ {% include social/cusdis.liquid %}
50
+ {% endif %}
51
+
52
+ <!-- Disqus -->
53
+ {% if site.comments.disqus_shortname or site.theme_settings.disqus_shortname or site.disqus_shortname %}
54
+ {% include social/disqus.liquid %}
55
+ {% endif %}
56
+ {% endcapture %}
57
+ {{ _post_footer | split: " " | join: " " }}
@@ -3,17 +3,17 @@
3
3
  <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=0.5, maximum-scale=5">
4
4
 
5
5
  <!-- Theme Mode-->
6
- {% if site.color_theme == 'auto' %}
7
6
  <script>
8
- const isAutoTheme = true;
9
- document.documentElement.setAttribute('data-theme', sessionStorage.getItem('theme'))
7
+ const darkBtn = "{{ site.data.language.str_dark | default: "Dark" }}";
8
+ const lightBtn = "{{ site.data.language.str_light | default: "Light" }}";
9
+ const isAutoTheme = {% if site.color_theme == 'auto' %}true{% else %}false{% endif %};
10
+ const preferredTheme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
11
+ if (isAutoTheme) {
12
+ document.documentElement.setAttribute('data-theme', sessionStorage.getItem('theme') ?? preferredTheme);
13
+ } else {
14
+ document.documentElement.setAttribute('data-theme', "{{ site.color_theme | default: 'light' }}");
15
+ }
10
16
  </script>
11
- {% else %}
12
- <script>
13
- const isAutoTheme = false;
14
- document.documentElement.setAttribute('data-theme', "{{ site.color_theme | default: 'light' }}")
15
- </script>
16
- {% endif %}
17
17
 
18
18
  <!-- Main JS (navbar.js, katex_init.js and masonry_init.js)-->
19
19
  <script defer src="{{ '/assets/js/main.min.js' | relative_url }}"></script>
@@ -35,13 +35,13 @@
35
35
  <script defer src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
36
36
  {% endif %}
37
37
 
38
- <!-- KaTeX 0.15.2 -->
38
+ <!-- KaTeX 0.16.9 -->
39
39
  {% if site.katex or site.theme_settings.katex %}
40
40
  <script defer src="{{ '/assets/js/vendor/katex.min.js' | relative_url }}"></script>
41
- <script defer src="{{ '/assets/js/vendor/auto-render.min.js' | relative_url }}" onload="renderMathInElement(document.body);"></script>
41
+ <script defer src="{{ '/assets/js/vendor/katex.auto-render.min.js' | relative_url }}" onload="renderMathInElement(document.body);"></script>
42
42
  {% endif %}
43
43
 
44
- <!-- Mermaid 9.1.1 -->
44
+ <!-- Mermaid 10.6.1 -->
45
45
  {% if site.mermaid %}
46
46
  <script defer src="{{ '/assets/js/vendor/mermaid.min.js' | relative_url }}" onload="mermaid.initialize({
47
47
  startOnLoad:true,
@@ -83,7 +83,7 @@
83
83
 
84
84
  <!-- Twitter Cards -->
85
85
  <meta name="twitter:title" content="{{ page.title | default: site.title }}">
86
- <meta name="twitter:description" content="{{ page.content | strip_html | strip_newlines | truncate: 160 | default: site.header_text}}">
86
+ <meta name="twitter:description" content="{{ page.content | default: site.header_text | strip_html | strip_newlines | truncate: 160 }}">
87
87
  {% if site.data.social.twitter %}
88
88
  <meta name="twitter:creator" content="@{{ site.data.social.twitter }}">
89
89
  <meta name="twitter:site" content="@{{ site.data.social.twitter }}">
@@ -21,18 +21,20 @@
21
21
  <!-- Menu -->
22
22
  <ul class="hide">
23
23
  {% assign name_page = "" %}
24
-
25
- {% for page in site.pages %}
26
- {% unless page.title == null or page.hide or name_page contains page.title %}
24
+ {% assign emptyArray = '' | split: '' %}
25
+ {% assign menus = site.data.menu | default: emptyArray %}
26
+ {% assign pages = site.pages | concat: menus | sort: 'position' %}
27
+ {% for page in pages %}
28
+ {% unless page.title == null or page.hide or name_page contains page.title %}
27
29
  <li class="separator"> | </li>
28
30
  <li>
29
31
  <a class="clear" aria-label="{{ page.title }}" title="{{ page.title }}" href="{{ page.url | relative_url }}">
30
- {% if page.icon %} <i class="fas {{ page.icon }}" aria-hidden="true"></i>
31
- {% else %} {{ page.title }} {% endif%}
32
+ {% if page.icon %} <i class="navbar-icon fas {{ page.icon }}" aria-hidden="true"></i>{% endif %}
33
+ <span class="navbar-label {% if page.icon %}navbar-label-with-icon{% endif%}">{{ page.title }}</span>
32
34
  </a>
33
35
  </li>
34
- {% endunless %}
35
- {% assign name_page = page.title | append: name_page %}
36
+ {% endunless %}
37
+ {% assign name_page = page.title | append: name_page %}
36
38
  {% endfor %}
37
39
 
38
40
  {% if site.color_theme == 'auto' %}
@@ -0,0 +1,50 @@
1
+ [
2
+ {% for post in site.posts %}
3
+ {
4
+ {% unless post.excluded %}
5
+ "title" : "{{ post.title | strip_newlines | escape }}",
6
+ "category" : "{{ post.category }}",
7
+ "tags" : "{{ post.tags | join: ', ' | prepend: " " }}",
8
+ "url" : "{{ post.url | relative_url }}",
9
+ "date" : "{{ post.date | date: "%B %-d, %Y" }}",
10
+ "excerpt" : {{ post.content | strip_html | strip_newlines | strip | escape | truncate: '250' | escape | jsonify }},
11
+ "content" : {{ post.content | strip_html | strip_newlines | strip | escape | jsonify }}
12
+ {% endunless %}
13
+ }{% unless forloop.last %},{% endunless %}
14
+ {% endfor %}
15
+ {% if site.pages.size > 0 %},{% endif %}
16
+ {% for page in site.pages %}
17
+ {
18
+ {% unless page.excluded or page.title == nil %}
19
+ "title" : "{{ page.title | strip_newlines | escape }}",
20
+ "category" : "{{ page.category }}",
21
+ "tags" : "{{ page.tags | join: ', ' | prepend: " " }}",
22
+ "url" : "{{ page.url | relative_url }}",
23
+ "date" : "{{ page.date | date: "%B %-d, %Y" | default: "N/A" }}",
24
+ "excerpt" : {{ page.content | strip_html | strip_newlines | strip | escape | truncate: '250' | escape | jsonify }},
25
+ "content" : {{ page.content | strip_html | strip_newlines | strip | escape | jsonify }}
26
+ {% endunless %}
27
+ }{% unless forloop.last %},{% endunless %}
28
+ {% endfor %}
29
+ {% if site.collections.size > 1 %},{% endif %}
30
+ {% for collection in site.collections %}
31
+ {% unless collection.label == 'posts' or site[collection.label].size == 0 %}
32
+ {% for page in site[collection.label] %}
33
+ {
34
+ {% if page.excluded or page.title != nil %}
35
+ "title" : "{{ page.title | strip_newlines | escape }}",
36
+ "category" : "{{ page.category }}",
37
+ "tags" : "{{ page.tags | join: ', ' | prepend: " " }}",
38
+ "url" : "{{ page.url | relative_url }}",
39
+ "date" : "{{ page.date | date: "%B %-d, %Y" | default: "N/A" }}",
40
+ "excerpt" : {{ page.content | strip_html | strip_newlines | strip | escape | truncate: '250' | jsonify }},
41
+ "content" : {{ page.content | strip_html | strip_newlines | strip | escape | jsonify }}
42
+ {% endif %}
43
+ }{% unless forloop.last %},{% endunless %}
44
+ {% endfor %}
45
+ {% else %}
46
+ {}
47
+ {% endunless %}
48
+ {% unless forloop.last %},{% endunless %}
49
+ {% endfor %}
50
+ ]
@@ -2,7 +2,7 @@
2
2
  data-host="https://cusdis.com"
3
3
  data-app-id="{% if site.comments.cusdis_app_id %}{{ site.comments.cusdis_app_id }}{% else %}{{ site.cusdis_app_id }}{% endif %}"
4
4
  data-page-id="{{ page.relative_path }}"
5
- data-page-url="{{ page.url }}"
5
+ data-page-url="{{ page.url | absolute_url }}"
6
6
  data-page-title="{{ page.title }}"
7
7
  data-theme="{{ site.color_theme }}"
8
8
  ></div>
@@ -1,16 +1,19 @@
1
1
  <!DOCTYPE html>
2
2
  <!--
3
- Type on Strap jekyll theme v2.4.6
3
+ Type on Strap jekyll theme v2.4.8
4
4
  Theme free for personal and commercial use under the MIT license
5
5
  https://github.com/sylhare/Type-on-Strap/blob/master/LICENSE
6
6
  -->
7
7
  <html lang="en">
8
- {% include default/head.liquid %}
8
+ {% capture _head %}{% include default/head.liquid %}{% endcapture %}
9
+ {{ _head | split: " " | join: " "}}
9
10
  <body>
10
- {% include default/navbar.liquid %}
11
+ {% capture _navbar %}{% include default/navbar.liquid %}{% endcapture %}
12
+ {{ _navbar | split: " " | join: " "}}
11
13
  <div class="content">
12
14
  {{ content }}
13
15
  </div>
14
- {% include default/footer.liquid %}
16
+ {% capture _footer %}{% include default/footer.liquid %}{% endcapture %}
17
+ {{ _footer | split: " " | join: " "}}
15
18
  </body>
16
19
  </html>
data/_layouts/home.liquid CHANGED
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  layout: default
3
3
  ---
4
-
5
4
  <div class="home">
6
5
  <style scoped>
7
6
  {% assign image = site.header_feature_image | relative_url | split: '.' %}
@@ -24,7 +23,6 @@ layout: default
24
23
  <div id="main" class="call-out call-out_img">
25
24
  <h1> {{ site.header_text | default: "Change <code>header_text</code> in <code>_config.yml</code>"}} </h1>
26
25
  </div>
27
-
28
- {% include blog/blog.liquid %}
29
-
26
+ {% capture _blog %}{% include blog/blog.liquid %}{% endcapture %}
27
+ {{ _blog | split: " " | join: " "}}
30
28
  </div>
data/_layouts/page.liquid CHANGED
@@ -1,35 +1,30 @@
1
1
  ---
2
2
  layout: default
3
3
  ---
4
-
5
4
  <article {% if page.feature-img %}class="feature-image"{% endif %}>
6
-
7
- <header id="main" style="background-image: url('{{ page.feature-img | relative_url }}')">
8
- <div class="title-padder">
9
- {% if page.hide_title %}
10
- <div class="feature-image-padding"></div>
11
- {% else %}
12
- <h1 id="{{ page.title | default: "" | cgi_escape }}" class="title"> {{ page.title }}</h1>
13
- {% if page.subtitle %}
14
- <h2 class="subtitle">{{ page.subtitle }}</h2>
5
+ <header id="main" style="background-image: url('{{ page.feature-img | relative_url }}')">
6
+ <div class="title-padder">
7
+ {% if page.hide_title %}
8
+ <div class="feature-image-padding"></div>
9
+ {% else %}
10
+ <h1 id="{{ page.title | default: "" | cgi_escape }}" class="title"> {{ page.title }}</h1>
11
+ {% if page.subtitle %}
12
+ <h2 class="subtitle">{{ page.subtitle }}</h2>
13
+ {% endif %}
14
+ {% endif %}
15
+ </div>
16
+ </header>
17
+ <section class="post-content">
18
+ {% if page.bootstrap %}
19
+ <div class="bootstrap-iso">
20
+ {% endif %}
21
+ {{ content }}
22
+ {% if page.bootstrap %}
23
+ </div>
15
24
  {% endif %}
16
- {% endif %}
17
- </div>
18
- </header>
19
-
20
- <section class="post-content">
21
- {% if page.bootstrap %}
22
- <div class="bootstrap-iso">
23
- {% endif %}
24
- {{ content }}
25
- {% if page.bootstrap %}
26
- </div>
27
- {% endif %}
28
- </section>
29
-
30
-
31
- <!-- Tag list for portfolio -->
32
- {% capture tag_list %}{{ page.tags | join: "|"}}{% endcapture %}
33
- {% include default/tags_list.liquid tags=tag_list %}
34
-
25
+ </section>
26
+ <!-- Tag list for portfolio -->
27
+ {% capture tag_list %}{{ page.tags | join: "|" }}{% endcapture %}
28
+ {% capture _tags %}{% include default/tags_list.liquid tags=tag_list %}{% endcapture %}
29
+ {{ _tags | split: " " | join: " " }}
35
30
  </article>
data/_layouts/post.liquid CHANGED
@@ -2,80 +2,30 @@
2
2
  layout: default
3
3
  ---
4
4
  <article {% if page.feature-img or page.color %}class="feature-image" {% endif %}>
5
- <header id="main" style="">
6
- <div class="title-padder">
7
- {% if page.hide_title %}
8
- <div class="feature-image-padding"></div>
9
- {% else %}
10
- <h1 id="{{ page.title | cgi_escape }}" class="title">{{ page.title }}</h1>
11
- {% include blog/post_info.liquid author=page.author date=page.date %}
12
- {% endif %}
13
- </div>
14
- </header>
15
-
16
- <section class="post-content">
17
- {% if page.bootstrap %}
18
- <div class="bootstrap-iso">
19
- {% endif %}
20
- {{ content }}
21
- {% if page.bootstrap %}
22
- </div>
23
- {% endif %}
24
- </section>
25
-
26
- <!-- Social media shares -->
27
- {% include social/share_buttons.liquid %}
28
-
29
- <!-- Tag list -->
30
- {% capture tag_list %}{{ page.tags | join: "|"}}{% endcapture %}
31
- {% include default/tags_list.liquid tags=tag_list %}
5
+ <header id="main" style="">
6
+ <div class="title-padder">
7
+ {% if page.hide_title %}
8
+ <div class="feature-image-padding"></div>
9
+ {% else %}
10
+ <h1 id="{{ page.title | cgi_escape }}" class="title">{{ page.title }}</h1>
11
+ {% include blog/post_info.liquid author=page.author date=page.date %}
12
+ {% endif %}
13
+ </div>
14
+ </header>
15
+
16
+ <section class="post-content">
17
+ {% if page.bootstrap %}<div class="bootstrap-iso">{% endif %}
18
+ {{ content }}
19
+ {% if page.bootstrap %}</div>{% endif %}
20
+ </section>
21
+
22
+ <!-- Social media shares -->
23
+ {% include social/share_buttons.liquid %}
24
+
25
+ <!-- Tag list -->
26
+ {% capture tag_list %}{{ page.tags | join: "|" }}{% endcapture %}
27
+ {% include default/tags_list.liquid tags=tag_list %}
32
28
 
33
29
  </article>
34
30
 
35
- <!-- Post navigation -->
36
- {% if site.post_navigation or site.theme_settings.post_navigation %}
37
- {% include blog/post_nav.liquid %}
38
- {% endif %}
39
-
40
- <!--Utterances-->
41
- {% if site.comments.utterances.repo and site.comments.utterances.issue-term %} {% include social/utterances.liquid %} {% endif %}
42
-
43
- <!-- Cusdis -->
44
- {% if site.comments.cusdis_app_id or site.cusdis_app_id %}{% include social/cusdis.liquid %}{% endif %}
45
-
46
- <!-- Disqus -->
47
- {% if site.comments.disqus_shortname or site.theme_settings.disqus_shortname or site.disqus_shortname %}
48
- {% include social/disqus.liquid %}{% endif %}
49
-
50
- <!-- To change color of links in the page -->
51
- <style>
52
- header#main {
53
- background-size: cover;
54
- background-repeat: no-repeat;
55
- background-position: center;
56
- }
57
-
58
- {% if page.color %}
59
- .post-content a { color: {{ page.color }} !important; }
60
- .share-buttons a { color: {{ page.color }} !important; }
61
- .tag-list a:not(:hover) { color: {{ page.color }} !important; }
62
- div#post-nav a { color: {{ page.color }} !important; }
63
- footer a { color: {{ page.color }} !important; }
64
- .site-header nav a:hover { color: {{ page.color }} !important; }
65
- a.button:hover {
66
- background: {{ page.color }} !important;
67
- border: 1px solid {{ page.color }} !important;
68
- color: white;
69
- text-decoration: none;
70
- filter: none;
71
- }
72
- header#main {
73
- background-color: {{ page.color }} !important;
74
- background-image: url('{{ site.color_image | relative_url }}');
75
- }
76
- {% endif %}
77
-
78
- {% if page.feature-img %}
79
- header#main { background-image: url('{{ page.feature-img | relative_url }}'); }
80
- {% endif %}
81
- </style>
31
+ {% include blog/post_footer.liquid color=page.color img=page.feature-img %}