mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-30 01:35:32 +00:00
Added settings classes for CSS; added Register parsing
This commit is contained in:
@@ -640,11 +640,7 @@ body {
|
||||
text-decoration-style: solid;
|
||||
}
|
||||
|
||||
/* TODO INLINE
|
||||
|
||||
.ha-maincolumn {
|
||||
@apply bg-slate-50 mx-auto p-2 md:p-4 desktop:px-16 desktop:py-12 xl:pr-80 text-lg font-serif
|
||||
} */
|
||||
/* Classes for static pages */
|
||||
|
||||
.ha-static {
|
||||
width: 100%;
|
||||
@@ -786,8 +782,246 @@ body {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* Classes for register pages */
|
||||
|
||||
.ha-register {
|
||||
width: 100%;
|
||||
font-family: Libertine, serif;
|
||||
font-variant-numeric: oldstyle-nums;
|
||||
}
|
||||
|
||||
.ha-register .ha-register-head, .ha-register .ha-register-body {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(248 250 252 / var(--tw-bg-opacity));
|
||||
padding-left: 2.25rem;
|
||||
padding-right: 2.25rem;
|
||||
padding-top: 2.25rem;
|
||||
}
|
||||
|
||||
@media (min-width: 1024px) {
|
||||
.ha-register .ha-register-head, .ha-register .ha-register-body {
|
||||
padding-left: 4rem;
|
||||
padding-right: 4rem;
|
||||
padding-top: 3rem;
|
||||
}
|
||||
}
|
||||
|
||||
.ha-register .ha-register-head {
|
||||
border-bottom-width: 2px;
|
||||
}
|
||||
|
||||
.ha-register .ha-register-head h1 {
|
||||
margin-bottom: 1.5rem;
|
||||
font-size: 1.25rem;
|
||||
line-height: 1.75rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
@media (min-width: 1190px) {
|
||||
.ha-register .ha-register-head h1 {
|
||||
font-size: 2.25rem;
|
||||
line-height: 2.5rem;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
|
||||
.ha-register .ha-register-head .ha-register-nav {
|
||||
font-family: Biolinum, sans-serif;
|
||||
}
|
||||
|
||||
.ha-register .ha-register-head .ha-register-nav a {
|
||||
margin-right: 0.25rem;
|
||||
display: inline-block;
|
||||
padding-left: 0.25rem;
|
||||
padding-right: 0.25rem;
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(55 65 81 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.ha-register .ha-register-head .ha-register-nav a:hover {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(17 24 39 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
@media (min-width: 1024px) {
|
||||
.ha-register .ha-register-head .ha-register-nav a {
|
||||
margin-right: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.ha-register .ha-register-head .ha-register-nav a:first {
|
||||
padding-left: 0px;
|
||||
}
|
||||
|
||||
.ha-register .ha-register-head .ha-register-nav a.active {
|
||||
border-bottom-width: 2px;
|
||||
}
|
||||
|
||||
.ha-register .ha-register-head .ha-register-nav .ha-register-left-nav {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.ha-register .ha-register-head .ha-register-nav .ha-register-right-nav {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.ha-register .ha-register-body {
|
||||
padding-bottom: 2.25rem;
|
||||
}
|
||||
|
||||
@media (min-width: 1024px) {
|
||||
.ha-register .ha-register-body {
|
||||
padding-right: 24rem;
|
||||
padding-bottom: 3rem;
|
||||
}
|
||||
}
|
||||
|
||||
.ha-register .ha-register-body .ha-comment {
|
||||
margin-bottom: 2.25rem;
|
||||
display: block;
|
||||
}
|
||||
|
||||
@media (min-width: 1024px) {
|
||||
.ha-register .ha-register-body .ha-comment {
|
||||
margin-bottom: 3rem;
|
||||
}
|
||||
}
|
||||
|
||||
.ha-register .ha-register-body .ha-comment a {
|
||||
-webkit-text-decoration-line: underline;
|
||||
text-decoration-line: underline;
|
||||
-webkit-text-decoration-style: dotted;
|
||||
text-decoration-style: dotted;
|
||||
}
|
||||
|
||||
.ha-register .ha-register-body .ha-comment a:hover {
|
||||
-webkit-text-decoration-style: solid;
|
||||
text-decoration-style: solid;
|
||||
}
|
||||
|
||||
.ha-register .ha-register-body .ha-comment .ha-headcomment {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@media (min-width: 1190px) {
|
||||
.ha-register .ha-register-body .ha-comment .ha-headcomment {
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
.ha-register .ha-register-body .ha-comment .ha-subcomment {
|
||||
margin-left: 2rem;
|
||||
margin-top: 0.5rem;
|
||||
display: block;
|
||||
}
|
||||
|
||||
@media (min-width: 1190px) {
|
||||
.ha-register .ha-register-body .ha-comment .ha-subcomment {
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
.ha-register .ha-register-body .ha-comment .ha-commenthead {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.ha-register .ha-register-body .ha-comment .ha-commenthead .ha-lemma {
|
||||
display: inline;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.ha-register .ha-forschung .ha-register-body .ha-comment .ha-commenthead .ha-lemma {
|
||||
display: inline;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.ha-register .ha-forschung .ha-register-body .ha-comment {
|
||||
margin-bottom: 1rem;
|
||||
padding-left: 1rem;
|
||||
text-indent: -1rem;
|
||||
}
|
||||
|
||||
@media (min-width: 1024px) {
|
||||
.ha-register .ha-forschung .ha-register-body .ha-comment {
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.ha-register .ha-register-body .ha-comment .ha-commenthead .ha-letlinks {
|
||||
margin-left: 0.5rem;
|
||||
display: inline-block;
|
||||
font-family: Biolinum, sans-serif;
|
||||
font-size: 0.75rem;
|
||||
line-height: 1rem;
|
||||
font-weight: 400;
|
||||
line-height: 1.375;
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(75 85 99 / var(--tw-text-opacity));
|
||||
font-variant-caps: all-petite-caps;
|
||||
}
|
||||
|
||||
@media (min-width: 1024px) {
|
||||
.ha-register .ha-register-body .ha-comment .ha-commenthead .ha-letlinks {
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.25rem;
|
||||
}
|
||||
}
|
||||
|
||||
.ha-register .ha-neuzeit .ha-register-body .ha-headcomment .ha-commenthead .ha-letlinks, .ha-register .ha-forschung .ha-register-body .ha-headcomment .ha-commenthead .ha-letlinks {
|
||||
padding-left: 0.5rem;
|
||||
}
|
||||
|
||||
@media (min-width: 1190px) {
|
||||
.ha-register .ha-neuzeit .ha-register-body .ha-headcomment .ha-commenthead .ha-letlinks, .ha-register .ha-forschung .ha-register-body .ha-headcomment .ha-commenthead .ha-letlinks {
|
||||
position: absolute;
|
||||
left: 48rem;
|
||||
top: 0px;
|
||||
display: block;
|
||||
width: 20rem;
|
||||
border-left-width: 2px;
|
||||
text-indent: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.ha-register .ha-neuzeit .ha-register-body .ha-subcomment .ha-commenthead .ha-letlinks, .ha-register .ha-forschung .ha-register-body .ha-headcomment .ha-commenthead .ha-letlinks {
|
||||
padding-left: 0.5rem;
|
||||
}
|
||||
|
||||
@media (min-width: 1190px) {
|
||||
.ha-register .ha-neuzeit .ha-register-body .ha-subcomment .ha-commenthead .ha-letlinks, .ha-register .ha-forschung .ha-register-body .ha-headcomment .ha-commenthead .ha-letlinks {
|
||||
position: absolute;
|
||||
left: 46rem;
|
||||
top: 0px;
|
||||
display: block;
|
||||
width: 20rem;
|
||||
border-left-width: 2px;
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(248 250 252 / var(--tw-bg-opacity));
|
||||
text-indent: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.ha-register .ha-register-body .ha-comment .ha-commenthead .ha-letlinks a {
|
||||
-webkit-text-decoration-line: none;
|
||||
text-decoration-line: none;
|
||||
}
|
||||
|
||||
.ha-register .ha-register-body .ha-comment .ha-commenthead .ha-letlinks a:hover {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(17 24 39 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
/* Classes from .NET */
|
||||
|
||||
.ha-title {
|
||||
display: inline;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.ha-insertedlemma {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.ha-serif {
|
||||
font-family: Libertine, serif;
|
||||
}
|
||||
@@ -1288,6 +1522,27 @@ body {
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
.numeric-mediaeval {
|
||||
font-variant-numeric: oldstyle-nums;
|
||||
}
|
||||
|
||||
.numeric-normal {
|
||||
font-variant-numeric: normal;
|
||||
}
|
||||
|
||||
.caps-small {
|
||||
font-variant-caps: all-petite-caps;
|
||||
}
|
||||
|
||||
.caps-normal {
|
||||
font-variant-caps: normal;
|
||||
}
|
||||
|
||||
.break-inside-avoid {
|
||||
-moz-column-break-inside: avoid;
|
||||
break-inside: avoid;
|
||||
}
|
||||
|
||||
.ha-menu-arrowsymbol::after {
|
||||
display: inline-block;
|
||||
margin-left: 0.2em;
|
||||
@@ -1315,6 +1570,15 @@ body {
|
||||
color:#000000;
|
||||
}
|
||||
|
||||
/* Not possible otherwise, overwrites javascript set style values, which cant be defined before render */
|
||||
|
||||
@media (max-width: 1190px) {
|
||||
.ha-register .ha-neuzeit .ha-register-body .ha-subcomment .ha-commenthead .ha-letlinks {
|
||||
height: auto !important;
|
||||
overflow: unset !important;
|
||||
}
|
||||
}
|
||||
|
||||
.hover\:text-black:hover {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(0 0 0 / var(--tw-text-opacity));
|
||||
|
||||
@@ -132,15 +132,12 @@
|
||||
@apply underline decoration-solid
|
||||
}
|
||||
|
||||
/* TODO INLINE
|
||||
|
||||
.ha-maincolumn {
|
||||
@apply bg-slate-50 mx-auto p-2 md:p-4 desktop:px-16 desktop:py-12 xl:pr-80 text-lg font-serif
|
||||
} */
|
||||
/* Classes for static pages */
|
||||
|
||||
.ha-static {
|
||||
@apply w-full bg-slate-50 py-12 px-12 md:px-16 hyphenate font-serif
|
||||
}
|
||||
|
||||
.ha-static h1 {
|
||||
@apply font-bold text-xl desktop:font-normal desktop:text-4xl mb-6
|
||||
}
|
||||
@@ -193,7 +190,112 @@
|
||||
@apply inline-block absolute text-right w-8 -left-10
|
||||
}
|
||||
|
||||
/* Classes for register pages */
|
||||
|
||||
.ha-register {
|
||||
@apply w-full font-serif numeric-mediaeval
|
||||
}
|
||||
|
||||
.ha-register .ha-register-head,
|
||||
.ha-register .ha-register-body {
|
||||
@apply bg-slate-50 pt-9 md:pt-12 px-9 md:px-16
|
||||
}
|
||||
|
||||
.ha-register .ha-register-head {
|
||||
@apply border-b-2
|
||||
}
|
||||
|
||||
.ha-register .ha-register-head h1 {
|
||||
@apply font-bold text-xl desktop:font-normal desktop:text-4xl mb-6
|
||||
}
|
||||
|
||||
.ha-register .ha-register-head .ha-register-nav {
|
||||
@apply font-sans
|
||||
}
|
||||
|
||||
.ha-register .ha-register-head .ha-register-nav a {
|
||||
@apply inline-block px-1 mr-1 md:mr-3 text-gray-700 hover:text-gray-900
|
||||
}
|
||||
|
||||
.ha-register .ha-register-head .ha-register-nav a:first {
|
||||
@apply pl-0
|
||||
}
|
||||
|
||||
.ha-register .ha-register-head .ha-register-nav a.active {
|
||||
@apply border-b-2
|
||||
}
|
||||
|
||||
.ha-register .ha-register-head .ha-register-nav .ha-register-left-nav {
|
||||
@apply inline-block
|
||||
}
|
||||
|
||||
.ha-register .ha-register-head .ha-register-nav .ha-register-right-nav {
|
||||
@apply inline-block
|
||||
}
|
||||
|
||||
.ha-register .ha-register-body {
|
||||
@apply md:pr-96 pb-9 md:pb-12
|
||||
}
|
||||
|
||||
.ha-register .ha-register-body .ha-comment {
|
||||
@apply block mb-9 md:mb-12
|
||||
}
|
||||
|
||||
.ha-register .ha-register-body .ha-comment a {
|
||||
@apply underline decoration-dotted hover:decoration-solid
|
||||
}
|
||||
|
||||
.ha-register .ha-register-body .ha-comment .ha-headcomment {
|
||||
@apply desktop:relative block
|
||||
}
|
||||
|
||||
.ha-register .ha-register-body .ha-comment .ha-subcomment {
|
||||
@apply desktop:relative block ml-8 mt-2
|
||||
}
|
||||
|
||||
.ha-register .ha-register-body .ha-comment .ha-commenthead {
|
||||
@apply block
|
||||
}
|
||||
|
||||
.ha-register .ha-register-body .ha-comment .ha-commenthead .ha-lemma {
|
||||
@apply inline font-bold
|
||||
}
|
||||
|
||||
.ha-register .ha-forschung .ha-register-body .ha-comment .ha-commenthead .ha-lemma {
|
||||
@apply inline font-normal
|
||||
}
|
||||
|
||||
.ha-register .ha-forschung .ha-register-body .ha-comment {
|
||||
@apply mb-4 md:mb-6 -indent-4 pl-4
|
||||
}
|
||||
|
||||
.ha-register .ha-register-body .ha-comment .ha-commenthead .ha-letlinks {
|
||||
@apply inline-block font-normal text-xs md:text-sm leading-snug font-sans text-gray-600 caps-small ml-2
|
||||
}
|
||||
|
||||
.ha-register .ha-neuzeit .ha-register-body .ha-headcomment .ha-commenthead .ha-letlinks,
|
||||
.ha-register .ha-forschung .ha-register-body .ha-headcomment .ha-commenthead .ha-letlinks {
|
||||
@apply desktop:indent-0 desktop:left-[48rem] desktop:top-0 desktop:w-80 desktop:block desktop:absolute desktop:border-l-2 pl-2
|
||||
}
|
||||
|
||||
.ha-register .ha-neuzeit .ha-register-body .ha-subcomment .ha-commenthead .ha-letlinks,
|
||||
.ha-register .ha-forschung .ha-register-body .ha-headcomment .ha-commenthead .ha-letlinks {
|
||||
@apply desktop:indent-0 desktop:block desktop:absolute desktop:border-l-2 pl-2 desktop:bg-slate-50 desktop:left-[46rem] desktop:top-0 desktop:w-80
|
||||
}
|
||||
|
||||
.ha-register .ha-register-body .ha-comment .ha-commenthead .ha-letlinks a {
|
||||
@apply hover:text-gray-900 no-underline
|
||||
}
|
||||
|
||||
/* Classes from .NET */
|
||||
.ha-title {
|
||||
@apply inline italic
|
||||
}
|
||||
|
||||
.ha-insertedlemma {
|
||||
@apply inline
|
||||
}
|
||||
|
||||
.ha-serif {
|
||||
@apply font-serif
|
||||
}
|
||||
@@ -286,6 +388,26 @@ body {
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
.numeric-mediaeval {
|
||||
font-variant-numeric: oldstyle-nums;
|
||||
}
|
||||
|
||||
.numeric-normal {
|
||||
font-variant-numeric: normal;
|
||||
}
|
||||
|
||||
.caps-small {
|
||||
font-variant-caps: all-petite-caps;
|
||||
}
|
||||
|
||||
.caps-normal {
|
||||
font-variant-caps: normal;
|
||||
}
|
||||
|
||||
.break-inside-avoid {
|
||||
break-inside: avoid;
|
||||
}
|
||||
|
||||
.ha-menu-arrowsymbol::after {
|
||||
display: inline-block;
|
||||
margin-left: 0.2em;
|
||||
@@ -311,4 +433,12 @@ body {
|
||||
stroke-linejoin:miter;
|
||||
fill:none;
|
||||
color:#000000;
|
||||
}
|
||||
|
||||
/* Not possible otherwise, overwrites javascript set style values, which cant be defined before render */
|
||||
@media (max-width: 1190px) {
|
||||
.ha-register .ha-neuzeit .ha-register-body .ha-subcomment .ha-commenthead .ha-letlinks {
|
||||
height: auto !important;
|
||||
overflow: unset !important;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,96 @@
|
||||
// Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
|
||||
// for details on configuring this project to bundle and minify static web assets.
|
||||
const openmenu = function () {
|
||||
var x = document.getElementById("ha-topnav");
|
||||
if (x !== null) x.className += " ha-topnav-collapsed";
|
||||
let oldbutton = document.getElementById("openmenubutton");
|
||||
if (oldbutton !== null) oldbutton.setAttribute('class', 'hidden');
|
||||
let newbutton = document.getElementById("closemenubutton");
|
||||
if (newbutton !== null) newbutton.setAttribute('class', '');
|
||||
}
|
||||
|
||||
const closemenu = function () {
|
||||
var x = document.getElementById("ha-topnav");
|
||||
if (x !== null) x.className = "ha-topnav";
|
||||
let oldbutton = document.getElementById("closemenubutton");
|
||||
if (oldbutton !== null) oldbutton.setAttribute('class', 'hidden');
|
||||
let newbutton = document.getElementById("openmenubutton");
|
||||
if (newbutton !== null) newbutton.setAttribute('class', '');
|
||||
|
||||
}
|
||||
|
||||
const markactive_startswith = function (element) {
|
||||
// Marks links as active which target URL starts with the current URL
|
||||
var all_links = element.getElementsByTagName("a"),
|
||||
i = 0, len = all_links.length,
|
||||
full_path = location.href.split('#')[0].toLowerCase(); //Ignore hashes
|
||||
|
||||
for (; i < len; i++) {
|
||||
if (full_path.startsWith(all_links[i].href.toLowerCase())) {
|
||||
all_links[i].className += " active";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const markactive_exact = function (element) {
|
||||
var all_links = element.getElementsByTagName("a"),
|
||||
i = 0, len = all_links.length,
|
||||
full_path = location.href.split('#')[0].toLowerCase(); //Ignore hashes
|
||||
|
||||
for (; i < len; i++) {
|
||||
if (full_path == all_links[i].href.toLowerCase()) {
|
||||
all_links[i].className += " active";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const getLineHeight = function (element) {
|
||||
var temp = document.createElement(element.nodeName), ret;
|
||||
temp.setAttribute("class", element.className);
|
||||
temp.innerHTML = "A";
|
||||
|
||||
element.parentNode.appendChild(temp);
|
||||
ret = temp.clientHeight;
|
||||
temp.parentNode.removeChild(temp);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
const sidebarcollapse = function (selector) {
|
||||
let backlinkboxes = document.querySelectorAll(selector);
|
||||
let clientrects = [];
|
||||
|
||||
for (element of backlinkboxes) {
|
||||
clientrects.push([element, element.getBoundingClientRect()]);
|
||||
}
|
||||
|
||||
let lineheight = 1;
|
||||
|
||||
if (backlinkboxes.length >= 1) {
|
||||
lineheight = getLineHeight(backlinkboxes[0]);
|
||||
}
|
||||
|
||||
for (var i = 0; i < clientrects.length; i++) {
|
||||
if (i < clientrects.length-1) {
|
||||
if (clientrects[i][1].bottom >= clientrects[i+1][1].top) {
|
||||
let overlap = clientrects[i][1].bottom - clientrects[i+1][1].top;
|
||||
let newlength = clientrects[i][1].height - overlap;
|
||||
let remainder = newlength % lineheight;
|
||||
newlength = newlength - remainder;
|
||||
clientrects[i][0].style.height = newlength + 'px';
|
||||
clientrects[i][0].style.overflowX = "hidden";
|
||||
clientrects[i][0].style.overflowY = "scroll";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
window.addEventListener('load', function() {
|
||||
document.getElementById("openmenubutton").addEventListener('click', openmenu);
|
||||
document.getElementById("closemenubutton").addEventListener('click', closemenu);
|
||||
markactive_startswith(document.getElementById("ha-topnav"));
|
||||
markactive_exact(document.getElementById("ha-register-nav"));
|
||||
sidebarcollapse(".ha-neuzeit .ha-letlinks");
|
||||
sidebarcollapse(".ha-forschung .ha-letlinks");
|
||||
})
|
||||
|
||||
// Write your JavaScript code.
|
||||
|
||||
Reference in New Issue
Block a user