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/
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">
</head>
<body>
<header>
<!-- <header>
<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>
<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>
</div> -->
</div> -- >
<div class="accountnav">
<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>
</div>
</div>
</header>
</header> -->
<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="/login" class="button">Sign in</a>
<a href="/register" class="button">Create an account</a>
</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;
--flax: #efdd8d;
--mindaro: #f4fdaf;
color-scheme: light dark;
}
button, .button {
button.primary, .button.primary {
color: var(--black-bean);
background-color: var(--flax);
}
@ -29,7 +31,7 @@ header a {
}
@media screen and (prefers-color-scheme: dark) {
button, .button {
button.primary, .button.primary {
color: var(--flax);
background-color: var(--dark-slate-gray);
}

View file

@ -18,3 +18,13 @@ button, .button {
header a {
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(./design.css);
@import url(./layout.css);
@import url(./colours.css);
:root {
color-scheme: light dark;

View file

@ -21,3 +21,7 @@ html {
.bc-3 {
font-weight: 400;
}
.center {
text-align: center;
}