type-on-strap 2.4.7 → 2.4.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +32 -23
  3. data/_data/language.yml +3 -1
  4. data/_includes/blog/post_footer.liquid +57 -0
  5. data/_includes/default/head.liquid +12 -12
  6. data/_includes/default/navbar.liquid +9 -7
  7. data/_includes/default/search_input.liquid +50 -0
  8. data/_layouts/default.html +7 -4
  9. data/_layouts/home.liquid +2 -4
  10. data/_layouts/page.liquid +24 -29
  11. data/_layouts/post.liquid +24 -74
  12. data/_sass/external/_font-awesome.scss +8 -16
  13. data/_sass/external/_katex.scss +5 -1146
  14. data/_sass/external/font-awesome/_animated.scss +142 -9
  15. data/_sass/external/font-awesome/_bordered-pulled.scss +13 -13
  16. data/_sass/external/font-awesome/_core.scss +28 -6
  17. data/_sass/external/font-awesome/_fixed-width.scss +2 -1
  18. data/_sass/external/font-awesome/_functions.scss +57 -0
  19. data/_sass/external/font-awesome/_icons.scss +7 -1459
  20. data/_sass/external/font-awesome/_list.scss +4 -4
  21. data/_sass/external/font-awesome/_mixins.scss +53 -34
  22. data/_sass/external/font-awesome/_rotated-flipped.scss +25 -18
  23. data/_sass/external/font-awesome/_screen-reader.scss +12 -3
  24. data/_sass/external/font-awesome/_shims.scss +640 -664
  25. data/_sass/external/font-awesome/_sizing.scss +16 -0
  26. data/_sass/external/font-awesome/_stacked.scss +5 -4
  27. data/_sass/external/font-awesome/_variables.scss +4923 -1409
  28. data/_sass/external/font-awesome/brands.scss +30 -0
  29. data/_sass/external/font-awesome/fontawesome.scss +21 -0
  30. data/_sass/external/font-awesome/regular.scss +26 -0
  31. data/_sass/external/font-awesome/solid.scss +26 -0
  32. data/_sass/external/font-awesome/v4-shims.scss +6 -1
  33. data/_sass/external/katex/katex.scss +1414 -0
  34. data/_sass/includes/_navbar.scss +6 -4
  35. data/_sass/includes/_share_buttons.scss +1 -1
  36. data/_sass/layouts/_posts.scss +1 -1
  37. data/assets/data/search.liquid +6 -27
  38. data/assets/fonts/font-awesome/fa-brands-400.ttf +0 -0
  39. data/assets/fonts/font-awesome/fa-brands-400.woff2 +0 -0
  40. data/assets/fonts/font-awesome/fa-regular-400.ttf +0 -0
  41. data/assets/fonts/font-awesome/fa-regular-400.woff2 +0 -0
  42. data/assets/fonts/font-awesome/fa-solid-900.ttf +0 -0
  43. data/assets/fonts/font-awesome/fa-solid-900.woff2 +0 -0
  44. data/assets/fonts/font-awesome/fa-v4compatibility.ttf +0 -0
  45. data/assets/fonts/font-awesome/fa-v4compatibility.woff2 +0 -0
  46. data/assets/js/main.min.js +3 -3
  47. data/assets/js/partials/cookie_consent_init.js +5 -0
  48. data/assets/js/partials/dark-mode.js +22 -18
  49. data/assets/js/vendor/katex.auto-render.min.js +1 -0
  50. data/assets/js/vendor/katex.min.js +1 -1
  51. data/assets/js/vendor/mermaid.min.js +830 -772
  52. metadata +14 -16
  53. data/_sass/external/font-awesome/_brands.scss +0 -23
  54. data/_sass/external/font-awesome/_larger.scss +0 -23
  55. data/_sass/external/font-awesome/_regular.scss +0 -23
  56. data/_sass/external/font-awesome/_solid.scss +0 -24
  57. data/assets/fonts/font-awesome/fa-brands-400.eot +0 -0
  58. data/assets/fonts/font-awesome/fa-brands-400.svg +0 -3717
  59. data/assets/fonts/font-awesome/fa-brands-400.woff +0 -0
  60. data/assets/fonts/font-awesome/fa-regular-400.eot +0 -0
  61. data/assets/fonts/font-awesome/fa-regular-400.svg +0 -801
  62. data/assets/fonts/font-awesome/fa-regular-400.woff +0 -0
  63. data/assets/fonts/font-awesome/fa-solid-900.eot +0 -0
  64. data/assets/fonts/font-awesome/fa-solid-900.svg +0 -5028
  65. data/assets/fonts/font-awesome/fa-solid-900.woff +0 -0
  66. data/assets/js/vendor/auto-render.min.js +0 -1
@@ -80,13 +80,11 @@ nav {
80
80
 
81
81
  &#pull {
82
82
  i {
83
- margin-top: 13px;
84
- margin-right: 10px;
83
+ margin-top: 22px;
84
+ margin-right: 18px;
85
85
  float: right;
86
86
  }
87
-
88
87
  }
89
-
90
88
  }
91
89
  }
92
90
 
@@ -96,6 +94,10 @@ nav {
96
94
  a#pull {
97
95
  display: none;
98
96
  }
97
+
98
+ .navbar-label-with-icon {
99
+ display: none;
100
+ }
99
101
  }
100
102
 
101
103
  @media screen and (max-width: $break) {
@@ -1,6 +1,6 @@
1
1
  ul.share-buttons {
2
2
  list-style: none;
3
- padding: $padding-x-small/2 0 $padding-x-small/4 0;
3
+ padding: 1.5% 0 0.75% 0;
4
4
  margin: 0;
5
5
  text-align: center;
6
6
 
@@ -99,7 +99,7 @@ header {
99
99
  header {
100
100
  color: var(--header-text);
101
101
  margin-bottom: 0;
102
- padding: $padding-large/2.5 $padding-large;
102
+ padding: 3.6% $padding-large;
103
103
 
104
104
  .meta {
105
105
  color: var(--header-text);
@@ -1,29 +1,8 @@
1
1
  ---
2
2
  ---
3
- [
4
- {% for post in site.posts %}
5
- {
6
- "title" : "{{ post.title | strip_newlines | escape }}",
7
- "category" : "{{ post.category }}",
8
- "tags" : "{{ post.tags | join: ', ' | prepend: " " }}",
9
- "url" : "{{ post.url | relative_url }}",
10
- "date" : "{{ post.date | date: "%B %-d, %Y" }}",
11
- "excerpt" : {{ post.content | strip_html | truncate: '250' | escape | jsonify }},
12
- "content" : {{ post.content | strip_html | escape | jsonify }}
13
- } {% unless forloop.last %},{% endunless %}
14
- {% endfor %}
15
- {% if site.portfolio.size > 0 %},{% endif %}
16
- {% for page in site.portfolio %}
17
- {
18
- {% if 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" }}",
24
- "excerpt" : {{ page.content | strip_html | truncate: '250' | jsonify }},
25
- "content" : {{ page.content | strip_html | escape | jsonify }}
26
- {% endif %}
27
- } {% unless forloop.last %},{% endunless %}
28
- {% endfor %}
29
- ]
3
+ {% comment %}
4
+ The json is created in search_input.liquid and included here to be compresed
5
+ {% endcomment %}
6
+ {% capture _search %}{% include default/search_input.liquid %}{% endcapture %}
7
+ {% assign emptyField = '{ },' %}
8
+ {{ _search | split: " " | join: " " | remove: emptyField }}
@@ -1,6 +1,6 @@
1
1
  /* @preserve Cookie Consent Init */
2
- function createCookie(e,t,o){var n="";if(o){var i=new Date;i.setTime(i.getTime()+24*o*60*60*1e3),n="; expires="+i.toUTCString()}document.cookie=`${e}=${t}${n}; path=/`}function readCookie(e){for(var t=e+"=",o=document.cookie.split(";"),n=0;n<o.length;n++){for(var i=o[n];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return i.substring(t.length,i.length)}return null}function addCookieConsentListener(){document.getElementById("cookie-notice-accept").addEventListener("click",(function(){createCookie(cookieName,"true",31),document.getElementById("cookie-notice").style.display="none",location.reload()}))}function googleAnalytics(){if(""!==analyticsName.toLowerCase()){function e(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],e("js",new Date),e("config",analyticsName,{anonymize_ip:!0}),analyticsNameGA4&&e("config",analyticsNameGA4,{anonymize_ip:!0})}}"true"===isCookieConsent.toLowerCase()?(addCookieConsentListener(),"true"===readCookie(cookieName)?googleAnalytics():document.getElementById("cookie-notice").style.display="block"):googleAnalytics()
3
- /* @preserve Dark mode Init */;const themeButton={light:'<i class="fas fa-adjust" aria-hidden="true"></i>',dark:'<i class="fas fa-adjust fa-rotate-180" aria-hidden="true"></i>'},currentTheme=()=>localStorage.getItem("theme");function setMode(e){document.documentElement.setAttribute("data-theme",e),localStorage.setItem("theme",e);const t=document.getElementById("theme-toggle");t&&(t.innerHTML=themeButton[e])}function themeToggle(){setMode("light"===currentTheme()?"dark":"light")}function bootstrapTheme(){if(isAutoTheme){if(!currentTheme()){let e=window.matchMedia("(prefers-color-scheme: dark)");e.matches&&localStorage.setItem("theme","dark"),e.addEventListener("change",(()=>{e.matches&&localStorage.setItem("theme","dark")}))}let e=currentTheme();setMode(e||"light")}}bootstrapTheme();
2
+ function createCookie(e,t,n){var o="";if(n){var a=new Date;a.setTime(a.getTime()+24*n*60*60*1e3),o="; expires="+a.toUTCString()}document.cookie=`${e}=${t}${o}; path=/`}function readCookie(e){for(var t=e+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){for(var a=n[o];" "===a.charAt(0);)a=a.substring(1,a.length);if(0===a.indexOf(t))return a.substring(t.length,a.length)}return null}function addCookieConsentListener(){document.getElementById("cookie-notice-accept").addEventListener("click",(function(){createCookie(cookieName,"true",31),document.getElementById("cookie-notice").style.display="none",location.reload()}))}function googleAnalytics(){if(""!==analyticsName.toLowerCase()){function e(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],e("js",new Date),e("config",analyticsName,{anonymize_ip:!0}),analyticsNameGA4&&e("config",analyticsNameGA4,{anonymize_ip:!0})}}"true"===isCookieConsent.toLowerCase()?(addCookieConsentListener(),"true"===readCookie(cookieName)?googleAnalytics():document.getElementById("cookie-notice").style.display="block"):googleAnalytics()
3
+ /* @preserve Dark mode Init */;const themeButton={light:`<i class="fas fa-adjust" aria-hidden="true"></i><span class="navbar-label-with-icon"> ${darkBtn}</span>`,dark:`<i class="fas fa-adjust fa-rotate-180" aria-hidden="true"></i><span class="navbar-label-with-icon"> ${lightBtn}</span>`};function currentTheme(){return localStorage.getItem("theme")}function setMode(e){document.documentElement.setAttribute("data-theme",e),localStorage.setItem("theme",e);const t=document.getElementById("theme-toggle");t&&(t.innerHTML=themeButton[e])}function themeToggle(){setMode("light"===currentTheme()?"dark":"light")}function bootstrapTheme(){if(isAutoTheme){if(!currentTheme()){let e=window.matchMedia("(prefers-color-scheme: dark)");e.matches&&localStorage.setItem("theme","dark"),e.addEventListener("change",(()=>{e.matches&&localStorage.setItem("theme","dark")}))}let e=currentTheme();setMode(e||"light")}}bootstrapTheme();
4
4
  /* @preserve Masonry Init */
5
5
  try{var elem=document.querySelector(".grid"),msnry=new Masonry(elem,{itemSelector:".grid-item",columnWidth:".grid-sizer",gutter:".gutter-sizer",percentPosition:!0}),imgLoad=imagesLoaded(elem);imgLoad.on("progress",(function(e,t){msnry.layout()}))}catch(e){if(!(e instanceof ReferenceError))throw e}
6
- /* @preserve Navbar */document.addEventListener("DOMContentLoaded",(function(e){const t=document.getElementById("pull"),o=document.querySelector("nav ul");["click","touch"].forEach((function(e){t?.addEventListener(e,(function(){o.classList.toggle("hide")}),!1)})),window.addEventListener("scroll",(function(){const e=-(window.scrollY||window.pageYOffset||document.body.scrollTop)/3,t=document.getElementById("main");t&&(t.style.backgroundPosition="100% "+(e-50)+"px, 0%, center top")}))}));
6
+ /* @preserve Navbar */document.addEventListener("DOMContentLoaded",(function(e){const t=document.getElementById("pull"),n=document.querySelector("nav ul");["click","touch"].forEach((function(e){t?.addEventListener(e,(function(){n.classList.toggle("hide")}),!1)})),window.addEventListener("scroll",(function(){const e=-(window.scrollY||window.pageYOffset||document.body.scrollTop)/3,t=document.getElementById("main");t&&(t.style.backgroundPosition="100% "+(e-50)+"px, 0%, center top")}))}));
@@ -1,4 +1,9 @@
1
1
  /* @preserve Cookie Consent Init */
2
+ /*
3
+ * This script is used to display a cookie consent banner.
4
+ * The variables isCookieConsent, cookieName, analyticsName are defined in head.liquid from the _config.yml
5
+ * The variables cookieNotice and cookieNoticeAccept are defined in head.liquid from the _data/translations.yml
6
+ */
2
7
  function createCookie(name, value, days) {
3
8
  var expires = "";
4
9
  if (days) {
@@ -1,32 +1,37 @@
1
1
  /* @preserve Dark mode Init */
2
2
  /*
3
- * There are two color palettes on CSS for the data-theme: 'light' and 'dark'.
4
- * Initially the script check if a theme is set in session storage and
3
+ * There are two colour palettes on CSS for the data-theme: 'light' and 'dark'.
4
+ * Initially the script checks if a theme is set in session storage and
5
5
  * alternatively listens to a MediaQuery callback looking for "prefers-color-scheme: dark".
6
+ *
7
+ * The variables darkBtn and lightBtn are defined in head.liquid from the _data/translations.yml
8
+ * The isAutoTheme is defined in head.liquid from the _config.yml
6
9
  */
7
10
 
8
11
  const themeButton = {
9
- 'light': '<i class="fas fa-adjust" aria-hidden="true"></i>',
10
- 'dark': '<i class="fas fa-adjust fa-rotate-180" aria-hidden="true"></i>'
11
- }
12
+ 'light': `<i class="fas fa-adjust" aria-hidden="true"></i><span class="navbar-label-with-icon"> ${darkBtn}</span>`,
13
+ 'dark': `<i class="fas fa-adjust fa-rotate-180" aria-hidden="true"></i><span class="navbar-label-with-icon"> ${lightBtn}</span>`
14
+ };
12
15
 
13
- const currentTheme = () => localStorage.getItem('theme')
16
+ function currentTheme(){
17
+ return localStorage.getItem('theme');
18
+ }
14
19
 
15
20
  function setMode(theme) {
16
- document.documentElement.setAttribute('data-theme', theme)
17
- localStorage.setItem('theme', theme)
18
- const toggle = document.getElementById('theme-toggle')
21
+ document.documentElement.setAttribute('data-theme', theme);
22
+ localStorage.setItem('theme', theme);
23
+ const toggle = document.getElementById('theme-toggle');
19
24
  if (toggle) {
20
- toggle.innerHTML = themeButton[theme]
25
+ toggle.innerHTML = themeButton[theme];
21
26
  }
22
27
  }
23
28
 
24
29
  function themeToggle() {
25
- let sessionPrefers = currentTheme()
30
+ let sessionPrefers = currentTheme();
26
31
  if (sessionPrefers === 'light') {
27
- setMode('dark')
32
+ setMode('dark');
28
33
  } else {
29
- setMode('light')
34
+ setMode('light');
30
35
  }
31
36
  }
32
37
 
@@ -37,17 +42,16 @@ function bootstrapTheme() {
37
42
  let browserPrefersDark = window.matchMedia('(prefers-color-scheme: dark)');
38
43
  if (browserPrefersDark.matches) localStorage.setItem('theme', 'dark');
39
44
  browserPrefersDark.addEventListener('change', () => {
40
- if (browserPrefersDark.matches) localStorage.setItem('theme', 'dark')
45
+ if (browserPrefersDark.matches) localStorage.setItem('theme', 'dark');
41
46
  });
42
47
  }
43
-
44
48
  // Load theme
45
- let sessionPrefers = currentTheme()
46
- setMode(sessionPrefers ? sessionPrefers : 'light')
49
+ let sessionPrefers = currentTheme();
50
+ setMode(sessionPrefers ? sessionPrefers : 'light');
47
51
  }
48
52
  }
49
53
 
50
54
  // Init
51
55
  (function () {
52
56
  bootstrapTheme();
53
- })()
57
+ })()
@@ -0,0 +1 @@
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):"object"==typeof exports?exports.renderMathInElement=t(require("katex")):e.renderMathInElement=t(e.katex)}("undefined"!=typeof self?self:this,(function(e){return function(){"use strict";var t={771:function(t){t.exports=e}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var a=r[e]={exports:{}};return t[e](a,a.exports,n),a.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var i={};return function(){n.d(i,{default:function(){return s}});var e=n(771),t=n.n(e),r=function(e,t,r){for(var n=r,i=0,a=e.length;n<t.length;){var o=t[n];if(i<=0&&t.slice(n,n+a)===e)return n;"\\"===o?n++:"{"===o?i++:"}"===o&&i--,n++}return-1},a=/^\\begin{/,o=function(e,t){for(var n,i=[],o=new RegExp("("+t.map((function(e){return e.left.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")})).join("|")+")");-1!==(n=e.search(o));){n>0&&(i.push({type:"text",data:e.slice(0,n)}),e=e.slice(n));var l=t.findIndex((function(t){return e.startsWith(t.left)}));if(-1===(n=r(t[l].right,e,t[l].left.length)))break;var d=e.slice(0,n+t[l].right.length),s=a.test(d)?d:e.slice(t[l].left.length,n);i.push({type:"math",data:s,rawData:d,display:t[l].display}),e=e.slice(n+t[l].right.length)}return""!==e&&i.push({type:"text",data:e}),i},l=function(e,r){var n=o(e,r.delimiters);if(1===n.length&&"text"===n[0].type)return null;for(var i=document.createDocumentFragment(),a=0;a<n.length;a++)if("text"===n[a].type)i.appendChild(document.createTextNode(n[a].data));else{var l=document.createElement("span"),d=n[a].data;r.displayMode=n[a].display;try{r.preProcess&&(d=r.preProcess(d)),t().render(d,l,r)}catch(e){if(!(e instanceof t().ParseError))throw e;r.errorCallback("KaTeX auto-render: Failed to parse `"+n[a].data+"` with ",e),i.appendChild(document.createTextNode(n[a].rawData));continue}i.appendChild(l)}return i},d=function e(t,r){for(var n=0;n<t.childNodes.length;n++){var i=t.childNodes[n];if(3===i.nodeType){for(var a=i.textContent,o=i.nextSibling,d=0;o&&o.nodeType===Node.TEXT_NODE;)a+=o.textContent,o=o.nextSibling,d++;var s=l(a,r);if(s){for(var f=0;f<d;f++)i.nextSibling.remove();n+=s.childNodes.length-1,t.replaceChild(s,i)}else n+=d}else 1===i.nodeType&&function(){var t=" "+i.className+" ";-1===r.ignoredTags.indexOf(i.nodeName.toLowerCase())&&r.ignoredClasses.every((function(e){return-1===t.indexOf(" "+e+" ")}))&&e(i,r)}()}},s=function(e,t){if(!e)throw new Error("No element provided to render");var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);r.delimiters=r.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],r.ignoredTags=r.ignoredTags||["script","noscript","style","textarea","pre","code","option"],r.ignoredClasses=r.ignoredClasses||[],r.errorCallback=r.errorCallback||console.error,r.macros=r.macros||{},d(e,r)}}(),i=i.default}()}));