This commit is contained in:
Bye 2023-10-31 18:43:21 +00:00
parent 8a247a3b23
commit 0517b9e317
13 changed files with 102 additions and 9 deletions

2
.gitignore vendored
View File

@ -129,3 +129,5 @@ dmypy.json
.pyre/ .pyre/
font-awesome/ font-awesome/
config.php

2
404.html Normal file
View File

@ -0,0 +1,2 @@
<h1>404</h1>
<p>Sorry, that page couldn't be found.</p>

View File

@ -10,26 +10,27 @@
<link rel="stylesheet" href="./fontawesome/css/all.css"> <link rel="stylesheet" href="./fontawesome/css/all.css">
</head> </head>
<body> <body>
<header> <!-- <header>
<div class="start"> <div class="start">
<a href="/" id="sitetitle"><span class="bc-1">Bye</span><span class="bc-2">Corps</span><span class="bc-3"> ID</span></a></div> <a href="/" id="sitetitle"><span class="bc-1">Bye</span><span class="bc-2">Corps</span><span class="bc-3"> ID</span></a></div>
<div class="end"> <div class="end">
<!-- <div class="accountnav"> < !-- <div class="accountnav">
<a href="/account" class="account">Hey there, Bye! <i class="fa-solid fa-fw fa-angle-down"></i></a> <a href="/account" class="account">Hey there, Bye! <i class="fa-solid fa-fw fa-angle-down"></i></a>
</div> --> </div> -- >
<div class="accountnav"> <div class="accountnav">
<a href="/login" class="account"><i class="fa-solid fa-key"></i> Sign in</a> <a href="/login" class="account"><i class="fa-solid fa-key"></i> Sign in</a>
<a href="/register" class="account"><i class="fa-solid fa-arrow-right-to-bracket"></i> Create an account</a> <a href="/register" class="account"><i class="fa-solid fa-arrow-right-to-bracket"></i> Create an account</a>
</div> </div>
</div> </div>
</header> </header> -->
<main> <main>
<div class="hero"> <div class="hero">
<div class="hero-text"> <div class="hero-text">
<h1><span class="bc-1">Bye</span><span class="bc-2">Corps</span><span class="bc-3"> ID</span></h1> <h1><span class="bc-1">Bye</span><span class="bc-2">Corps</span><span class="bc-3"> ID</span></h1>
<p>Log into ByeCorps and beyond with a single ID.</p> <p>Log into ByeCorps and beyond with a single ID.</p>
<!-- <p><input type="email" name="loginEmail" id="loginEmail" placeholder="Email" /></p> -->
<a href="/login" class="button">Sign in</a> <a href="/login" class="button">Sign in</a>
<a href="/register" class="button">Create an account</a> <a href="/register" class="button">Create an account</a>
</div> </div>

3
footer.php Normal file
View File

@ -0,0 +1,3 @@
<footer>
&COPY; ByeCorps <?php echo(date("Y")); ?>
</footer>

58
index.php Normal file
View File

@ -0,0 +1,58 @@
<?php
session_start();
$host_string = $_SERVER['HTTP_HOST'];
$host = explode('.', $host_string);
$uri_string = $_SERVER['REQUEST_URI'];
$query_string = explode('?', $uri_string);
$uri = array_values(array_filter(explode('/', $uri_string)));
if(isset($query_string[1])) {
$uri_string = $query_string[0];
$query_string = explode('&', $query_string[1]);
$query = array();
foreach($query_string as $string) {
$bits = explode('=', $string);
$query[$bits[0]] = $bits[1];
}
}
else {
$query = array();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ByeCorps ID</title>
<link rel="stylesheet" href="/styles/global.css">
<link rel="stylesheet" href="/fontawesome/css/all.css">
</head>
<body>
<?php include("header.php"); ?>
<main>
<?php
// routing
if (!$uri) {
// empty array means index
include("landing.html");
}
else if ($query_string[0] == "/signin") {
include("signin.php");
}
else {
http_response_code(404);
include("404.html");
}
?>
</main>
<?php include("footer.php"); ?>
</body>
</html>

11
landing.html Normal file
View File

@ -0,0 +1,11 @@
<main>
<div class="hero">
<div class="hero-text">
<h1><span class="bc-1">Bye</span><span class="bc-2">Corps</span><span class="bc-3"> ID</span></h1>
<p>Log into ByeCorps and beyond with a single ID.</p>
<!-- <p><input type="email" name="loginEmail" id="loginEmail" placeholder="Email" /></p> -->
<a href="/signin" class="button primary">Sign in</a>
<a href="/register" class="button">Create an account</a>
</div>
</div>
</main>

0
signin.php Normal file
View File

View File

@ -12,9 +12,11 @@
--fern-green: #65743a; --fern-green: #65743a;
--flax: #efdd8d; --flax: #efdd8d;
--mindaro: #f4fdaf; --mindaro: #f4fdaf;
color-scheme: light dark;
} }
button, .button { button.primary, .button.primary {
color: var(--black-bean); color: var(--black-bean);
background-color: var(--flax); background-color: var(--flax);
} }
@ -29,7 +31,7 @@ header a {
} }
@media screen and (prefers-color-scheme: dark) { @media screen and (prefers-color-scheme: dark) {
button, .button { button.primary, .button.primary {
color: var(--flax); color: var(--flax);
background-color: var(--dark-slate-gray); background-color: var(--dark-slate-gray);
} }

View File

@ -17,4 +17,14 @@ button, .button {
header a { header a {
text-decoration: none; text-decoration: none;
} }
/* inputs */
input {
all: unset;
padding: 1em;
text-align: start;
border-radius: 1em;
}

View File

@ -1,7 +1,7 @@
@import url(./colours.css);
@import url(./types.css); @import url(./types.css);
@import url(./design.css); @import url(./design.css);
@import url(./layout.css); @import url(./layout.css);
@import url(./colours.css);
:root { :root {
color-scheme: light dark; color-scheme: light dark;

View File

@ -20,4 +20,8 @@ html {
.bc-3 { .bc-3 {
font-weight: 400; font-weight: 400;
} }
.center {
text-align: center;
}