chore: merge branch dev to main (#127)

This commit is contained in:
oSumAtrIX 2023-06-21 03:58:34 +02:00 committed by GitHub
commit 5dab8357bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 80 additions and 102 deletions

View File

@ -3,14 +3,21 @@
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/logo.svg" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
</head>
<body>
<div>%sveltekit.body%</div>
</body>
<!-- Google Tag Manager (noscript) -->
<!-- TODO: Is this allowed to be present, even when consent to collect data is not given? -->
<noscript>
<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-MQ6K849" height="0" width="0" style="display:none;visibility:hidden"></iframe>
<iframe
src="https://www.googletagmanager.com/ns.html?id=GTM-MQ6K849"
height="0"
width="0"
style="display: none; visibility: hidden"
></iframe>
</noscript>
</html>

View File

@ -155,9 +155,7 @@
}
a:hover {
text-decoration: underline;
text-decoration-style: wavy;
text-decoration-color: var(--accent-color-two);
text-decoration: underline var(--accent-color-two);
color: var(--white);
}

View File

@ -134,6 +134,10 @@
</Modal>
<style>
#logo {
padding: 0.5rem;
}
path {
fill: var(--grey-five);
}

View File

@ -47,9 +47,9 @@
<slot name="icon" />
{/if}
{#if $$slots.title}
<h4>
<h3>
<slot name="title" />
</h4>
</h3>
{/if}
</div>
@ -85,7 +85,7 @@
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 0.75rem;
gap: 1rem;
}
.title {
@ -94,13 +94,11 @@
gap: 1rem;
width: 100%;
background-color: var(--grey-six);
margin-bottom: 8px;
}
.buttons {
display: flex;
gap: 2rem;
margin-top: 1rem;
justify-content: flex-end;
width: 100%;
}
@ -134,6 +132,8 @@
padding: 32px;
box-shadow: 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12),
0px 2px 4px -1px rgba(0, 0, 0, 0.2);
scrollbar-width: none;
-ms-overflow-style: none;
}
button {

View File

@ -39,7 +39,7 @@
/>
</div>
<style>
<style lang="scss">
#search {
/* umm dont ask */
position: absolute;
@ -73,6 +73,19 @@
border-radius: 100px;
border: none;
background-color: var(--grey-ten);
outline: none;
transition: background-color 0.3s var(--bezier-one);
&:hover {
background-color: var(--grey-three);
}
&:focus::placeholder {
color: var(--accent-color);
}
&:focus {
background-color: var(--bg-color);
}
}
input::placeholder {
@ -81,13 +94,4 @@
font-weight: 500;
transition: all 0.2s var(--bezier-one);
}
input:focus {
outline: none;
}
input:focus::placeholder {
outline: none;
color: var(--accent-color);
}
</style>

View File

