Commit 962bce91 authored by Jakob Moser's avatar Jakob Moser
Browse files

Replace .overlay-shown with .welcome-shown

parent 1ce292a7
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ body {
    grid-template-columns: 1fr 1fr;
}

body.overlay-shown {
body.welcome-shown {
    overflow: hidden;
}

@@ -21,11 +21,13 @@ body.overlay-shown {
    grid-template-columns: 1fr 2fr 1fr;
}

.overlay-shown .overlay {
.welcome-shown .overlay {
    display: grid;
}

.dialog {
    display: none;

    align-self: center;
    justify-self: center;

@@ -41,6 +43,10 @@ body.overlay-shown {
    box-shadow: 4px 4px 4px black;
}

.welcome-shown #welcome-dialog {
    display: block;
}

.dialog h1 {
    margin-top: 0;
}
+4 −4
Original line number Diff line number Diff line
@@ -94,16 +94,16 @@ function initActionLinks() {
                + "\nDas Token wurde in die Zwischenablage kopiert, du kannst es in der Mail also direkt einfach einfügen.")
            },
            "begin": function () {
                document.body.classList.remove("overlay-shown")
                document.body.classList.remove("welcome-shown")
                currentTest.markWelcomeAsRead(currentState)
            },
            "continue": function () {
                document.body.classList.remove("overlay-shown")
                document.body.classList.remove("welcome-shown")
            },
            "welcome-again": function () {
                document.querySelector("#welcome-dialog [data-action='begin']").style.display = "none"
                document.querySelector("#welcome-dialog [data-action='continue']").style.display = "block"
                document.body.classList.add("overlay-shown")
                document.body.classList.add("welcome-shown")
            },
            "reset": function () {
                const response = prompt("Möchtest du wirklich allen Fortschritt löschen und von vorne beginnen? Achtung: Die Seite verhält sich danach, als würdest du sie zum allerersten Mal besuchen (insbesondere: falls du schon angefangen hast, den Pooltest zu bearbeiten, ist dein Fortschritt komplett weg). Gib 'ZURÜCKSETZEN' (ohne Anführungszeichen) ein, falls du alles zurücksetzen willst. Ansonsten drücke einfach auf Abbrechen :)")
@@ -141,7 +141,7 @@ export function main() {
        }

        if (!currentTest.wasWelcomeRead(currentState)) {
            document.body.classList.add("overlay-shown")
            document.body.classList.add("welcome-shown")
        }
    } else {
        // No welcome dialog exists, so we also don't want the user to be able to show it again