Better and simplified arrows when rolling/unrolling content
This commit is contained in:
parent
ddbbf4bb72
commit
556d774a5e
@ -12,6 +12,10 @@
|
|||||||
src: url("../fonts/NotoSansRunic-Regular.ttf");
|
src: url("../fonts/NotoSansRunic-Regular.ttf");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--after-rotation: 90deg;
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: "Noto Sans Runes", "DoulosSIL", "Lato", "proxima-nova", "Helvetica Neue", Arial, sans-serif;
|
font-family: "Noto Sans Runes", "DoulosSIL", "Lato", "proxima-nova", "Helvetica Neue", Arial, sans-serif;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
@ -160,14 +164,21 @@ a.footref {
|
|||||||
margin: 0 2px;
|
margin: 0 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.rolled::after {
|
h2::after,
|
||||||
|
h3::after,
|
||||||
|
h4::after,
|
||||||
|
h5::after {
|
||||||
content: "➤";
|
content: "➤";
|
||||||
padding-left: 20px;
|
margin-left: 20px;
|
||||||
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.unrolled::after {
|
.rotated::after {
|
||||||
content: "⌄";
|
-webkit-transform: rotate(var(--after-rotation));
|
||||||
padding-left: 20px;
|
-moz-transform: rotate(var(--after-rotation));
|
||||||
|
-o-transform: rotate(var(--after-rotation));
|
||||||
|
-ms-transform: rotate(var(--after-rotation));
|
||||||
|
transform: rotate(var(--after-rotation));
|
||||||
}
|
}
|
||||||
|
|
||||||
.themeBtn {
|
.themeBtn {
|
||||||
|
@ -15,15 +15,14 @@ function roll_elems() {
|
|||||||
// Except for the footnotes
|
// Except for the footnotes
|
||||||
$('.footnotes').removeClass('rolled');
|
$('.footnotes').removeClass('rolled');
|
||||||
|
|
||||||
// // Make the rollable headers actually rollable and rolled
|
// Make the rollable headers actually rollable and rolled
|
||||||
$('.header-container').each(function($header) {
|
$('.header-container').each(function($header) {
|
||||||
$header = $(this);
|
$header = $(this);
|
||||||
$header.click(function() {
|
$header.click(function() {
|
||||||
$header.nextAll().each(function() {
|
$header.nextAll().each(function() {
|
||||||
$(this).slideToggle(500);
|
$(this).slideToggle(500);
|
||||||
});
|
});
|
||||||
$header.find('>:first-child').toggleClass('unrolled');
|
$header.find('>:first-child').toggleClass('rotated');
|
||||||
$header.find('>:first-child').toggleClass('rolled');
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user