jekyll-ham 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/ham/navbar.html +1 -1
- data/_includes/ham/sidebar.html +2 -4
- data/_layouts/default.html +1 -1
- data/_layouts/page.html +2 -2
- data/assets/entry-parser.js +11 -4
- 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: a62916483d33bfe35d4ba07584c67024a2805656337f17a74400001fb0ff0736
|
4
|
+
data.tar.gz: f41683049c26e0fbd4ac22dc1a7081dec4085675fd46f7325e08427b92fa0093
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2bff65101e73ca1379b195a0fba6c21acafefb1e37d2f582a18401131c2bad163243f38ead09f3c7070b4864446902b82abcdbbf70081f064991bdab0e591c77
|
7
|
+
data.tar.gz: e8573a85f3fb71985695f1caee6da374d33e0a969322f1b80e42ecdfbd7053863d4691b5aeaa4c834cfff0b7aaced6dc118edaeccd040f9ac5fab524b5eb8657
|
data/_includes/ham/navbar.html
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
<i class="bi bi-list-nested" aria-hidden="true"></i>
|
6
6
|
</button>
|
7
7
|
</div>
|
8
|
-
<a class="navbar-brand" href="
|
8
|
+
<a class="navbar-brand" href="/">
|
9
9
|
{% if site.ham.site_icon != null %}
|
10
10
|
<img src="{{ site.ham.site_icon }}" alt="{{ site.title }}" width="24" height="24" class="d-inline-block align-text-top">
|
11
11
|
{% endif %}{{ site.title }}
|
data/_includes/ham/sidebar.html
CHANGED
@@ -2,12 +2,10 @@
|
|
2
2
|
<div class="offcanvas-header d-md-none border-bottom border-secondary border-opacity-25">
|
3
3
|
<a href="/" class="sidebar-brand">
|
4
4
|
{% if site.ham.site_icon != null %}
|
5
|
-
<img src="{{ site.ham.site_icon }}" alt="{{ site.title }}">
|
5
|
+
<img src="{{ site.ham.site_icon }}" alt="{{ site.title }}" width="24" height="24">
|
6
6
|
{% endif %}{{ site.title }}
|
7
7
|
</a>
|
8
|
-
<button type="button" class="btn-close d-md-none" data-bs-dismiss="offcanvas"
|
9
|
-
<i class="bi bi-x-lg" aria-description="Close sidebar"></i>
|
10
|
-
</button>
|
8
|
+
<button type="button" class="btn-close d-md-none" aria-label="Close" data-bs-dismiss="offcanvas" data-bs-target="#_ham_sidebar"></button>
|
11
9
|
</div>
|
12
10
|
<div class="offcanvas-body">
|
13
11
|
<div class="mb-3">
|
data/_layouts/default.html
CHANGED
@@ -67,7 +67,7 @@
|
|
67
67
|
document.getElementById('_ham_search_input').addEventListener('change', updateSearchResultsVisibility);
|
68
68
|
document.getElementById('_ham_search_input').addEventListener('input', updateSearchResultsVisibility);
|
69
69
|
</script>
|
70
|
-
<!--
|
70
|
+
<!-- Bootstrap JS -->
|
71
71
|
<script src="{{ site.url }}/assets/halfmoon.min.js"></script>
|
72
72
|
<!-- Bootstrap JS for color modes -->
|
73
73
|
<script src="{{ site.url }}/assets/bootstrap-color-modes.js"></script>
|
data/_layouts/page.html
CHANGED
@@ -2,10 +2,10 @@
|
|
2
2
|
layout: default
|
3
3
|
---
|
4
4
|
<article class="row px-1 py-3">
|
5
|
-
<div class="col-xl-8 collapse-group article-wrapper" id="_ham_content">
|
5
|
+
<div class="col-xl-8 collapse-group article-wrapper mb-3" id="_ham_content">
|
6
6
|
{{ content }}
|
7
7
|
</div>
|
8
|
-
<div class="col-xl-4">
|
8
|
+
<div class="col-xl-4 mb-3">
|
9
9
|
{% if page.related_topics != null %}
|
10
10
|
<div class="mb-3">
|
11
11
|
<h5 id="related-topics" class="sidebar-title">Related Topics</h5>
|
data/assets/entry-parser.js
CHANGED
@@ -61,12 +61,14 @@ function parseRawEntry(originalContent, onThisPageEntry, siteTitle, siteTagline)
|
|
61
61
|
var newA = document.createElement('a');
|
62
62
|
newA.href = '#' + node.id;
|
63
63
|
newA.className = 'nav-link text-truncate';
|
64
|
-
newA.setAttribute('
|
64
|
+
newA.setAttribute('data-bs-dismiss', 'offcanvas');
|
65
|
+
newA.setAttribute('data-bs-target', '#_ham_sidebar');
|
66
|
+
newA.setAttribute('onclick', 'expandAccordion(\'' + currentAccordionId + '\', \'' + node.id + '\')');
|
65
67
|
for (j = 2; j < currentHeadingLevel; j++){
|
66
68
|
var newSpan = document.createElement('span');
|
67
69
|
if (j == currentHeadingLevel - 1) {
|
68
70
|
newSpan.className = 'me-1 d-inline-block text-body-tertiary';
|
69
|
-
newSpan.
|
71
|
+
newSpan.innerHTML = '<i class="bi bi-arrow-return-right"></i>';
|
70
72
|
} else {
|
71
73
|
newSpan.className = 'ms-3 d-inline-block';
|
72
74
|
}
|
@@ -193,9 +195,14 @@ function autoexpandAccordion(){
|
|
193
195
|
}
|
194
196
|
}
|
195
197
|
|
196
|
-
async function expandAccordion(
|
197
|
-
var el = new bootstrap.Collapse(document.getElementById(
|
198
|
+
async function expandAccordion(collapsibleId, contentId){
|
199
|
+
var el = new bootstrap.Collapse(document.getElementById(collapsibleId + "-content"), {toggle: false});
|
198
200
|
await el.show();
|
201
|
+
if (contentId) {
|
202
|
+
location.hash = "";
|
203
|
+
location.hash = "#" + contentId;
|
204
|
+
scrollBy(0, -66);
|
205
|
+
}
|
199
206
|
}
|
200
207
|
|
201
208
|
window.addEventListener("load", autoexpandAccordion);
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-ham
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Reinhart Previano Koentjoro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|