From 42fd8cd3560047c88a2167a4d5c5845dd81eb3ec Mon Sep 17 00:00:00 2001 From: Martin Hafskjold Thoresen Date: Sat, 11 Jan 2025 01:01:10 +0100 Subject: Add styling and hot reload --- static/style.css | 160 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 157 insertions(+), 3 deletions(-) (limited to 'static/style.css') diff --git a/static/style.css b/static/style.css index 3b9ba9d..3dac7a4 100644 --- a/static/style.css +++ b/static/style.css @@ -1,18 +1,172 @@ +@import url("https://fonts.googleapis.com/css2?family=Chakra+Petch:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap"); + :root { + font-family: "Chakra Petch", serif; +} + +* { + font-family: "Chakra Petch", serif; + padding: 0; + margin: 0; } body { + background: hsl(214 100% 44.7%); + color: white; + display: flex; + flex-direction: column; + align-items: center; +} + +h1 { + font-size: 48px; + text-align: center; +} + +button { + background: hsl(214 100% 100%); + color: hsl(214 100% 15%); + padding: 12px 24px; + border: none; + border-radius: 4px; + font-size: 16px; + + &:hover { + background: hsl(214 100% 95%); + cursor: pointer; + } +} + +form { + display: flex; + flex-direction: row; + gap: 10px; +} + +input:not([type]) { + padding: 4px 8px; + border: none; + border-radius: 4px; + font-size: 16px; + + &:focus { + outline: none; + } +} + +input[type="submit"] { + background: white; + padding: 4px 8px; + border: none; + border-radius: 4px; + font-size: 16px; + + &:hover { + background: #f0f0f0; + cursor: pointer; + } +} + +body > section { + padding: 48px 24px; + display: flex; + flex-direction: column; + gap: 10px; + + align-items: center; +} + +canvas { + background: white; + box-shadow: 0 0 10px 4px #00000080; + padding: 10px; + border-radius: 5px; +} + +footer { + border-top: 1px solid #00000020; + padding: 24px; + text-align: center; +} + +a { + color: #e1edfe; + &:visited { + color: #e1edfe; + } +} + +.main-page { + min-width: 30rem; + max-width: 50vw; +} + +.games-list { + list-style: none; + display: flex; + flex-direction: column; + gap: 8px; + + padding-bottom: 24px; + + li { + display: flex; + a { + flex: 1; + border-radius: 20px; + padding: 4px 16px; + background: #ffffff; + text-decoration: none; + &:hover { + background: #f0f8ff; + } + color: #333; + &:visited { + color: #333; + } + } + } +} + +.leaderboard { + font-size: 20px; + li { + margin-left: 20px; + } + padding-bottom: 36px; } #guesslist { list-style: none; + display: flex; + flex-direction: row; + gap: 10px; + min-width: 50vw; + flex-wrap: wrap; + + li { + border-radius: 4px; + padding: 4px 8px; + + background: white; + color: black; + } + [data-accept="none"] { - background: #aaa; + &::before { + content: "❓ "; + } } [data-accept="true"] { - background: #00ff00; + background: #d9ffd9; + &::before { + content: "✅ "; + } } [data-accept="false"] { - background: #ff0000; + background: #ffc0c0; + &::before { + content: "❌ "; + } } } -- cgit v1.2.3