compared the versions; fond a few things

This commit is contained in:
schnulller
2022-05-29 05:58:20 +02:00
parent 95918c84d0
commit 9504b89f30
9 changed files with 84 additions and 52 deletions

View File

@@ -39,3 +39,8 @@ Briefe beim Namen
- Marginalien in dne Traditions an die falsche Zeile gesetzt
- Lessing-Registereitrag
- 224 erse beidenkomm vertauscht
TODO Letter 41 2x Zeile 25, also auch zwei Mal der Kommentar
TODO 148 153 letzter kommentar
TODO 332
TODO 367

View File

@@ -245,7 +245,7 @@ public class LetterRules
}
// Marginalien
if(reader.State.Marginals != null) {
if(reader.State.Marginals != null && !String.IsNullOrWhiteSpace(tag["index"])) {
var margs = reader.State.Marginals.Where(x => x.Page == reader.State.currpage && x.Line == reader.State.currline);
if (margs != null && margs.Any())
{
@@ -275,12 +275,14 @@ public class LetterRules
if(tag["type"] == "line") {
sb.Append(HaWeb.HTMLHelpers.TagHelpers.CreateElement(DEFAULTELEMENT, LINELINECLASS));
sb.Append(HaWeb.HTMLHelpers.TagHelpers.CreateEndElement(DEFAULTELEMENT));
reader.State.mustwrap = true;
}
// Line tab=
if(!String.IsNullOrWhiteSpace(tag["tab"])) {
sb.Append(HaWeb.HTMLHelpers.TagHelpers.CreateElement(DEFAULTELEMENT, LINEINDENTCLASS + tag["tab"]));
sb.Append(HaWeb.HTMLHelpers.TagHelpers.CreateEndElement(DEFAULTELEMENT));
if (tag["tab"] != "1") reader.State.mustwrap = true;
}
}
)};

View File

