Skip to content

Commit

Permalink
fix: #461 allow for gradient customization
Browse files Browse the repository at this point in the history
  • Loading branch information
ThaUnknown committed Jun 30, 2024
1 parent ec9d9ab commit c344d54
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion common/components/Sidebar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
.sidebar-overlay {
width: var(--sidebar-width);
transition: width .8s cubic-bezier(0.25, 0.8, 0.25, 1), left .8s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
background: linear-gradient(90deg, #17191D 15.62%, rgba(23, 25, 29, 0.92) 36.46%, rgba(23, 25, 29, 0.619632) 70.83%, rgba(23, 25, 29, 0) 100%);
background: var(--sidebar-gradient);
backdrop-filter: blur(2px);
z-index: -1;
}
Expand Down
2 changes: 1 addition & 1 deletion common/components/banner/Banner.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<style>
.gradient {
background: linear-gradient(0deg, #17191D 0%, #0000 15%, #0000 100%), linear-gradient(90deg, #17191D 0%, rgba(23, 25, 29, 0.885417) 15%, rgba(25, 28, 32, 0) 72%);
background: var(--banner-gradient);
}
.opacity-0 {
opacity: 0;
Expand Down
2 changes: 1 addition & 1 deletion common/components/cards/EpisodeCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
-webkit-box-orient: vertical;
}
.image:after {
background: linear-gradient(180deg, rgba(0, 0, 0, 0) 77.08%, rgba(0, 0, 0, 0.7) 100%);
background: var(--episode-card-gradient);
content:'';
position:absolute;
left:0; top:0;
Expand Down
2 changes: 1 addition & 1 deletion common/components/cards/EpisodePreviewCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
position: absolute;
left: 0 ; bottom: 0;
width: 100%; height: 100%;
background: linear-gradient(180deg, #0000 0%, #25292f00 80%, #25292f 95%, #25292f 100%);
background: var(--episode-preview-card-gradient);
}
.list-status-circle {
background: var(--statusColor);
Expand Down
2 changes: 1 addition & 1 deletion common/components/cards/PreviewCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
left: 0 ; bottom: 0;
margin-bottom: -1px;
width: 100%; height: 100% ;
background: linear-gradient(180deg, #0000 0%, #25292f00 80%, #25292fe3 95%, #25292f 100%);
background: var(--preview-card-gradient);
}
@keyframes load-in {
from {
Expand Down
7 changes: 7 additions & 0 deletions common/css.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@
--gray-color-base-hue: 216;
--safe-area-top: 0px;
--safe-area-left: 0px;
--sidebar-gradient: linear-gradient(90deg, #17191D 15.62%, rgba(23, 25, 29, 0.92) 36.46%, rgba(23, 25, 29, 0.619632) 70.83%, rgba(23, 25, 29, 0) 100%);
--banner-gradient: linear-gradient(0deg, #17191D 0%, #0000 15%, #0000 100%), linear-gradient(90deg, #17191D 0%, rgba(23, 25, 29, 0.885417) 15%, rgba(25, 28, 32, 0) 72%);
--torrent-card-gradient: linear-gradient(90deg, #17191C 32%, rgba(23, 25, 28, 0.90) 100%);
--episode-card-gradient: linear-gradient(180deg, rgba(0, 0, 0, 0) 77.08%, rgba(0, 0, 0, 0.7) 100%);
--episode-preview-card-gradient: linear-gradient(180deg, #0000 0%, #25292f00 80%, #25292f 95%, #25292f 100%);
--preview-card-gradient: linear-gradient(180deg, #0000 0%, #25292f00 80%, #25292fe3 95%, #25292f 100%);
--section-end-gradient: linear-gradient(270deg, #17191cff 0%, #17191c00 100%);
color-scheme: dark;
}
.dark-mode {
Expand Down
2 changes: 1 addition & 1 deletion common/views/Home/Section.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
right: 0;
height: 100%;
width: 8rem;
background: linear-gradient(270deg, #17191cff 0%, #17191c00 100%);
background: var(--section-end-gradient);
pointer-events: none;
}
.gallery {
Expand Down
2 changes: 1 addition & 1 deletion common/views/TorrentSearch/TorrentCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
{#if media.bannerImage}
<div class='position-absolute top-0 left-0 w-full h-full'>
<img src={media.bannerImage} alt='bannerImage' class='img-cover w-full h-full' style='border-radius: 5px;' />
<div class='position-absolute top-0 left-0 w-full h-full' style='background: linear-gradient(90deg, #17191C 32%, rgba(23, 25, 28, 0.90) 100%);' />
<div class='position-absolute top-0 left-0 w-full h-full' style='background: var(--torrent-card-gradient)' />
</div>
{/if}
<div class='d-flex pl-10 flex-column justify-content-between w-full h-100 position-relative' style='min-width: 0;'>
Expand Down

0 comments on commit c344d54

Please sign in to comment.