Refactor styles and components for improved UI consistency
- Updated login page layout by removing unnecessary classes. - Redesigned 404 not found page with new layout and styles. - Enhanced public pages with consistent font styling and hover effects. - Improved ranking page header styling for better readability. - Updated rules page with consistent font and link styles. - Enhanced statistics page header styling. - Refined global CSS variables for better theme consistency. - Updated button styles for improved interaction feedback. - Enhanced table styles for better readability and interaction. - Updated Tailwind configuration to include new font families.
This commit is contained in:
@@ -5,5 +5,5 @@ import localBau from "@images/90.png";
|
||||
|
||||
<Image src={localBau} alt="Bau" widths={[240, 540, 720, 1080, 1920, localBau.width]}
|
||||
sizes={`(max-width: 240px) 240px, (max-width: 540px) 540px, (max-width: 720px) 720px, (max-width: 1080px) 1080px, (max-width: 1920px) 1920px, ${localBau.width}px`}
|
||||
class="w-full h-full object-cover rounded-b-2xl shadow-2xl" quality={100}
|
||||
class="w-full h-full object-cover" quality={100}
|
||||
draggable="false" loading="eager"/>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
}
|
||||
|
||||
let { hoverEffect = true, extraClasses = "", children }: Props = $props();
|
||||
let classes = $derived(twMerge("w-72 border-2 border-gray-100 flex flex-col items-center p-8 m-4 rounded-xl shadow-lg bg-zinc-900 dark:border-gray-800 dark:text-gray-100", extraClasses));
|
||||
let classes = $derived(twMerge("flex flex-col items-center p-8 m-4 bg-[#0c0c0c] border border-[rgba(255,255,255,0.06)] text-gray-100", extraClasses));
|
||||
</script>
|
||||
|
||||
<div class={classes} bind:this={cardElement} onmousemove={rotateElement} onmouseleave={resetElement} class:hoverEffect>
|
||||
@@ -67,10 +67,13 @@
|
||||
|
||||
:global(h1) {
|
||||
@apply text-xl font-bold mt-4;
|
||||
font-family: "Barlow Condensed", sans-serif;
|
||||
letter-spacing: 0.06em;
|
||||
}
|
||||
|
||||
:global(svg) {
|
||||
@apply transition-transform duration-300 ease-in-out hover:scale-110 hover:drop-shadow-2xl;
|
||||
color: #f59e0b;
|
||||
@apply transition-transform duration-300 ease-in-out hover:scale-110;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="p-3 bg-gray-200 dark:bg-neutral-800 rounded-2xl w-3/4 mx-auto">
|
||||
<div class="p-3 bg-[#0c0c0c] border border-[rgba(255,255,255,0.06)] w-3/4 mx-auto">
|
||||
<table>
|
||||
<thead>
|
||||
<tr class="font-bold border-b">
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
);
|
||||
</script>
|
||||
|
||||
<div class="p-3 bg-gray-200 dark:bg-neutral-800 rounded-2xl w-3/4 mx-auto">
|
||||
<div class="p-3 bg-[#0c0c0c] border border-[rgba(255,255,255,0.06)] w-3/4 mx-auto">
|
||||
<table class="w-full">
|
||||
<thead>
|
||||
<tr class="font-bold border-b">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import {t} from "astro-i18n";
|
||||
---
|
||||
|
||||
<div class="bg-yellow-100 border-l-4 border-yellow-500 text-yellow-700 p-4" role="alert">
|
||||
<p class="font-bold">{t("warning.title")}</p>
|
||||
<p>{t("warning.text")}</p>
|
||||
<div class="border-l-2 border-amber-500 bg-amber-500/5 p-4" role="alert">
|
||||
<p class="font-bold text-amber-400" style="font-family: 'Barlow Condensed', sans-serif; letter-spacing: 0.1em; text-transform: uppercase;">{t("warning.title")}</p>
|
||||
<p class="text-gray-400 text-sm">{t("warning.text")}</p>
|
||||
</div>
|
||||
|
||||
@@ -74,8 +74,8 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<form class="bg-gray-100 dark:bg-neutral-900 p-12 rounded-2xl shadow-2xl border-2 border-gray-600 flex flex-col" onsubmit={preventDefault(login)}>
|
||||
<h1 class="text-4xl text-white text-center">{t("login.title")}</h1>
|
||||
<form class="sw-login-form" onsubmit={preventDefault(login)}>
|
||||
<h1 class="text-4xl text-white text-center" style="font-family: 'Barlow Condensed', sans-serif; letter-spacing: 0.08em;">{t("login.title")}</h1>
|
||||
<div class="ml-2 flex flex-col">
|
||||
<label for="username">{t("login.label.username")}</label>
|
||||
<input type="text" id="username" name="username" placeholder={t("login.placeholder.username")} bind:value={username} />
|
||||
@@ -83,24 +83,65 @@
|
||||
<input type="password" id="password" name="password" placeholder={t("login.placeholder.password")} bind:value={pw} />
|
||||
</div>
|
||||
<p class="mt-2">
|
||||
<a class="text-neutral-500 hover:underline" href={l("/set-password")}>{t("login.setPassword")}</a>
|
||||
<a class="sw-link" href={l("/set-password")}>{t("login.setPassword")}</a>
|
||||
</p>
|
||||
|
||||
{#if error}
|
||||
<p class="mt-2 text-red-500">{error}</p>
|
||||
{/if}
|
||||
<button class="btn mt-4 !mx-0 justify-center" type="submit" onclick={preventDefault(login)}>{t("login.submit")}</button>
|
||||
<a class="btn mt-4 !mx-0 justify-center" href="https://discord.com/oauth2/authorize?client_id=869606970099904562&response_type=token&redirect_uri=https%3A%2F%2Fsteamwar.de%2Flogin&scope=identify">
|
||||
<button class="btn mt-4 justify-center w-full" type="submit" onclick={preventDefault(login)}>{t("login.submit")}</button>
|
||||
<a class="btn mt-4 justify-center w-full" href="https://discord.com/oauth2/authorize?client_id=869606970099904562&response_type=token&redirect_uri=https%3A%2F%2Fsteamwar.de%2Flogin&scope=identify">
|
||||
{t("login.discord")}
|
||||
</a>
|
||||
</form>
|
||||
|
||||
<style lang="postcss">
|
||||
.sw-login-form {
|
||||
background: rgba(12, 12, 12, 0.95);
|
||||
border: 1px solid rgba(255, 255, 255, 0.06);
|
||||
border-top: 2px solid #f59e0b;
|
||||
backdrop-filter: blur(24px);
|
||||
padding: 3rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
input {
|
||||
@apply border-2 rounded-md p-2 shadow-2xl w-80 dark:bg-neutral-800 focus:outline-none focus:ring-2 focus:ring-neutral-500 focus:border-transparent text-black;
|
||||
width: 20rem;
|
||||
padding: 0.6rem 0.8rem;
|
||||
margin-top: 0.25rem;
|
||||
margin-bottom: 0.5rem;
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
color: #f5f5f5;
|
||||
font-size: 0.85rem;
|
||||
outline: none;
|
||||
transition: border-color 0.2s ease;
|
||||
}
|
||||
|
||||
input:focus {
|
||||
border-color: rgba(245, 158, 11, 0.5);
|
||||
}
|
||||
|
||||
label {
|
||||
@apply text-neutral-300;
|
||||
font-family: "Barlow Condensed", sans-serif;
|
||||
font-size: 0.7rem;
|
||||
letter-spacing: 0.15em;
|
||||
text-transform: uppercase;
|
||||
color: rgba(163, 163, 163, 0.7);
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
.sw-link {
|
||||
color: rgba(163, 163, 163, 0.5);
|
||||
text-decoration: none;
|
||||
font-size: 0.85rem;
|
||||
border-bottom: 1px solid transparent;
|
||||
transition: color 0.2s, border-color 0.2s;
|
||||
}
|
||||
|
||||
.sw-link:hover {
|
||||
color: #f59e0b;
|
||||
border-bottom-color: #f59e0b;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -49,9 +49,9 @@
|
||||
|
||||
function handleScroll() {
|
||||
if (window.scrollY > 0) {
|
||||
navbar!.classList.add("before:scale-y-100");
|
||||
navbar!.classList.add("sw-nav-scrolled");
|
||||
} else {
|
||||
navbar!.classList.remove("before:scale-y-100");
|
||||
navbar!.classList.remove("sw-nav-scrolled");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -60,15 +60,15 @@
|
||||
|
||||
<nav
|
||||
data-pagefind-ignore
|
||||
class="z-20 fixed top-0 left-0 right-0 sm:px-4 py-1 transition-colors flex justify-center before:backdrop-blur before:shadow-2xl before:absolute before:top-0 before:left-0 before:bottom-0 before:right-0 before:-z-10 before:scale-y-0 before:transition-transform before:origin-top"
|
||||
class="sw-nav z-20 fixed top-0 left-0 right-0 sm:px-4 py-1 transition-colors flex justify-center"
|
||||
bind:this={navbar}
|
||||
>
|
||||
<div class="flex flex-row items-center justify-evenly md:justify-between match">
|
||||
<a class="flex items-center" href={l("/")}>
|
||||
{@render logo?.()}
|
||||
<span class="text-2xl uppercase font-bold text-white hidden md:inline-block">
|
||||
<span class="sw-nav-title hidden md:inline-block">
|
||||
{t("navbar.title")}
|
||||
<span class="before:scale-y-100" style="display: none" aria-hidden="true"></span>
|
||||
<span class="scrolled-trigger" style="display: none" aria-hidden="true"></span>
|
||||
</span>
|
||||
</a>
|
||||
<div class="flex justify-center flex-wrap">
|
||||
@@ -144,4 +144,26 @@
|
||||
.match {
|
||||
width: min(100vw, 70em);
|
||||
}
|
||||
|
||||
:global(.sw-nav) {
|
||||
backdrop-filter: none;
|
||||
background: transparent;
|
||||
transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
|
||||
border-bottom: 1px solid transparent;
|
||||
}
|
||||
|
||||
:global(.sw-nav-scrolled) {
|
||||
background: rgba(8, 8, 8, 0.85) !important;
|
||||
backdrop-filter: blur(16px) !important;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
|
||||
}
|
||||
|
||||
.sw-nav-title {
|
||||
font-family: "Barlow Condensed", sans-serif;
|
||||
font-size: 1.3rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.12em;
|
||||
text-transform: uppercase;
|
||||
color: #f5f5f5;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -22,7 +22,7 @@ const {
|
||||
const postUrl = l(`/announcements/${post.slug.split("/").slice(1).join("/")}`);
|
||||
---
|
||||
|
||||
<Card extraClasses={`w-full items-start mx-0 ${slim ? "m-0 p-1 backdrop-blur-xl bg-transparent" : ""}`} hoverEffect={false}>
|
||||
<Card extraClasses={`w-full items-start mx-0 ${slim ? "m-0 p-2 backdrop-blur-xl bg-transparent border-0" : "border-t-2 border-t-amber-500/30"}`} hoverEffect={false}>
|
||||
<div class={`flex flex-row ${slim ? "" : "p-4"}`}>
|
||||
{
|
||||
post.data.image != null ? (
|
||||
@@ -32,7 +32,7 @@ const postUrl = l(`/announcements/${post.slug.split("/").slice(1).join("/")}`);
|
||||
transition:name={post.data.title + "-image"}
|
||||
src={post.data.image}
|
||||
alt="Post Image"
|
||||
class="rounded-2xl shadow-2xl object-cover h-32 w-32 max-w-none transition-transform hover:scale-105"
|
||||
class="object-cover h-32 w-32 max-w-none transition-transform hover:scale-105"
|
||||
/>
|
||||
</div>
|
||||
</a>
|
||||
@@ -40,8 +40,8 @@ const postUrl = l(`/announcements/${post.slug.split("/").slice(1).join("/")}`);
|
||||
}
|
||||
<div>
|
||||
<a href={postUrl} class="flex flex-col items-start">
|
||||
<h2 class="text-2xl font-bold" transition:name={post.data.title + "-title"}>{post.data.title}</h2>
|
||||
<P class="text-gray-500"
|
||||
<h2 class="text-2xl font-bold" style="font-family: 'Barlow Condensed', sans-serif; letter-spacing: 0.04em;" transition:name={post.data.title + "-title"}>{post.data.title}</h2>
|
||||
<P class="text-gray-500 text-sm"
|
||||
>{
|
||||
Intl.DateTimeFormat(astroI18n.locale, {
|
||||
day: "numeric",
|
||||
|
||||
@@ -49,14 +49,14 @@
|
||||
let { open = $bindable(false) }: Props = $props();
|
||||
</script>
|
||||
|
||||
<button transition:fade class="fixed top-0 left-0 w-screen h-screen backdrop-blur z-20 cursor-default" onclick={() => open = false}>
|
||||
<button transition:fade class="fixed top-0 left-0 w-screen h-screen bg-black/60 backdrop-blur-sm z-20 cursor-default" onclick={() => open = false}>
|
||||
</button>
|
||||
<div transition:slide style="width: min(100%, 75em);" class="fixed top-0 left-1/2 -translate-x-1/2 h-2/3 dark:bg-zinc-900 rounded-b-2xl shadow-2xl z-30 p-4 text-white flex flex-col">
|
||||
<div transition:slide style="width: min(100%, 75em);" class="fixed top-0 left-1/2 -translate-x-1/2 h-2/3 z-30 p-4 text-white flex flex-col sw-search-panel">
|
||||
<input placeholder="Search..." onkeypress={search}>
|
||||
|
||||
<div class="overflow-y-scroll flex-1 w-full mt-2 rounded-2xl">
|
||||
<div class="overflow-y-scroll flex-1 w-full mt-2">
|
||||
{#each results as result}
|
||||
<Card extraClasses="w-full m-0 my-2" hoverEffect={false}>
|
||||
<Card extraClasses="w-full m-0 my-2 border-t-2 border-t-amber-500/30" hoverEffect={false}>
|
||||
<a class="grid grid-cols-3" href={l(result.url)}>
|
||||
<h1>{result.meta.title}</h1>
|
||||
{#each result.sub_results.slice(0, 2) as sub_result}
|
||||
@@ -69,13 +69,28 @@
|
||||
</div>
|
||||
|
||||
<style lang="postcss">
|
||||
.sw-search-panel {
|
||||
background: rgba(8, 8, 8, 0.95);
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
|
||||
backdrop-filter: blur(24px);
|
||||
}
|
||||
|
||||
input {
|
||||
@apply border-2 rounded-md p-2 shadow-2xl w-full
|
||||
dark:bg-neutral-800
|
||||
focus:outline-none focus:ring-2 focus:ring-neutral-500 focus:border-transparent;
|
||||
width: 100%;
|
||||
padding: 0.7rem 1rem;
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
color: #f5f5f5;
|
||||
font-size: 0.9rem;
|
||||
outline: none;
|
||||
transition: border-color 0.2s ease;
|
||||
}
|
||||
|
||||
input:focus {
|
||||
border-color: rgba(245, 158, 11, 0.5);
|
||||
}
|
||||
|
||||
label {
|
||||
@apply text-neutral-300;
|
||||
color: rgba(163, 163, 163, 0.7);
|
||||
}
|
||||
</style>
|
||||
@@ -13,10 +13,10 @@ const {tag, noLink} = Astro.props;
|
||||
|
||||
{noLink
|
||||
? (
|
||||
<span class="inline-block bg-gray-800 rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 shadow-2xl">{capitalize(tag)}</span>
|
||||
<span class="inline-block bg-transparent border border-amber-500/30 px-3 py-0.5 text-xs font-semibold text-amber-400 mr-2 uppercase tracking-wider" style="font-family: 'Barlow Condensed', sans-serif;">{capitalize(tag)}</span>
|
||||
)
|
||||
: (
|
||||
<a href={l(`/announcements/tags/${tag}`)}>
|
||||
<span class="inline-block bg-gray-800 rounded-full px-3 py-1 text-sm font-semibold text-white mr-2 shadow-2xl">{capitalize(tag)}</span>
|
||||
<span class="inline-block bg-transparent border border-amber-500/30 px-3 py-0.5 text-xs font-semibold text-amber-400 mr-2 uppercase tracking-wider hover:border-amber-400 hover:text-amber-300 transition-colors" style="font-family: 'Barlow Condensed', sans-serif;">{capitalize(tag)}</span>
|
||||
</a>
|
||||
)}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col gap-1 {unsized ? '' : 'w-72 m-4'}">
|
||||
<div class="bg-gray-100 text-black font-bold px-2 rounded uppercase">
|
||||
<div class="bg-amber-500 text-black font-bold px-2 uppercase text-xs tracking-wider" style="font-family: 'Barlow Condensed', sans-serif;">
|
||||
{title}
|
||||
</div>
|
||||
<div class="border border-gray-600 rounded p-2 flex flex-col gap-2 bg-slate-900">
|
||||
|
||||
Reference in New Issue
Block a user