linaro-jekyll-theme 4.1.0 → 4.1.1
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.
- checksums.yaml +4 -4
- data/_includes/blog/tags.html +1 -1
- data/_layouts/post.html +1 -1
- data/assets/js/app/main.js +36 -15
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 756d7402b28b07848743f83a9e6e57c6abb27722786e0df049445f338bb0ebd8
|
|
4
|
+
data.tar.gz: bf19a183f36c41c556bd2e3a15503af49667c8e8225234535e3719fe021ea210
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 020b1d2206083b0a79a2e4e269f898ea33851c62dbf0a98c8e7f4696a989d72074c698f498d0cfa18f556103bbaab55ae4efbc44f63606e16e9b03f91c79e6a9
|
|
7
|
+
data.tar.gz: a6ca0015b7d7eb587c136abf656d126611ecd7dc409808b728c6e2b574226278e2354c9e65c03d07acc099b13e243bf7e6b8ffe4c39cf94307e4c1f5b81bce68
|
data/_includes/blog/tags.html
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
</div>
|
|
20
20
|
<div class="col col-12 tagged_posts" id="tagged_posts">
|
|
21
21
|
{% for tag in site.tags %}
|
|
22
|
-
<div class="tag_list {{tag[0]}} d-none">
|
|
22
|
+
<div class="tag_list {{tag[0] | slugify}} d-none">
|
|
23
23
|
<h3>{{ tag[0] }}</h3>
|
|
24
24
|
<ul class="list-unstyled">
|
|
25
25
|
{% for post in tag[1] %}
|
data/_layouts/post.html
CHANGED
|
@@ -56,7 +56,7 @@ css_package: blog
|
|
|
56
56
|
<div class="post_tags text-center text-md-left my-2 my-sm-1">
|
|
57
57
|
{% assign post_tags = page.tags | split: " " %}
|
|
58
58
|
{% for tag in page.tags %}
|
|
59
|
-
<a class="btn bg-light text-dark btn-sm my-1" href="/{{page.category}}/tags/?tag={{tag}}" data-toggle="tooltip" data-placement="top" title="View {{page.category}} post tagged {{tag}}">
|
|
59
|
+
<a class="btn bg-light text-dark btn-sm my-1" href="/{{page.category | downcase }}/tags/?tag={{tag}}" data-toggle="tooltip" data-placement="top" title="View {{page.category}} post tagged {{tag}}">
|
|
60
60
|
{{tag}}
|
|
61
61
|
</a>
|
|
62
62
|
{% endfor %}
|
data/assets/js/app/main.js
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
function slugify(string) {
|
|
2
|
+
const a =
|
|
3
|
+
"àáâäæãåāăąçćčđďèéêëēėęěğǵḧîïíīįìłḿñńǹňôöòóœøōõőṕŕřßśšşșťțûüùúūǘůűųẃẍÿýžźż·/_,:;";
|
|
4
|
+
const b =
|
|
5
|
+
"aaaaaaaaaacccddeeeeeeeegghiiiiiilmnnnnoooooooooprrsssssttuuuuuuuuuwxyyzzz------";
|
|
6
|
+
const p = new RegExp(a.split("").join("|"), "g");
|
|
7
|
+
|
|
8
|
+
return string
|
|
9
|
+
.toString()
|
|
10
|
+
.toLowerCase()
|
|
11
|
+
.replace(/\s+/g, "-") // Replace spaces with -
|
|
12
|
+
.replace(p, (c) => b.charAt(a.indexOf(c))) // Replace special characters
|
|
13
|
+
.replace(/&/g, "-and-") // Replace & with 'and'
|
|
14
|
+
.replace(/[^\w\-]+/g, "") // Remove all non-word characters
|
|
15
|
+
.replace(/\-\-+/g, "-") // Replace multiple - with single -
|
|
16
|
+
.replace(/^-+/, "") // Trim - from start of text
|
|
17
|
+
.replace(/-+$/, ""); // Trim - from end of text
|
|
18
|
+
}
|
|
19
|
+
|
|
1
20
|
$(document).ready(function () {
|
|
2
21
|
// Clipboard JS
|
|
3
22
|
if ($("div.highlight").length > 0) {
|
|
@@ -27,27 +46,29 @@ $(document).ready(function () {
|
|
|
27
46
|
});
|
|
28
47
|
}
|
|
29
48
|
// Tagged Posts
|
|
30
|
-
if($("#tagged_posts").length > 0){
|
|
31
|
-
var getUrlParameter =
|
|
49
|
+
if ($("#tagged_posts").length > 0) {
|
|
50
|
+
var getUrlParameter = (sParam) => {
|
|
32
51
|
var sPageURL = window.location.search.substring(1),
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
52
|
+
sURLVariables = sPageURL.split("&"),
|
|
53
|
+
sParameterName,
|
|
54
|
+
i;
|
|
55
|
+
|
|
37
56
|
for (i = 0; i < sURLVariables.length; i++) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
57
|
+
sParameterName = sURLVariables[i].split("=");
|
|
58
|
+
|
|
59
|
+
if (sParameterName[0] === sParam) {
|
|
60
|
+
return sParameterName[1] === undefined
|
|
61
|
+
? true
|
|
62
|
+
: decodeURIComponent(sParameterName[1]);
|
|
63
|
+
}
|
|
43
64
|
}
|
|
44
65
|
};
|
|
45
|
-
var tag = getUrlParameter(
|
|
46
|
-
if(tag !== undefined){
|
|
66
|
+
var tag = getUrlParameter("tag");
|
|
67
|
+
if (tag !== undefined) {
|
|
47
68
|
console.log(tag);
|
|
48
69
|
$(".tag_list").addClass("d-none");
|
|
49
|
-
$(`.tag_list.${tag}`).addClass("d-block");
|
|
50
|
-
$(this).html(tag)
|
|
70
|
+
$(`.tag_list.${slugify(tag)}`).addClass("d-block");
|
|
71
|
+
$(this).html(tag);
|
|
51
72
|
}
|
|
52
73
|
}
|
|
53
74
|
if ($("#jumbotron-slider").length > 0) {
|