type-on-strap 2.3.11 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -1
- data/_includes/default/head.liquid +1 -1
- data/_layouts/default.html +1 -1
- data/_layouts/home.liquid +19 -3
- data/_sass/layouts/_blog.scss +6 -6
- data/assets/js/main.min.js +1 -1
- data/assets/js/partials/navbar.js +3 -3
- data/assets/js/vendor/mermaid.min.js +2 -32
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8389a7d6ea215d30a665c55a1395631f0fc555772ed192956637b81390cd36d6
|
4
|
+
data.tar.gz: 7bb8bef255c863b833801b5c6005c49c33a7c0d9d438f1733b3072685fa3f202
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f4da0e9cc2b2447859de17a193b26bede24f02a8f78be88556c44ab4f8cdceac7a57fc101959ebccf5707fb7e3b5a6734548641e4ee359f9be4a0f3bb119e92
|
7
|
+
data.tar.gz: 12acd5e8c2b5e807489bbffb5a9472c4488fbacf5af2be3daf396b65231f627d17f82b40df03f0b875e13e6417f3af9fee0f1d631c0d1585ea0e3e9f996744ff
|
data/README.md
CHANGED
@@ -141,12 +141,24 @@ Customize your site header/footer with these variables in `_config.yml`:
|
|
141
141
|
|
142
142
|
```yml
|
143
143
|
header_text: Welcome to my Jekyll blog
|
144
|
-
header_feature_image: assets/img/sample3.png
|
145
144
|
footer_text: Copyright 2017
|
146
145
|
```
|
147
146
|
|
148
147
|
If you don't want anything, replace the value by `" "`.
|
149
148
|
|
149
|
+
#### Header's image
|
150
|
+
|
151
|
+
The header's image (tested with 2480x1280) can be set as one image with `header_feature_image`
|
152
|
+
but can also be responsive:
|
153
|
+
|
154
|
+
```yml
|
155
|
+
header_feature_image: assets/img/header/my-header-image.png
|
156
|
+
header_feature_image_responsive: true
|
157
|
+
```
|
158
|
+
|
159
|
+
By setting `header_feature_image_responsive` to true, it will look for images
|
160
|
+
with suffix `-small` (620x320) and `-medium` (1240x640) to display on smaller screen.
|
161
|
+
|
150
162
|
#### Localisation string
|
151
163
|
|
152
164
|
Localization string is a way to quickly change the template language for text like *Next Post* or *Follow on*, ...
|
@@ -41,7 +41,7 @@
|
|
41
41
|
<script defer src="{{ '/assets/js/vendor/auto-render.min.js' | relative_url }}" onload="renderMathInElement(document.body);"></script>
|
42
42
|
{% endif %}
|
43
43
|
|
44
|
-
<!-- Mermaid 8.
|
44
|
+
<!-- Mermaid 8.13.10 -->
|
45
45
|
{% if site.mermaid %}
|
46
46
|
<script defer src="{{ '/assets/js/vendor/mermaid.min.js' | relative_url }}" onload="mermaid.initialize({startOnLoad:true});"></script>
|
47
47
|
{% endif %}
|
data/_layouts/default.html
CHANGED
data/_layouts/home.liquid
CHANGED
@@ -3,9 +3,25 @@ layout: default
|
|
3
3
|
---
|
4
4
|
|
5
5
|
<div class="home">
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
<style scoped>
|
7
|
+
{% assign image = site.header_feature_image | relative_url | split: '.' %}
|
8
|
+
.call-out_img {
|
9
|
+
background-image: url('{{ image | join: '.' }}');
|
10
|
+
}
|
11
|
+
{% if site.header_feature_image_responsive %}
|
12
|
+
@media screen and (max-width: 768px) {
|
13
|
+
.call-out_img {
|
14
|
+
background-image: url('{{ image[0] | append: '-medium.' | append: image[1] | default: image}}');
|
15
|
+
}
|
16
|
+
}
|
17
|
+
@media screen and (max-width: 576px) {
|
18
|
+
.call-out_img {
|
19
|
+
background-image: url('{{ image[0] | append: '-small.' | append: image[1] }}');
|
20
|
+
}
|
21
|
+
}
|
22
|
+
{% endif %}
|
23
|
+
</style>
|
24
|
+
<div id="main" class="call-out call-out_img">
|
9
25
|
<h1> {{ site.header_text | default: "Change <code>header_text</code> in <code>_config.yml</code>"}} </h1>
|
10
26
|
</div>
|
11
27
|
|
data/_sass/layouts/_blog.scss
CHANGED
@@ -17,20 +17,20 @@
|
|
17
17
|
}
|
18
18
|
|
19
19
|
/* --- Responsive --- */
|
20
|
-
@media screen and (
|
21
|
-
background-size:
|
20
|
+
@media screen and (max-width: $m-break) {
|
21
|
+
background-size: 170% auto;
|
22
22
|
}
|
23
23
|
|
24
|
-
@media screen and (max-width:
|
24
|
+
@media screen and (max-width: 450px) {
|
25
25
|
background-size: 200% auto;
|
26
26
|
}
|
27
27
|
|
28
|
-
@media screen and (max-width:
|
28
|
+
@media screen and (max-width: 400px) {
|
29
29
|
background-size: 250% auto;
|
30
30
|
}
|
31
31
|
|
32
|
-
@media screen and (max-width:
|
33
|
-
background-size:
|
32
|
+
@media screen and (max-width: 380px) {
|
33
|
+
background-size: 280% auto;
|
34
34
|
}
|
35
35
|
|
36
36
|
p:last-child {
|
data/assets/js/main.min.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
function createCookie(e,t,o){var n,i="";o&&((n=new Date).setTime(n.getTime()+24*o*60*60*1e3),i="; expires="+n.toUTCString()),document.cookie=`${e}=${t}${i}; 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(){function e(){dataLayer.push(arguments)}""!==analyticsName.toLowerCase()&&(window.dataLayer=window.dataLayer||[],e("js",new Date),e("config",analyticsName),window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create",analyticsName,"auto"),ga("send","pageview"))}"true"===isCookieConsent.toLowerCase()?(addCookieConsentListener(),"true"===readCookie(cookieName)?googleAnalytics():document.getElementById("cookie-notice").style.display="block"):googleAnalytics();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=()=>sessionStorage.getItem("theme");function setMode(e){document.documentElement.setAttribute("data-theme",e),sessionStorage.setItem("theme",e),document.getElementById("theme-toggle").innerHTML=themeButton[e]}function themeToggle(){setMode("light"===currentTheme()?"dark":"light")}window.onload=function(){if(isAutoTheme){if(!currentTheme()){let e=window.matchMedia("(prefers-color-scheme: dark)");e.addEventListener("change",()=>{e.matches&&sessionStorage.setItem("theme","dark")})}var e=currentTheme();setMode(e||"light")}};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}document.addEventListener("DOMContentLoaded",function(e){
|
1
|
+
function createCookie(e,t,o){var n,i="";o&&((n=new Date).setTime(n.getTime()+24*o*60*60*1e3),i="; expires="+n.toUTCString()),document.cookie=`${e}=${t}${i}; 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(){function e(){dataLayer.push(arguments)}""!==analyticsName.toLowerCase()&&(window.dataLayer=window.dataLayer||[],e("js",new Date),e("config",analyticsName),window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create",analyticsName,"auto"),ga("send","pageview"))}"true"===isCookieConsent.toLowerCase()?(addCookieConsentListener(),"true"===readCookie(cookieName)?googleAnalytics():document.getElementById("cookie-notice").style.display="block"):googleAnalytics();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=()=>sessionStorage.getItem("theme");function setMode(e){document.documentElement.setAttribute("data-theme",e),sessionStorage.setItem("theme",e),document.getElementById("theme-toggle").innerHTML=themeButton[e]}function themeToggle(){setMode("light"===currentTheme()?"dark":"light")}window.onload=function(){if(isAutoTheme){if(!currentTheme()){let e=window.matchMedia("(prefers-color-scheme: dark)");e.addEventListener("change",()=>{e.matches&&sessionStorage.setItem("theme","dark")})}var e=currentTheme();setMode(e||"light")}};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}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(){var e=-(window.scrollY||window.pageYOffset||document.body.scrollTop)/3;document.getElementById("main").style.backgroundPosition="100% "+(e-50)+"px, 0%, center top"})});
|
@@ -4,8 +4,8 @@ document.addEventListener("DOMContentLoaded", function (event) {
|
|
4
4
|
/*
|
5
5
|
* Display the menu items on smaller screens
|
6
6
|
*/
|
7
|
-
|
8
|
-
|
7
|
+
const pull = document.getElementById('pull');
|
8
|
+
const menu = document.querySelector('nav ul');
|
9
9
|
|
10
10
|
['click', 'touch'].forEach(function (e) {
|
11
11
|
pull.addEventListener(e, function () {
|
@@ -17,7 +17,7 @@ document.addEventListener("DOMContentLoaded", function (event) {
|
|
17
17
|
* Make the header images move on scroll
|
18
18
|
*/
|
19
19
|
window.addEventListener('scroll', function () {
|
20
|
-
|
20
|
+
const offset = -(window.scrollY || window.pageYOffset || document.body.scrollTop) / 3;
|
21
21
|
document.getElementById("main").style.backgroundPosition = '100% ' + (offset - 50) + 'px' + ', 0%, center top';
|
22
22
|
});
|
23
23
|
});
|