Verified Commit 6562562d authored by hanke's avatar hanke Committed by Jakob Moser
Browse files

Implement new category of services for TaCoS 2026

parent b05614d2
Loading
Loading
Loading
Loading
+88 −0
Original line number Diff line number Diff line
import { Service } from "../../model/Service.mjs"
import { ServiceLink } from "../pieces/ServiceLink.mjs"
import { Base } from "./Base.mjs"

const germanDateFormatter = new Intl.DateTimeFormat("de-DE", {
    month: "2-digit",
    day: "2-digit",
    year: "numeric",
})

// function getMensaLink() {
//     const dayToShow = new Date()
//     if (dayToShow.getHours() >= 15) {
//         // If it is 15:00 or later, show tomorrow's menu
//         dayToShow.setDate(dayToShow.getDate() + 1)
//     }

//     return `https://www.stw.uni-heidelberg.de/external-tools/speiseplan/speiseplan.php?lang=de&mode=Mensa+Im+Neuenheimer+Feld+304&date=${germanDateFormatter.format(
//         dayToShow
//     )}`
// }

export const TacosServices = {
    oncreate() {
        document.title = "TaCoS 2026-Dienste · FS Coli Portal"
    },
    view() {
        return m(
            Base,
            m("article.services", [
                m(
                    ServiceLink,
                    new Service(
                        "ChefOrga",
                        "https://https://orga.chefexperte.de/",
                        "fa-solid fa-at",
                        "ChefOrga-Account"
                    )
                ),
                // m(
                //     ServiceLink,
                //     new Service(
                //         "Overleaf",
                //         "https://overleaf.cl.uni-heidelberg.de",
                //         "fa-solid fa-leaf",
                //         "CL-Account"
                //     )
                // ),
                // More to come as we get there lol
                // m(
                //     ServiceLink,
                //     new Service(
                //         "Moodle",
                //         "https://moodle.uni-heidelberg.de/",
                //         "fa-solid fa-school-flag",
                //         "Uni-ID"
                //     )
                // ),
                // m(
                //     ServiceLink,
                //     new Service(
                //         "Uni-Mail",
                //         "https://sogo.uni-heidelberg.de/",
                //         "fa-solid fa-inbox",
                //         "Uni-ID"
                //     )
                // ),
                // m(
                //     ServiceLink,
                //     new Service(
                //         "HeiCo",
                //         "https://heico.uni-heidelberg.de/",
                //         "fa-solid fa-graduation-cap",
                //         "Uni-ID"
                //     )
                // ),
                // m(
                //     ServiceLink,
                //     new Service(
                //         "Mensa INF",
                //         getMensaLink(),
                //         "fa-solid fa-utensils"
                //     )
                // ),
            ])
        )
    },
}
+19 −10
Original line number Diff line number Diff line
@@ -15,10 +15,10 @@ export const Nav = {
                            m(
                                "a",
                                { href: "#navigation", title: "Navigation" },
                                m("i.fa-solid.fa-bars"),
                                m("i.fa-solid.fa-bars")
                            )
                        ),
                        ),
                    ]),
                    ])
                ),
            ]),
            m("div.full#navigation", [
@@ -31,23 +31,30 @@ export const Nav = {
                            m(NavPageLink, {
                                href: "/fachschaftssitzung",
                                label: "Fachschaftssitzung",
                            }),
                            })
                        ),
                        m(
                            "li",
                            m(NavPageLink, {
                                href: "/fs-services",
                                label: "FS-Dienste",
                            }),
                            })
                        ),
                        m(
                            "li",
                            m(NavPageLink, {
                                href: "/uni-services",
                                label: "Uni-Dienste",
                            }),
                            })
                        ),
                    ]),
                        m(
                            "li",
                            m(NavPageLink, {
                                href: "/tacos-services",
                                label: "TaCoS 2026-Dienste",
                            })
                        ),
                    ])
                ),
                m(
                    "section.right",
@@ -64,12 +71,14 @@ export const Nav = {
                                : m(NavPageLink, {
                                      href: hasQueryParam("next", m.route.get())
                                          ? m.route.get()
                                          : `/login?next=${m.route.get() || "/"}`,
                                          : `/login?next=${
                                                m.route.get() || "/"
                                            }`,
                                      label: " Anmelden",
                                      icon: "fa-solid fa-right-to-bracket",
                                  }),
                                  })
                        ),
                    ]),
                    ])
                ),
            ]),
        ])
+2 −0
Original line number Diff line number Diff line
import { Start } from "./components/pages/Start.mjs"
import { FsServices } from "./components/pages/FsServices.mjs"
import { UniServices } from "./components/pages/UniServices.mjs"
import { TacosServices } from "./components/pages/TacosServices.mjs"
import { Unlock } from "./components/pages/Unlock.mjs"
import { Fachschaftssitzung } from "./components/pages/Fachschaftssitzung.mjs"
import { Login } from "./components/pages/Login.mjs"
@@ -12,6 +13,7 @@ m.route.prefix = ""
m.route(document.body, "/", {
    "/": Start,
    "/fs-services": FsServices,
    "/tacos-services": TacosServices,
    "/all-services": {
        // Redirect for compatibility purposes, say, if anyone already has a bookmark to /all-services
        onmatch(args) {