Skip to content

Commit

Permalink
add SRI hashes
Browse files Browse the repository at this point in the history
  • Loading branch information
le4ker committed May 4, 2024
1 parent 3d0c26a commit 54818b1
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 85 deletions.
16 changes: 13 additions & 3 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@
<title>{{site.title}}{% if page.title %} | {{page.title}}{% endif %}</title>

<!-- CSS links -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.css" defer />
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.css"
rel="stylesheet"
integrity="sha512-pli9aKq758PMdsqjNA+Au4CJ7ZatLCCXinnlSfv023z4xmzl8s+Jbj2qNR7RI8DsxFp5e8OvbYGDACzKntZE9w=="
crossorigin="anonymous"
defer
/>
<link href="{{site.url}}/css/grayscale.css" rel="stylesheet" />

{% if page.section-type == "index" %}
Expand All @@ -19,14 +24,19 @@

{% if page.layout == "post" %}
{% include syntax-highlight.html %}
<link rel="stylesheet" href="{{site.url}}/css/rrssb.css" />
<link rel="stylesheet" href="{{site.url}}/css/rrssb.css" />
{% endif %}

<!-- Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Maven+Pro:wght@400..900&display=swap" rel="stylesheet" defer>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" defer/>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"
rel="stylesheet"
integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA=="
crossorigin="anonymous"
defer
/>

{% if site.favicon %}
<link
Expand Down
170 changes: 88 additions & 82 deletions _includes/js.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
<!-- Javascript Start -->

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js"
integrity="sha512-jGsMH83oKe9asCpkOVkBnUrDDTp8wl+adkB2D+//JtlxO4SrLoJdhbOysIFQJloQFD+C4Fl1rMsQZF76JjV0eQ=="
crossorigin="anonymous"
/>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js"
integrity="sha512-oBTprMeNEKCnqfuqKd6sbvFzmFQtlXS3e0C/RGFV0hD6QzhHV+ODfaQbAlmY6/q0ubbwlAM/nCJjkrgA3waLzg=="
crossorigin="anonymous"
/>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"
integrity="sha512-ahmSZKApTDNd3gVuqL5TQ3MBTj8tL5p2tYV05Xxzcfu6/ecvt1A0j6tfudSGBVuteSoTRMqMljbfdU0g2eDNUA=="
crossorigin="anonymous"
/>

<!--
* Start Bootstrap - Grayscale Bootstrap Theme (http://startbootstrap.com)
Expand Down Expand Up @@ -53,107 +65,101 @@
});
</script>

{% if site.dynamic-typing %}
{% if site.dynamic-typing %}

<!-- Dynamic Typing Start -->
<!-- Dynamic Typing Start -->

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/typed.js/1.1.7/typed.min.js"></script>
<script
type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/typed.js/1.1.7/typed.min.js"
></script>

<script type="text/javascript">
<script type="text/javascript">

var myQuotes = new Array();
{% for line in site.lines %}
myQuotes.push("{{ line.text }}");
{% endfor %}
var myQuotes = new Array();
{% for line in site.lines %}
myQuotes.push("{{ line.text }}");
{% endfor %}

function shuffle(array) {
var currentIndex = array.length, temporaryValue, randomIndex ;
function shuffle(array) {
var currentIndex = array.length, temporaryValue, randomIndex ;

// While there remain elements to shuffle...
while (0 !== currentIndex) {
// While there remain elements to shuffle...
while (0 !== currentIndex) {

// Pick a remaining element...
randomIndex = Math.floor(Math.random() * currentIndex);
currentIndex -= 1;
// Pick a remaining element...
randomIndex = Math.floor(Math.random() * currentIndex);
currentIndex -= 1;

// And swap it with the current element.
temporaryValue = array[currentIndex];
array[currentIndex] = array[randomIndex];
array[randomIndex] = temporaryValue;
}
// And swap it with the current element.
temporaryValue = array[currentIndex];
array[currentIndex] = array[randomIndex];
array[randomIndex] = temporaryValue;
}

return array;
}

{% if site.shuffle %}
shuffle(myQuotes)
{% endif %}

$(".intro-text").typed({
strings: myQuotes,
typeSpeed: {{ site.type-speed }},
backDelay: {{ site.delete-delay }},
startDelay: {{ site.start-delay }},
loop: {{ site..loop }},
loopCount: {{ site.loop-count }},
cursorChar: "|"
});
</script>

<!-- Dynamic Typing End -->
return array;
}

{% if site.shuffle %}
shuffle(myQuotes)
{% endif %}

{% endif %}

{% if site.disqus-shortname %}

{% if page.has-comments %}
$(".intro-text").typed({
strings: myQuotes,
typeSpeed: {{ site.type-speed }},
backDelay: {{ site.delete-delay }},
startDelay: {{ site.start-delay }},
loop: {{ site..loop }},
loopCount: {{ site.loop-count }},
cursorChar: "|"
});
</script>

<!-- Comments Counter Start -->
<!-- Dynamic Typing End -->

<script type="text/javascript">
var disqus_shortname = "{{ site.disqus-shortname }}";
{% endif %} {% endif %} {% if site.disqus-shortname %} {% if page.has-comments
%}

(function () {
var s = document.createElement("script");
s.async = true;
s.type = "text/javascript";
s.src = "//" + disqus_shortname + ".disqus.com/count.js";
(
document.getElementsByTagName("HEAD")[0] ||
document.getElementsByTagName("BODY")[0]
).appendChild(s);
})();
</script>
<!-- Comments Counter Start -->

<!-- Comments Counter End -->
<script type="text/javascript">
var disqus_shortname = "{{ site.disqus-shortname }}";

{% endif %}
(function () {
var s = document.createElement("script");
s.async = true;
s.type = "text/javascript";
s.src = "//" + disqus_shortname + ".disqus.com/count.js";
(
document.getElementsByTagName("HEAD")[0] ||
document.getElementsByTagName("BODY")[0]
).appendChild(s);
})();
</script>

{% if page.section-type == "post" %}
<!-- Comments Counter End -->

<!-- Disqus Comments -->
{% endif %} {% if page.section-type == "post" %}

<script type="text/javascript">
var disqus_shortname = "{{ site.disqus-shortname }}";
(function () {
var dsq = document.createElement("script");
dsq.type = "text/javascript";
dsq.async = true;
dsq.src = "//" + disqus_shortname + ".disqus.com/embed.js";
(
document.getElementsByTagName("head")[0] ||
document.getElementsByTagName("body")[0]
).appendChild(dsq);
})();
</script>
<!-- Disqus Comments -->

<!-- Share buttons Start -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/rrssb/1.14.0/js/rrssb.min.js"></script>
<script type="text/javascript">
var disqus_shortname = "{{ site.disqus-shortname }}";
(function () {
var dsq = document.createElement("script");
dsq.type = "text/javascript";
dsq.async = true;
dsq.src = "//" + disqus_shortname + ".disqus.com/embed.js";
(
document.getElementsByTagName("head")[0] ||
document.getElementsByTagName("body")[0]
).appendChild(dsq);
})();
</script>

{% endif %}
<!-- Share buttons Start -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/rrssb/1.14.0/js/rrssb.min.js"></script>

{% endif %}
{% endif %} {% endif %}

<!-- Javascript End -->

0 comments on commit 54818b1

Please sign in to comment.