📄 Added license-note to every file

This commit is contained in:
Mawoka
2022-07-02 17:14:51 +02:00
parent 4842167597
commit 469cd3e779
124 changed files with 602 additions and 0 deletions
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import sentry_sdk import sentry_sdk
from fastapi import FastAPI, Request from fastapi import FastAPI, Request
from sentry_sdk.integrations.redis import RedisIntegration from sentry_sdk.integrations.redis import RedisIntegration
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
from datetime import timedelta from datetime import timedelta
from typing import Dict from typing import Dict
from typing import Optional from typing import Optional
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import uuid import uuid
from json import loads from json import loads
from typing import Union from typing import Union
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
from functools import lru_cache from functools import lru_cache
from redis import asyncio as redis_lib from redis import asyncio as redis_lib
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import databases import databases
import sqlalchemy import sqlalchemy
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import uuid import uuid
from datetime import datetime from datetime import datetime
from typing import Optional from typing import Optional
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import os import os
import smtplib import smtplib
import ssl import ssl
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import asyncio import asyncio
from typing import Optional from typing import Optional
+4
View File
@@ -33,6 +33,10 @@ Notice that '_mint()' behaves deterministically, finding the same suffix
every time it is passed the same arguments. 'mint()' incorporates a random every time it is passed the same arguments. 'mint()' incorporates a random
salt in stamps (as per the hashcash v.1 protocol). salt in stamps (as per the hashcash v.1 protocol).
""" """
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
from string import ascii_letters from string import ascii_letters
from math import ceil, floor from math import ceil, floor
import hashlib import hashlib
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
from typing import List, Any, Optional from typing import List, Any, Optional
from uuid import UUID from uuid import UUID
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
from aiohttp import ClientSession from aiohttp import ClientSession
from pydantic import BaseModel from pydantic import BaseModel
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import html import html
import json import json
import uuid import uuid
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
from typing import List from typing import List
from aiohttp import ClientSession from aiohttp import ClientSession
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
from fastapi import APIRouter from fastapi import APIRouter
from classquiz.oauth import google, github from classquiz.oauth import google, github
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
from classquiz.db.models import User, UserSession from classquiz.db.models import User, UserSession
from fastapi import Response, Request, HTTPException from fastapi import Response, Request, HTTPException
import os import os
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
from typing import Optional from typing import Optional
import authlib.integrations.base_client import authlib.integrations.base_client
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
from fastapi import APIRouter, Request, HTTPException, Response from fastapi import APIRouter, Request, HTTPException, Response
from classquiz.config import settings from classquiz.config import settings
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
from authlib.integrations.starlette_client import OAuth from authlib.integrations.starlette_client import OAuth
from classquiz.config import settings from classquiz.config import settings
from functools import lru_cache from functools import lru_cache
+3
View File
@@ -0,0 +1,3 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import asyncio import asyncio
import html import html
import re import re
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import json import json
import re import re
import uuid import uuid
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import pydantic import pydantic
from fastapi import APIRouter from fastapi import APIRouter
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
from fastapi import APIRouter from fastapi import APIRouter
from classquiz.config import redis from classquiz.config import redis
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import re import re
from fastapi import APIRouter, HTTPException from fastapi import APIRouter, HTTPException
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
from fastapi import APIRouter from fastapi import APIRouter
from classquiz.db.models import User from classquiz.db.models import User
from classquiz.config import settings from classquiz.config import settings
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import os import os
import ormar import ormar
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import io import io
import qrcode import qrcode
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import json import json
import os import os
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
from io import BytesIO from io import BytesIO
from typing import Optional from typing import Optional
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
from io import BytesIO from io import BytesIO
from classquiz.storage.errors import DeletionFailedError, SavingFailedError, DownloadingFailedError from classquiz.storage.errors import DeletionFailedError, SavingFailedError, DownloadingFailedError
+5
View File
@@ -1,3 +1,8 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
class DeletionFailedError(Exception): class DeletionFailedError(Exception):
pass pass
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import io import io
import os import os
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
from typing import Generator from typing import Generator
from fastapi.testclient import TestClient from fastapi.testclient import TestClient
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import pytest import pytest
from classquiz.auth import get_password_hash, verify_password, settings, ALGORITHM, create_access_token from classquiz.auth import get_password_hash, verify_password, settings, ALGORITHM, create_access_token
from jose import JWTError, jwt from jose import JWTError, jwt
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import pytest import pytest
from classquiz.kahoot_importer.get import get from classquiz.kahoot_importer.get import get
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import pytest import pytest
from classquiz.kahoot_importer.import_quiz import _download_image from classquiz.kahoot_importer.import_quiz import _download_image
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import pytest import pytest
from classquiz.kahoot_importer.search import search from classquiz.kahoot_importer.search import search
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import uuid import uuid
import pytest import pytest
+4
View File
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import pytest import pytest
from classquiz.config import settings from classquiz.config import settings
+6
View File
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
module.exports = { module.exports = {
root: true, root: true,
parser: '@typescript-eslint/parser', parser: '@typescript-eslint/parser',
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
module.exports = { module.exports = {
options: { options: {
debug: true, debug: true,
+6
View File
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
const tailwindcss = require('tailwindcss'); const tailwindcss = require('tailwindcss');
const autoprefixer = require('autoprefixer'); const autoprefixer = require('autoprefixer');
const cssnano = require('cssnano'); const cssnano = require('cssnano');
+6
View File
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
/* Write your global styles here, in PostCSS syntax */ /* Write your global styles here, in PostCSS syntax */
@tailwind base; @tailwind base;
@tailwind components; @tailwind components;
+5
View File
@@ -0,0 +1,5 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
+6
View File
@@ -1,3 +1,9 @@
<!--
~ This Source Code Form is subject to the terms of the Mozilla Public
~ License, v. 2.0. If a copy of the MPL was not distributed with this
~ file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
+6
View File
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
import * as cookie from 'cookie'; import * as cookie from 'cookie';
import Redis from 'ioredis'; import Redis from 'ioredis';
+5
View File
@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script lang="ts"> <script lang="ts">
import { browser } from '$app/env'; import { browser } from '$app/env';
import { Map, Marker } from '@beyonk/svelte-mapbox'; import { Map, Marker } from '@beyonk/svelte-mapbox';
+6
View File
@@ -1,3 +1,9 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<svg class="h-8 w-8 animate-spin mx-auto my-20" viewBox="3 3 18 18"> <svg class="h-8 w-8 animate-spin mx-auto my-20" viewBox="3 3 18 18">
<path <path
class="fill-black" class="fill-black"

Before

Width:  |  Height:  |  Size: 680 B

After

Width:  |  Height:  |  Size: 898 B

+5
View File
@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script lang="ts"> <script lang="ts">
import type { QuizData } from '$lib/quiz_types'; import type { QuizData } from '$lib/quiz_types';
import { getLocalization } from '$lib/i18n'; import { getLocalization } from '$lib/i18n';
+6
View File
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
import type { QuizData } from '$lib/quiz_types'; import type { QuizData } from '$lib/quiz_types';
export const get_question_title = (q_number: number, quiz_data: QuizData): string => { export const get_question_title = (q_number: number, quiz_data: QuizData): string => {
+6
View File
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
/** Dispatch event on click outside of node */ /** Dispatch event on click outside of node */
export function clickOutside(node) { export function clickOutside(node) {
const handleClick = (event) => { const handleClick = (event) => {
+5
View File
@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script> <script>
export let headerText; export let headerText;
+6
View File
@@ -1,2 +1,8 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
export const google_auth_enabled = import.meta.env.VITE_GOOGLE_AUTH_ENABLED === 'true'; export const google_auth_enabled = import.meta.env.VITE_GOOGLE_AUTH_ENABLED === 'true';
export const github_auth_enabled = import.meta.env.VITE_GITHUB_AUTH_ENABLED === 'true'; export const github_auth_enabled = import.meta.env.VITE_GITHUB_AUTH_ENABLED === 'true';
+5
View File
@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script lang="ts"> <script lang="ts">
import { mint } from '$lib/hashcash'; import { mint } from '$lib/hashcash';
import { dataSchema } from '$lib/yupSchemas'; import { dataSchema } from '$lib/yupSchemas';
+5
View File
@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script lang="ts"> <script lang="ts">
import type { EditorData, Answer } from '$lib/quiz_types'; import type { EditorData, Answer } from '$lib/quiz_types';
import { reach } from 'yup'; import { reach } from 'yup';
+6
View File
@@ -1,3 +1,9 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 8" width="16" height="16"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 8" width="16" height="16">
<path fill="#d0d0d0" fill-rule="evenodd" d="M0 0h4v4H0V0zm4 4h4v4H4V4z"/> <path fill="#d0d0d0" fill-rule="evenodd" d="M0 0h4v4H0V0zm4 4h4v4H4V4z"/>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 167 B

After

Width:  |  Height:  |  Size: 385 B

@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script lang="ts"> <script lang="ts">
import type { EditorData } from '$lib/quiz_types'; import type { EditorData } from '$lib/quiz_types';
+5
View File
@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script lang="ts"> <script lang="ts">
import type { EditorData, Question } from '../quiz_types'; import type { EditorData, Question } from '../quiz_types';
import { reach } from 'yup'; import { reach } from 'yup';
+5
View File
@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script lang="ts"> <script lang="ts">
import { Dashboard as SvelteDashboard } from '@uppy/svelte'; import { Dashboard as SvelteDashboard } from '@uppy/svelte';
import Uppy from '@uppy/core'; import Uppy from '@uppy/core';
+6
View File
@@ -1,3 +1,9 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<footer class="text-center text-white border-black"> <footer class="text-center text-white border-black">
<div class="text-center pt-4 bg-gray-700"> <div class="text-center pt-4 bg-gray-700">
Made with ❤️ by Made with ❤️ by
+6
View File
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
import { DateTime } from 'luxon'; import { DateTime } from 'luxon';
const gen_salt = (l: number): string => { const gen_salt = (l: number): string => {
+6
View File
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
pre code.hljs { pre code.hljs {
display: block; display: block;
overflow-x: auto; overflow-x: auto;
+6
View File
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
import i18next from 'i18next'; import i18next from 'i18next';
import translations from './translations'; import translations from './translations';
import en from './locales/en.json'; import en from './locales/en.json';
+6
View File
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
import { I18nService } from './i18n-service'; import { I18nService } from './i18n-service';
import { I18NextTranslationService } from './translation-service'; import { I18NextTranslationService } from './translation-service';
import type { TType } from './translation-service'; import type { TType } from './translation-service';
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
import type { I18nService } from './i18n-service'; import type { I18nService } from './i18n-service';
import { derived, writable } from 'svelte/store'; import { derived, writable } from 'svelte/store';
import type { Readable, Writable } from 'svelte/store'; import type { Readable, Writable } from 'svelte/store';
+6
View File
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
export default { export default {
en: { en: {
common: { common: {
@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script lang="ts"> <script lang="ts">
/* /*
import AdminOverviewScreenshot from '$lib/assets/landing/admin_overview.png'; import AdminOverviewScreenshot from '$lib/assets/landing/admin_overview.png';
@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script lang="ts"> <script lang="ts">
export let open: boolean; export let open: boolean;
@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script lang="ts"> <script lang="ts">
import { Swiper, SwiperSlide } from 'swiper/svelte'; import { Swiper, SwiperSlide } from 'swiper/svelte';
import { Autoplay } from 'swiper'; import { Autoplay } from 'swiper';
+6
View File
@@ -9,6 +9,12 @@ By Flowbite, but changed: https://flowbite.com/docs/components/modal/#default-mo
open = true; open = true;
</script> </script>
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<!-- Main modal --> <!-- Main modal -->
{#if open} {#if open}
<div tabindex="-1" class="overflow-y-auto overflow-x-hidden md:inset-0 lg:w-2/6 w-5/6"> <div tabindex="-1" class="overflow-y-auto overflow-x-hidden md:inset-0 lg:w-2/6 w-5/6">
+5
View File
@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script lang="ts"> <script lang="ts">
import '@fontsource/marck-script/index.css'; import '@fontsource/marck-script/index.css';
import { getLocalization } from '$lib/i18n'; import { getLocalization } from '$lib/i18n';
+5
View File
@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script lang="ts"> <script lang="ts">
import type { QuizData } from '$lib/quiz_types'; import type { QuizData } from '$lib/quiz_types';
import { getLocalization } from '$lib/i18n'; import { getLocalization } from '$lib/i18n';
+5
View File
@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script lang="ts"> <script lang="ts">
import { socket } from '$lib/socket'; import { socket } from '$lib/socket';
import { onDestroy, onMount } from 'svelte'; import { onDestroy, onMount } from 'svelte';
+5
View File
@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script lang="ts"> <script lang="ts">
import type { Question } from '$lib/quiz_types'; import type { Question } from '$lib/quiz_types';
import { socket } from '$lib/socket'; import { socket } from '$lib/socket';
@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script lang="ts"> <script lang="ts">
import type { Answer, QuizData } from '$lib/quiz_types'; import type { Answer, QuizData } from '$lib/quiz_types';
import { getLocalization } from '$lib/i18n'; import { getLocalization } from '$lib/i18n';
+5
View File
@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script lang="ts"> <script lang="ts">
export let title: string; export let title: string;
export let description: string; export let description: string;
+6
View File
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
export interface QuizData { export interface QuizData {
title: string; title: string;
description: string; description: string;
+5
View File
@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script> <script>
import { getLocalization } from '$lib/i18n'; import { getLocalization } from '$lib/i18n';
+6
View File
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
import { io } from 'socket.io-client'; import { io } from 'socket.io-client';
export const socket = io(); export const socket = io();
+6
View File
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
import { writable } from 'svelte/store'; import { writable } from 'svelte/store';
export const navbarVisible = writable(true); export const navbarVisible = writable(true);
@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script lang="ts"> <script lang="ts">
import { createTippy } from 'svelte-tippy'; import { createTippy } from 'svelte-tippy';
import 'tippy.js/animations/perspective-subtle.css'; import 'tippy.js/animations/perspective-subtle.css';
+6
View File
@@ -1,3 +1,9 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
import * as yup from 'yup'; import * as yup from 'yup';
export const dataSchema = yup.object({ export const dataSchema = yup.object({
+5
View File
@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script context="module" lang="ts"> <script context="module" lang="ts">
import { signedIn } from '$lib/stores'; import { signedIn } from '$lib/stores';
@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script lang="ts" context="module"> <script lang="ts" context="module">
import { signedIn } from '$lib/stores'; import { signedIn } from '$lib/stores';
+5
View File
@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script context="module" lang="ts"> <script context="module" lang="ts">
export async function load({ session, url }) { export async function load({ session, url }) {
const verified = url.searchParams.get('verified'); const verified = url.searchParams.get('verified');
@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script lang="ts" context="module"> <script lang="ts" context="module">
export async function load({ url }) { export async function load({ url }) {
const error = url.searchParams.get('error'); const error = url.searchParams.get('error');
@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script lang="ts" context="module"> <script lang="ts" context="module">
export async function load({ url }) { export async function load({ url }) {
const token = url.searchParams.get('token'); const token = url.searchParams.get('token');
@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script context="module" lang="ts"> <script context="module" lang="ts">
export async function load({ session }) { export async function load({ session }) {
if (session.authenticated) { if (session.authenticated) {
@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script context="module" lang="ts"> <script context="module" lang="ts">
export async function load({ session }) { export async function load({ session }) {
if (session.authenticated) { if (session.authenticated) {
@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script context="module" lang="ts"> <script context="module" lang="ts">
export async function load({ session }) { export async function load({ session }) {
if (!session.authenticated) { if (!session.authenticated) {
+5
View File
@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script context="module" lang="ts"> <script context="module" lang="ts">
export async function load({ session, url }) { export async function load({ session, url }) {
if (!session.authenticated) { if (!session.authenticated) {
+5
View File
@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script context="module" lang="ts"> <script context="module" lang="ts">
import { signedIn } from '$lib/stores'; import { signedIn } from '$lib/stores';
+5
View File
@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script lang="ts" context="module"> <script lang="ts" context="module">
import { signedIn } from '$lib/stores'; import { signedIn } from '$lib/stores';
@@ -1,3 +1,9 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<svelte:head> <svelte:head>
<title>ClassQuiz/docs - Attribution</title> <title>ClassQuiz/docs - Attribution</title>
<meta name="description" content="People who helped make with ClassQuiz." /> <meta name="description" content="People who helped make with ClassQuiz." />
+5
View File
@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script lang="ts"> <script lang="ts">
import { onMount } from 'svelte'; import { onMount } from 'svelte';
import '$lib/hljs.css'; import '$lib/hljs.css';
@@ -1,3 +1,9 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<svelte:head> <svelte:head>
<title>ClassQuiz/docs - Import from Kahoot</title> <title>ClassQuiz/docs - Import from Kahoot</title>
<meta <meta
+6
View File
@@ -1,3 +1,9 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<svelte:head> <svelte:head>
<title>ClassQuiz/docs - Index</title> <title>ClassQuiz/docs - Index</title>
<meta <meta
+6
View File
@@ -1,3 +1,9 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<svelte:head> <svelte:head>
<title>ClassQuiz/docs - PoW</title> <title>ClassQuiz/docs - PoW</title>
<meta <meta
@@ -1,3 +1,8 @@
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script lang="ts"> <script lang="ts">
import { onMount } from 'svelte'; import { onMount } from 'svelte';
import '$lib/hljs.css'; import '$lib/hljs.css';

Some files were not shown because too many files have changed in this diff Show More