style: add streamer list styling per platform

- Added @font-face declarations for various font weights of the Inter font family in app.css to improve font rendering.
- Updated text-shadow styles for different platforms (Twitch, YouTube, Kick, Douyu, Huya) in grid_info.blade.php.
- Expanded file paths in tailwind.config.js to include more blade.php files.
This commit is contained in:
Rico van Zelst
2024-03-26 11:19:20 +01:00
parent 7ccd8ba022
commit 99a5fea8f3
3 changed files with 106 additions and 74 deletions

View File

@@ -2,6 +2,78 @@
@tailwind components;
@tailwind utilities;
@font-face {
font-display: swap;
font-family: "Inter";
font-style: normal;
font-weight: 100;
src: url("/fonts/inter-v13-latin-100.woff2") format("woff2");
}
@font-face {
font-display: swap;
font-family: "Inter";
font-style: normal;
font-weight: 200;
src: url("/fonts/inter-v13-latin-200.woff2") format("woff2");
}
@font-face {
font-display: swap;
font-family: "Inter";
font-style: normal;
font-weight: 300;
src: url("/fonts/inter-v13-latin-300.woff2") format("woff2");
}
@font-face {
font-display: swap;
font-family: "Inter";
font-style: normal;
font-weight: 400;
src: url("/fonts/inter-v13-latin-regular.woff2") format("woff2");
}
@font-face {
font-display: swap;
font-family: "Inter";
font-style: normal;
font-weight: 500;
src: url("/fonts/inter-v13-latin-500.woff2") format("woff2");
}
@font-face {
font-display: swap;
font-family: "Inter";
font-style: normal;
font-weight: 600;
src: url("/fonts/inter-v13-latin-600.woff2") format("woff2");
}
@font-face {
font-display: swap;
font-family: "Inter";
font-style: normal;
font-weight: 700;
src: url("/fonts/inter-v13-latin-700.woff2") format("woff2");
}
@font-face {
font-display: swap;
font-family: "Inter";
font-style: normal;
font-weight: 800;
src: url("/fonts/inter-v13-latin-800.woff2") format("woff2");
}
@font-face {
font-display: swap;
font-family: "Inter";
font-style: normal;
font-weight: 900;
src: url("/fonts/inter-v13-latin-900.woff2") format("woff2");
}
.glow-shadow::before {
content: "";
position: absolute;
@@ -13,13 +85,18 @@
animation: glow 4s infinite;
--tw-scale-x: 1.02;
--tw-scale-y: 1.02;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
transform: translate(var(--tw-translate-x), var(--tw-translate-y))
rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y))
scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.shadow-md-splash {
--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
--tw-shadow-colored: 0 4px 6px -1px var(--splash-color), 0 2px 4px -2px var(--splash-color);
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1),
0 2px 4px -2px rgb(0 0 0 / 0.1);
--tw-shadow-colored: 0 4px 6px -1px var(--splash-color),
0 2px 4px -2px var(--splash-color);
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000),
var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
@keyframes glow {
@@ -27,10 +104,12 @@
opacity: 0.8;
filter: blur(8px);
}
50% {
opacity: 0.45;
filter: blur(11px);
}
100% {
opacity: 0.8;
filter: blur(8px);
@@ -47,75 +126,22 @@
box-shadow: 0 50vh 0 50vh #292524;
}
/* inter-100 - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Inter';
font-style: normal;
font-weight: 100;
src: url('/fonts/inter-v13-latin-100.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
.text-shadow-twitch {
text-shadow: 1px 1px 2px #6441a5;
}
/* inter-200 - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Inter';
font-style: normal;
font-weight: 200;
src: url('/fonts/inter-v13-latin-200.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
.text-shadow-youtube {
text-shadow: 1px 1px 2px #ff0000;
}
/* inter-300 - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Inter';
font-style: normal;
font-weight: 300;
src: url('/fonts/inter-v13-latin-300.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
.text-shadow-kick {
text-shadow: 1px 1px 2px #53fc18;
}
/* inter-regular - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Inter';
font-style: normal;
font-weight: 400;
src: url('/fonts/inter-v13-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
.text-shadow-douyu {
text-shadow: 1px 1px 2px #ff5f3a;
}
/* inter-500 - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Inter';
font-style: normal;
font-weight: 500;
src: url('/fonts/inter-v13-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* inter-600 - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Inter';
font-style: normal;
font-weight: 600;
src: url('/fonts/inter-v13-latin-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* inter-700 - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Inter';
font-style: normal;
font-weight: 700;
src: url('/fonts/inter-v13-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* inter-800 - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Inter';
font-style: normal;
font-weight: 800;
src: url('/fonts/inter-v13-latin-800.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* inter-900 - latin */
@font-face {
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
font-family: 'Inter';
font-style: normal;
font-weight: 900;
src: url('/fonts/inter-v13-latin-900.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
.text-shadow-huya {
text-shadow: 1px 1px 2px #ffaa06;
}

View File

@@ -101,15 +101,13 @@
<div class="flex justify-center items -center">
<div class="flex flex-col items-center justify-center">
<a href="{{ $streamer->streamer_url }}" target="_blank" rel="noopener noreferrer"
class="text-center text-neutral-100 text-sm mt-1.5 items-center">
class="text-center text-neutral-100 text-sm mt-1.5 items-center drop-shadow-lg text-shadow-{{ strtolower($streamer->platform) }}">
{{ $streamer->displayname }}
</a>
</div>
</div>
@endforeach
</div>
</div>
</div>
<div class="transition-all duration-700 border shadow-md rounded-2xl border-3 border-white/10 shadow-stone-800/80 lg:col-span-2 hover:shadow-orange-500/20"

View File

@@ -5,6 +5,7 @@ module.exports = {
darkMode: 'class',
content: [
'./resources/**/*.blade.php',
'./resources/**/**/*.blade.php',
'./resources/**/*.js',
'./resources/**/*.vue',
'./node_modules/flowbite/**/*.js',
@@ -25,6 +26,13 @@ module.exports = {
fontFamily: {
sans: ['Inter var', 'Inter', 'sans-serif', ...defaultTheme.fontFamily.sans],
},
colors: {
twitch: '#6441a5',
youtube: '#FF0000',
kick: '#53fc18',
douyu: '#ff5f3a',
huya: '#ffaa06'
}
},
},
corePlugins: {