Format
This commit is contained in:
parent
2aa8ee78a9
commit
7cbeef6482
6 changed files with 114 additions and 78 deletions
|
|
@ -1,8 +1,9 @@
|
|||
function copyGameLink() {
|
||||
const gameId = document.querySelector('meta[name="gameId"]').content;
|
||||
const gameLink = `${window.location.origin}${window.location.pathname}?gameId=${gameId}`;
|
||||
|
||||
navigator.clipboard.writeText(gameLink)
|
||||
|
||||
navigator.clipboard
|
||||
.writeText(gameLink)
|
||||
.then(() => {
|
||||
const copyLinkButton = document.getElementById('copy-link-button');
|
||||
const copyLinkText = document.getElementById('copy-link-text');
|
||||
|
|
@ -24,7 +25,7 @@ function copyGameLink() {
|
|||
window.copyButtonTimeoutId = null;
|
||||
}, 3000);
|
||||
})
|
||||
.catch(err => {
|
||||
.catch((err) => {
|
||||
console.error('Failed to copy link: ', err);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ gameContainer.setAttribute('ws-connect', wsUrl);
|
|||
// Tell HTMX to connect the WebSocket
|
||||
htmx.trigger(gameContainer, ' and connect');
|
||||
|
||||
|
||||
// Update the WebSocket status indicator
|
||||
const wsStatusDiv = document.getElementById('ws-status');
|
||||
|
||||
|
|
|
|||
129
public/style.css
129
public/style.css
|
|
@ -1,61 +1,79 @@
|
|||
|
||||
|
||||
:root {
|
||||
/* PRIMARY BRAND COLORS */
|
||||
--color-primary: #C12675; /* Main brand color - primary buttons, links, highlights */
|
||||
--color-primary-light: #D84A95; /* Hover states for primary elements, lighter accents */
|
||||
--color-primary-dark: #9A1C5B; /* Active states, pressed buttons, darker emphasis */
|
||||
--color-primary-subtle: #F4E6EE; /* Background tints, very light overlays, subtle highlights */
|
||||
|
||||
--color-primary: #c12675; /* Main brand color - primary buttons, links, highlights */
|
||||
--color-primary-light: #d84a95; /* Hover states for primary elements, lighter accents */
|
||||
--color-primary-dark: #9a1c5b; /* Active states, pressed buttons, darker emphasis */
|
||||
--color-primary-subtle: #f4e6ee; /* Background tints, very light overlays, subtle highlights */
|
||||
|
||||
/* SECONDARY ACCENT COLORS */
|
||||
--color-secondary: #8B4A9C; /* Secondary buttons, alternative CTAs, complementary actions */
|
||||
--color-secondary-light: #A866B8; /* Hover states for secondary elements */
|
||||
--color-secondary-dark: #6D3B7A; /* Active states for secondary elements */
|
||||
|
||||
--color-secondary: #8b4a9c; /* Secondary buttons, alternative CTAs, complementary actions */
|
||||
--color-secondary-light: #a866b8; /* Hover states for secondary elements */
|
||||
--color-secondary-dark: #6d3b7a; /* Active states for secondary elements */
|
||||
|
||||
/* NEUTRAL GRAYS */
|
||||
--color-neutral-50: #FAFAFA; /* Page backgrounds, card backgrounds */
|
||||
--color-neutral-100: #F5F5F5; /* Subtle backgrounds, disabled states */
|
||||
--color-neutral-200: #E5E5E5; /* Borders, dividers, subtle separators */
|
||||
--color-neutral-300: #D4D4D4; /* Input borders, inactive elements */
|
||||
--color-neutral-400: #A3A3A3; /* Placeholder text, muted elements */
|
||||
--color-neutral-500: #737373; /* Body text, secondary information */
|
||||
--color-neutral-600: #525252; /* Headings, important text */
|
||||
--color-neutral-700: #404040; /* Primary text, main content */
|
||||
--color-neutral-800: #262626; /* High contrast text, emphasis */
|
||||
--color-neutral-900: #171717; /* Maximum contrast, headers, navigation */
|
||||
|
||||
--color-neutral-50: #fafafa; /* Page backgrounds, card backgrounds */
|
||||
--color-neutral-100: #f5f5f5; /* Subtle backgrounds, disabled states */
|
||||
--color-neutral-200: #e5e5e5; /* Borders, dividers, subtle separators */
|
||||
--color-neutral-300: #d4d4d4; /* Input borders, inactive elements */
|
||||
--color-neutral-400: #a3a3a3; /* Placeholder text, muted elements */
|
||||
--color-neutral-500: #737373; /* Body text, secondary information */
|
||||
--color-neutral-600: #525252; /* Headings, important text */
|
||||
--color-neutral-700: #404040; /* Primary text, main content */
|
||||
--color-neutral-800: #262626; /* High contrast text, emphasis */
|
||||
--color-neutral-900: #171717; /* Maximum contrast, headers, navigation */
|
||||
|
||||
/* STATUS & FEEDBACK COLORS */
|
||||
--color-success: #059669; /* Success messages, confirmations, positive states */
|
||||
--color-success-light: #10B981; /* Success backgrounds, subtle positive indicators */
|
||||
--color-warning: #D97706; /* Warning messages, caution states */
|
||||
--color-warning-light: #F59E0B; /* Warning backgrounds, attention grabbers */
|
||||
--color-error: #DC2626; /* Error messages, destructive actions */
|
||||
--color-error-light: #EF4444; /* Error backgrounds, validation errors */
|
||||
--color-info: #2563EB; /* Info messages, helpful tips */
|
||||
--color-info-light: #3B82F6; /* Info backgrounds, informational highlights */
|
||||
|
||||
--color-success: #059669; /* Success messages, confirmations, positive states */
|
||||
--color-success-light: #10b981; /* Success backgrounds, subtle positive indicators */
|
||||
--color-warning: #d97706; /* Warning messages, caution states */
|
||||
--color-warning-light: #f59e0b; /* Warning backgrounds, attention grabbers */
|
||||
--color-error: #dc2626; /* Error messages, destructive actions */
|
||||
--color-error-light: #ef4444; /* Error backgrounds, validation errors */
|
||||
--color-info: #2563eb; /* Info messages, helpful tips */
|
||||
--color-info-light: #3b82f6; /* Info backgrounds, informational highlights */
|
||||
|
||||
/* SPECIAL PURPOSE COLORS */
|
||||
--color-gradient-start: #C12675; /* Start of brand gradients */
|
||||
--color-gradient-end: #8B4A9C; /* End of brand gradients, creates depth */
|
||||
--color-shadow: rgba(193, 38, 117, 0.15); /* Drop shadows with brand tint */
|
||||
--color-overlay: rgba(193, 38, 117, 0.08); /* Modal overlays, background tints */
|
||||
|
||||
--color-gradient-start: #c12675; /* Start of brand gradients */
|
||||
--color-gradient-end: #8b4a9c; /* End of brand gradients, creates depth */
|
||||
--color-shadow: rgba(193, 38, 117, 0.15); /* Drop shadows with brand tint */
|
||||
--color-overlay: rgba(
|
||||
193,
|
||||
38,
|
||||
117,
|
||||
0.08
|
||||
); /* Modal overlays, background tints */
|
||||
|
||||
/* TEXT ON COLORED BACKGROUNDS */
|
||||
--color-on-primary: #FFFFFF; /* Text/icons on primary color backgrounds */
|
||||
--color-on-secondary: #FFFFFF; /* Text/icons on secondary color backgrounds */
|
||||
--color-on-dark: #FFFFFF; /* Text/icons on dark backgrounds */
|
||||
--color-on-light: #171717; /* Text/icons on light backgrounds */
|
||||
|
||||
--color-on-primary: #ffffff; /* Text/icons on primary color backgrounds */
|
||||
--color-on-secondary: #ffffff; /* Text/icons on secondary color backgrounds */
|
||||
--color-on-dark: #ffffff; /* Text/icons on dark backgrounds */
|
||||
--color-on-light: #171717; /* Text/icons on light backgrounds */
|
||||
|
||||
/* INTERACTIVE STATES */
|
||||
--color-hover-overlay: rgba(255, 255, 255, 0.1); /* Light overlay for hover states */
|
||||
--color-active-overlay: rgba(0, 0, 0, 0.1); /* Dark overlay for active/pressed states */
|
||||
--color-focus-ring: rgba(193, 38, 117, 0.3); /* Focus rings for accessibility */
|
||||
|
||||
--color-hover-overlay: rgba(
|
||||
255,
|
||||
255,
|
||||
255,
|
||||
0.1
|
||||
); /* Light overlay for hover states */
|
||||
--color-active-overlay: rgba(
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0.1
|
||||
); /* Dark overlay for active/pressed states */
|
||||
--color-focus-ring: rgba(
|
||||
193,
|
||||
38,
|
||||
117,
|
||||
0.3
|
||||
); /* Focus rings for accessibility */
|
||||
|
||||
/* BACKGROUND VARIATIONS */
|
||||
--color-bg-primary: #FFFFFF; /* Main page background */
|
||||
--color-bg-secondary: #FAFAFA; /* Secondary sections, cards */
|
||||
--color-bg-tertiary: #F5F5F5; /* Sidebar backgrounds, less prominent areas */
|
||||
--color-bg-accent: #FDF2F8; /* Very subtle pink background for special sections */
|
||||
--color-bg-primary: #ffffff; /* Main page background */
|
||||
--color-bg-secondary: #fafafa; /* Secondary sections, cards */
|
||||
--color-bg-tertiary: #f5f5f5; /* Sidebar backgrounds, less prominent areas */
|
||||
--color-bg-accent: #fdf2f8; /* Very subtle pink background for special sections */
|
||||
}
|
||||
|
||||
body {
|
||||
|
|
@ -99,8 +117,8 @@ body {
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
background-image:
|
||||
linear-gradient(to right, var(--color-neutral-400) 1px, transparent 1px),
|
||||
linear-gradient(to bottom, var(--color-neutral-400) 1px, transparent 1px);
|
||||
linear-gradient(to right, var(--color-neutral-400) 1px, transparent 1px),
|
||||
linear-gradient(to bottom, var(--color-neutral-400) 1px, transparent 1px);
|
||||
background-size: 30px 30px;
|
||||
background-position: -1px -1px;
|
||||
pointer-events: none;
|
||||
|
|
@ -123,7 +141,8 @@ body {
|
|||
background-color: var(--color-hover-overlay);
|
||||
}
|
||||
|
||||
.stone-black-heart, .stone-white-heart {
|
||||
.stone-black-heart,
|
||||
.stone-white-heart {
|
||||
position: relative;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
|
|
@ -155,11 +174,13 @@ body {
|
|||
transform-origin: 100% 100%;
|
||||
}
|
||||
|
||||
.stone-black-heart::before, .stone-black-heart::after {
|
||||
.stone-black-heart::before,
|
||||
.stone-black-heart::after {
|
||||
background-color: var(--color-primary-light);
|
||||
}
|
||||
|
||||
.stone-white-heart::before, .stone-white-heart::after {
|
||||
.stone-white-heart::before,
|
||||
.stone-white-heart::after {
|
||||
background-color: var(--color-on-primary);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue