diff --git a/.gitignore b/.gitignore index 64637c57717035aa245c70fae80b3818cc1cf121..afa987657f0300cde9572792205cf2113c9229f7 100644 --- a/.gitignore +++ b/.gitignore @@ -129,3 +129,5 @@ dmypy.json .pyre/ font-awesome/ + +config.php diff --git a/404.html b/404.html new file mode 100644 index 0000000000000000000000000000000000000000..e2066aa24a6cf786c9518608e9eca1853bcd07e2 --- /dev/null +++ b/404.html @@ -0,0 +1,2 @@ +<h1>404</h1> +<p>Sorry, that page couldn't be found.</p> \ No newline at end of file diff --git a/bcid_prototyping/index.html b/bcid_prototyping/index.html index 0baf76dee10aa6cb3dc8b648ef3918404fe1d340..b99e68a552b4d7e6306b295ef497fc843265f152 100644 --- a/bcid_prototyping/index.html +++ b/bcid_prototyping/index.html @@ -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> diff --git a/footer.php b/footer.php new file mode 100644 index 0000000000000000000000000000000000000000..5ea6a24aaca9bcf975dee9ff8859fcffdb29bcc3 --- /dev/null +++ b/footer.php @@ -0,0 +1,3 @@ +<footer> + © ByeCorps <?php echo(date("Y")); ?> +</footer> \ No newline at end of file diff --git a/bcid_prototyping/header.html b/header.php similarity index 100% rename from bcid_prototyping/header.html rename to header.php diff --git a/index.php b/index.php new file mode 100644 index 0000000000000000000000000000000000000000..c4ee53f8580e71490d1a6aca1c6988e3892612bd --- /dev/null +++ b/index.php @@ -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> \ No newline at end of file diff --git a/landing.html b/landing.html new file mode 100644 index 0000000000000000000000000000000000000000..d6f90faf5231d04c07de307fe895dd88890ce591 --- /dev/null +++ b/landing.html @@ -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> \ No newline at end of file diff --git a/signin.php b/signin.php new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/bcid_prototyping/styles/colours.css b/styles/colours.css similarity index 89% rename from bcid_prototyping/styles/colours.css rename to styles/colours.css index 1ec43dbefa38b0d11dd123f7545f4a28a341703d..2d9116719711283dc463c6115ae6f2b51be19730 100644 --- a/bcid_prototyping/styles/colours.css +++ b/styles/colours.css @@ -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); } diff --git a/bcid_prototyping/styles/design.css b/styles/design.css similarity index 78% rename from bcid_prototyping/styles/design.css rename to styles/design.css index 326ccc9c552793b383130800ff32d2519a7504d9..7de58d3401a273e29dc9d9bcdb82dbf5beec41e4 100644 --- a/bcid_prototyping/styles/design.css +++ b/styles/design.css @@ -17,4 +17,14 @@ button, .button { header a { text-decoration: none; -} \ No newline at end of file +} + +/* inputs */ + +input { + all: unset; + padding: 1em; + text-align: start; + + border-radius: 1em; +} diff --git a/bcid_prototyping/styles/global.css b/styles/global.css similarity index 100% rename from bcid_prototyping/styles/global.css rename to styles/global.css index 2dc7ecaf2830140ec7aa80220e640392d819096b..59f2674e65db971a74bb0ad242fd21936a0e2c53 100644 --- a/bcid_prototyping/styles/global.css +++ b/styles/global.css @@ -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; diff --git a/bcid_prototyping/styles/layout.css b/styles/layout.css similarity index 100% rename from bcid_prototyping/styles/layout.css rename to styles/layout.css diff --git a/bcid_prototyping/styles/types.css b/styles/types.css similarity index 91% rename from bcid_prototyping/styles/types.css rename to styles/types.css index e267029f9be27c262978a59e75cd4a0a7f76c9ec..6fce88f7215b165f0cb87eeed19f977f1eda151b 100644 --- a/bcid_prototyping/styles/types.css +++ b/styles/types.css @@ -20,4 +20,8 @@ html { .bc-3 { font-weight: 400; -} \ No newline at end of file +} + +.center { + text-align: center; +}