@ -2,7 +2,6 @@
import { writable } from 'svelte/store';
// There might be a better place to put this, but I am not entirely sure...
export const isRestoring = writable(false);
declare const telemetryInit: () => void;
</script>
<script lang="ts">
@ -33,21 +32,20 @@
}
});
let askCookieConsent = false;
let showConsentModal = false;
// store a cookie to remember the user's preference
function setPrivacySetting(allowTelemetry: boolean) {
localStorage.setItem('allowTelemetry', allowTelemetry.toString());
askCookieConsent = false;
if (typeof telemetryInit !== 'undefined') {
telemetryInit();
}
function rememberChoice(allow: boolean) {
localStorage.setItem('analytics', allow.toString());
showConsentModal = false;
if (allow) location.reload();
}
onMount(() => {
if (!localStorage.getItem('allowTelemetry')) {
askCookieConsent = true;
}
// Check if the user has already decided.
const hasDecided = localStorage.getItem('analytics') !== null;
if (!hasDecided) showConsentModal = true;
isRestoring.set(true);
const [unsubscribe, promise] = persistQueryClient({
@ -74,69 +72,36 @@
);
</script>
<!-- telemetry good -->
<svelte:head>
<!-- Google Tag Manager -->
<script>
(function (w, d, s, l, i) {
w[l] = w[l] || [];
w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' });
var f = d.getElementsByTagName(s)[0],
j = d.createElement(s),
dl = l != 'dataLayer' ? '&l=' + l : '';
j.async = true;
j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
f.parentNode.insertBefore(j, f);
})(window, document, 'script', 'dataLayer', 'GTM-MQ6K849');
</script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-PLH0N9VQL5"></script>
<!-- Sometimes you don't want telemetry -->
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
allowAnalytics = localStorage.getItem('analytics') === 'true';
if (allowAnalytics) {
(function (w, d, s, l, i) {
w[l] = w[l] || [];
w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' });
var f = d.getElementsByTagName(s)[0],
j = d.createElement(s),
dl = l != 'dataLayer' ? '&l=' + l : '';
j.async = true;
j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
f.parentNode.insertBefore(j, f);
})(window, document, 'script', 'dataLayer', 'GTM-MQ6K849');
}
function runClarity(c, l, a, r, i, t, y) {
c[a] =
c[a] ||
function () {
(c[a].q = c[a].q || []).push(arguments);
};
t = l.createElement(r);
t.async = 1;
t.src = 'https://www.clarity.ms/tag/' + i;
y = l.getElementsByTagName(r)[0];
y.parentNode.insertBefore(t, y);
}
function telemetryInit() {
allowTelemetry = (localStorage.getItem('allowTelemetry') === 'true');
if (!allowTelemetry) {
gtag('set', 'allow_google_signals', false);
return;
}
gtag('js', new Date());
gtag('config', 'G-PLH0N9VQL5');
runClarity(window, document, 'clarity', 'script', 'hfh8dhfgus');
}
telemetryInit();
</script>
</svelte:head>
<QueryClientProvider client={queryClient}>
<NavHost />
<!-- if cookie consent hasn't been set -->
<Dialogue bind:modalOpen={askCookieConsent} notDismissible>
<Dialogue bind:modalOpen={showConsentModal} notDismissible>
<svelte:fragment slot="title">It's your choice</svelte:fragment>
<svelte:fragment slot="description">
This site uses analytics to understand better how you use it. Opting in is
optional and won't impact your experience.
We use analytics to improve your experience on this site. By clicking "Allow", you allow us to
collect anonymous data about your visit.
</svelte:fragment>
<svelte:fragment slot="buttons">
<Button type="text" on:click={() => setPrivacySetting(false)}>Deny</Button>
<Button type="text" on:click={() => setPrivacySetting(true)}>Accept</Button>
<Button type="text" on:click={() => rememberChoice(false)}>Deny</Button>
<Button type="filled" on:click={() => rememberChoice(true)}>Allow</Button>
</svelte:fragment>
</Dialogue>
@ -145,6 +110,5 @@
{:else}
<slot />
{/if}
<!-- guhh afn -->
<!-- <Footer> -->
</QueryClientProvider>

View File

@ -83,9 +83,7 @@
}
a:hover {
text-decoration: underline;
text-decoration-style: wavy;
text-decoration-color: var(--grey-four);
text-decoration: underline var(--grey-four);
}
a:hover::after {

View File

@ -26,9 +26,8 @@
}
a:hover {
text-decoration: underline;
text-decoration-style: wavy;
text-decoration-color: var(--accent-color);
background: var(--grey-one);
text-decoration: underline var(--accent-color);
color: var(--white);
}

View File

@ -43,7 +43,7 @@
{/if}
</div>
<style>
<style lang="scss">
.title {
display: flex;
align-items: center;
@ -53,6 +53,10 @@
padding: 0.75rem 1.25rem;
border-bottom: 1px solid var(--grey-three);
transition: all 0.2s var(--bezier-one);
&:hover {
background-color: var(--grey-one);
}
}
.closed {
@ -79,9 +83,7 @@
}
a:hover {
text-decoration: underline;
text-decoration-style: wavy;
text-decoration-color: var(--accent-color);
text-decoration: underline var(--accent-color);
color: var(--white);
}

View File

@ -66,7 +66,7 @@
{/if}
</div>
<style>
<style lang="scss">
h3 {
margin-right: 0.5rem;
margin-bottom: 0.2rem;
@ -92,10 +92,8 @@
}
a .patch-info:hover {
text-decoration: underline;
text-decoration: underline var(--accent-color-two);
color: var(--accent-color-two);
text-decoration-style: wavy;
text-decoration-color: var(--accent-color-two);
}
.info-container {
@ -108,14 +106,18 @@
}
.patch-container {
transition: all 2s var(--bezier-one);
transition: all 0.1s var(--bezier-one);
background-color: var(--grey-six);
padding: 1.25rem;
border-radius: 12px;
}
.patch-container:active {
filter: brightness(1.75);
&:active {
filter: brightness(1.15);
}
&:hover {
background-color: var(--grey-one);
}
}
.title {