If I don't commit this i'll be ruined

This commit is contained in:
bye 2024-07-03 21:28:13 +01:00
parent 13f55034f0
commit df44ea96df
5 changed files with 64 additions and 10 deletions

View file

@ -25,7 +25,6 @@ require_once 'common/strings.php';
require_once 'common/account_utils.php';
require_once 'common/database.php';
patch_lang('en_UWU');
// Starts the session
// TODO: write this to use the database to work across more than one server (e.g. don't use PHP sessions)

View file

@ -11,7 +11,9 @@
--flax: #efdd8d;
--mindaro: #f4fdaf;
--gray-0: #f8f9fa;
--grey-5: #adb5bd;
--gray-9: #212529;
--red-2: #ffc9c9;
--red-3: #ffa8a8;
@ -19,12 +21,18 @@
--red-9: #c92a2a;
--link-fg: var(--dark-slate-gray);
--non-color-link-fg: var(--gray-9);
--hover-bg: var(--gray-1);
--error-fg: var(--red-9);
}
@media screen and (prefers-color-scheme: dark) {
:root {
--link-fg: var(--flax);
--non-color-link-fg: var(--gray-0);
--hover-bg: var(--gray-9);
--error-fg: var(--red-3);
}
}

21
styles/dashboard.css Normal file
View file

@ -0,0 +1,21 @@
ul {
list-style: none;
padding: 0;
}
ul > li + li {
border-top: var(--grey-5) 1px solid;
}
ul > li > a {
display: flex;
padding: 1rem;
gap: 0.25rem;
color: var(--non-color-link-fg);
text-decoration: none;
}
ul > li:hover {
background: var(--hover-bg);
}

View file

@ -1,13 +1,36 @@
<!doctype html>
<html>
<head>
<title><?= get_string('page.dashboard') ?> ~> ByeCorps ID</title>
<?php include 'partials/head.php'; ?>
<title><?= get_string('page.dashboard') ?> ~> ByeCorps ID</title>
<link rel="stylesheet" href="/styles/dashboard.css" />
</head>
<body>
<?php include 'partials/header.php'; ?>
<main>
<h1><?= get_string('page.dashboard') ?></h1>
<div class="grid">
<ul>
<li>
<a href="/profile" class="item">
<div class="icon"><span class="fa-fw fa-solid fa-id-card"></span></div>
<div class="label"><?= get_string('page.profile') ?></div>
</a>
</li>
<li>
<a href="/settings" class="item">
<div class="icon"><span class="fa-fw fa-solid fa-cog"></span></div>
<div class="label"><?= get_string('page.settings') ?></div>
</a>
</li>
<li>
<a href="/auth/signout" class="item">
<div class="icon"><span class="fa-fw fa-solid fa-right-to-bracket"></span></div>
<span class="label"><?= get_string('auth.signout') ?></span>
</a>
</li>
</ul>
</div>
</main>
<?php include 'partials/footer.php'; ?>
</body>

View file

@ -16,6 +16,7 @@ if (is_null($user)) {
<body>
<?php include "partials/header.php" ?>
<main>
<?php
if ($error) {
include 'partials/error.php';
@ -25,6 +26,8 @@ if (is_null($user)) {
?>
<p><?= $profile_owner['id'] ?></p>
</main>
<?php include 'partials/footer.php' ?>
</body>