feat: Apply themes on specific events (#227)

Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
madkarmaa
2024-08-13 13:18:56 +02:00
committed by oSumAtrIX
parent f428902773
commit bc8e19e0e7
30 changed files with 2068 additions and 1701 deletions

View File

@@ -28,6 +28,6 @@
}
h1 {
color: var(--accent-color);
color: var(--primary);
}
</style>

View File

@@ -14,6 +14,7 @@
import { persistQueryClient } from '@tanstack/query-persist-client-core';
import { QueryClientProvider } from '@tanstack/svelte-query';
import { createSyncStoragePersister } from '@tanstack/query-sync-storage-persister';
import { DateTriggerEventHandler } from 'datetrigger';
import NavHost from '$layout/Navbar/NavHost.svelte';
import Spinner from '$lib/components/Spinner.svelte';
@@ -21,6 +22,7 @@
import Button from '$lib/components/Button.svelte';
import { staleTime } from '$data/api';
import RouterEvents from '$data/RouterEvents';
import { events as themeEvents } from '$util/themeEvents';
const queryClient = new QueryClient({
defaultOptions: {
@@ -41,6 +43,8 @@
}
onMount(() => {
new DateTriggerEventHandler(themeEvents);
// Check if the user has already decided.
const hasDecided = localStorage.getItem('analytics') !== null;

View File

@@ -74,13 +74,13 @@
h2 {
text-align: center;
color: var(--grey-four);
color: var(--text-three);
margin-bottom: 0.3rem;
}
p {
text-align: center;
color: var(--grey-four);
color: var(--text-three);
}
.text-container {
@@ -88,14 +88,14 @@
align-items: center;
flex-direction: column;
margin-bottom: 2rem;
background-color: var(--accent-color);
background-color: var(--primary);
padding: 2.5rem 1.75rem;
border-radius: 20px;
}
a {
text-decoration: none;
color: var(--grey-four);
color: var(--text-three);
}
a::after {
@@ -106,7 +106,7 @@
}
a:hover {
text-decoration: underline var(--grey-four);
text-decoration: underline var(--text-three);
}
a:hover::after {

View File

@@ -12,7 +12,7 @@
<style>
a {
color: var(--white);
color: var(--text-one);
text-decoration: none;
cursor: pointer;
padding: 0.9rem 1rem;
@@ -21,14 +21,14 @@
display: flex;
gap: 1rem;
align-items: center;
border-right: 1px solid var(--grey-three);
border-bottom: 1px solid var(--grey-three);
border-right: 1px solid var(--border);
border-bottom: 1px solid var(--border);
}
a:hover {
background: var(--grey-one);
text-decoration: underline var(--accent-color);
color: var(--white);
background: var(--surface-three);
text-decoration: underline var(--primary);
color: var(--text-one);
}
h5 {
@@ -42,7 +42,7 @@
border-radius: 50%;
height: 32px;
width: 32px;
background-color: var(--grey-two);
background-color: var(--surface-four);
transition: transform 0.4s var(--bezier-one);
user-select: none;
}

View File

@@ -48,13 +48,13 @@
align-items: center;
justify-content: space-between;
cursor: pointer;
background-color: var(--grey-six);
background-color: var(--surface-seven);
padding: 0.75rem 1.25rem;
border-bottom: 1px solid var(--grey-three);
border-bottom: 1px solid var(--border);
transition: all 0.2s var(--bezier-one);
&:hover {
background-color: var(--grey-one);
background-color: var(--surface-three);
}
}
@@ -71,7 +71,7 @@
.section-container {
border-radius: 20px;
overflow: hidden;
border: 1px solid var(--grey-three);
border: 1px solid var(--border);
}
a {
@@ -82,8 +82,8 @@
}
a:hover {
text-decoration: underline var(--accent-color);
color: var(--white);
text-decoration: underline var(--primary);
color: var(--text-one);
}
.contrib-host {

View File

@@ -73,7 +73,7 @@
<main class="wrapper" in:fly={{ y: 10, easing: quintOut, duration: 750 }}>
<section>
<div>
<h2>🎉 Support <span style="color: var(--accent-color);">ReVanced</span></h2>
<h2>🎉 Support <span style="color: var(--primary);">ReVanced</span></h2>
<p>
ReVanced offers a variety of patches, including ad-blocking, custom themes, and innovative
features. All of which is completely open source and free of charge. Donating will allow
@@ -221,7 +221,7 @@
h2 {
margin-bottom: 0.5rem;
color: var(--white);
color: var(--text-one);
}
h3 {
@@ -260,7 +260,7 @@
.donate-card {
text-decoration: none;
background-color: var(--grey-ten);
background-color: var(--surface-nine);
border-radius: 1.5rem;
width: 100%;
cursor: pointer;
@@ -272,7 +272,7 @@
0.3s background-color var(--bezier-one);
&:hover {
background-color: var(--accent-low-opacity);
background-color: var(--tertiary);
}
&:active {
@@ -281,7 +281,7 @@
span {
display: block;
color: var(--grey-five);
color: var(--text-four);
font-size: 1.05rem;
font-weight: 500;
padding: 1.5rem;
@@ -308,12 +308,12 @@
font-size: 0.9rem;
background-color: transparent;
border: none;
color: var(--grey-five);
color: var(--text-four);
cursor: pointer;
text-align: left;
display: flex;
justify-content: space-between;
background-color: var(--grey-six);
background-color: var(--surface-seven);
padding: 0.75rem 1.25rem;
transition: filter 0.4s var(--bezier-one);

View File

@@ -28,8 +28,8 @@
<style lang="scss">
.member {
width: 100%;
color: var(--white);
border: 1px solid var(--grey-three);
color: var(--text-one);
border: 1px solid var(--border);
text-decoration: none;
cursor: pointer;
padding: 1rem;
@@ -39,7 +39,7 @@
transition: 0.3s background-color var(--bezier-one);
&:hover {
background-color: var(--grey-six);
background-color: var(--surface-seven);
}
}

View File

@@ -123,7 +123,7 @@
h2 {
text-align: center;
color: var(--white);
color: var(--text-one);
}
p {
@@ -138,7 +138,7 @@
width: auto;
padding: 0.5rem 0.5rem;
border-radius: 2rem;
background-color: var(--grey-six);
background-color: var(--surface-seven);
user-select: none;
}
@@ -148,6 +148,6 @@
}
span {
color: var(--accent-color);
color: var(--primary);
}
</style>

View File

@@ -209,7 +209,7 @@
.search {
padding-top: 5rem;
padding-bottom: 1.25rem;
background-color: var(--grey-seven);
background-color: var(--surface-eight);
}
.search-contain {
@@ -239,7 +239,7 @@
margin-bottom: -1px;
overflow: hidden;
border-radius: 12px;
border: 1px solid var(--grey-three);
border: 1px solid var(--border);
}
@media (min-width: 768px) {

View File

@@ -46,21 +46,21 @@
width: 100%;
user-select: none;
transition: background-color 0.4s var(--bezier-one);
color: var(--grey-five);
color: var(--text-four);
transition: color 0.3s var(--bezier-one);
}
.selected {
color: var(--accent-color);
color: var(--primary);
transition: color 0.3s var(--bezier-one);
background-color: var(--accent-low-opacity);
background-color: var(--tertiary);
}
.package:hover:not(.selected) {
background-color: var(--grey-six);
background-color: var(--surface-seven);
}
.package:not(.selected):hover {
color: var(--white);
color: var(--text-one);
}
@media (max-width: 767px) {
@@ -73,17 +73,17 @@
word-break: break-all;
overflow: hidden;
text-overflow: ellipsis;
color: var(--grey-five);
border-bottom: 1px solid var(--grey-three);
color: var(--text-four);
border-bottom: 1px solid var(--border);
}
.selected {
color: var(--accent-color);
background-color: var(--accent-low-opacity);
color: var(--primary);
background-color: var(--tertiary);
}
.package:not(.selected):hover {
color: var(--grey-five);
color: var(--text-four);
}
}
</style>

View File

@@ -23,7 +23,7 @@
background-color: transparent;
}
.menu:hover::-webkit-scrollbar-thumb {
background-color: var(--accent-color);
background-color: var(--primary);
}
.slot {
@@ -37,7 +37,7 @@
h6 {
margin-bottom: 1rem;
color: var(--accent-color);
color: var(--primary);
}
@media (max-width: 767px) {

View File

@@ -100,7 +100,7 @@
h3 {
margin-right: 0.5rem;
margin-bottom: 0.2rem;
color: var(--accent-color);
color: var(--primary);
}
#option-description {
@@ -109,7 +109,7 @@
}
#option-title {
color: var(--accent-color-two);
color: var(--secondary);
}
.button {
@@ -124,23 +124,23 @@
list-style: none;
font-size: 0.8rem;
font-weight: 500;
color: var(--grey-five);
color: var(--text-four);
padding: 0.25rem 0.5rem;
border: 1px solid var(--grey-three);
border: 1px solid var(--border);
border-radius: 8px;
&:hover {
background-color: var(--grey-two);
background-color: var(--surface-four);
}
}
a {
text-decoration: none;
color: var(--grey-five);
color: var(--text-four);
&:hover {
text-decoration: underline var(--accent-color-two);
color: var(--accent-color-two);
text-decoration: underline var(--secondary);
color: var(--secondary);
}
}
@@ -155,7 +155,7 @@
.patch-container {
transition: all 0.1s var(--bezier-one);
background-color: var(--grey-six);
background-color: var(--surface-seven);
padding: 1.25rem;
border-radius: 12px;
}
@@ -184,7 +184,7 @@
cursor: pointer;
&:hover {
background-color: var(--grey-one);
background-color: var(--surface-three);
}
&:active {
@@ -198,11 +198,11 @@
/* thanks piknik */
.option + .option {
border-top: 1px solid var(--grey-three);
border-top: 1px solid var(--border);
}
.options {
border: 1px solid var(--grey-three);
border: 1px solid var(--border);
overflow: hidden;
border-radius: 8px;
margin-top: 1rem;