format frontend code
All checks were successful
CI/CD Pipeline / deploy-main (push) Successful in 1m2s
All checks were successful
CI/CD Pipeline / deploy-main (push) Successful in 1m2s
This commit is contained in:
parent
fb90c5c259
commit
5736a79fd7
@ -1,18 +1,18 @@
|
|||||||
document.addEventListener('DOMContentLoaded', function() {
|
document.addEventListener("DOMContentLoaded", function () {
|
||||||
changeTheme();
|
changeTheme();
|
||||||
initcolorTheme();
|
initcolorTheme();
|
||||||
apply_stickies()
|
apply_stickies();
|
||||||
});
|
});
|
||||||
|
|
||||||
function changeTheme() {
|
function changeTheme() {
|
||||||
let toggleBtn = document.querySelector('#theme-toggle-js');
|
let toggleBtn = document.querySelector("#theme-toggle-js");
|
||||||
|
|
||||||
if (toggleBtn) {
|
if (toggleBtn) {
|
||||||
toggleBtn.addEventListener('click', function() {
|
toggleBtn.addEventListener("click", function () {
|
||||||
if(toggleBtn.dataset.theme === 'light') {
|
if (toggleBtn.dataset.theme === "light") {
|
||||||
setTheme('dark', true);
|
setTheme("dark", true);
|
||||||
} else {
|
} else {
|
||||||
setTheme('light', true);
|
setTheme("light", true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -26,15 +26,15 @@ function changeTheme() {
|
|||||||
*/
|
*/
|
||||||
function initcolorTheme() {
|
function initcolorTheme() {
|
||||||
colorThemeWatcher();
|
colorThemeWatcher();
|
||||||
let theme = localStorage.getItem('theme');
|
let theme = localStorage.getItem("theme");
|
||||||
if (theme == null || theme === 'auto') {
|
if (theme == null || theme === "auto") {
|
||||||
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
if (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches) {
|
||||||
setTheme('dark', false);
|
setTheme("dark", false);
|
||||||
} else {
|
} else {
|
||||||
setTheme('light', false);
|
setTheme("light", false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setTheme(theme)
|
setTheme(theme);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,11 +43,11 @@ function initcolorTheme() {
|
|||||||
*/
|
*/
|
||||||
function colorThemeWatcher() {
|
function colorThemeWatcher() {
|
||||||
try {
|
try {
|
||||||
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', e => {
|
window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", (e) => {
|
||||||
setTheme(e.matches ? 'dark' : 'light');
|
setTheme(e.matches ? "dark" : "light");
|
||||||
});
|
});
|
||||||
} catch {
|
} catch {
|
||||||
console.warn('color theme watcher not supported');
|
console.warn("color theme watcher not supported");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,37 +57,37 @@ function colorThemeWatcher() {
|
|||||||
* @param theme
|
* @param theme
|
||||||
*/
|
*/
|
||||||
function setTheme(theme, setLocalStorage = true) {
|
function setTheme(theme, setLocalStorage = true) {
|
||||||
let toggleBtn = document.querySelector('#theme-toggle-js');
|
let toggleBtn = document.querySelector("#theme-toggle-js");
|
||||||
|
|
||||||
if (setLocalStorage) {
|
if (setLocalStorage) {
|
||||||
localStorage.setItem('theme', theme);
|
localStorage.setItem("theme", theme);
|
||||||
}
|
}
|
||||||
if (toggleBtn) toggleBtn.setAttribute('data-theme', theme);
|
if (toggleBtn) toggleBtn.setAttribute("data-theme", theme);
|
||||||
|
|
||||||
if (document.documentElement.dataset.theme === 'dark' && theme === 'light') {
|
if (document.documentElement.dataset.theme === "dark" && theme === "light") {
|
||||||
document.documentElement.dataset.theme = 'light';
|
document.documentElement.dataset.theme = "light";
|
||||||
} else if(document.documentElement.dataset.theme === 'light' && theme === 'dark'){
|
} else if (document.documentElement.dataset.theme === "light" && theme === "dark") {
|
||||||
document.documentElement.dataset.theme = 'dark';
|
document.documentElement.dataset.theme = "dark";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener('scroll', function() {
|
window.addEventListener("scroll", function () {
|
||||||
apply_stickies()
|
apply_stickies();
|
||||||
})
|
});
|
||||||
|
|
||||||
function apply_stickies() {
|
function apply_stickies() {
|
||||||
var _$stickies = [].slice.call(document.querySelectorAll('.sticky'))
|
var _$stickies = [].slice.call(document.querySelectorAll(".sticky"));
|
||||||
_$stickies.forEach(function (_$sticky) {
|
_$stickies.forEach(function (_$sticky) {
|
||||||
if (CSS.supports && CSS.supports('position', 'sticky')) {
|
if (CSS.supports && CSS.supports("position", "sticky")) {
|
||||||
apply_sticky_class(_$sticky)
|
apply_sticky_class(_$sticky);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function apply_sticky_class(_$sticky) {
|
function apply_sticky_class(_$sticky) {
|
||||||
var currentOffset = _$sticky.getBoundingClientRect().top
|
var currentOffset = _$sticky.getBoundingClientRect().top;
|
||||||
var stickyOffset = parseInt(getComputedStyle(_$sticky).top.replace('px', ''))
|
var stickyOffset = parseInt(getComputedStyle(_$sticky).top.replace("px", ""));
|
||||||
var isStuck = currentOffset <= stickyOffset
|
var isStuck = currentOffset <= stickyOffset;
|
||||||
|
|
||||||
_$sticky.classList.toggle('js-is-sticky', isStuck)
|
_$sticky.classList.toggle("js-is-sticky", isStuck);
|
||||||
}
|
}
|
@ -1,9 +1,9 @@
|
|||||||
<html lang="de" data-theme="dark">
|
<html lang="de" data-theme="dark">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>RIS Parser</title>
|
<title>RIS Parser</title>
|
||||||
<meta name="description" content="RIS Parser für Bundesgesetze in Österreich">
|
<meta name="description" content="RIS Parser für Bundesgesetze in Österreich" />
|
||||||
|
|
||||||
<link rel="stylesheet" href="pico.min.css" />
|
<link rel="stylesheet" href="pico.min.css" />
|
||||||
<link rel="stylesheet" href="style.css" />
|
<link rel="stylesheet" href="style.css" />
|
||||||
@ -38,12 +38,16 @@
|
|||||||
<button id="theme-toggle-js" type="button" data-theme="light" class="btn btn-primary">
|
<button id="theme-toggle-js" type="button" data-theme="light" class="btn btn-primary">
|
||||||
<span class="inline dark-hidden">
|
<span class="inline dark-hidden">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
|
||||||
<path d="M8 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6zm0 1a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z"/>
|
<path
|
||||||
|
d="M8 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6zm0 1a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z"
|
||||||
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</span>
|
</span>
|
||||||
<span class="hidden dark-inline">
|
<span class="hidden dark-inline">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
|
||||||
<path d="M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278zM4.858 1.311A7.269 7.269 0 0 0 1.025 7.71c0 4.02 3.279 7.276 7.319 7.276a7.316 7.316 0 0 0 5.205-2.162c-.337.042-.68.063-1.029.063-4.61 0-8.343-3.714-8.343-8.29 0-1.167.242-2.278.681-3.286z"/>
|
<path
|
||||||
|
d="M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278zM4.858 1.311A7.269 7.269 0 0 0 1.025 7.71c0 4.02 3.279 7.276 7.319 7.276a7.316 7.316 0 0 0 5.205-2.162c-.337.042-.68.063-1.029.063-4.61 0-8.343-3.714-8.343-8.29 0-1.167.242-2.278.681-3.286z"
|
||||||
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<html lang="de" data-theme="dark">
|
<html lang="de" data-theme="dark">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>RIS Parser</title>
|
<title>RIS Parser</title>
|
||||||
<meta name="description" content="RIS Parser für Bundesgesetze in Österreich">
|
<meta name="description" content="RIS Parser für Bundesgesetze in Österreich" />
|
||||||
|
|
||||||
<link rel="stylesheet" href="pico.min.css" />
|
<link rel="stylesheet" href="pico.min.css" />
|
||||||
<link rel="stylesheet" href="style.css" />
|
<link rel="stylesheet" href="style.css" />
|
||||||
@ -41,12 +41,16 @@
|
|||||||
<button id="theme-toggle-js" type="button" data-theme="light" class="btn btn-primary">
|
<button id="theme-toggle-js" type="button" data-theme="light" class="btn btn-primary">
|
||||||
<span class="inline dark-hidden">
|
<span class="inline dark-hidden">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
|
||||||
<path d="M8 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6zm0 1a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z"/>
|
<path
|
||||||
|
d="M8 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6zm0 1a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z"
|
||||||
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</span>
|
</span>
|
||||||
<span class="hidden dark-inline">
|
<span class="hidden dark-inline">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
|
||||||
<path d="M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278zM4.858 1.311A7.269 7.269 0 0 0 1.025 7.71c0 4.02 3.279 7.276 7.319 7.276a7.316 7.316 0 0 0 5.205-2.162c-.337.042-.68.063-1.029.063-4.61 0-8.343-3.714-8.343-8.29 0-1.167.242-2.278.681-3.286z"/>
|
<path
|
||||||
|
d="M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278zM4.858 1.311A7.269 7.269 0 0 0 1.025 7.71c0 4.02 3.279 7.276 7.319 7.276a7.316 7.316 0 0 0 5.205-2.162c-.337.042-.68.063-1.029.063-4.61 0-8.343-3.714-8.343-8.29 0-1.167.242-2.278.681-3.286z"
|
||||||
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
@ -1,86 +1,68 @@
|
|||||||
|
|
||||||
|
|
||||||
html {
|
html {
|
||||||
-webkit-hyphens: auto;
|
-webkit-hyphens: auto;
|
||||||
hyphens: auto;
|
hyphens: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
margin-top: var(--pico-spacing);
|
margin-top: var(--pico-spacing);
|
||||||
}
|
}
|
||||||
|
|
||||||
h2,
|
h2,
|
||||||
h3,
|
h3,
|
||||||
h4,
|
h4,
|
||||||
h5,
|
h5,
|
||||||
h6 {
|
h6 {
|
||||||
--pico-font-weight: 400;
|
--pico-font-weight: 400;
|
||||||
|
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
--pico-font-size: 1.3rem;
|
--pico-font-size: 1.3rem;
|
||||||
--pico-font-weight: 200;
|
--pico-font-weight: 200;
|
||||||
}
|
}
|
||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
--pico-font-size: 1.2rem;
|
--pico-font-size: 1.2rem;
|
||||||
--pico-font-weight: 200;
|
--pico-font-weight: 200;
|
||||||
}
|
}
|
||||||
|
|
||||||
h4 {
|
h4 {
|
||||||
--pico-font-size: 1.1rem;
|
--pico-font-size: 1.1rem;
|
||||||
--pico-font-weight: 200;
|
--pico-font-weight: 200;
|
||||||
}
|
}
|
||||||
|
|
||||||
mark {
|
mark {
|
||||||
--pico-mark-gradient: linear-gradient(270deg, #08AEEA 0%, #2AF598 100%);
|
--pico-mark-gradient: linear-gradient(270deg, #08aeea 0%, #2af598 100%);
|
||||||
|
|
||||||
padding: 0;
|
padding: 0;
|
||||||
background: var(--pico-mark-gradient);
|
background: var(--pico-mark-gradient);
|
||||||
-webkit-background-clip: text;
|
-webkit-background-clip: text;
|
||||||
background-clip: text;
|
background-clip: text;
|
||||||
color: transparent;
|
color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
main {
|
main {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
details summary {
|
details summary {
|
||||||
line-height: unset;
|
line-height: unset;
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
details summary::after {
|
details summary::after {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
details > summary {
|
details > summary {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
background-color: var(--pico-background-color);
|
background-color: var(--pico-background-color);
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
details details > summary {
|
details details > summary {
|
||||||
position: unset !important;
|
position: unset !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
summary h2,
|
summary h2,
|
||||||
summary h3,
|
summary h3,
|
||||||
summary h4,
|
summary h4,
|
||||||
summary h5 {
|
summary h5 {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
summary.js-is-sticky {
|
summary.js-is-sticky {
|
||||||
padding: 1.5rem 0;
|
padding: 1.5rem 0;
|
||||||
background: linear-gradient(0deg, transparent 0%, var(--pico-background-color) 30%);
|
background: linear-gradient(0deg, transparent 0%, var(--pico-background-color) 30%);
|
||||||
}
|
}
|
||||||
|
|
||||||
summary.js-is-sticky h2,
|
summary.js-is-sticky h2,
|
||||||
summary.js-is-sticky h3,
|
summary.js-is-sticky h3,
|
||||||
summary.js-is-sticky h4,
|
summary.js-is-sticky h4,
|
||||||
@ -93,85 +75,66 @@ summary.js-is-sticky h5 {
|
|||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|
||||||
.par {
|
.par {
|
||||||
margin-bottom: calc(var(--pico-spacing) * 2);
|
margin-bottom: calc(var(--pico-spacing) * 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.symb {
|
.symb {
|
||||||
--pico-font-weight: 700;
|
--pico-font-weight: 700;
|
||||||
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: calc(var(--pico-spacing) / 3);
|
margin-right: calc(var(--pico-spacing) / 3);
|
||||||
font-weight: var(--pico-font-weight)
|
|
||||||
}
|
|
||||||
|
|
||||||
.header {
|
|
||||||
--pico-font-weight: 300;
|
|
||||||
|
|
||||||
font-weight: var(--pico-font-weight);
|
font-weight: var(--pico-font-weight);
|
||||||
}
|
}
|
||||||
|
.header {
|
||||||
|
--pico-font-weight: 300;
|
||||||
|
font-weight: var(--pico-font-weight);
|
||||||
|
}
|
||||||
h4,
|
h4,
|
||||||
h5,
|
h5,
|
||||||
h6 {
|
h6 {
|
||||||
--pico-font-weight: 400;
|
--pico-font-weight: 400;
|
||||||
|
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
--pico-font-size: 1.3rem;
|
--pico-font-size: 1.3rem;
|
||||||
--pico-font-weight: 200;
|
--pico-font-weight: 200;
|
||||||
}
|
}
|
||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
--pico-font-size: 1.2rem;
|
--pico-font-size: 1.2rem;
|
||||||
--pico-font-weight: 200;
|
--pico-font-weight: 200;
|
||||||
}
|
}
|
||||||
|
|
||||||
h4 {
|
h4 {
|
||||||
--pico-font-size: 1.1rem;
|
--pico-font-size: 1.1rem;
|
||||||
--pico-font-weight: 200;
|
--pico-font-weight: 200;
|
||||||
}
|
}
|
||||||
|
|
||||||
.par > ul {
|
.par > ul {
|
||||||
margin: var(--pico-spacing) 0;
|
margin: var(--pico-spacing) 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.par > ul > li {
|
.par > ul > li {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
margin: 1rem 0;
|
margin: 1rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
padding: 0 2rem;
|
padding: 0 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
li {
|
li {
|
||||||
list-style: square;
|
list-style: square;
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
--pico-form-element-spacing-vertical: 0.25rem;
|
--pico-form-element-spacing-vertical: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
body > footer {
|
body > footer {
|
||||||
padding-block: calc(var(--pico-block-spacing-vertical) * 2);
|
padding-block: calc(var(--pico-block-spacing-vertical) * 2);
|
||||||
background: linear-gradient(180deg, black, transparent);
|
background: linear-gradient(180deg, black, transparent);
|
||||||
}
|
}
|
||||||
|
:root:not([data-theme="dark"]) body > footer,
|
||||||
:root:not([data-theme=dark]) body > footer,
|
[data-theme="light"] body > footer {
|
||||||
[data-theme=light] body > footer {
|
background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), transparent);
|
||||||
background: linear-gradient(180deg, rgba(0,0,0,.1), transparent);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* approx 800px */
|
/* approx 800px */
|
||||||
.container {
|
.container {
|
||||||
max-width: 38rem;
|
max-width: 38rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-container {
|
.btn-container {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0rem;
|
bottom: 0rem;
|
||||||
@ -182,55 +145,43 @@ body > footer {
|
|||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
background: linear-gradient(180deg, transparent, var(--pico-background-color), var(--pico-background-color));
|
background: linear-gradient(180deg, transparent, var(--pico-background-color), var(--pico-background-color));
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-open,
|
.btn-open,
|
||||||
.btn-close {
|
.btn-close {
|
||||||
font-size: .8rem;
|
font-size: 0.8rem;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-open {
|
.btn-open {
|
||||||
margin-right: 1rem;
|
margin-right: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.par {
|
.par {
|
||||||
margin-bottom: calc(var(--pico-spacing) * 2);
|
margin-bottom: calc(var(--pico-spacing) * 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.symb {
|
.symb {
|
||||||
--pico-font-weight: 700;
|
--pico-font-weight: 700;
|
||||||
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: calc(var(--pico-spacing) / 3);
|
margin-right: calc(var(--pico-spacing) / 3);
|
||||||
font-weight: var(--pico-font-weight)
|
|
||||||
}
|
|
||||||
|
|
||||||
.header {
|
|
||||||
--pico-font-weight: 300;
|
|
||||||
|
|
||||||
font-weight: var(--pico-font-weight);
|
font-weight: var(--pico-font-weight);
|
||||||
}
|
}
|
||||||
|
.header {
|
||||||
|
--pico-font-weight: 300;
|
||||||
|
font-weight: var(--pico-font-weight);
|
||||||
|
}
|
||||||
.content {
|
.content {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.note {
|
.note {
|
||||||
--pico-font-weight: 200;
|
--pico-font-weight: 200;
|
||||||
|
|
||||||
font-weight: var(--pico-font-weight);
|
font-weight: var(--pico-font-weight);
|
||||||
display: block;
|
display: block;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
padding: calc(var(--pico-spacing) / 3) 0;
|
padding: calc(var(--pico-spacing) / 3) 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* List index.html */
|
/* List index.html */
|
||||||
ol {
|
ol {
|
||||||
counter-reset: index;
|
counter-reset: index;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* List element index.html */
|
/* List element index.html */
|
||||||
ol li {
|
ol li {
|
||||||
counter-increment: index;
|
counter-increment: index;
|
||||||
@ -239,8 +190,6 @@ ol li {
|
|||||||
padding: 12px 0;
|
padding: 12px 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Element counter */
|
/* Element counter */
|
||||||
ol li::before {
|
ol li::before {
|
||||||
content: "§";
|
content: "§";
|
||||||
@ -249,33 +198,27 @@ ol li::before {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
padding-right: 12px;
|
padding-right: 12px;
|
||||||
align-self: flex-start;
|
align-self: flex-start;
|
||||||
background-image: linear-gradient(to bottom, #08AEEA, #2AF598);
|
background-image: linear-gradient(to bottom, #08aeea, #2af598);
|
||||||
background-attachment: fixed;
|
background-attachment: fixed;
|
||||||
-webkit-background-clip: text;
|
-webkit-background-clip: text;
|
||||||
background-clip: text;
|
background-clip: text;
|
||||||
-webkit-text-fill-color: transparent;
|
-webkit-text-fill-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Element separation */
|
/* Element separation */
|
||||||
ol li + li {
|
ol li + li {
|
||||||
border-top: var(--pico-contrast-focus) solid 1px;
|
border-top: var(--pico-contrast-focus) solid 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hidden {
|
.hidden {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inline {
|
.inline {
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
|
:root:not([data-theme="dark"]) .dark-inline,
|
||||||
:root:not([data-theme=dark]) .dark-inline,
|
[data-theme="light"] .dark-inline {
|
||||||
[data-theme=light] .dark-inline{
|
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
|
:root:not([data-theme="dark"]) .dark-hidden,
|
||||||
:root:not([data-theme=dark]) .dark-hidden,
|
[data-theme="light"] .dark-hidden {
|
||||||
[data-theme=light] .dark-hidden {
|
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
document.addEventListener('DOMContentLoaded', function() {
|
document.addEventListener("DOMContentLoaded", function () {
|
||||||
toggleSummary();
|
toggleSummary();
|
||||||
});
|
});
|
||||||
|
|
||||||
function toggleSummary() {
|
function toggleSummary() {
|
||||||
const openBtns = document.querySelectorAll('.open-js');
|
const openBtns = document.querySelectorAll(".open-js");
|
||||||
const closeBtns = document.querySelectorAll('.close-js');
|
const closeBtns = document.querySelectorAll(".close-js");
|
||||||
const detailElements = document.querySelectorAll('details');
|
const detailElements = document.querySelectorAll("details");
|
||||||
|
|
||||||
openBtns.forEach(function (openBtn) {
|
openBtns.forEach(function (openBtn) {
|
||||||
openBtn.addEventListener('click', function(){
|
openBtn.addEventListener("click", function () {
|
||||||
detailElements.forEach((detail) => detail.setAttribute("open", ""));
|
detailElements.forEach((detail) => detail.setAttribute("open", ""));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
closeBtns.forEach(function (closeBtn) {
|
closeBtns.forEach(function (closeBtn) {
|
||||||
closeBtn.addEventListener('click', function(){
|
closeBtn.addEventListener("click", function () {
|
||||||
detailElements.forEach((detail) => detail.removeAttribute("open", ""));
|
detailElements.forEach((detail) => detail.removeAttribute("open", ""));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user