changements de le couleur et de la font sur l'ensemble du site.

This commit is contained in:
cherif
2023-01-15 17:55:52 +01:00
parent d9652a5eab
commit 99c02ea0ab
8 changed files with 129 additions and 110 deletions

View File

@@ -1,4 +1,5 @@
html, body { html, body {
position: relative; position: relative;
width: 100%; width: 100%;
@@ -12,11 +13,23 @@ body {
box-sizing: border-box; box-sizing: border-box;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
/* tmp? */ /* tmp? */
background: bisque; background-color: #333;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
@font-face {
font-family: "Bit5x3";
src:
url("./fonts/Bit5x3.woff2") format("woff2"),
local("Bit5x3"),
url("./fonts/Bit5x3.woff") format("woff");
font-weight: normal;
font-style: normal;
font-display: swap;
}
a { a {
color: rgb(0,100,200); color: rgb(0,100,200);
text-decoration: none; text-decoration: none;
@@ -30,6 +43,13 @@ a:visited {
color: rgb(0,80,160); color: rgb(0,80,160);
} }
.background-pages {
background-color: #333;
font-family: "Bit5x3";
font-size: 2vw;
color: white;
}
label { label {
display: block; display: block;
} }

View File

@@ -1,10 +1,26 @@
<script> <script>
import { link } from "svelte-spa-router"; import { link } from "svelte-spa-router";
import Header from '../pieces/Header.svelte';
</script> </script>
<h1>We are sorry!</h1>
<p>This isn't a url that we use.</p> <div class="background-pages">
<p>Go home you're drunk.</p> <div class="content">
<a href="/" use:link> <h1>We are sorry!</h1>
<h2>Take me home →</h2> <p>This isn't a url that we use.</p>
</a> <p>Go home you're drunk.</p>
</div>
</div>
<style>
.content {
left: 50%;
position: absolute;
-ms-transform: translateX(-50%);
transform: translateX(-50%);
}
</style>

View File

@@ -78,8 +78,8 @@
.button-in { .button-in {
background-color: #8c0000; background-color: #8c0000;
border-color: black; border-color: #071013;
border-width: 4px; border-width: 2px;
color: white; color: white;
font-family: "Bit5x3"; font-family: "Bit5x3";
font-size: x-large; font-size: x-large;
@@ -88,8 +88,8 @@
.button-out { .button-out {
background-color: #008c8c; background-color: #008c8c;
border-color: black; border-color: #071013;
border-width: 4px; border-width: 2px;
color: white; color: white;
font-family: "Bit5x3"; font-family: "Bit5x3";
font-size: x-large; font-size: x-large;

View File

@@ -28,7 +28,7 @@
</script> </script>
<Header /> <Header />
<br /> <br />
<div class="background-pages">
<div class="principal-div"> <div class="principal-div">
<table class="stats-table"> <table class="stats-table">
<thead> <thead>
@@ -59,6 +59,7 @@
</tbody> </tbody>
</table> </table>
</div> </div>
</div>
<style> <style>
@@ -71,7 +72,6 @@
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
font-size: 0.9em; font-size: 0.9em;
font-family: sans-serif;
min-width: 400px; min-width: 400px;
} }

View File

@@ -19,6 +19,7 @@
<Chat color="bisque"/> <Chat color="bisque"/>
<div class="background-pages">
<div class="outer"> <div class="outer">
{#if user !== undefined} {#if user !== undefined}
<GenerateUserDisplay user={user}/> <GenerateUserDisplay user={user}/>
@@ -28,13 +29,13 @@
<div>Failed to load current</div> <div>Failed to load current</div>
{/if} {/if}
</div> </div>
</div>
<style> <style>
div.outer{ div.outer{
max-width: 960px; max-width: 100%;
margin: 40px auto;
text-align: center; text-align: center;
padding-bottom: 10px;
} }
</style> </style>

View File

@@ -24,22 +24,10 @@
onMount( async() => { onMount( async() => {
// DO I ACTUALLY NEED TO ON MOUNT ALL THIS STUFF?
// ALSO I COULD JUST USE THE FUNCITONS I MADE...
// yea no idea what
// i mean do i fetch user? i will for now
user = await fetch(`http://${process.env.WEBSITE_HOST}:${process.env.WEBSITE_PORT}/api/v2/user`) user = await fetch(`http://${process.env.WEBSITE_HOST}:${process.env.WEBSITE_PORT}/api/v2/user`)
.then( (x) => x.json() ); .then( (x) => x.json() );
fetchAll(); fetchAll();
// ok this shit works!
// const interval = setInterval(() => {
// fetchAll();
// }, 1000);
// return () => clearInterval(interval);
}); });
const fetchAll = async() => { const fetchAll = async() => {
@@ -234,6 +222,7 @@
</script> </script>
<div class="background-pages">
<!-- svelte-ignore a11y-click-events-have-key-events --> <!-- svelte-ignore a11y-click-events-have-key-events -->
<div class="top-grid"> <div class="top-grid">
@@ -353,7 +342,7 @@
</div> </div>
</div> </div>
</div>
<style> <style>
/* ok so i want a 12 column grid with a sidebar */ /* ok so i want a 12 column grid with a sidebar */
@@ -368,7 +357,14 @@
div.sidebar-list{ div.sidebar-list{
grid-column: 1 / span 2; grid-column: 1 / span 2;
background: white; background: #FB8B24;
padding: 1vw;
max-width: 100%;
max-height: 100%;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
border-right: 4px solid #071013;
} }
div.sidebar-item{ div.sidebar-item{
@@ -393,7 +389,7 @@
} }
div.placeholder{ div.placeholder{
color: darkgray; color: white;
text-align: center; text-align: center;
} }
@@ -402,7 +398,7 @@
} }
div.tip{ div.tip{
color: darkgray; color: white;
font-size: 0.8em; font-size: 0.8em;
font-weight: bold; font-weight: bold;
} }

View File

@@ -106,6 +106,7 @@
<main> <main>
<div class="background-pages">
<h2>Look! You can change stuff</h2> <h2>Look! You can change stuff</h2>
<div class="cards"> <div class="cards">
<Card> <Card>
@@ -114,7 +115,7 @@
<div class="label">New Username</div> <div class="label">New Username</div>
<!-- it really hates {user.username} and ${user.username} --> <!-- it really hates {user.username} and ${user.username} -->
<!-- <input type="text" placeholder="current username: ${user.username}" bind:value={set.username}> --> <!-- <input type="text" placeholder="current username: ${user.username}" bind:value={set.username}> -->
<input type="text" placeholder="current username: {nameTmp}" bind:value={set.username}> <input type="text" placeholder="{nameTmp}" bind:value={set.username}>
<div class="success">{success.username}</div> <div class="success">{success.username}</div>
<div class="error">{errors.username}</div> <div class="error">{errors.username}</div>
</div> </div>
@@ -144,7 +145,7 @@
</form> </form>
</Card> </Card>
</div> </div>
</div>
</main> </main>
@@ -158,6 +159,8 @@
grid-gap: 20px; */ grid-gap: 20px; */
} }
div.cards{ div.cards{
display: grid; display: grid;
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;

View File

@@ -21,101 +21,84 @@
<!-- svelte-ignore a11y-click-events-have-key-events --> <!-- svelte-ignore a11y-click-events-have-key-events -->
<header> <div class="header">
<img src="/img/potato_logo.png" alt="Potato Pong Logo" on:click={() => (push('/'))}> <img src="/img/logo_potato.png" alt="Potato Pong Logo" on:click={() => (push('/'))}>
<h1>Potato Pong</h1> <div class="center">
<nav>
<button class:selected="{current === '/game'}" on:click={() => (push('/game'))}>Play</button> <button class:selected="{current === '/game'}" on:click={() => (push('/game'))}>Play</button>
<button class:selected="{current === '/spectator'}" on:click={() => (push('/spectator'))}>Spectate</button> <button class:selected="{current === '/spectator'}" on:click={() => (push('/spectator'))}>Spectate</button>
<button class:selected="{current === '/ranking'}" on:click={() => (push('/ranking'))}>Ranking</button> <button class:selected="{current === '/ranking'}" on:click={() => (push('/ranking'))}>Ranking</button>
<button class:selected="{current === '/profile'}" on:click={() => (push('/profile'))}>My Profile</button> <button class:selected="{current === '/profile'}" on:click={() => (push('/profile'))}>My Profile</button>
<!-- <button class:selected="{current === '/profile/settings'}" on:click={() => (push('/profile/settings'))}>Settings</button> -->
<button class:selected="{current === '/profile/friends'}" on:click={() => (push('/profile/friends'))}>Friends</button> <button class:selected="{current === '/profile/friends'}" on:click={() => (push('/profile/friends'))}>Friends</button>
<button on:click={handleClickLogout}>Log Out</button> </div>
</nav> <button class="logout" on:click={handleClickLogout}>Log Out</button>
</header> </div>
<style> <style>
/* See "possible_fonts.css" for more font options... */
@font-face { @font-face {
font-family: 'Bondi'; font-family: "Bit5x3";
src:url('/fonts/Bondi.ttf.woff') format('woff'), src:
url('/fonts/Bondi.ttf.svg#Bondi') format('svg'), url("/fonts/Bit5x3.woff2") format("woff2"),
url('/fonts/Bondi.ttf.eot'), local("Bit5x3"),
url('/fonts/Bondi.ttf.eot?#iefix') format('embedded-opentype'); url("/fonts/Bit5x3.woff") format("woff");
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
font-display: swap;
} }
.header div.center button.selected {
.selected {
background-color: chocolate;
text-decoration: underline; text-decoration: underline;
/* TMP so it's obvious but we need to pick good colors */ background-color: #2B3A67;
}
.header div.center button {
background-color: #8c0000;
border-color: #071013;
color: white;
font-family: "Bit5x3";
border-width: 2px;
font-size: 2vw;
} }
/* There is a bunch of unncessary shit in here... why so many flex grids, why is everything the same class? just seemed easier but... */ .header button.logout {
background-color: #008c8c;
border-color: #071013;
header{ color: white;
/* background: #f7f7f7; */ font-family: "Bit5x3";
background: #618174; border-width: 2px;
/* padding: 20px; */ font-size: 2vw;
margin: 0;
/* does nothing so far... */
/* display: flex; */
} }
header{ .header {
/* for some reason this doesn't do shit! */ resize: vertical;
position: sticky; overflow: hidden;
/* position: absolute; */ background: #FB8B24;
display: grid; box-sizing: border-box;
grid-template-columns: 1fr 1fr 1fr; -moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
border-bottom: 4px solid #071013;
position: relative;
display: block;
padding: 10px;
} }
/* Headers */ .header div.center {
h1{ width: fit-content;
font-family: 'Bondi';
}
h1{
margin: 0;
text-align: left;
/* max-width: 40px; */
/* this helped with the weird extra space under the image... */
display: flex;
justify-self: center; justify-self: center;
align-self: center; position: absolute;
left: 50%;
display: inline-block;
-ms-transform: translateX(-50%);
transform: translateX(-50%);
} }
/* Images */ .header button.logout {
float: right;
}
img{ .header img{
cursor: pointer; cursor: pointer;
max-width: 40px; max-width: 10%;
padding: 7px 20px; float: left;
justify-self: left;
} }
nav{
display: flex;
justify-content: right;
}
nav button{
margin: 7px 20px;
/* padding: 5px; */
border-radius: 4px;
}
/* .none{
} */
</style> </style>