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> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/logo.svg" /> <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" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head% %sveltekit.head%
</head> </head>
<body> <body>
<div>%sveltekit.body%</div> <div>%sveltekit.body%</div>
</body> </body>
<!-- Google Tag Manager (noscript) -->
<!-- TODO: Is this allowed to be present, even when consent to collect data is not given? -->
<noscript> <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> </noscript>
</html> </html>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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