@@ -37,7 +37,7 @@
</div>
</div>
<div class="ha-letterbody">
<div class="ha-letterbody" id="ha-letterbody">
<div class="ha-lettertext" id="ha-lettertext">
@if (Model.ParsedText != null)
{

View File

@@ -1540,8 +1540,6 @@ body {
}
.ha-additions .ha-tradition a {
--tw-text-opacity: 1;
color: rgb(51 65 85 / var(--tw-text-opacity));
-webkit-text-decoration-line: underline !important;
text-decoration-line: underline !important;
-webkit-text-decoration-style: dotted;
@@ -1549,8 +1547,6 @@ body {
}
.ha-additions .ha-tradition a:hover {
--tw-text-opacity: 1;
color: rgb(15 23 42 / var(--tw-text-opacity));
-webkit-text-decoration-style: solid;
text-decoration-style: solid;
}
@@ -1560,8 +1556,6 @@ body {
}
.ha-additions .ha-tradition .ha-tradzhtext .ha-marginalbox .ha-marginal a {
--tw-text-opacity: 1;
color: rgb(30 41 59 / var(--tw-text-opacity));
-webkit-text-decoration-line: underline !important;
text-decoration-line: underline !important;
-webkit-text-decoration-style: dotted;
@@ -1569,8 +1563,6 @@ body {
}
.ha-additions .ha-tradition .ha-tradzhtext .ha-marginalbox .ha-marginal a:hover {
--tw-text-opacity: 1;
color: rgb(15 23 42 / var(--tw-text-opacity));
-webkit-text-decoration-style: solid;
text-decoration-style: solid;
}
@@ -1860,8 +1852,6 @@ body {
}
.ha-lettertext .ha-marginalbox .ha-marginal a {
--tw-text-opacity: 1;
color: rgb(30 41 59 / var(--tw-text-opacity));
-webkit-text-decoration-line: underline !important;
text-decoration-line: underline !important;
-webkit-text-decoration-style: dotted;
@@ -1869,8 +1859,6 @@ body {
}
.ha-lettertext .ha-marginalbox .ha-marginal a:hover {
--tw-text-opacity: 1;
color: rgb(15 23 42 / var(--tw-text-opacity));
-webkit-text-decoration-style: solid;
text-decoration-style: solid;
}
@@ -1955,7 +1943,8 @@ body {
text-decoration-line: underline;
}
.ha-del, .ha-del * :not(.ha-linecount *, .ha-linecount, .ha-marginal *, .ha-marginal) {
.ha-del, .ha-del * :not(.ha-linecount *, .ha-linecount, .ha-marginal *, .ha-marginal, .ha-diagdel) {
display: inline;
-webkit-text-decoration-line: line-through;
text-decoration-line: line-through;
}
@@ -1985,6 +1974,10 @@ body {
color: rgb(51 65 85 / var(--tw-text-opacity));
}
.ha-emph {
font-style: italic;
}
.ha-sup {
position: relative;
top: -0.3em;
@@ -2690,38 +2683,40 @@ body {
list-style-type:circle;
} */
.diagdel {
text-decoration: none;
.ha-diagdel {
text-decoration: none !important;
-webkit-text-decoration-line: none !important;
text-decoration-line: none !important;
position: relative;
display: inline-block;
display: inline-block !important;
}
.diagdel::before,
.diagdel::after {
.ha-diagdel::before,
.ha-diagdel::after {
content: "";
width: 100%;
height: 0%;
position: absolute;
right: 0;
bottom: 1.5ex;
bottom: 1.4ex;
}
.diagdel::before {
.ha-diagdel::before {
border-bottom: 1px solid black;
transform: skewY(-36deg);
}
.del .del,
.del .del * {
.ha-del .ha-del,
.ha-del .ha-del * {
-moz-text-decoration-style: double;
-webkit-text-decoration-style: double !important;
text-decoration-thickness: 1px;
text-decoration-style: double;
}
.del .del .ul,
.ul .del .del,
.del .ul .del {
.ha-del .ha-del .ha-ul,
.ha-ul .ha-del .ha-del,
.ha-del .ha-ul .ha-del {
text-decoration: line-through underline;
-moz-text-decoration-style: double;
-webkit-text-decoration-style: double !important;
@@ -2729,8 +2724,8 @@ body {
text-decoration-style: double;
}
.del .ul,
.ul .del {
.ha-del .ha-ul,
.ha-ul .ha-del {
text-decoration: line-through underline;
text-decoration-thickness: 1px;
text-decoration-skip-ink: auto;

View File

@@ -554,7 +554,7 @@
}
.ha-additions .ha-tradition a {
@apply !underline decoration-dotted hover:decoration-solid text-slate-700 hover:text-slate-900;
@apply !underline decoration-dotted hover:decoration-solid
}
.ha-additions .ha-tradition .ha-tradzhtext .ha-marginalbox .ha-marginal {
@@ -562,7 +562,7 @@
}
.ha-additions .ha-tradition .ha-tradzhtext .ha-marginalbox .ha-marginal a {
@apply !underline decoration-dotted hover:decoration-solid text-slate-800 hover:text-slate-900;
@apply !underline decoration-dotted hover:decoration-solid
}
.ha-additions .ha-tradition .ha-tradzhtext .ha-btn-collapsed-box {
@@ -709,7 +709,7 @@
}
.ha-lettertext .ha-marginalbox .ha-marginal a {
@apply !underline decoration-dotted hover:decoration-solid text-slate-800 hover:text-slate-900;
@apply !underline decoration-dotted hover:decoration-solid
}
.ha-lettertext .ha-btn-collapsed-box {
@@ -758,8 +758,8 @@
}
.ha-del,
.ha-del * :not(.ha-linecount *, .ha-linecount, .ha-marginal *, .ha-marginal) {
@apply line-through;
.ha-del * :not(.ha-linecount *, .ha-linecount, .ha-marginal *, .ha-marginal, .ha-diagdel) {
@apply inline line-through;
}
.ha-hand,
@@ -783,6 +783,10 @@
@apply italic text-slate-700;
}
.ha-emph {
@apply italic
}
.ha-sup {
@apply relative -top-[0.3em] text-[80%];
}
@@ -984,39 +988,40 @@ body {
list-style-type:circle;
} */
.diagdel {
text-decoration: none;
.ha-diagdel {
text-decoration: none !important;
text-decoration-line: none !important;
position: relative;
display: inline-block;
display: inline-block !important;
}
.diagdel::before,
.diagdel::after {
.ha-diagdel::before,
.ha-diagdel::after {
content: "";
width: 100%;
height: 0%;
position: absolute;
right: 0;
bottom: 1.5ex;
bottom: 1.4ex;
}
.diagdel::before {
.ha-diagdel::before {
border-bottom: 1px solid black;
-webkit-transform: skewY(-36deg);
transform: skewY(-36deg);
}
.del .del,
.del .del * {
.ha-del .ha-del,
.ha-del .ha-del * {
-moz-text-decoration-style: double;
-webkit-text-decoration-style: double !important;
text-decoration-thickness: 1px;
text-decoration-style: double;
}
.del .del .ul,
.ul .del .del,
.del .ul .del {
.ha-del .ha-del .ha-ul,
.ha-ul .ha-del .ha-del,
.ha-del .ha-ul .ha-del {
text-decoration: line-through underline;
-moz-text-decoration-style: double;
-webkit-text-decoration-style: double !important;
@@ -1024,8 +1029,8 @@ body {
text-decoration-style: double;
}
.del .ul,
.ul .del {
.ha-del .ha-ul,
.ha-ul .ha-del {
text-decoration: line-through underline;
text-decoration-thickness: 1px;
text-decoration-skip-ink: auto;

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -47,7 +47,7 @@ const getLineHeight = function (element) {
var temp = document.createElement(element.nodeName),
ret;
temp.setAttribute("class", element.className);
temp.innerHTML = "A";
temp.innerHTML = "Ü";
element.parentNode.appendChild(temp);
ret = temp.clientHeight;
@@ -125,7 +125,7 @@ const addbuttoncaollapsebox = function (element, height, hoverfunction) {
};
/* TODO: need a resize watcher to undo and reapply the effect on breakpoint */
const overlappingcollapsebox = function (selector, hoverfunction) {
const overlappingcollapsebox = function (selector, hoverfunction, parentbox) {
let boxes = document.querySelectorAll(selector);
let clientrects = [];
let lineheight = 1;
@@ -138,18 +138,43 @@ const overlappingcollapsebox = function (selector, hoverfunction) {
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;
let remainder = newlength % lineheight;
newlength = newlength - remainder - 1;
collapsebox(clientrects[i][0], newlength);
addbuttoncaollapsebox(clientrects[i][0], newlength, hoverfunction);
}
} else {
if (boundigparent !== null) {
let overlap = clientrects[i][1].bottom - boundigparent.bottom;
console.log(clientrects[i][0]);
console.log(pb);
console.log(clientrects[i][1].bottom, boundigparent.bottom);
console.log(overlap);
if (overlap >= 0) {
let newlength = clientrects[i][1].height - overlap;
console.log(newlength);
let remainder = newlength % lineheight;
newlength = newlength - remainder;
collapsebox(clientrects[i][0], newlength);
addbuttoncaollapsebox(clientrects[i][0], newlength, hoverfunction);
}
}
}
}
};
/* Button to hide / show traditions, marginals and the text of the letter */
@@ -238,7 +263,7 @@ const collapseboxes = function() {
}
overlappingcollapsebox(".ha-neuzeit .ha-letlinks", true);
overlappingcollapsebox(".ha-forschung .ha-letlinks", true);
overlappingcollapsebox(".ha-lettertext .ha-marginalbox", true);
overlappingcollapsebox(".ha-lettertext .ha-marginalbox", true, "ha-letterbody");
}
//////////////////////////////// ONLOAD ////////////////////////////////////