Compare commits

...

2 commits

Author SHA1 Message Date
3e2af3b038
attempt at better colors
All checks were successful
/ Build and deploy website (push) Successful in 4m31s
2025-10-12 22:08:57 +02:00
b9c3974070
multiple calendar / display fixes 2025-10-12 21:57:06 +02:00
2 changed files with 17 additions and 7 deletions

View file

@ -3,6 +3,9 @@
Modernization by @kleinesfilmroellchen
*/
const uriRegex =
/(https?:\/\/([-\w\.]+)+(:\d+)?(\/([\w\/\-_\.\:]*(\?\S+)?)?)?)/gi;
export default function hackcal(e, p = 1) {
if (!document.getElementById("dbkcalendar")) return;
@ -41,8 +44,10 @@ export default function hackcal(e, p = 1) {
// use description as link on summary if it's a valid URL
const summaryItem = entryItem.querySelector(".summary");
const possibleUri = uriRegex.exec(event.description)?.[0];
const cleanedDescription = event.description.replaceAll(uriRegex, "");
try {
const descriptionUri = new URL(event.description);
const descriptionUri = new URL(possibleUri);
const descriptionLink = document.createElement("a");
descriptionLink.href = descriptionUri;
descriptionLink.target = "_blank";
@ -50,9 +55,9 @@ export default function hackcal(e, p = 1) {
summaryItem.appendChild(descriptionLink);
} catch (e) {
summaryItem.innerText = event.summary;
entryItem.querySelector(".description").innerText =
event.description;
}
entryItem.querySelector(".description").innerText =
cleanedDescription;
// self-link location if it's a valid URL
const locationItem = entryItem.querySelector(".location");

View file

@ -3,8 +3,8 @@
--main-bg-color: oklch(1% 0 0);
--main-bg-contrast-color: oklch(40% 0 0);
--main-text-color: oklch(92% 0 none);
--main-accent-color: #f9c827;
--secondary-accent-color: #ff925f;
--main-accent-color: oklch(85.23% 0.1662 89.73);
--secondary-accent-color: oklch(64.41% 0.1673 44.98);
/* Tell browser that we support dark and light mode.
Allows browser to change UI elements to match the color scheme.
@ -83,6 +83,10 @@ h3 {
font-size: 1.2rem;
}
ul > li {
margin-top: 0.3em;
}
/* page header */
#space-image {
@ -105,7 +109,7 @@ header {
"logo . nav nav"
"logo . space-text space-image" min-content
"logo . . ." min-content /
minmax(min-content, 25vw) 1fr auto minmax(0, min-content);
minmax(min-content, 25vw) 1fr auto 11vh;
overflow: hidden;
* {
@ -337,8 +341,9 @@ footer {
margin-top: 0.2em;
em {
background-color: var(--main-accent-color);
background-color: var(--secondary-accent-color);
padding: 0 0.25em;
margin-right: 0.2em;
font-style: normal;
font-weight: bold;
color: var(--main-bg-color);