+
+
diff --git a/src/pages/overlay/components/overlay/ambassadors/ambassadors.module.scss b/src/pages/overlay/components/overlay/ambassadors/ambassadors.module.scss
index 7e5ca820..46eac107 100644
--- a/src/pages/overlay/components/overlay/ambassadors/ambassadors.module.scss
+++ b/src/pages/overlay/components/overlay/ambassadors/ambassadors.module.scss
@@ -1,5 +1,8 @@
@import "../../../../../variables";
+$container-overflow: $twitch-vertical-padding;
+$fade-distance: 3rem;
+
.ambassadorList {
position: absolute;
top: 0;
@@ -8,7 +11,7 @@
display: flex;
z-index: 0; // lets tooltips appear above the list
- .scrollAmbassadors {
+ .scroll {
display: flex;
flex-direction: column;
align-items: center;
@@ -21,20 +24,24 @@
align-items: center;
width: 10rem;
- padding: 1.5rem 1rem;
+ margin: -$container-overflow 0;
+ padding: ($container-overflow + $fade-distance) 1rem;
gap: 1rem;
// mask image to fade out the list to transparent top and bottom
// using a gradient as image of which the alpha channel will be
// applied to the content of the list
- // 0% - 3% gradient from 0% to 100% alpha
- // 3% - 97% 100% alpha
- // 97% - 100% gradient from 100% to 0% alpha
mask-image: linear-gradient(
to bottom,
- rgba(0, 0, 0, 0) 0%,
- rgba(0, 0, 0, 1) 3%,
- rgba(0, 0, 0, 1) 97%,
+ /* gradient from 0% to 100% alpha,
+ with most of the transition between the overflow and fade distance */
+ rgba(0, 0, 0, 0) 0,
+ rgba(0, 0, 0, 0.25) #{$container-overflow},
+ rgba(0, 0, 0, 1) #{$container-overflow + $fade-distance},
+ /* gradient from 100% to 0% alpha,
+ with most of the transition between the overflow and fade distance */
+ rgba(0, 0, 0, 1) calc(100% - #{$container-overflow + $fade-distance}),
+ rgba(0, 0, 0, 0.25) calc(100% - #{$container-overflow}),
rgba(0, 0, 0, 0) 100%
);
@@ -47,42 +54,88 @@
}
}
+ &::before,
+ &::after {
+ content: "";
+ display: block;
+ position: absolute;
+ width: 100%;
+
+ height: #{$container-overflow + $fade-distance};
+ mask-image: linear-gradient(
+ to bottom,
+ /* gradient from 100% to 0% alpha/blur,
+ with the transition happening after the overflow */
+ rgba(0, 0, 0, 1) 0,
+ rgba(0, 0, 0, 1) #{$container-overflow},
+ rgba(0, 0, 0, 0) 100%
+ );
+ backdrop-filter: blur(0.125rem);
+
+ z-index: 1;
+ }
+
+ &::before {
+ top: -$container-overflow;
+ }
+
+ &::after {
+ bottom: -$container-overflow;
+ transform: rotate(180deg);
+ }
+
.arrow {
position: absolute;
border: 0;
cursor: pointer;
- width: 2.5rem;
- height: 2.5rem;
- padding: 0.5rem;
- border-radius: 1.25rem;
- background-clip: content-box;
- background: rgba(0, 0, 0, 0.3);
- backdrop-filter: blur(0.25rem);
+ color: $primary-color;
+ width: 100%;
+ height: $fade-distance;
+ padding: 0 0 1rem; // offset toward the faded edge
+ background: rgba(
+ $accent-color,
+ 0.01%
+ ); // non-default "transparent" background to avoid dismissing
z-index: 2;
- transition: 0.3s ease;
- transition-property: scale, visibility, opacity;
+ transition: $transition opacity;
&:hover {
- scale: 1.4;
+ svg {
+ scale: 1.2;
+
+ path {
+ stroke: $outline-color;
+ stroke-width: 0.375rem;
+ }
+ }
}
- &Up {
+ &.up {
top: 0;
}
- &Down {
+ &.down {
bottom: 0;
transform: rotate(180deg);
}
- &Hidden {
- visibility: hidden;
+ &.hidden {
opacity: 0;
+ pointer-events: none;
}
- img {
- width: 100%;
- height: auto;
+ svg {
+ filter: drop-shadow(0 0 0.5rem rgba($accent-color, 0.75));
+ overflow: visible; // ensure stroke doesn't get clipped
+ transition: $transition scale;
+
+ path {
+ stroke: $secondary-color;
+ stroke-width: 0.25rem;
+ paint-order: stroke; // force the stroke to be under the fill
+ transition: $transition;
+ transition-property: stroke-width, stroke;
+ }
}
}
}
diff --git a/src/pages/overlay/components/toggle/Toggle.tsx b/src/pages/overlay/components/toggle/Toggle.tsx
index 3646cc3b..16e48102 100644
--- a/src/pages/overlay/components/toggle/Toggle.tsx
+++ b/src/pages/overlay/components/toggle/Toggle.tsx
@@ -1,5 +1,7 @@
import { useCallback, type ChangeEvent } from "react";
+import IconCheck from "../../../../components/icons/IconCheck";
+
import styles from "./toggle.module.scss";
interface ToggleProps {
@@ -22,7 +24,7 @@ export default function Toggle(props: ToggleProps) {
diff --git a/src/pages/overlay/components/toggle/toggle.module.scss b/src/pages/overlay/components/toggle/toggle.module.scss
index 84eac148..5ac70889 100644
--- a/src/pages/overlay/components/toggle/toggle.module.scss
+++ b/src/pages/overlay/components/toggle/toggle.module.scss
@@ -32,13 +32,13 @@
&:checked {
background: $secondary-color;
- ~ span {
+ ~ svg {
opacity: 1;
}
}
}
- span {
+ svg {
color: $primary-color;
opacity: 0;
position: absolute;
diff --git a/src/pages/overlay/index.scss b/src/pages/overlay/index.scss
index 92722f8b..32d7c159 100644
--- a/src/pages/overlay/index.scss
+++ b/src/pages/overlay/index.scss
@@ -25,7 +25,8 @@ body {
width: 100vw;
height: 100vh;
overflow: hidden;
- padding: 5rem 7rem 5rem 0; // https://dev.twitch.tv/docs/extensions/designing/#video-overlay-extensions
+ padding: $twitch-vertical-padding $twitch-right-padding
+ $twitch-vertical-padding $twitch-left-padding;
#root {
width: 100%;
diff --git a/src/pages/panel/components/nav/Nav.tsx b/src/pages/panel/components/nav/Nav.tsx
index d7f9034d..1d1ebcd8 100644
--- a/src/pages/panel/components/nav/Nav.tsx
+++ b/src/pages/panel/components/nav/Nav.tsx
@@ -1,11 +1,11 @@
-import AlveusLogo from "../../../../assets/alveus-logo.png";
+import alveus from "../../../../assets/alveus.png";
import styles from "./nav.module.scss";
export default function Nav() {
return (
);
diff --git a/src/utils/ambassadors.ts b/src/utils/ambassadors.ts
index 1df9c56a..6dc3be67 100644
--- a/src/utils/ambassadors.ts
+++ b/src/utils/ambassadors.ts
@@ -8,7 +8,10 @@ import {
type ActiveAmbassadorKey as AmbassadorKey,
} from "@alveusgg/data/src/ambassadors/filters";
import { getClassification } from "@alveusgg/data/src/ambassadors/classification";
-import { getAmbassadorImages } from "@alveusgg/data/src/ambassadors/images";
+import {
+ getAmbassadorImages,
+ type AmbassadorImage,
+} from "@alveusgg/data/src/ambassadors/images";
import { getIUCNStatus } from "@alveusgg/data/src/iucn";
import { typeSafeObjectEntries, typeSafeObjectFromEntries } from "./helpers";
@@ -28,4 +31,5 @@ export {
type Ambassadors,
type AmbassadorKey,
type Ambassador,
+ type AmbassadorImage,
};
diff --git a/src/variables.scss b/src/variables.scss
index 02d1d850..031f4087 100644
--- a/src/variables.scss
+++ b/src/variables.scss
@@ -1,4 +1,4 @@
-@import "https://fonts.googleapis.com/css2?family=Nunito:wght@400;500&display=swap";
+@import "https://fonts.googleapis.com/css2?family=Nunito:wght@300;500;700&display=swap";
$primary-color: #636a60;
$secondary-color: #c2b3a7;
@@ -7,6 +7,7 @@ $accent-color: #272b27;
$primary-text: white;
$secondary-text: #dcdcdc;
+$heading-text: lighten($primary-color, 25%);
$outline-color: #ff9f1c;
$tooltip-background-color: #18181b;
@@ -20,14 +21,7 @@ $transition: 0.3s ease;
$slide-distance: 2.5rem;
-// used to scale various elements based on available height
-// but clamped between 6px and 10px to prevent tiny/giant UI
-// the values are chosen so that in a normal desktop resolution
-// 1 base unit === 10px to make the math easier when using it
-// to scale elements.
-//
-// usage example:
-// width: calc(5 * $overlay-base-size);
-// => which would be 50px in normal views and
-// would scale down to 30px
-$overlay-base-size: clamp(6px, 1.46vh, 10px);
+// https://dev.twitch.tv/docs/extensions/designing/#video-overlay-extensions
+$twitch-vertical-padding: 5rem;
+$twitch-right-padding: 7rem;
+$twitch-left-padding: 0rem;