create basic homepage layout

This commit is contained in:
2026-02-25 20:48:43 +01:00
parent d9c2a8cd2a
commit 7ee2e1ad08
6 changed files with 340 additions and 17 deletions
+48
View File
@@ -0,0 +1,48 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Friends</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="{{ url_for('static', filename='app.css') }}" />
</head>
<body>
<div class="site-shell">
<header class="topbar">
<a href="{{ url_for('main.home') }}" class="brand">Chess</a>
<nav class="topnav">
<a href="{{ url_for('main.home') }}">Home</a>
<a href="{{ url_for('main.play') }}">Play</a>
<a href="{{ url_for('main.friends') }}" class="active">Friends</a>
</nav>
<div class="profile-pill">{{ current_user.username }}</div>
</header>
<h1>Friends</h1>
<section class="panel-grid">
<article class="panel">
<h2>Online now</h2>
<ul class="friend-list">
<li><span class="dot"></span>name1</li>
<li><span class="dot"></span>friend2</li>
<li><span class="dot"></span>bro has a lot of friends</li>
</ul>
</article>
<article class="panel">
<h2>Incoming invites</h2>
<p>No pending invitations
</p>
</article>
</section>
</main>
</div>
</body>
</html>
+28 -5
View File
@@ -3,15 +3,38 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Home Page</title>
<title>Home</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap"
rel="stylesheet"
href="{{ url_for('static', filename='style.css') }}"
/>
<link rel="stylesheet" href="{{ url_for('static', filename='app.css') }}" />
</head>
<body>
<h1>logged in</h1>
<p>hi, {{ current_user.username }}!</p>
<a href="{{ url_for('main.play') }}" class="link-button">Play Chess</a>
<div class="site-shell">
<header class="topbar">
<a href="{{ url_for('main.home') }}" class="brand">Chess</a>
<nav class="topnav">
<a href="{{ url_for('main.home') }}" class="active">Home</a>
<a href="{{ url_for('main.play') }}">Play</a>
<a href="{{ url_for('main.friends') }}">Friends</a>
</nav>
<div class="profile-pill">{{ current_user.username }}</div>
</header>
<main class="page-wrap">
<h1>Welcome back, {{current_user.username}}</h1>
<div class="cta-row">
<a href="{{ url_for('main.play') }}" class="btn btn-primary"
>Start a game</a
>
<a href="{{ url_for('main.friends') }}" class="btn btn-secondary"
>Open friends</a
>
</div>
</main>
</div>
</body>
</html>
+44 -11
View File
@@ -3,21 +3,54 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Chess Arena</title>
<title>Play</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap"
rel="stylesheet"
href="{{ url_for('static', filename='play.css') }}"
/>
<script
src="https://cdn.socket.io/4.8.1/socket.io.min.js"
crossorigin="anonymous"
></script>
<script
type="module"
src="{{ url_for('static', filename='js/main.js') }}"
></script>
<link rel="stylesheet" href="{{ url_for('static', filename='app.css') }}" />
</head>
<body>
<div id="app"></div>
<div class="site-shell">
<header class="topbar">
<a href="{{ url_for('main.home') }}" class="brand">Chess</a>
<nav class="topnav">
<a href="{{ url_for('main.home') }}">Home</a>
<a href="{{ url_for('main.play') }}" class="active">Play</a>
<a href="{{ url_for('main.friends') }}">Friends</a>
</nav>
<div class="profile-pill">{{ current_user.username }}</div>
</header>
<!-- todo: make all of this via js and implement logic -->
<main class="page-wrap">
<section class="queue-layout">
<article class="panel">
<h2>Game settings</h2>
<h4>Choose a time setup</h4>
<div class="chip-row">
<button class="chip">1 + 0</button>
<button class="chip">3 + 2</button>
<button class="chip active">10 + 0</button>
<button class="chip">15 + 10</button>
</div>
<h4>You play as</h4>
<div class="chip-row">
<button class="chip">white</button>
<button class="chip">black</button>
<button class="chip active">random</button>
</div>
<div class="cta-row">
<!-- <button class="btn btn-primary" type="button">Start game</button> -->
<button class="btn btn-secondary" type="button">
Create game code
</button>
</div>
</article>
</section>
</main>
</div>
</body>
</html>