mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-30 09:45:32 +00:00
Fixed marginals; fixed Tables
This commit is contained in:
@@ -1390,16 +1390,6 @@ body {
|
||||
}
|
||||
}
|
||||
|
||||
.ha-lettertext.ha-minwidth {
|
||||
min-width: 38rem;
|
||||
}
|
||||
|
||||
@media (min-width: 1190px) {
|
||||
.ha-lettertext.ha-minwidth {
|
||||
min-width: 45rem;
|
||||
}
|
||||
}
|
||||
|
||||
.ha-marginals {
|
||||
position: relative;
|
||||
margin-left: 1rem;
|
||||
@@ -1510,51 +1500,6 @@ body {
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
.ha-additions .ha-tradition .ha-tradzhtext .ha-marginalbox {
|
||||
position: absolute;
|
||||
right: -20rem;
|
||||
margin-top: 0.25rem;
|
||||
display: none;
|
||||
width: 19rem;
|
||||
flex-wrap: wrap;
|
||||
border-radius: 0.125rem;
|
||||
border-left-width: 2px;
|
||||
--tw-border-opacity: 1;
|
||||
border-color: rgb(203 213 225 / var(--tw-border-opacity));
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(248 250 252 / var(--tw-bg-opacity));
|
||||
padding-left: 0.5rem;
|
||||
padding-right: 0.25rem;
|
||||
font-family: Biolinum, sans-serif;
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.25rem;
|
||||
line-height: 1.25;
|
||||
-webkit-hyphens: auto;
|
||||
-ms-hyphens: auto;
|
||||
hyphens: auto;
|
||||
}
|
||||
|
||||
@media (min-width: 960px) {
|
||||
.ha-additions .ha-tradition .ha-tradzhtext .ha-marginalbox {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1190px) {
|
||||
.ha-additions .ha-tradition .ha-tradzhtext .ha-marginalbox {
|
||||
right: -26rem;
|
||||
width: 23rem;
|
||||
}
|
||||
}
|
||||
|
||||
.ha-additions .ha-tradition .ha-tradzhtext .ha-marginalbox .ha-marginal {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.ha-additions .ha-tradition .ha-tradzhtext .ha-marginalbox.ha-expanded-box {
|
||||
padding-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.ha-additions .ha-tradition a {
|
||||
-webkit-text-decoration-line: underline !important;
|
||||
text-decoration-line: underline !important;
|
||||
@@ -1567,50 +1512,6 @@ body {
|
||||
text-decoration-style: solid;
|
||||
}
|
||||
|
||||
.ha-additions .ha-tradition .ha-tradzhtext .ha-marginalbox .ha-marginal {
|
||||
padding-right: 1.5rem;
|
||||
}
|
||||
|
||||
.ha-additions .ha-tradition .ha-tradzhtext .ha-marginalbox .ha-marginal a {
|
||||
-webkit-text-decoration-line: underline !important;
|
||||
text-decoration-line: underline !important;
|
||||
-webkit-text-decoration-style: dotted;
|
||||
text-decoration-style: dotted;
|
||||
}
|
||||
|
||||
.ha-additions .ha-tradition .ha-tradzhtext .ha-marginalbox .ha-marginal a:hover {
|
||||
-webkit-text-decoration-style: solid;
|
||||
text-decoration-style: solid;
|
||||
}
|
||||
|
||||
.ha-additions .ha-tradition .ha-tradzhtext .ha-btn-collapsed-box {
|
||||
position: absolute;
|
||||
right: -0.5rem;
|
||||
margin-top: 2px;
|
||||
display: none;
|
||||
cursor: pointer;
|
||||
line-height: 1;
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(71 85 105 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.ha-additions .ha-tradition .ha-tradzhtext .ha-btn-collapsed-box:hover {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(15 23 42 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
@media (min-width: 960px) {
|
||||
.ha-additions .ha-tradition .ha-tradzhtext .ha-btn-collapsed-box {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1190px) {
|
||||
.ha-additions .ha-tradition .ha-tradzhtext .ha-btn-collapsed-box {
|
||||
right: -2.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.ha-additions .ha-hands {
|
||||
padding-top: 1.5rem;
|
||||
}
|
||||
@@ -1814,21 +1715,29 @@ body {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.ha-lettertext .ha-marginalbox {
|
||||
.ha-tradzhtext .ha-marginal::before, .ha-lettertext .ha-marginal:before {
|
||||
position: absolute;
|
||||
right: -20rem;
|
||||
top: 0.1rem;
|
||||
bottom: 0.1rem;
|
||||
left: 0px;
|
||||
width: 0.125rem;
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(148 163 184 / var(--tw-bg-opacity));
|
||||
--tw-content: '';
|
||||
content: var(--tw-content);
|
||||
}
|
||||
|
||||
.ha-tradzhtext .ha-marginalbox, .ha-lettertext .ha-marginalbox {
|
||||
position: absolute;
|
||||
left: 100%;
|
||||
margin-left: 1.5rem;
|
||||
margin-top: 0.25rem;
|
||||
display: none;
|
||||
width: 19rem;
|
||||
flex-wrap: wrap;
|
||||
width: 16rem;
|
||||
border-radius: 0.125rem;
|
||||
border-left-width: 2px;
|
||||
--tw-border-opacity: 1;
|
||||
border-color: rgb(203 213 225 / var(--tw-border-opacity));
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(248 250 252 / var(--tw-bg-opacity));
|
||||
padding-left: 0.5rem;
|
||||
padding-right: 0.25rem;
|
||||
font-family: Biolinum, sans-serif;
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.25rem;
|
||||
@@ -1839,49 +1748,57 @@ body {
|
||||
}
|
||||
|
||||
@media (min-width: 960px) {
|
||||
.ha-lettertext .ha-marginalbox {
|
||||
display: flex;
|
||||
.ha-tradzhtext .ha-marginalbox, .ha-lettertext .ha-marginalbox {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1190px) {
|
||||
.ha-lettertext .ha-marginalbox {
|
||||
right: -26rem;
|
||||
width: 23rem;
|
||||
.ha-tradzhtext .ha-marginalbox, .ha-lettertext .ha-marginalbox {
|
||||
width: 24rem;
|
||||
}
|
||||
}
|
||||
|
||||
.ha-lettertext .ha-marginalbox .ha-marginal {
|
||||
display: inline-block;
|
||||
.ha-tradzhtext .ha-marginalbox.ha-expanded-box .ha-marginallist, .ha-lettertext .ha-marginalbox.ha-expanded-box .ha-marginallist {
|
||||
--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
||||
--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);
|
||||
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
||||
}
|
||||
|
||||
.ha-lettertext .ha-marginalbox.ha-expanded-box {
|
||||
padding-bottom: 0.25rem;
|
||||
.ha-tradzhtext .ha-marginalbox .ha-marginallist, .ha-lettertext .ha-marginalbox .ha-marginallist {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
-moz-column-gap: 1rem;
|
||||
column-gap: 1rem;
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.25rem;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
.ha-lettertext .ha-marginalbox .ha-marginal {
|
||||
padding-right: 1.5rem;
|
||||
.ha-tradzhtext .ha-marginalbox .ha-marginallist .ha-marginal, .ha-lettertext .ha-marginalbox .ha-marginallist .ha-marginal {
|
||||
position: relative;
|
||||
display: inline;
|
||||
flex-grow: 1;
|
||||
padding-left: 0.5rem;
|
||||
}
|
||||
|
||||
.ha-lettertext .ha-marginalbox .ha-marginal .ha-text {
|
||||
}
|
||||
|
||||
.ha-lettertext .ha-marginalbox .ha-marginal a {
|
||||
.ha-tradzhtext .ha-marginalbox .ha-marginallist .ha-marginal a, .ha-lettertext .ha-marginalbox .ha-marginallist .ha-marginal a {
|
||||
-webkit-text-decoration-line: underline !important;
|
||||
text-decoration-line: underline !important;
|
||||
-webkit-text-decoration-style: dotted;
|
||||
text-decoration-style: dotted;
|
||||
}
|
||||
|
||||
.ha-lettertext .ha-marginalbox .ha-marginal a:hover {
|
||||
.ha-tradzhtext .ha-marginalbox .ha-marginallist .ha-marginal a:hover, .ha-lettertext .ha-marginalbox .ha-marginallist .ha-marginal a:hover {
|
||||
-webkit-text-decoration-style: solid;
|
||||
text-decoration-style: solid;
|
||||
}
|
||||
|
||||
.ha-lettertext .ha-btn-collapsed-box {
|
||||
.ha-tradzhtext .ha-btn-collapsed-box, .ha-lettertext .ha-btn-collapsed-box {
|
||||
position: absolute;
|
||||
right: -0.5rem;
|
||||
margin-top: 2px;
|
||||
left: 100%;
|
||||
margin-left: 1rem;
|
||||
margin-top: 0.125rem;
|
||||
display: none;
|
||||
cursor: pointer;
|
||||
line-height: 1;
|
||||
@@ -1889,23 +1806,40 @@ body {
|
||||
color: rgb(51 65 85 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.ha-lettertext .ha-btn-collapsed-box:hover {
|
||||
.ha-tradzhtext .ha-btn-collapsed-box:hover, .ha-lettertext .ha-btn-collapsed-box:hover {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(15 23 42 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
@media (min-width: 960px) {
|
||||
.ha-lettertext .ha-btn-collapsed-box {
|
||||
.ha-tradzhtext .ha-btn-collapsed-box, .ha-lettertext .ha-btn-collapsed-box {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.ha-minwidth .ha-tradzhtext, .ha-lettertext.ha-minwidth {
|
||||
min-width: 38rem;
|
||||
}
|
||||
|
||||
@media (min-width: 1190px) {
|
||||
.ha-lettertext .ha-btn-collapsed-box {
|
||||
right: -2.5rem;
|
||||
.ha-minwidth .ha-tradzhtext, .ha-lettertext.ha-minwidth {
|
||||
min-width: 55rem;
|
||||
}
|
||||
}
|
||||
|
||||
.ha-minwidth .ha-tradzhtext .ha-alignright, .ha-lettertext.ha-minwidth .ha-alignright {
|
||||
float: right;
|
||||
margin-right: 20%;
|
||||
}
|
||||
|
||||
.ha-lettertext.ha-minwidth .ha-aligncenter {
|
||||
position: absolute;
|
||||
left: 33.333333%;
|
||||
--tw-translate-x: -50%;
|
||||
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* Classes from the General parser */
|
||||
|
||||
/* Classes from .NET */
|
||||
@@ -2301,16 +2235,16 @@ body {
|
||||
|
||||
.ha-collapsed-box {
|
||||
z-index: 0;
|
||||
cursor: default;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.ha-expanded-box {
|
||||
z-index: 1000;
|
||||
height: auto !important;
|
||||
max-height: 100vh !important;
|
||||
--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
||||
--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);
|
||||
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
||||
padding-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
/* .ha-register .ha-neuzeit .ha-register-body .ha-commenthead .ha-collapsed-box:hover,
|
||||
@@ -2644,6 +2578,10 @@ body {
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.ha-lettertext .ha-marginalbox:before {
|
||||
content: "";
|
||||
}
|
||||
|
||||
.ha-lettertext .ha-marginalbox .ha-marginal::after {
|
||||
content: "";
|
||||
}
|
||||
|
||||
@@ -489,10 +489,6 @@
|
||||
@apply max-w-[38rem] desktop:max-w-[45rem] sm:shrink-0 sm:border-l-2 ml-4 sm:ml-12 px-4 pt-4 pb-8 relative font-serif leading-[1.48] bg-slate-50 numeric-mediaeval;
|
||||
}
|
||||
|
||||
.ha-lettertext.ha-minwidth {
|
||||
@apply min-w-[38rem] desktop:min-w-[45rem]
|
||||
}
|
||||
|
||||
.ha-marginals {
|
||||
@apply max-w-3xl ml-4 md:ml-12 px-4 py-4 relative leading-[1.48] bg-slate-50 numeric-mediaeval;
|
||||
}
|
||||
@@ -545,34 +541,10 @@
|
||||
@apply !block font-serif relative w-fit -ml-4 pl-4 unhyphenate;
|
||||
}
|
||||
|
||||
.ha-additions .ha-tradition .ha-tradzhtext .ha-marginalbox {
|
||||
@apply absolute -right-[20rem] desktop:-right-[26rem] w-[19rem] desktop:w-[23rem] text-sm border-l-2 border-slate-300 leading-tight pl-2 bg-slate-50 pr-1 hyphenate mt-1 rounded-sm font-sans hidden md:flex flex-wrap;
|
||||
}
|
||||
|
||||
.ha-additions .ha-tradition .ha-tradzhtext .ha-marginalbox .ha-marginal {
|
||||
@apply inline-block;
|
||||
}
|
||||
|
||||
.ha-additions .ha-tradition .ha-tradzhtext .ha-marginalbox.ha-expanded-box {
|
||||
@apply pb-1;
|
||||
}
|
||||
|
||||
.ha-additions .ha-tradition a {
|
||||
@apply !underline decoration-dotted hover:decoration-solid
|
||||
}
|
||||
|
||||
.ha-additions .ha-tradition .ha-tradzhtext .ha-marginalbox .ha-marginal {
|
||||
@apply pr-6;
|
||||
}
|
||||
|
||||
.ha-additions .ha-tradition .ha-tradzhtext .ha-marginalbox .ha-marginal a {
|
||||
@apply !underline decoration-dotted hover:decoration-solid
|
||||
}
|
||||
|
||||
.ha-additions .ha-tradition .ha-tradzhtext .ha-btn-collapsed-box {
|
||||
@apply hidden md:block absolute text-slate-600 hover:text-slate-900 cursor-pointer -right-[0.5rem] desktop:-right-[2.5rem] leading-none mt-[2px];
|
||||
}
|
||||
|
||||
.ha-additions .ha-hands {
|
||||
@apply pt-6;
|
||||
}
|
||||
@@ -692,32 +664,53 @@
|
||||
@apply !hidden;
|
||||
}
|
||||
|
||||
.ha-tradzhtext .ha-marginal::before,
|
||||
.ha-lettertext .ha-marginal:before {
|
||||
@apply absolute top-[0.1rem] bottom-[0.1rem] left-0 w-0.5 bg-slate-400 content-['']
|
||||
}
|
||||
|
||||
.ha-tradzhtext .ha-marginalbox,
|
||||
.ha-lettertext .ha-marginalbox {
|
||||
@apply absolute -right-[20rem] desktop:-right-[26rem] w-[19rem] desktop:w-[23rem] text-sm border-l-2 border-slate-300 leading-tight pl-2 bg-slate-50 pr-1 hyphenate mt-1 rounded-sm font-sans hidden md:flex flex-wrap;
|
||||
@apply hidden pl-2 md:block absolute left-full ml-6 mt-1 w-[16rem] desktop:w-[24rem] text-sm leading-tight bg-slate-50 hyphenate rounded-sm font-sans
|
||||
}
|
||||
|
||||
.ha-tradzhtext .ha-marginalbox.ha-expanded-box .ha-marginallist,
|
||||
.ha-lettertext .ha-marginalbox.ha-expanded-box .ha-marginallist {
|
||||
@apply shadow-md
|
||||
}
|
||||
|
||||
.ha-tradzhtext .ha-marginalbox .ha-marginallist,
|
||||
.ha-lettertext .ha-marginalbox .ha-marginallist {
|
||||
@apply text-sm leading-tight flex flex-wrap gap-x-4
|
||||
}
|
||||
|
||||
.ha-lettertext .ha-marginalbox .ha-marginal {
|
||||
@apply inline-block;
|
||||
.ha-tradzhtext .ha-marginalbox .ha-marginallist .ha-marginal,
|
||||
.ha-lettertext .ha-marginalbox .ha-marginallist .ha-marginal {
|
||||
@apply pl-2 inline grow relative
|
||||
}
|
||||
|
||||
.ha-lettertext .ha-marginalbox.ha-expanded-box {
|
||||
@apply pb-1;
|
||||
}
|
||||
|
||||
.ha-lettertext .ha-marginalbox .ha-marginal {
|
||||
@apply pr-6;
|
||||
}
|
||||
|
||||
.ha-lettertext .ha-marginalbox .ha-marginal .ha-text {
|
||||
|
||||
}
|
||||
|
||||
.ha-lettertext .ha-marginalbox .ha-marginal a {
|
||||
.ha-tradzhtext .ha-marginalbox .ha-marginallist .ha-marginal a,
|
||||
.ha-lettertext .ha-marginalbox .ha-marginallist .ha-marginal a {
|
||||
@apply !underline decoration-dotted hover:decoration-solid
|
||||
}
|
||||
|
||||
.ha-tradzhtext .ha-btn-collapsed-box,
|
||||
.ha-lettertext .ha-btn-collapsed-box {
|
||||
@apply hidden md:block absolute text-slate-700 hover:text-slate-900 cursor-pointer -right-[0.5rem] desktop:-right-[2.5rem] leading-none mt-[2px];
|
||||
@apply absolute left-full ml-4 hidden md:block text-slate-700 hover:text-slate-900 cursor-pointer leading-none mt-0.5;
|
||||
}
|
||||
|
||||
.ha-minwidth .ha-tradzhtext,
|
||||
.ha-lettertext.ha-minwidth {
|
||||
@apply min-w-[38rem] desktop:min-w-[55rem]
|
||||
}
|
||||
|
||||
.ha-minwidth .ha-tradzhtext .ha-alignright,
|
||||
.ha-lettertext.ha-minwidth .ha-alignright {
|
||||
@apply float-right mr-[20%];
|
||||
}
|
||||
|
||||
.ha-lettertext.ha-minwidth .ha-aligncenter {
|
||||
@apply absolute left-1/3 whitespace-nowrap -translate-x-1/2;
|
||||
}
|
||||
|
||||
/* Classes from the General parser */
|
||||
@@ -926,11 +919,11 @@
|
||||
}
|
||||
|
||||
.ha-collapsed-box {
|
||||
@apply z-0 overflow-hidden;
|
||||
@apply z-0 overflow-hidden overflow-ellipsis cursor-default
|
||||
}
|
||||
|
||||
.ha-expanded-box {
|
||||
@apply shadow-md z-[1000] !h-auto !max-h-screen;
|
||||
@apply pb-1 z-[1000] !h-auto !max-h-screen;
|
||||
}
|
||||
|
||||
/* .ha-register .ha-neuzeit .ha-register-body .ha-commenthead .ha-collapsed-box:hover,
|
||||
@@ -939,6 +932,10 @@
|
||||
} */
|
||||
}
|
||||
|
||||
.ha-lettertext .ha-marginalbox:before {
|
||||
content: "";
|
||||
}
|
||||
|
||||
.ha-lettertext .ha-marginalbox .ha-marginal::after {
|
||||
content: "";
|
||||
}
|
||||
|
||||
@@ -48,11 +48,9 @@ const getLineHeight = function (element) {
|
||||
ret;
|
||||
temp.setAttribute("class", element.className);
|
||||
temp.innerHTML = "Ü";
|
||||
|
||||
element.parentNode.appendChild(temp);
|
||||
ret = temp.clientHeight;
|
||||
ret = temp.getBoundingClientRect().height;
|
||||
temp.parentNode.removeChild(temp);
|
||||
|
||||
return ret;
|
||||
};
|
||||
|
||||
@@ -68,7 +66,7 @@ const uncollapsebox = function (element) {
|
||||
};
|
||||
|
||||
const addbuttoncaollapsebox = function (element, height, hoverfunction) {
|
||||
const btn = document.createElement("div");
|
||||
let btn = document.createElement("div");
|
||||
btn.classList.add("ha-btn-collapsed-box");
|
||||
|
||||
if (element.classList.contains("ha-collapsed-box")) {
|
||||
@@ -125,37 +123,26 @@ const addbuttoncaollapsebox = function (element, height, hoverfunction) {
|
||||
};
|
||||
|
||||
/* TODO: need a resize watcher to undo and reapply the effect on breakpoint */
|
||||
const overlappingcollapsebox = function (selector, hoverfunction, parentbox) {
|
||||
const overlappingcollapsebox = function (selector, hoverfunction) {
|
||||
let boxes = document.querySelectorAll(selector);
|
||||
let clientrects = [];
|
||||
let lineheight = 1;
|
||||
|
||||
if (boxes.length >= 1) {
|
||||
lineheight = getLineHeight(boxes[0]);
|
||||
}
|
||||
|
||||
for (element of boxes) {
|
||||
clientrects.push([element, element.getBoundingClientRect()]);
|
||||
}
|
||||
|
||||
let boundigparent = null;
|
||||
let pb = null;
|
||||
if (parentbox !== null) {
|
||||
pb = document.getElementById(parentbox);
|
||||
if (pb !== null) {
|
||||
boundigparent = pb.getBoundingClientRect();
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0; i < clientrects.length; i++) {
|
||||
if (i < clientrects.length - 1) {
|
||||
let overlap = clientrects[i][1].bottom - clientrects[i + 1][1].top;
|
||||
if (overlap >= 0) {
|
||||
let newlength = clientrects[i][1].height - overlap;
|
||||
for (var i = 0; i < boxes.length; i++) {
|
||||
if (i < boxes.length - 1) {
|
||||
let element = boxes[i];
|
||||
let thisrect = element.getBoundingClientRect();
|
||||
let nextrect = boxes[i+1].getBoundingClientRect();
|
||||
let overlap = thisrect.bottom - nextrect.top;
|
||||
if (overlap >= 0 && !(window.getComputedStyle(element).display === "none")) {
|
||||
let newlength = thisrect.height - overlap;
|
||||
let remainder = newlength % lineheight;
|
||||
newlength = newlength - remainder - 1;
|
||||
collapsebox(clientrects[i][0], newlength);
|
||||
addbuttoncaollapsebox(clientrects[i][0], newlength, hoverfunction);
|
||||
requestAnimationFrame(() => { collapsebox(element, newlength) });
|
||||
requestAnimationFrame(() => { addbuttoncaollapsebox(element, newlength, hoverfunction) });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -230,26 +217,12 @@ const get_theme_settings = function(standard) {
|
||||
}
|
||||
|
||||
const collapseboxes = function() {
|
||||
for (entry of this.document.getElementsByClassName("ha-letlinks")) {
|
||||
entry.maxHeight = "auto";
|
||||
let btns = entry.parentNode.getElementsByClassName("ha-btn-collapsed-box");
|
||||
for (btn of btns) {
|
||||
btn.remove();
|
||||
}
|
||||
}
|
||||
|
||||
for (entry of this.document.getElementsByClassName("ha-marginalbox")) {
|
||||
entry.maxHeight = "auto";
|
||||
let btns = entry.parentNode.getElementsByClassName("ha-btn-collapsed-box");
|
||||
for (btn of btns) {
|
||||
btn.remove();
|
||||
}
|
||||
}
|
||||
overlappingcollapsebox(".ha-neuzeit .ha-letlinks", true);
|
||||
overlappingcollapsebox(".ha-forschung .ha-letlinks", true);
|
||||
overlappingcollapsebox(".ha-lettertext .ha-marginalbox", true, "ha-letterbody");
|
||||
overlappingcollapsebox(".ha-lettertext .ha-marginalbox", true);
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////// ONLOAD ////////////////////////////////////
|
||||
window.addEventListener("load", function () {
|
||||
// Menu: Show / Hide Buttons for mobile View
|
||||
@@ -271,9 +244,13 @@ window.addEventListener("load", function () {
|
||||
if (document.getElementById("ha-register-nav") != null)
|
||||
markactive_exact(document.getElementById("ha-register-nav"));
|
||||
|
||||
// Letter / Register View: Collapse all unfit boxes
|
||||
// Letter / Register View: Collapse all unfit boxes + resize observer
|
||||
collapseboxes();
|
||||
//this.window.addEventListener('resize', collapseboxes);
|
||||
var doit;
|
||||
this.window.addEventListener('resize', function() {
|
||||
this.clearTimeout(doit);
|
||||
this.setTimeout(collapseboxes, 250);
|
||||
});
|
||||
|
||||
|
||||
// Letter View: Show / Hide Tabs
|
||||
|
||||
Reference in New Issue
Block a user