mirror of
https://github.com/Theodor-Springmann-Stiftung/webseite.git
synced 2025-10-30 09:45:33 +00:00
Initial
This commit is contained in:
37
src/transform/main.js
Normal file
37
src/transform/main.js
Normal file
@@ -0,0 +1,37 @@
|
||||
import "./site.css";
|
||||
|
||||
function setup() {
|
||||
let templates = document.querySelectorAll("template[simple]");
|
||||
templates.forEach((template) => {
|
||||
let templateId = template.getAttribute("id");
|
||||
let templateContent = template.content;
|
||||
|
||||
customElements.define(
|
||||
templateId,
|
||||
class extends HTMLElement {
|
||||
constructor() {
|
||||
super();
|
||||
this.appendChild(templateContent.cloneNode(true));
|
||||
this.slots = this.querySelectorAll("slot");
|
||||
}
|
||||
|
||||
connectedCallback() {
|
||||
let toremove = [];
|
||||
this.slots.forEach((tslot) => {
|
||||
let slotName = tslot.getAttribute("name");
|
||||
let slotContent = this.querySelector(`[slot="${slotName}"]`);
|
||||
if (slotContent) {
|
||||
tslot.replaceWith(slotContent.cloneNode(true));
|
||||
toremove.push(slotContent);
|
||||
}
|
||||
});
|
||||
toremove.forEach((element) => {
|
||||
element.remove();
|
||||
});
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
export { setup };
|
||||
90
src/transform/site.css
Normal file
90
src/transform/site.css
Normal file
@@ -0,0 +1,90 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
@layer base {
|
||||
@font-face {
|
||||
font-family: "Rancho";
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-display: swap;
|
||||
src: url(/fonts/Rancho-Regular.ttf) format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Merriweather";
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-display: swap;
|
||||
src: url(/fonts/Merriweather-Regular.ttf) format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Merriweather";
|
||||
font-style: italic;
|
||||
font-weight: 500;
|
||||
font-display: swap;
|
||||
src: url(/fonts/Merriweather-Italic.ttf) format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Merriweather";
|
||||
font-style: normal;
|
||||
font-weight: bold;
|
||||
font-display: swap;
|
||||
src: url(/fonts/Merriweather-Bold.ttf) format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Merriweather";
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
font-display: swap;
|
||||
src: url(/fonts/SourceSans3-BoldItalic.ttf) format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Source Sans 3";
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-display: swap;
|
||||
src: url(/fonts/SourceSans3-Medium.ttf) format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Source Sans 3";
|
||||
font-style: italic;
|
||||
font-weight: 500;
|
||||
font-display: swap;
|
||||
src: url(/fonts/SourceSans3-MediumItalic.ttf) format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Source Sans 3";
|
||||
font-style: normal;
|
||||
font-weight: bold;
|
||||
font-display: swap;
|
||||
src: url(/fonts/SourceSans3-Bold.ttf) format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Source Sans 3";
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
font-display: swap;
|
||||
src: url(/fonts/SourceSans3-BoldItalic.ttf) format("truetype");
|
||||
}
|
||||
}
|
||||
|
||||
@layer components {
|
||||
a {
|
||||
@apply underline decoration-dotted hover:decoration-solid text-zinc-800 hover:text-zinc-900;
|
||||
}
|
||||
|
||||
h2 {
|
||||
@apply font-bold;
|
||||
}
|
||||
p {
|
||||
@apply mt-2 mb-3;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user