Skip to content

Commit b92a2a9

Browse files
committed
Fix bug where navlets take up more vertical space than needed
1 parent 6bd0ef4 commit b92a2a9

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

python/nav/web/sass/nav/navlets.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ $fullscreen-color: #EEE;
2727
margin-bottom: 1em;
2828
padding: 0.5em 1em 1em 1.2em;
2929
position: relative;
30-
min-height: 200px;
3130
transition: box-shadow .5s;
31+
&.loading {
32+
min-height: 200px;
33+
}
3234
&.outline {
3335
border: 1px dashed black;
3436
}

python/nav/web/templates/navlets/_navlet_item.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@
1818
const spinner = new Spinner({zIndex: 10});
1919
node.addEventListener('htmx:beforeRequest', function () {
2020
spinner.spin(node);
21+
node.classList.add('loading');
2122
});
2223
node.addEventListener('htmx:afterRequest', function () {
2324
spinner.stop();
25+
node.classList.remove('loading');
2426
});
2527
})
2628
</script>

0 commit comments

Comments
 (0)