Skip to content

Commit 6ffca4c

Browse files
committed
WIP
no actions
1 parent 125f047 commit 6ffca4c

31 files changed

+358
-1401
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "hugo-universal-collapsible"]
2+
path = hugo-universal-collapsible
3+
url = https://github.com/alexandruioanp/hugo-universal-collapsible/

assets/css/collapse.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.collapseAnchor {
2+
text-decoration:none;
3+
}
4+
/* Might want to redo something similar to ensure the arrows look right */
5+
/*.collapseAnchor:after {
6+
content:"\25B2";
7+
display:inline-block;
8+
padding:0.4em 0 0 0.3em;
9+
vertical-align:top;
10+
font-size:0.625em;
11+
}
12+
.collapseWrap.closed + .collapseAnchor:after {
13+
content:"\25BC";
14+
}
15+
*/
16+
.collapseWrap.closed > .hugo-collapse-below {
17+
position:absolute;
18+
top:-999em;
19+
left:-999em;
20+
}

assets/js/collapse.js

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// Handler will be called when the DOM is fully loaded
2+
// So the script can be placed anywhere on the page
3+
var callback = function() {
4+
var collapseHooks = document.getElementsByClassName('collapseAfter');
5+
for (var hook of collapseHooks) {
6+
var wrap = hook.parentNode;
7+
var a = document.createElement('a');
8+
wrap.append(a);
9+
a.addEventListener('click', toggleCollapse, false);
10+
a.className = 'collapseAnchor';
11+
a.href="#"; /* without this it's not keyboard focusable */
12+
wrap.classList.add('collapseWrap');
13+
// check/set defaults just to be safe
14+
if(!wrap.hasAttribute('data-text-open')) {
15+
wrap.setAttribute('data-text-open', 'See Less ▲');
16+
}
17+
if(!wrap.hasAttribute('data-text-closed')) {
18+
wrap.setAttribute('data-text-closed', 'See More ▼');
19+
}
20+
setName(a, wrap);
21+
} // for hook
22+
function toggleCollapse(e) {
23+
e.preventDefault();
24+
currParent = e.currentTarget.parentNode;
25+
currParent.classList.toggle('closed');
26+
setName(e.currentTarget, currParent);
27+
} // toggleCollapse
28+
};
29+
30+
function setName(el, parent) {
31+
if(parent.classList.contains('closed')) {
32+
el.text = parent.getAttribute('data-text-closed');
33+
} else {
34+
el.text = parent.getAttribute('data-text-open');
35+
}
36+
}
37+
38+
if(document.readyState === "complete" ||
39+
(document.readyState !== "loading" && !document.documentElement.doScroll)) {
40+
callback();
41+
} else {
42+
document.addEventListener("DOMContentLoaded", callback);
43+
}

config.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,12 @@ params:
117117
invisible: 1
118118
nonce: sBQMjIu6F5wRbojje4UQ6WQL7zW1994WyaBlJYAHYg
119119
posthog:
120-
id: phc_xvr9iYiOKNEZdxKH8JC7PFHwCVJflLczaKNIzeoEFVy
120+
apiKey: phc_xvr9iYiOKNEZdxKH8JC7PFHwCVJflLczaKNIzeoEFVy
121+
host: https://app.posthog.com
122+
# # Optional configuration
123+
options:
124+
defaults: '2025-11-30'
125+
# id: phc_xvr9iYiOKNEZdxKH8JC7PFHwCVJflLczaKNIzeoEFVy
121126
comment:
122127
enable: true
123128
services:
@@ -181,7 +186,6 @@ module:
181186
imports:
182187
# - path: github.com/hugo-toha/toha/v4
183188
- path: github.com/hugo-toha/toha/v4
184-
- path: github.com/hugomods/code-block-panel
185189
mounts:
186190
- source: static/files
187191
target: static/files

content/posts/category/open-source/_index.de.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

content/posts/category/open-source/_index.es.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

content/posts/category/open-source/_index.fr.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

content/posts/category/open-source/_index.nl.md

Lines changed: 0 additions & 9 deletions
This file was deleted.
167 KB
Loading
164 KB
Loading

0 commit comments

Comments
 (0)