Verified Commit 0f5fa4cc authored by Jakob Moser's avatar Jakob Moser
Browse files

Add Service abstraction, unify terms, dry data

parent 893e0a23
Loading
Loading
Loading
Loading
+18 −18
Changes for css/main.css: 18 added lines, 18 removed lines.
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ nav ul li:hover a {
    border-color: var(--primary-light);
}

.tools {
.services {
    display: grid;

    grid-template-columns: repeat(6, min-content);
@@ -110,11 +110,11 @@ nav ul li:hover a {
    row-gap: 2em;
}

.tools.col-7 {
.services.col-7 {
    grid-template-columns: repeat(7, min-content);
}

.tool {
.service {
    display: grid;

    row-gap: 1em;
@@ -132,7 +132,7 @@ nav ul li:hover a {
    );
}

article:not(.tools) {
article:not(.services) {
    padding: 3em 4em;
}

@@ -180,7 +180,7 @@ a.detail:hover {
    text-decoration: underline;
}

.tool:hover .detail {
.service:hover .detail {
    color: white;
}

@@ -217,35 +217,35 @@ a.detail:hover {
}

@media (max-width: 1670px) {
    .tools.col-7 {
    .services.col-7 {
        grid-template-columns: repeat(6, min-content);
    }
}

@media (max-width: 1390px) {
    .tools,
    .tools.col-7 {
    .services,
    .services.col-7 {
        grid-template-columns: repeat(5, min-content);
    }
}

@media (max-width: 1150px) {
    .tools,
    .tools.col-7 {
    .services,
    .services.col-7 {
        grid-template-columns: repeat(4, min-content);
    }
}

@media (max-width: 980px) {
    .tools,
    .tools.col-7 {
    .services,
    .services.col-7 {
        grid-template-columns: repeat(3, min-content);
    }
}

@media (max-width: 740px) {
    .tools,
    .tools.col-7 {
    .services,
    .services.col-7 {
        grid-template-columns: repeat(2, min-content);
    }
}
@@ -256,16 +256,16 @@ a.detail:hover {
        height: 8em;
    }

    .tools,
    .tools.col-7 {
    .services,
    .services.col-7 {
        column-gap: 2em;
        margin: 2em;
    }
}

@media (max-width: 310px) {
    .tools,
    .tools.col-7 {
    .services,
    .services.col-7 {
        grid-template-columns: repeat(1, min-content);
    }
}
+6 −74
Changes for js/components/pages/AllServices.mjs: 6 added lines, 74 removed lines.
Original line number Diff line number Diff line
import { Service } from "../pieces/Service.mjs"
import { services } from "../../model/services.mjs"
import { ServiceLink } from "../pieces/ServiceLink.mjs"
import { Base } from "./Base.mjs"

export const All = {
@@ -8,79 +9,10 @@ export const All = {
    view() {
        return m(
            Base,
            m("article.tools", [
                m(Service, {
                    href: "https://fachschaft.cl.uni-heidelberg.de/meet",
                    icon: "fa-solid fa-phone-volume",
                    label: "Meeting",
                }),
                m(Service, {
                    href: "https://fachschaft.cl.uni-heidelberg.de/tickets",
                    icon: "fa-regular fa-envelope",
                    label: "Tickets",
                    account: "CL-Account",
                    unlockRequired: true,
                }),
                m(Service, {
                    href: "https://fachschaft.cl.uni-heidelberg.de/todo",
                    icon: "fa-solid fa-list-check",
                    label: "Todo",
                    account: "CL-Account",
                    unlockRequired: true,
                }),
                m(Service, {
                    href: "https://fachschaft.cl.uni-heidelberg.de/docs/Kalender",
                    icon: "fa-regular fa-calendar-days",
                    label: "Kalender",
                    account: "Eigener Account",
                    unlockRequired: true,
                }),
                m(Service, {
                    href: "https://fachschaft.cl.uni-heidelberg.de/protokolle",
                    icon: "fa-regular fa-note-sticky",
                    label: "Protokolle",
                    account: "CL-Account",
                    unlockRequired: true,
                }),
                m(Service, {
                    href: "/#!/unlock",
                    icon: "fa-solid fa-lock",
                    label: "Freischaltung",
                    sameTab: true,
                }),
                m(Service, {
                    href: "https://bitwarden.stura.uni-heidelberg.de",
                    icon: "fa-solid fa-key",
                    label: "Passwörter",
                    account: "Eigener Account",
                    unlockRequired: true,
                }),
                m(Service, {
                    href: "https://status.fsco.li",
                    icon: "fa-solid fa-heart-pulse",
                    label: "Status",
                }),
                m(Service, {
                    href: "https://automation.fachschaft.cl.uni-heidelberg.de",
                    icon: "fa-solid fa-robot",
                    label: "Mailobert & Co.",
                    account: "Geteilter Account",
                    passwordInVault: true,
                }),
                m(Service, {
                    href: "https://traefik.fachschaft.cl.uni-heidelberg.de",
                    icon: "fa-solid fa-globe",
                    label: "Traefik",
                    account: "Geteilter Account",
                    passwordInVault: true,
                }),
                m(Service, {
                    href: "https://fachschaft.cl.uni-heidelberg.de/wp-admin",
                    icon: "fa-brands fa-wordpress",
                    label: "Website-Admin",
                    account: "CL-Account",
                    unlockRequired: true,
                }),
            m("article.services", [
                services
                    .toSorted((s1, s2) => s1.name.localeCompare(s2.name))
                    .map(service => m(ServiceLink, service)),
            ]),
        )
    },
+4 −41
Changes for js/components/pages/Start.mjs: 4 added lines, 41 removed lines.
Original line number Diff line number Diff line
import { Service } from "../pieces/Service.mjs"
import { services } from "../../model/services.mjs"
import { ServiceLink } from "../pieces/ServiceLink.mjs"
import { Base } from "./Base.mjs"

export const Start = {
@@ -8,46 +9,8 @@ export const Start = {
    view() {
        return m(
            Base,
            m("article.tools", [
                m(Service, {
                    href: "https://fachschaft.cl.uni-heidelberg.de/meet",
                    icon: "fa-solid fa-phone-volume",
                    label: "Meeting",
                }),
                m(Service, {
                    href: "https://fachschaft.cl.uni-heidelberg.de/tickets",
                    icon: "fa-regular fa-envelope",
                    label: "Tickets",
                    account: "CL-Account",
                    unlockRequired: true,
                }),
                m(Service, {
                    href: "https://fachschaft.cl.uni-heidelberg.de/todo",
                    icon: "fa-solid fa-list-check",
                    label: "Todo",
                    account: "CL-Account",
                    unlockRequired: true,
                }),
                m(Service, {
                    href: "https://fachschaft.cl.uni-heidelberg.de/docs/Kalender",
                    icon: "fa-regular fa-calendar-days",
                    label: "Kalender",
                    account: "Eigener Account",
                    unlockRequired: true,
                }),
                m(Service, {
                    href: "https://fachschaft.cl.uni-heidelberg.de/protokolle",
                    icon: "fa-regular fa-note-sticky",
                    label: "Protokolle",
                    account: "CL-Account",
                    unlockRequired: true,
                }),
                m(Service, {
                    href: "/#!/unlock",
                    icon: "fa-solid fa-lock",
                    label: "Freischaltung",
                    sameTab: true,
                }),
            m("article.services", [
                services.slice(0, 6).map(service => m(ServiceLink, service)),
            ]),
        )
    },
+1 −1
Changes for js/components/pieces/Agenda.mjs: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ export const Agenda = {
                    href: "https://fachschaft.cl.uni-heidelberg.de/todo",
                    target: "_blank",
                },
                [m("i.fa-solid.fa-list-check"), "Bearbeiten im Todo-Tool"],
                [m("i.fa-solid.fa-list-check"), "Bearbeiten im Todo-"],
            ),
        )
    },
+1 −1
Changes for js/components/pieces/BoxedButton.mjs: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ export const BoxedButton = {
                    m("i", {
                        class: vnode.attrs.icon,
                    }),
                    vnode.attrs.label,
                    vnode.attrs.name,
                ],
            ),
        ]
Loading