✨ Added footer
This commit is contained in:
@@ -0,0 +1,15 @@
|
|||||||
|
<footer class="text-center text-white border-black">
|
||||||
|
<div class="text-center p-4 bg-gray-700">
|
||||||
|
Made with ❤️ by
|
||||||
|
<a
|
||||||
|
href="https://mawoka.eu?utm_source=ClassQuiz&utm_medium=footer"
|
||||||
|
class="hover:underline bg-clip-text text-transparent bg-gradient-to-r from-[#009444] via-[#39b54a] to-[#8dc63f]"
|
||||||
|
>Mawoka</a
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="flex justify-center bg-gray-700 border-t-2 border-t-white">
|
||||||
|
<p class="text-gray-400 text-center">
|
||||||
|
<i>Kahoot! and the K! logo are trademarks of Kahoot! AS</i>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
@@ -1,107 +1,107 @@
|
|||||||
{
|
{
|
||||||
"index_page": {
|
"index_page": {
|
||||||
"meta": {
|
"meta": {
|
||||||
"title": "Home",
|
"title": "Home",
|
||||||
"description": "ClassQuiz ist eine Quiz-App wie KAHOOT! für Schüler*innen, welche open-source und kostenlos ist"
|
"description": "ClassQuiz ist eine Quiz-App wie KAHOOT! für Schüler*innen, welche open-source und kostenlos ist"
|
||||||
},
|
},
|
||||||
"features_description": {
|
"features_description": {
|
||||||
"1": "ClassQuiz ist eine Quiz-Platform, welche das erstellen und managen von Quizzes erlaubt.",
|
"1": "ClassQuiz ist eine Quiz-Platform, welche das erstellen und managen von Quizzes erlaubt.",
|
||||||
"2": "Das Hauptfeature ist die KAHOOT!-Importfunktion, mit der man Quizzes von KAHOOT! importieren kann."
|
"2": "Das Hauptfeature ist die KAHOOT!-Importfunktion, mit der man Quizzes von KAHOOT! importieren kann."
|
||||||
},
|
},
|
||||||
"slogan": "Die open-source Quiz-Platform!"
|
"slogan": "Die open-source Quiz-Platform!"
|
||||||
},
|
},
|
||||||
"overview_page": {
|
"overview_page": {
|
||||||
"created_at": "Erstellt am",
|
"created_at": "Erstellt am",
|
||||||
"question_count": "Fragenanzahl"
|
"question_count": "Fragenanzahl"
|
||||||
},
|
},
|
||||||
"edit_page": {
|
"edit_page": {
|
||||||
"success_update_title": "Quiz erfolgreich aktualisiert!",
|
"success_update_title": "Quiz erfolgreich aktualisiert!",
|
||||||
"success_update_body": "Das Quiz wurde erfolgreich aktualisiert!"
|
"success_update_body": "Das Quiz wurde erfolgreich aktualisiert!"
|
||||||
},
|
},
|
||||||
"create_page": {
|
"create_page": {
|
||||||
"success": {
|
"success": {
|
||||||
"title": "Quiz erfolgreich erstellt!",
|
"title": "Quiz erfolgreich erstellt!",
|
||||||
"body": "Das Quiz wurde erfolgreich erstellt!"
|
"body": "Das Quiz wurde erfolgreich erstellt!"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"register_page": {
|
"register_page": {
|
||||||
"greeting": "Schön, dich zu sehen!",
|
"greeting": "Schön, dich zu sehen!",
|
||||||
"create_account": "Account erstellen",
|
"create_account": "Account erstellen",
|
||||||
"forgot_password?": "Passwort vergessen?",
|
"forgot_password?": "Passwort vergessen?",
|
||||||
"already_have_account?": "Hast du schon einen Account?"
|
"already_have_account?": "Hast du schon einen Account?"
|
||||||
},
|
},
|
||||||
"login_page": {
|
"login_page": {
|
||||||
"welcome_back": "Willkommen zurück!",
|
"welcome_back": "Willkommen zurück!",
|
||||||
"login_or_create_account": "Einloggen oder Account erstellen",
|
"login_or_create_account": "Einloggen oder Account erstellen",
|
||||||
"already_have_account": "Noch kein Account?",
|
"already_have_account": "Noch kein Account?",
|
||||||
"modal": {
|
"modal": {
|
||||||
"success": {
|
"success": {
|
||||||
"success_check_mail": "Login erfolgreich! Guck in deine Mailbox!",
|
"success_check_mail": "Login erfolgreich! Guck in deine Mailbox!",
|
||||||
"success": "Login erfolgreich!",
|
"success": "Login erfolgreich!",
|
||||||
"description": {
|
"description": {
|
||||||
"success_check_mail": "Bitte überprüfe deine Mailbox, weil du eine Email mit einem Link, um dich einzuloggen, empfangen haben solltest.",
|
"success_check_mail": "Bitte überprüfe deine Mailbox, weil du eine Email mit einem Link, um dich einzuloggen, empfangen haben solltest.",
|
||||||
"success": "Du hast dich erfolgreich angemeldet!"
|
"success": "Du hast dich erfolgreich angemeldet!"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"wrong_creds": "Falsche Email oder falsches Passwort!",
|
"wrong_creds": "Falsche Email oder falsches Passwort!",
|
||||||
"unexpected": "Unerwarteter Fehler!",
|
"unexpected": "Unerwarteter Fehler!",
|
||||||
"description": {
|
"description": {
|
||||||
"wrong_creds": "Bitte stelle sicher, dass dein Passwort und deine Email richtig sind!",
|
"wrong_creds": "Bitte stelle sicher, dass dein Passwort und deine Email richtig sind!",
|
||||||
"unexpected": "Der gute alte unerwartete Fehler hat uns heimgesucht!"
|
"unexpected": "Der gute alte unerwartete Fehler hat uns heimgesucht!"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"words": {
|
"words": {
|
||||||
"question": "Frage",
|
"question": "Frage",
|
||||||
"answer": "Antwort",
|
"answer": "Antwort",
|
||||||
"stats": "Statistiken",
|
"stats": "Statistiken",
|
||||||
"features": "Features",
|
"features": "Features",
|
||||||
"import": "Importieren",
|
"import": "Importieren",
|
||||||
"url": "URL",
|
"url": "URL",
|
||||||
"submit": "Abschicken",
|
"submit": "Abschicken",
|
||||||
"create": "Erstellen",
|
"create": "Erstellen",
|
||||||
"logout": "Abmelden",
|
"logout": "Abmelden",
|
||||||
"title": "Titel",
|
"title": "Titel",
|
||||||
"play": "Spielen",
|
"play": "Spielen",
|
||||||
"edit": "Bearbeiten",
|
"edit": "Bearbeiten",
|
||||||
"delete": "Löschen",
|
"delete": "Löschen",
|
||||||
"public": "Öffentlich",
|
"public": "Öffentlich",
|
||||||
"start": "Start",
|
"start": "Start",
|
||||||
"connect": "Verbinden",
|
"connect": "Verbinden",
|
||||||
"pin": "PIN",
|
"pin": "PIN",
|
||||||
"kick": "Kicken",
|
"kick": "Kicken",
|
||||||
"register": "Registrieren",
|
"register": "Registrieren",
|
||||||
"login": "Anmelden",
|
"login": "Anmelden",
|
||||||
"docs": "Dokumentation",
|
"docs": "Dokumentation",
|
||||||
"close": "Schließen",
|
"close": "Schließen",
|
||||||
"save": "Speichern",
|
"save": "Speichern",
|
||||||
"username": "Nutzername",
|
"username": "Nutzername",
|
||||||
"password": "Passwort",
|
"password": "Passwort",
|
||||||
"email": "Email"
|
"email": "Email"
|
||||||
},
|
},
|
||||||
"editor": {
|
"editor": {
|
||||||
"time_in_seconds": "Zeit in Sekunden",
|
"time_in_seconds": "Zeit in Sekunden",
|
||||||
"right_or_true?": "Richtig?",
|
"right_or_true?": "Richtig?",
|
||||||
"add_new_answer": "Neue Antwort hinzufügen",
|
"add_new_answer": "Neue Antwort hinzufügen",
|
||||||
"add_new_question": "Neue Frage hinzufügen"
|
"add_new_question": "Neue Frage hinzufügen"
|
||||||
},
|
},
|
||||||
"import": {
|
"import": {
|
||||||
"need_help": "",
|
"need_help": "",
|
||||||
"visit_docs": ""
|
"visit_docs": ""
|
||||||
},
|
},
|
||||||
"admin": {
|
"admin": {
|
||||||
"already_registered_as_admin": ""
|
"already_registered_as_admin": ""
|
||||||
},
|
},
|
||||||
"admin_page": {
|
"admin_page": {
|
||||||
"already_registered_as_admin": "Ein Admin wurde schon für dieses Spiel registriert.",
|
"already_registered_as_admin": "Ein Admin wurde schon für dieses Spiel registriert.",
|
||||||
"start_game": "Spiel starten",
|
"start_game": "Spiel starten",
|
||||||
"time_left": "Zeit übrig",
|
"time_left": "Zeit übrig",
|
||||||
"get_results": "Ergebnisse abfragen"
|
"get_results": "Ergebnisse abfragen"
|
||||||
},
|
},
|
||||||
"import_page": {
|
"import_page": {
|
||||||
"need_help": "Brauchst du Hilfe?",
|
"need_help": "Brauchst du Hilfe?",
|
||||||
"visit_docs": "Besuche die Dokumentation"
|
"visit_docs": "Besuche die Dokumentation"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
import { navbarVisible } from '$lib/stores';
|
import { navbarVisible } from '$lib/stores';
|
||||||
import { browser } from '$app/env';
|
import { browser } from '$app/env';
|
||||||
import { getLocalization } from '$lib/i18n';
|
import { getLocalization } from '$lib/i18n';
|
||||||
|
import Footer from '$lib/footer.svelte';
|
||||||
|
|
||||||
const { t } = getLocalization();
|
const { t } = getLocalization();
|
||||||
|
|
||||||
@@ -73,7 +74,6 @@
|
|||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>ClassQuiz - Login</title>
|
<title>ClassQuiz - Login</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<div class="flex items-center justify-center h-full px-4">
|
<div class="flex items-center justify-center h-full px-4">
|
||||||
<div>
|
<div>
|
||||||
<span class="p-4" />
|
<span class="p-4" />
|
||||||
@@ -184,7 +184,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<Footer />
|
||||||
<div
|
<div
|
||||||
class="fixed z-10 inset-0 overflow-y-auto"
|
class="fixed z-10 inset-0 overflow-y-auto"
|
||||||
aria-labelledby="modal-title"
|
aria-labelledby="modal-title"
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
import { getLocalization } from '$lib/i18n';
|
import { getLocalization } from '$lib/i18n';
|
||||||
import { validateSchema } from '@felte/validator-yup';
|
import { validateSchema } from '@felte/validator-yup';
|
||||||
import { navbarVisible } from '$lib/stores';
|
import { navbarVisible } from '$lib/stores';
|
||||||
|
import Footer from '$lib/footer.svelte';
|
||||||
|
|
||||||
const { t } = getLocalization();
|
const { t } = getLocalization();
|
||||||
// import reporter from '@felte/reporter-tippy';
|
// import reporter from '@felte/reporter-tippy';
|
||||||
@@ -227,7 +228,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<Footer />
|
||||||
<div
|
<div
|
||||||
class="fixed z-10 inset-0 overflow-y-auto"
|
class="fixed z-10 inset-0 overflow-y-auto"
|
||||||
aria-labelledby="modal-title"
|
aria-labelledby="modal-title"
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import Footer from '$lib/footer.svelte';
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="min-h-screen flex flex-col">
|
||||||
|
<slot />
|
||||||
|
</div>
|
||||||
|
<div class="pt-4">
|
||||||
|
<Footer />
|
||||||
|
</div>
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { navbarVisible } from '$lib/stores';
|
import { navbarVisible } from '$lib/stores';
|
||||||
import { getLocalization } from '$lib/i18n';
|
import { getLocalization } from '$lib/i18n';
|
||||||
|
import Footer from '$lib/footer.svelte';
|
||||||
|
|
||||||
const { t } = getLocalization();
|
const { t } = getLocalization();
|
||||||
|
|
||||||
@@ -22,31 +23,36 @@
|
|||||||
<meta name="description" content={$t('index_page.meta.description')} />
|
<meta name="description" content={$t('index_page.meta.description')} />
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<section>
|
<div class="min-h-screen flex flex-col">
|
||||||
<div class="pt-12 text-center">
|
<section>
|
||||||
<h1 class="sm:text-8xl text-6xl mt-6 marck-script">ClassQuiz</h1>
|
<div class="pt-12 text-center">
|
||||||
<p class="text-xl mt-4">{$t('index_page.slogan')}</p>
|
<h1 class="sm:text-8xl text-6xl mt-6 marck-script">ClassQuiz</h1>
|
||||||
</div>
|
<p class="text-xl mt-4">{$t('index_page.slogan')}</p>
|
||||||
</section>
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
<section id="stats">
|
<section id="stats">
|
||||||
<div class="text-center pt-48 snap-y">
|
<div class="text-center pt-48 snap-y">
|
||||||
<h1 class="sm:text-6xl text-4xl">{$t('words.stats')}</h1>
|
<h1 class="sm:text-6xl text-4xl">{$t('words.stats')}</h1>
|
||||||
<p class="text-xl pt-4">
|
<p class="text-xl pt-4">
|
||||||
{#await getStats() then stats}
|
{#await getStats() then stats}
|
||||||
There are already <span class="underline">{stats.user_count}</span> users and <!-- TODO: Add translation -->
|
There are already <span class="underline">{stats.user_count}</span> users and
|
||||||
<span class="underline">{stats.quiz_count}</span> quizzes on ClassQuiz.
|
<!-- TODO: Add translation -->
|
||||||
{/await}
|
<span class="underline">{stats.quiz_count}</span> quizzes on ClassQuiz.
|
||||||
</p>
|
{/await}
|
||||||
</div>
|
</p>
|
||||||
</section>
|
</div>
|
||||||
<section id="features">
|
</section>
|
||||||
<div class="text-center pt-24 snap-y">
|
<section id="features">
|
||||||
<h1 class="sm:text-6xl text-4xl">{$t('words.features')}</h1>
|
<div class="text-center pt-24 snap-y">
|
||||||
<p class="text-xl pt-4">
|
<h1 class="sm:text-6xl text-4xl">{$t('words.features')}</h1>
|
||||||
{$t('index_page.features_description.1')}
|
<p class="text-xl pt-4">
|
||||||
<br />
|
{$t('index_page.features_description.1')}
|
||||||
{$t('index_page.features_description.2')}
|
<br />
|
||||||
</p>
|
{$t('index_page.features_description.2')}
|
||||||
</div>
|
</p>
|
||||||
</section>
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Footer />
|
||||||
|
|||||||
+144
-138
@@ -18,6 +18,7 @@
|
|||||||
import type { QuizData } from '../app';
|
import type { QuizData } from '../app';
|
||||||
import { DateTime } from 'luxon';
|
import { DateTime } from 'luxon';
|
||||||
import { getLocalization } from '$lib/i18n';
|
import { getLocalization } from '$lib/i18n';
|
||||||
|
import Footer from '$lib/footer.svelte';
|
||||||
const { t } = getLocalization();
|
const { t } = getLocalization();
|
||||||
|
|
||||||
const getData = async (): Promise<Array<QuizData>> => {
|
const getData = async (): Promise<Array<QuizData>> => {
|
||||||
@@ -57,155 +58,160 @@
|
|||||||
<title>ClassQuiz - Overview</title>
|
<title>ClassQuiz - Overview</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
{#await getData()}
|
<div class="min-h-screen flex flex-col">
|
||||||
<svg class="h-8 w-8 animate-spin mx-auto my-20" viewBox="3 3 18 18">
|
{#await getData()}
|
||||||
<path
|
<svg class="h-8 w-8 animate-spin mx-auto my-20" viewBox="3 3 18 18">
|
||||||
class="fill-black"
|
<path
|
||||||
d="M12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5ZM3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12Z"
|
class="fill-black"
|
||||||
/>
|
d="M12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5ZM3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12Z"
|
||||||
<path
|
/>
|
||||||
class="fill-blue-100"
|
<path
|
||||||
d="M16.9497 7.05015C14.2161 4.31648 9.78392 4.31648 7.05025 7.05015C6.65973 7.44067 6.02656 7.44067 5.63604 7.05015C5.24551 6.65962 5.24551 6.02646 5.63604 5.63593C9.15076 2.12121 14.8492 2.12121 18.364 5.63593C18.7545 6.02646 18.7545 6.65962 18.364 7.05015C17.9734 7.44067 17.3403 7.44067 16.9497 7.05015Z"
|
class="fill-blue-100"
|
||||||
/>
|
d="M16.9497 7.05015C14.2161 4.31648 9.78392 4.31648 7.05025 7.05015C6.65973 7.44067 6.02656 7.44067 5.63604 7.05015C5.24551 6.65962 5.24551 6.02646 5.63604 5.63593C9.15076 2.12121 14.8492 2.12121 18.364 5.63593C18.7545 6.02646 18.7545 6.65962 18.364 7.05015C17.9734 7.44067 17.3403 7.44067 16.9497 7.05015Z"
|
||||||
</svg>
|
/>
|
||||||
{:then quizzes}
|
</svg>
|
||||||
<div class="flex flex-col w-fit mx-auto">
|
{:then quizzes}
|
||||||
<!-- <button
|
<div class="flex flex-col w-fit mx-auto">
|
||||||
|
<!-- <button
|
||||||
class='px-4 py-2 font-medium tracking-wide text-gray-500 whitespace-nowrap dark:text-gray-400 capitalize transition-colors dark:bg-gray-700 duration-200 transform bg-gray-50 rounded-md hover:bg-green-600 focus:outline-none focus:ring focus:ring-blue-300 focus:ring-opacity-80'>
|
class='px-4 py-2 font-medium tracking-wide text-gray-500 whitespace-nowrap dark:text-gray-400 capitalize transition-colors dark:bg-gray-700 duration-200 transform bg-gray-50 rounded-md hover:bg-green-600 focus:outline-none focus:ring focus:ring-blue-300 focus:ring-opacity-80'>
|
||||||
Primary
|
Primary
|
||||||
</button>-->
|
</button>-->
|
||||||
<div class="w-full grid grid-cols-3 gap-2">
|
<div class="w-full grid grid-cols-3 gap-2">
|
||||||
<a
|
<a
|
||||||
href="/create"
|
href="/create"
|
||||||
class="px-4 py-2 leading-5 text-white transition-colors duration-200 transform bg-gray-700 rounded text-center hover:bg-gray-600 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50"
|
class="px-4 py-2 leading-5 text-white transition-colors duration-200 transform bg-gray-700 rounded text-center hover:bg-gray-600 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50"
|
||||||
>{$t('words.create')}
|
>{$t('words.create')}
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
href="/import"
|
href="/import"
|
||||||
class="px-4 py-2 leading-5 text-white transition-colors duration-200 transform bg-gray-700 rounded text-center hover:bg-gray-600 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50"
|
class="px-4 py-2 leading-5 text-white transition-colors duration-200 transform bg-gray-700 rounded text-center hover:bg-gray-600 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50"
|
||||||
>{$t('words.import')}
|
>{$t('words.import')}
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
href="/api/v1/users/logout"
|
href="/api/v1/users/logout"
|
||||||
class="px-4 py-2 leading-5 text-white transition-colors duration-200 transform bg-gray-700 rounded text-center hover:bg-gray-600 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50"
|
class="px-4 py-2 leading-5 text-white transition-colors duration-200 transform bg-gray-700 rounded text-center hover:bg-gray-600 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50"
|
||||||
>{$t('words.logout')}
|
>{$t('words.logout')}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="overflow-x-auto sm:-mx-8 lg:-mx-8">
|
<div class="overflow-x-auto sm:-mx-8 lg:-mx-8">
|
||||||
<div class="inline-block py-2 min-w-full sm:px-6 lg:px-8">
|
<div class="inline-block py-2 min-w-full sm:px-6 lg:px-8">
|
||||||
<div class="overflow-hidden shadow-md sm:rounded-lg">
|
<div class="overflow-hidden shadow-md sm:rounded-lg">
|
||||||
<table class="min-w-full">
|
<table class="min-w-full">
|
||||||
<thead class="bg-gray-50 dark:bg-gray-700">
|
<thead class="bg-gray-50 dark:bg-gray-700">
|
||||||
<tr>
|
<tr>
|
||||||
<th
|
<th
|
||||||
scope="col"
|
scope="col"
|
||||||
class="py-3 px-6 text-xs font-medium tracking-wider text-left text-gray-700 uppercase dark:text-gray-400"
|
class="py-3 px-6 text-xs font-medium tracking-wider text-left text-gray-700 uppercase dark:text-gray-400"
|
||||||
>
|
|
||||||
{$t('words.title')}
|
|
||||||
</th>
|
|
||||||
<th
|
|
||||||
scope="col"
|
|
||||||
class="py-3 px-6 text-xs font-medium tracking-wider text-left text-gray-700 uppercase dark:text-gray-400"
|
|
||||||
>
|
|
||||||
{$t('overview_page.created_at')}
|
|
||||||
</th>
|
|
||||||
<th
|
|
||||||
scope="col"
|
|
||||||
class="py-3 px-6 text-xs font-medium tracking-wider text-left text-gray-700 uppercase dark:text-gray-400"
|
|
||||||
>
|
|
||||||
{$t('overview_page.question_count')}
|
|
||||||
</th>
|
|
||||||
<th
|
|
||||||
scope="col"
|
|
||||||
class="py-3 px-6 text-xs font-medium tracking-wider text-left text-gray-700 uppercase dark:text-gray-400"
|
|
||||||
>
|
|
||||||
{$t('words.play')}
|
|
||||||
</th>
|
|
||||||
<th
|
|
||||||
scope="col"
|
|
||||||
class="py-3 px-6 text-xs font-medium tracking-wider text-left text-gray-700 uppercase dark:text-gray-400"
|
|
||||||
>
|
|
||||||
{$t('words.edit')}
|
|
||||||
</th>
|
|
||||||
<th
|
|
||||||
scope="col"
|
|
||||||
class="py-3 px-6 text-xs font-medium tracking-wider text-left text-gray-700 uppercase dark:text-gray-400"
|
|
||||||
>
|
|
||||||
{$t('words.delete')}
|
|
||||||
</th>
|
|
||||||
<th
|
|
||||||
scope="col"
|
|
||||||
class="py-3 px-6 text-xs font-medium tracking-wider text-left text-gray-700 uppercase dark:text-gray-400"
|
|
||||||
>
|
|
||||||
{$t('words.public')}
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<!-- Product 1 -->
|
|
||||||
{#each quizzes as quiz}
|
|
||||||
<tr class="bg-white border-b dark:bg-gray-800 dark:border-gray-700">
|
|
||||||
<td
|
|
||||||
class="py-4 px-6 text-sm font-medium text-gray-900 whitespace-nowrap dark:text-white"
|
|
||||||
>
|
>
|
||||||
{quiz.title}
|
{$t('words.title')}
|
||||||
</td>
|
</th>
|
||||||
<td
|
<th
|
||||||
class="py-4 px-6 text-sm text-gray-500 whitespace-nowrap dark:text-gray-400"
|
scope="col"
|
||||||
|
class="py-3 px-6 text-xs font-medium tracking-wider text-left text-gray-700 uppercase dark:text-gray-400"
|
||||||
>
|
>
|
||||||
{formatDate(quiz.created_at)}
|
{$t('overview_page.created_at')}
|
||||||
</td>
|
</th>
|
||||||
<td
|
<th
|
||||||
class="py-4 px-6 text-sm text-gray-500 whitespace-nowrap dark:text-gray-400"
|
scope="col"
|
||||||
|
class="py-3 px-6 text-xs font-medium tracking-wider text-left text-gray-700 uppercase dark:text-gray-400"
|
||||||
>
|
>
|
||||||
{quiz.questions.length}
|
{$t('overview_page.question_count')}
|
||||||
</td>
|
</th>
|
||||||
<td
|
<th
|
||||||
class="py-4 px-6 text-sm text-gray-500 whitespace-nowrap dark:text-gray-400"
|
scope="col"
|
||||||
|
class="py-3 px-6 text-xs font-medium tracking-wider text-left text-gray-700 uppercase dark:text-gray-400"
|
||||||
>
|
>
|
||||||
<button
|
{$t('words.play')}
|
||||||
on:click={() => {
|
</th>
|
||||||
startGame(quiz.id);
|
<th
|
||||||
}}
|
scope="col"
|
||||||
class="border border-green-600"
|
class="py-3 px-6 text-xs font-medium tracking-wider text-left text-gray-700 uppercase dark:text-gray-400"
|
||||||
>
|
|
||||||
{$t('words.start')}
|
|
||||||
</button>
|
|
||||||
</td>
|
|
||||||
<td
|
|
||||||
class="py-4 px-6 text-sm text-gray-500 whitespace-nowrap dark:text-gray-400"
|
|
||||||
>
|
>
|
||||||
<a href="/edit?quiz_id={quiz.id}">Edit</a>
|
{$t('words.edit')}
|
||||||
</td>
|
</th>
|
||||||
<td
|
<th
|
||||||
class="py-4 px-6 text-sm text-gray-500 whitespace-nowrap dark:text-gray-400"
|
scope="col"
|
||||||
|
class="py-3 px-6 text-xs font-medium tracking-wider text-left text-gray-700 uppercase dark:text-gray-400"
|
||||||
>
|
>
|
||||||
<button
|
{$t('words.delete')}
|
||||||
on:click={() => {
|
</th>
|
||||||
deleteQuiz(quiz.id);
|
<th
|
||||||
}}
|
scope="col"
|
||||||
class="border border-green-600"
|
class="py-3 px-6 text-xs font-medium tracking-wider text-left text-gray-700 uppercase dark:text-gray-400"
|
||||||
>
|
|
||||||
{$t('words.delete')}
|
|
||||||
</button>
|
|
||||||
</td>
|
|
||||||
<td
|
|
||||||
class="py-4 px-6 text-sm text-gray-500 whitespace-nowrap dark:text-gray-400"
|
|
||||||
>
|
>
|
||||||
{#if quiz.public}
|
{$t('words.public')}
|
||||||
✅
|
</th>
|
||||||
{:else}
|
|
||||||
❌
|
|
||||||
{/if}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
{/each}
|
</thead>
|
||||||
</tbody>
|
<tbody>
|
||||||
</table>
|
<!-- Product 1 -->
|
||||||
|
{#each quizzes as quiz}
|
||||||
|
<tr
|
||||||
|
class="bg-white border-b dark:bg-gray-800 dark:border-gray-700"
|
||||||
|
>
|
||||||
|
<td
|
||||||
|
class="py-4 px-6 text-sm font-medium text-gray-900 whitespace-nowrap dark:text-white"
|
||||||
|
>
|
||||||
|
{quiz.title}
|
||||||
|
</td>
|
||||||
|
<td
|
||||||
|
class="py-4 px-6 text-sm text-gray-500 whitespace-nowrap dark:text-gray-400"
|
||||||
|
>
|
||||||
|
{formatDate(quiz.created_at)}
|
||||||
|
</td>
|
||||||
|
<td
|
||||||
|
class="py-4 px-6 text-sm text-gray-500 whitespace-nowrap dark:text-gray-400"
|
||||||
|
>
|
||||||
|
{quiz.questions.length}
|
||||||
|
</td>
|
||||||
|
<td
|
||||||
|
class="py-4 px-6 text-sm text-gray-500 whitespace-nowrap dark:text-gray-400"
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
on:click={() => {
|
||||||
|
startGame(quiz.id);
|
||||||
|
}}
|
||||||
|
class="border border-green-600"
|
||||||
|
>
|
||||||
|
{$t('words.start')}
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
<td
|
||||||
|
class="py-4 px-6 text-sm text-gray-500 whitespace-nowrap dark:text-gray-400"
|
||||||
|
>
|
||||||
|
<a href="/edit?quiz_id={quiz.id}">Edit</a>
|
||||||
|
</td>
|
||||||
|
<td
|
||||||
|
class="py-4 px-6 text-sm text-gray-500 whitespace-nowrap dark:text-gray-400"
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
on:click={() => {
|
||||||
|
deleteQuiz(quiz.id);
|
||||||
|
}}
|
||||||
|
class="border border-green-600"
|
||||||
|
>
|
||||||
|
{$t('words.delete')}
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
<td
|
||||||
|
class="py-4 px-6 text-sm text-gray-500 whitespace-nowrap dark:text-gray-400"
|
||||||
|
>
|
||||||
|
{#if quiz.public}
|
||||||
|
✅
|
||||||
|
{:else}
|
||||||
|
❌
|
||||||
|
{/if}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{/each}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{:catch err}
|
||||||
{:catch err}
|
<p>{err}</p>
|
||||||
<p>{err}</p>
|
{/await}
|
||||||
{/await}
|
</div>
|
||||||
|
<Footer />
|
||||||
|
|||||||
Reference in New Issue
Block a user