From 82f911cf18c615d23d7a6934c36879e75f2cf46e Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Tue, 26 Nov 2024 11:45:12 -0500 Subject: new style, add redirect support --- src/public/bg.jpg | Bin 375672 -> 0 bytes src/public/bg/0001.jpg | Bin 0 -> 292263 bytes src/public/bg/0002.jpg | Bin 0 -> 972557 bytes src/public/bg/0003.jpg | Bin 0 -> 701659 bytes src/public/bg/0004.jpg | Bin 0 -> 3232092 bytes src/public/bg/0005.jpg | Bin 0 -> 697801 bytes src/public/bg/0006.jpg | Bin 0 -> 2246869 bytes src/public/bg/0007.jpg | Bin 0 -> 567141 bytes src/public/bg/0008.jpg | Bin 0 -> 581858 bytes src/public/bg/0009.jpg | Bin 0 -> 329394 bytes src/public/bg/0010.jpg | Bin 0 -> 876388 bytes src/public/bg/0011.jpg | Bin 0 -> 826411 bytes src/public/bg/0012.jpg | Bin 0 -> 1713099 bytes src/public/bg/0013.jpg | Bin 0 -> 383242 bytes src/public/bg/0014.jpg | Bin 0 -> 853377 bytes src/public/bg/0015.jpg | Bin 0 -> 1077746 bytes src/public/bg/0016.jpg | Bin 0 -> 298351 bytes src/public/bg/0017.jpg | Bin 0 -> 176187 bytes src/public/bg/0018.jpg | Bin 0 -> 201450 bytes src/public/bg/0019.jpg | Bin 0 -> 1920339 bytes src/public/bg/0020.jpg | Bin 0 -> 435255 bytes src/public/bg/0021.jpg | Bin 0 -> 1376229 bytes src/public/bg/0022.jpg | Bin 0 -> 189340 bytes src/public/bg/0023.jpg | Bin 0 -> 160591 bytes src/public/bg/0024.jpg | Bin 0 -> 186170 bytes src/public/bg/0025.jpg | Bin 0 -> 187031 bytes src/public/bg/0026.jpg | Bin 0 -> 570904 bytes src/public/bg/0027.jpg | Bin 0 -> 404926 bytes src/public/bg/0028.jpg | Bin 0 -> 790571 bytes src/public/bg/0029.jpg | Bin 0 -> 1250915 bytes src/public/bg/0030.jpg | Bin 0 -> 788146 bytes src/public/bg/0031.jpg | Bin 0 -> 1390417 bytes src/public/bg/0032.jpg | Bin 0 -> 874898 bytes src/public/bg/0033.jpg | Bin 0 -> 583597 bytes src/public/bg/0034.jpg | Bin 0 -> 451506 bytes src/public/bg/0035.jpg | Bin 0 -> 181638 bytes src/public/bg/0036.jpg | Bin 0 -> 158299 bytes src/public/bg/0037.jpg | Bin 0 -> 410963 bytes src/public/bg/0038.jpg | Bin 0 -> 449906 bytes src/public/bg/0039.jpg | Bin 0 -> 760648 bytes src/public/bg/0040.jpg | Bin 0 -> 581424 bytes src/public/bg/0041.jpg | Bin 0 -> 516970 bytes src/public/bg/0042.jpg | Bin 0 -> 726774 bytes src/public/bg/0043.jpg | Bin 0 -> 752305 bytes src/public/bg/0044.jpg | Bin 0 -> 320943 bytes src/public/bg/0045.jpg | Bin 0 -> 222990 bytes src/public/bg/0046.jpg | Bin 0 -> 987261 bytes src/public/bg/0047.jpg | Bin 0 -> 261181 bytes src/public/bg/0048.jpg | Bin 0 -> 421702 bytes src/public/bg/0049.jpg | Bin 0 -> 121040 bytes src/public/bg/0050.jpg | Bin 0 -> 250313 bytes src/public/bg/0051.jpg | Bin 0 -> 160861 bytes src/public/bg/0052.jpg | Bin 0 -> 578427 bytes src/public/bg/0053.jpg | Bin 0 -> 555419 bytes src/public/bg/0054.jpg | Bin 0 -> 439157 bytes src/public/bg/0055.jpg | Bin 0 -> 1696144 bytes src/public/bg/0056.jpg | Bin 0 -> 617640 bytes src/public/bg/0057.jpg | Bin 0 -> 357429 bytes src/public/bg/0058.jpg | Bin 0 -> 1358426 bytes src/public/bg/0059.jpg | Bin 0 -> 192383 bytes src/public/bg/0060.jpg | Bin 0 -> 219424 bytes src/public/bg/0061.jpg | Bin 0 -> 419496 bytes src/public/bg/0062.jpg | Bin 0 -> 171851 bytes src/public/bg/0063.jpg | Bin 0 -> 358778 bytes src/public/bg/0064.jpg | Bin 0 -> 1341817 bytes src/public/bg/0065.jpg | Bin 0 -> 565468 bytes src/public/bg/0066.jpg | Bin 0 -> 266503 bytes src/public/bg/0067.jpg | Bin 0 -> 396761 bytes src/public/bg/0068.jpg | Bin 0 -> 1399625 bytes src/public/bg/0069.jpg | Bin 0 -> 416106 bytes src/public/bg/0070.jpg | Bin 0 -> 447779 bytes src/public/main.css | 148 +++++++++++++++++++++++++++++++++++----------- src/public/opensans.ttf | Bin 0 -> 529700 bytes src/web/helpers/html.php | 21 +++++++ src/web/index.php | 1 + src/web/router.php | 52 +++++++++++----- src/web/views/error.php | 10 ++++ src/web/views/footer.php | 5 ++ src/web/views/header.php | 8 +-- src/web/views/login.php | 39 +++++++----- src/web/views/message.php | 2 +- 81 files changed, 217 insertions(+), 69 deletions(-) delete mode 100644 src/public/bg.jpg create mode 100644 src/public/bg/0001.jpg create mode 100644 src/public/bg/0002.jpg create mode 100644 src/public/bg/0003.jpg create mode 100644 src/public/bg/0004.jpg create mode 100644 src/public/bg/0005.jpg create mode 100644 src/public/bg/0006.jpg create mode 100644 src/public/bg/0007.jpg create mode 100644 src/public/bg/0008.jpg create mode 100644 src/public/bg/0009.jpg create mode 100644 src/public/bg/0010.jpg create mode 100644 src/public/bg/0011.jpg create mode 100644 src/public/bg/0012.jpg create mode 100644 src/public/bg/0013.jpg create mode 100644 src/public/bg/0014.jpg create mode 100644 src/public/bg/0015.jpg create mode 100644 src/public/bg/0016.jpg create mode 100644 src/public/bg/0017.jpg create mode 100644 src/public/bg/0018.jpg create mode 100644 src/public/bg/0019.jpg create mode 100644 src/public/bg/0020.jpg create mode 100644 src/public/bg/0021.jpg create mode 100644 src/public/bg/0022.jpg create mode 100644 src/public/bg/0023.jpg create mode 100644 src/public/bg/0024.jpg create mode 100644 src/public/bg/0025.jpg create mode 100644 src/public/bg/0026.jpg create mode 100644 src/public/bg/0027.jpg create mode 100644 src/public/bg/0028.jpg create mode 100644 src/public/bg/0029.jpg create mode 100644 src/public/bg/0030.jpg create mode 100644 src/public/bg/0031.jpg create mode 100644 src/public/bg/0032.jpg create mode 100644 src/public/bg/0033.jpg create mode 100644 src/public/bg/0034.jpg create mode 100644 src/public/bg/0035.jpg create mode 100644 src/public/bg/0036.jpg create mode 100644 src/public/bg/0037.jpg create mode 100644 src/public/bg/0038.jpg create mode 100644 src/public/bg/0039.jpg create mode 100644 src/public/bg/0040.jpg create mode 100644 src/public/bg/0041.jpg create mode 100644 src/public/bg/0042.jpg create mode 100644 src/public/bg/0043.jpg create mode 100644 src/public/bg/0044.jpg create mode 100644 src/public/bg/0045.jpg create mode 100644 src/public/bg/0046.jpg create mode 100644 src/public/bg/0047.jpg create mode 100644 src/public/bg/0048.jpg create mode 100644 src/public/bg/0049.jpg create mode 100644 src/public/bg/0050.jpg create mode 100644 src/public/bg/0051.jpg create mode 100644 src/public/bg/0052.jpg create mode 100644 src/public/bg/0053.jpg create mode 100644 src/public/bg/0054.jpg create mode 100644 src/public/bg/0055.jpg create mode 100644 src/public/bg/0056.jpg create mode 100644 src/public/bg/0057.jpg create mode 100644 src/public/bg/0058.jpg create mode 100644 src/public/bg/0059.jpg create mode 100644 src/public/bg/0060.jpg create mode 100644 src/public/bg/0061.jpg create mode 100644 src/public/bg/0062.jpg create mode 100644 src/public/bg/0063.jpg create mode 100644 src/public/bg/0064.jpg create mode 100644 src/public/bg/0065.jpg create mode 100644 src/public/bg/0066.jpg create mode 100644 src/public/bg/0067.jpg create mode 100644 src/public/bg/0068.jpg create mode 100644 src/public/bg/0069.jpg create mode 100644 src/public/bg/0070.jpg create mode 100644 src/public/opensans.ttf create mode 100644 src/web/helpers/html.php create mode 100644 src/web/views/error.php (limited to 'src') diff --git a/src/public/bg.jpg b/src/public/bg.jpg deleted file mode 100644 index 6f8314a..0000000 Binary files a/src/public/bg.jpg and /dev/null differ diff --git a/src/public/bg/0001.jpg b/src/public/bg/0001.jpg new file mode 100644 index 0000000..0ff8146 Binary files /dev/null and b/src/public/bg/0001.jpg differ diff --git a/src/public/bg/0002.jpg b/src/public/bg/0002.jpg new file mode 100644 index 0000000..4e5a0e4 Binary files /dev/null and b/src/public/bg/0002.jpg differ diff --git a/src/public/bg/0003.jpg b/src/public/bg/0003.jpg new file mode 100644 index 0000000..2d82fd9 Binary files /dev/null and b/src/public/bg/0003.jpg differ diff --git a/src/public/bg/0004.jpg b/src/public/bg/0004.jpg new file mode 100644 index 0000000..541578a Binary files /dev/null and b/src/public/bg/0004.jpg differ diff --git a/src/public/bg/0005.jpg b/src/public/bg/0005.jpg new file mode 100644 index 0000000..8b58607 Binary files /dev/null and b/src/public/bg/0005.jpg differ diff --git a/src/public/bg/0006.jpg b/src/public/bg/0006.jpg new file mode 100644 index 0000000..583e4fc Binary files /dev/null and b/src/public/bg/0006.jpg differ diff --git a/src/public/bg/0007.jpg b/src/public/bg/0007.jpg new file mode 100644 index 0000000..77dea69 Binary files /dev/null and b/src/public/bg/0007.jpg differ diff --git a/src/public/bg/0008.jpg b/src/public/bg/0008.jpg new file mode 100644 index 0000000..baa0568 Binary files /dev/null and b/src/public/bg/0008.jpg differ diff --git a/src/public/bg/0009.jpg b/src/public/bg/0009.jpg new file mode 100644 index 0000000..19c924f Binary files /dev/null and b/src/public/bg/0009.jpg differ diff --git a/src/public/bg/0010.jpg b/src/public/bg/0010.jpg new file mode 100644 index 0000000..864c074 Binary files /dev/null and b/src/public/bg/0010.jpg differ diff --git a/src/public/bg/0011.jpg b/src/public/bg/0011.jpg new file mode 100644 index 0000000..ebfda51 Binary files /dev/null and b/src/public/bg/0011.jpg differ diff --git a/src/public/bg/0012.jpg b/src/public/bg/0012.jpg new file mode 100644 index 0000000..e7ce9cd Binary files /dev/null and b/src/public/bg/0012.jpg differ diff --git a/src/public/bg/0013.jpg b/src/public/bg/0013.jpg new file mode 100644 index 0000000..8ef8658 Binary files /dev/null and b/src/public/bg/0013.jpg differ diff --git a/src/public/bg/0014.jpg b/src/public/bg/0014.jpg new file mode 100644 index 0000000..c3989fd Binary files /dev/null and b/src/public/bg/0014.jpg differ diff --git a/src/public/bg/0015.jpg b/src/public/bg/0015.jpg new file mode 100644 index 0000000..117a684 Binary files /dev/null and b/src/public/bg/0015.jpg differ diff --git a/src/public/bg/0016.jpg b/src/public/bg/0016.jpg new file mode 100644 index 0000000..e6aec55 Binary files /dev/null and b/src/public/bg/0016.jpg differ diff --git a/src/public/bg/0017.jpg b/src/public/bg/0017.jpg new file mode 100644 index 0000000..8a3fa8c Binary files /dev/null and b/src/public/bg/0017.jpg differ diff --git a/src/public/bg/0018.jpg b/src/public/bg/0018.jpg new file mode 100644 index 0000000..86f9ac1 Binary files /dev/null and b/src/public/bg/0018.jpg differ diff --git a/src/public/bg/0019.jpg b/src/public/bg/0019.jpg new file mode 100644 index 0000000..b67060f Binary files /dev/null and b/src/public/bg/0019.jpg differ diff --git a/src/public/bg/0020.jpg b/src/public/bg/0020.jpg new file mode 100644 index 0000000..01b63fd Binary files /dev/null and b/src/public/bg/0020.jpg differ diff --git a/src/public/bg/0021.jpg b/src/public/bg/0021.jpg new file mode 100644 index 0000000..c34702e Binary files /dev/null and b/src/public/bg/0021.jpg differ diff --git a/src/public/bg/0022.jpg b/src/public/bg/0022.jpg new file mode 100644 index 0000000..32ab2f9 Binary files /dev/null and b/src/public/bg/0022.jpg differ diff --git a/src/public/bg/0023.jpg b/src/public/bg/0023.jpg new file mode 100644 index 0000000..120ab71 Binary files /dev/null and b/src/public/bg/0023.jpg differ diff --git a/src/public/bg/0024.jpg b/src/public/bg/0024.jpg new file mode 100644 index 0000000..e2200cd Binary files /dev/null and b/src/public/bg/0024.jpg differ diff --git a/src/public/bg/0025.jpg b/src/public/bg/0025.jpg new file mode 100644 index 0000000..e1ebc9c Binary files /dev/null and b/src/public/bg/0025.jpg differ diff --git a/src/public/bg/0026.jpg b/src/public/bg/0026.jpg new file mode 100644 index 0000000..fe7244c Binary files /dev/null and b/src/public/bg/0026.jpg differ diff --git a/src/public/bg/0027.jpg b/src/public/bg/0027.jpg new file mode 100644 index 0000000..e40dcf2 Binary files /dev/null and b/src/public/bg/0027.jpg differ diff --git a/src/public/bg/0028.jpg b/src/public/bg/0028.jpg new file mode 100644 index 0000000..602df1f Binary files /dev/null and b/src/public/bg/0028.jpg differ diff --git a/src/public/bg/0029.jpg b/src/public/bg/0029.jpg new file mode 100644 index 0000000..f9f652f Binary files /dev/null and b/src/public/bg/0029.jpg differ diff --git a/src/public/bg/0030.jpg b/src/public/bg/0030.jpg new file mode 100644 index 0000000..6f24103 Binary files /dev/null and b/src/public/bg/0030.jpg differ diff --git a/src/public/bg/0031.jpg b/src/public/bg/0031.jpg new file mode 100644 index 0000000..cda7b71 Binary files /dev/null and b/src/public/bg/0031.jpg differ diff --git a/src/public/bg/0032.jpg b/src/public/bg/0032.jpg new file mode 100644 index 0000000..43b0672 Binary files /dev/null and b/src/public/bg/0032.jpg differ diff --git a/src/public/bg/0033.jpg b/src/public/bg/0033.jpg new file mode 100644 index 0000000..39510c4 Binary files /dev/null and b/src/public/bg/0033.jpg differ diff --git a/src/public/bg/0034.jpg b/src/public/bg/0034.jpg new file mode 100644 index 0000000..f724db1 Binary files /dev/null and b/src/public/bg/0034.jpg differ diff --git a/src/public/bg/0035.jpg b/src/public/bg/0035.jpg new file mode 100644 index 0000000..ca31ff5 Binary files /dev/null and b/src/public/bg/0035.jpg differ diff --git a/src/public/bg/0036.jpg b/src/public/bg/0036.jpg new file mode 100644 index 0000000..5c7daeb Binary files /dev/null and b/src/public/bg/0036.jpg differ diff --git a/src/public/bg/0037.jpg b/src/public/bg/0037.jpg new file mode 100644 index 0000000..27865c9 Binary files /dev/null and b/src/public/bg/0037.jpg differ diff --git a/src/public/bg/0038.jpg b/src/public/bg/0038.jpg new file mode 100644 index 0000000..9378daa Binary files /dev/null and b/src/public/bg/0038.jpg differ diff --git a/src/public/bg/0039.jpg b/src/public/bg/0039.jpg new file mode 100644 index 0000000..9b9487f Binary files /dev/null and b/src/public/bg/0039.jpg differ diff --git a/src/public/bg/0040.jpg b/src/public/bg/0040.jpg new file mode 100644 index 0000000..5fe91ca Binary files /dev/null and b/src/public/bg/0040.jpg differ diff --git a/src/public/bg/0041.jpg b/src/public/bg/0041.jpg new file mode 100644 index 0000000..eb77cc3 Binary files /dev/null and b/src/public/bg/0041.jpg differ diff --git a/src/public/bg/0042.jpg b/src/public/bg/0042.jpg new file mode 100644 index 0000000..ce857a2 Binary files /dev/null and b/src/public/bg/0042.jpg differ diff --git a/src/public/bg/0043.jpg b/src/public/bg/0043.jpg new file mode 100644 index 0000000..8d1c961 Binary files /dev/null and b/src/public/bg/0043.jpg differ diff --git a/src/public/bg/0044.jpg b/src/public/bg/0044.jpg new file mode 100644 index 0000000..cbcacbb Binary files /dev/null and b/src/public/bg/0044.jpg differ diff --git a/src/public/bg/0045.jpg b/src/public/bg/0045.jpg new file mode 100644 index 0000000..1852910 Binary files /dev/null and b/src/public/bg/0045.jpg differ diff --git a/src/public/bg/0046.jpg b/src/public/bg/0046.jpg new file mode 100644 index 0000000..0e491f3 Binary files /dev/null and b/src/public/bg/0046.jpg differ diff --git a/src/public/bg/0047.jpg b/src/public/bg/0047.jpg new file mode 100644 index 0000000..18a6b92 Binary files /dev/null and b/src/public/bg/0047.jpg differ diff --git a/src/public/bg/0048.jpg b/src/public/bg/0048.jpg new file mode 100644 index 0000000..32b6422 Binary files /dev/null and b/src/public/bg/0048.jpg differ diff --git a/src/public/bg/0049.jpg b/src/public/bg/0049.jpg new file mode 100644 index 0000000..0760400 Binary files /dev/null and b/src/public/bg/0049.jpg differ diff --git a/src/public/bg/0050.jpg b/src/public/bg/0050.jpg new file mode 100644 index 0000000..c203587 Binary files /dev/null and b/src/public/bg/0050.jpg differ diff --git a/src/public/bg/0051.jpg b/src/public/bg/0051.jpg new file mode 100644 index 0000000..1b8d855 Binary files /dev/null and b/src/public/bg/0051.jpg differ diff --git a/src/public/bg/0052.jpg b/src/public/bg/0052.jpg new file mode 100644 index 0000000..e91914e Binary files /dev/null and b/src/public/bg/0052.jpg differ diff --git a/src/public/bg/0053.jpg b/src/public/bg/0053.jpg new file mode 100644 index 0000000..82cbd0f Binary files /dev/null and b/src/public/bg/0053.jpg differ diff --git a/src/public/bg/0054.jpg b/src/public/bg/0054.jpg new file mode 100644 index 0000000..26a3992 Binary files /dev/null and b/src/public/bg/0054.jpg differ diff --git a/src/public/bg/0055.jpg b/src/public/bg/0055.jpg new file mode 100644 index 0000000..687f3c9 Binary files /dev/null and b/src/public/bg/0055.jpg differ diff --git a/src/public/bg/0056.jpg b/src/public/bg/0056.jpg new file mode 100644 index 0000000..d63123f Binary files /dev/null and b/src/public/bg/0056.jpg differ diff --git a/src/public/bg/0057.jpg b/src/public/bg/0057.jpg new file mode 100644 index 0000000..29e0e78 Binary files /dev/null and b/src/public/bg/0057.jpg differ diff --git a/src/public/bg/0058.jpg b/src/public/bg/0058.jpg new file mode 100644 index 0000000..0573f0b Binary files /dev/null and b/src/public/bg/0058.jpg differ diff --git a/src/public/bg/0059.jpg b/src/public/bg/0059.jpg new file mode 100644 index 0000000..b8f509c Binary files /dev/null and b/src/public/bg/0059.jpg differ diff --git a/src/public/bg/0060.jpg b/src/public/bg/0060.jpg new file mode 100644 index 0000000..221b115 Binary files /dev/null and b/src/public/bg/0060.jpg differ diff --git a/src/public/bg/0061.jpg b/src/public/bg/0061.jpg new file mode 100644 index 0000000..2493e91 Binary files /dev/null and b/src/public/bg/0061.jpg differ diff --git a/src/public/bg/0062.jpg b/src/public/bg/0062.jpg new file mode 100644 index 0000000..264caa1 Binary files /dev/null and b/src/public/bg/0062.jpg differ diff --git a/src/public/bg/0063.jpg b/src/public/bg/0063.jpg new file mode 100644 index 0000000..47a25c8 Binary files /dev/null and b/src/public/bg/0063.jpg differ diff --git a/src/public/bg/0064.jpg b/src/public/bg/0064.jpg new file mode 100644 index 0000000..28932ca Binary files /dev/null and b/src/public/bg/0064.jpg differ diff --git a/src/public/bg/0065.jpg b/src/public/bg/0065.jpg new file mode 100644 index 0000000..2477bac Binary files /dev/null and b/src/public/bg/0065.jpg differ diff --git a/src/public/bg/0066.jpg b/src/public/bg/0066.jpg new file mode 100644 index 0000000..4e8fbe9 Binary files /dev/null and b/src/public/bg/0066.jpg differ diff --git a/src/public/bg/0067.jpg b/src/public/bg/0067.jpg new file mode 100644 index 0000000..aafede1 Binary files /dev/null and b/src/public/bg/0067.jpg differ diff --git a/src/public/bg/0068.jpg b/src/public/bg/0068.jpg new file mode 100644 index 0000000..e4fde22 Binary files /dev/null and b/src/public/bg/0068.jpg differ diff --git a/src/public/bg/0069.jpg b/src/public/bg/0069.jpg new file mode 100644 index 0000000..e7d5ec4 Binary files /dev/null and b/src/public/bg/0069.jpg differ diff --git a/src/public/bg/0070.jpg b/src/public/bg/0070.jpg new file mode 100644 index 0000000..c7e1e6f Binary files /dev/null and b/src/public/bg/0070.jpg differ diff --git a/src/public/main.css b/src/public/main.css index 2c5ecf2..ddaa7ce 100644 --- a/src/public/main.css +++ b/src/public/main.css @@ -1,68 +1,150 @@ +@font-face { + font-family: 'Open Sans'; + src: url('opensans.ttf'); +} + :root { + --white: #fff; + --grey: #F5F5F5; + --black: #2D2D2F; + + --text: var(--black); + --font: 'Playfair Display'; --blue: rgb(0, 102, 204); + + --font-size: 140%; + --font-small: 60%; + + --radius: 7px; } * { box-sizing: border-box; } -html, body { +html, +body, +main { + min-height: 100vh; height: 100%; - padding: 0; - margin: 0; } body { + background: var(--white); + color: var(--text); + font-family: 'Open Sans', Helvetica, Arial, sans-serif; + font-size: var(--font-size); + margin: 0; +} + +.row { display: flex; + flex-direction: row; + flex: 1; +} + +.col { + display: flex; + flex-direction: column; + flex: 1; justify-content: center; - background: url('./bg.jpg') - 50% 50%/cover no-repeat fixed; - color: #fff; - font-family: "Open Sans", Helvetica, Arial, sans-serif; - font-weight: 100; - font-size: 14px; } main { - margin-top: 20vh; - height: fit-content; - width: 400px; + justify-content: center; + align-items: center; background: #fff; color: #000; } -main .heading { - border-top: 5px solid var(--blue); - font-size: 1.5rem; - text-align: center; - padding: 10px; +main .content-box { + margin: auto 0; + height: 100%; + align-items: center; } main .content { - padding: 10px; + padding: 40px; + min-width: 400px; } -main .content, form { - display: flex; - flex-direction: column; +.btn { + background: var(--grey); + color: var(--black); + text-decoration: none; + font-size: var(--font-small); + padding: 10px 60px; + border-radius: var(--radius); + cursor: pointer; } -main label, -main #submit { - margin-top: 10px; +.btn:hover { + outline: 1px solid var(--black); + transition: all 0.2s ease-out; } -main input { - border: 1px solid #ddd; +main .banner { + width: 100%; + height: 100%; +} + +main .banner img { + width: 100%; + height: 100%; + object-fit: cover; + border-radius: 30px 0 0 30px; +} + +input { outline: none; - padding: 7px; - font-size: 14px; - border-bottom-color: black; + border: none; } -main #submit { - background: var(--blue); - color: white; - cursor: pointer; +form input:not(.btn) { + display: block; + outline: 2px solid var(--grey); + margin-bottom: 10px; + padding: 10px; + min-width: 350px; + border-radius: var(--radius); + font-size: var(--font-small); +} + +form input:not(.btn):focus { + outline-color: var(--blue); +} + +form > div { + position: relative; +} + +form label { + position: absolute; + top: 50%; + font-size: var(--font-small); + transform: translate(10px, -50%); + pointer-events: none; +} + +input:focus + label, +input:not(:placeholder-shown) + label { + top: 0; + padding: 2px; + background-color: var(--white); + transition: all 0.2s ease-out; +} + +@media (max-width: 1200px) { + .row { + flex-direction: column !important; + } + + main .banner { + height: 50% !important; + } + + main .banner img { + border-radius: 30px 30px 0 0; + } } diff --git a/src/public/opensans.ttf b/src/public/opensans.ttf new file mode 100644 index 0000000..ac587b4 Binary files /dev/null and b/src/public/opensans.ttf differ diff --git a/src/web/helpers/html.php b/src/web/helpers/html.php new file mode 100644 index 0000000..dc38e3a --- /dev/null +++ b/src/web/helpers/html.php @@ -0,0 +1,21 @@ +', '>', $data); + return $data; +} diff --git a/src/web/index.php b/src/web/index.php index d4271c9..c4417ea 100644 --- a/src/web/index.php +++ b/src/web/index.php @@ -6,6 +6,7 @@ $webroot = dirname(__FILE__); $publicroot = realpath(dirname(__FILE__) . '/../public'); // load stuff +require($webroot . '/helpers/html.php'); require($webroot . '/helpers/schema.php'); require($webroot . '/helpers/ldap.php'); require($webroot . '/helpers/auth.php'); diff --git a/src/web/router.php b/src/web/router.php index ce30f8b..536e228 100644 --- a/src/web/router.php +++ b/src/web/router.php @@ -17,12 +17,13 @@ class Router { /** * Displays a page to the user * @param string $file - * @param array $data - */ - private function send_page( + * @param array $data + */ + private function send_page( string $file, array $data = array() ): void { + $data['bg'] = random_int(1, 70); extract($data); $webroot = $GLOBALS['webroot']; require($webroot . '/views/header.php'); @@ -35,7 +36,7 @@ class Router { * @param string $title * @param string $msg * @param int $code - */ + */ private function send_message( string $title, string $msg @@ -50,15 +51,16 @@ class Router { * Gets the HTTP request information */ private function get_req(): array { - $path = $_SERVER['REQUEST_URI']; + $uri = $_SERVER['REQUEST_URI']; + $path = parse_url($uri)['path']; $method = $_SERVER['REQUEST_METHOD']; return [$method, $path]; } - /** - * @param array $fields - */ - private function get_post_info( + /** + * @param array $fields + */ + private function get_post_info( string ...$fields ): ?array { $values = array(); @@ -88,10 +90,18 @@ class Router { return; } + $redirect = $this->get_post_info('redirect') ?? ''; + if (is_array($redirect)) { + $redirect = $redirect['redirect']; + $redirect = base64_decode($redirect); + } + $user = $this->ldap->search($info['username']); if ($user == NULL || !count($user)) { http_response_code(400); - $this->send_message('Error', 'User does not exist'); + $this->send_page('error', array( + 'title' => 'Error', + 'redirect' => $redirect)); return; } @@ -108,9 +118,18 @@ class Router { $session = $this->auth->create_session($user); - http_response_code(200); - $session->write_headers(); - $this->send_message('Success', 'Authenticated. You can now go back to your content'); + if ($redirect == '') { + http_response_code(200); + $session->write_headers(); + $this->send_message('Success', 'Authenticated. You can now go back to your content'); + } else { + if (!str_starts_with($redirect, 'http')) { + $redirect = 'http://' . $redirect; + } + http_response_code(303); + $session->write_headers(); + header("Location: $redirect"); + } } private function handle_logout(): void { @@ -131,7 +150,7 @@ class Router { 'You have been logged out successfully.'); } - private function handle_auth(): void { + private function handle_auth(): void { $session = $this->auth->get_session(); if ($session == NULL) { // redirect them to login @@ -145,14 +164,15 @@ class Router { http_response_code(200); $session->write_headers(); $this->send_message('Authenticated', - 'You are already logged in.

Log Out'); + 'Log Out'); } } private function page_login(): void { http_response_code(200); $this->send_page('login', array( - 'title' => 'Login' + 'title' => 'Login', + 'redirect' => $_GET['redirect'] ?? '' )); } diff --git a/src/web/views/error.php b/src/web/views/error.php new file mode 100644 index 0000000..2860336 --- /dev/null +++ b/src/web/views/error.php @@ -0,0 +1,10 @@ + +
+Authentication failed +
+
+ + Go Back + diff --git a/src/web/views/footer.php b/src/web/views/footer.php index eb7ee28..bac99a3 100644 --- a/src/web/views/footer.php +++ b/src/web/views/footer.php @@ -1,4 +1,9 @@ + + + diff --git a/src/web/views/header.php b/src/web/views/header.php index befa190..3a608c3 100644 --- a/src/web/views/header.php +++ b/src/web/views/header.php @@ -4,13 +4,11 @@ - <?=$title?> -
-
- -
+
+
+

diff --git a/src/web/views/login.php b/src/web/views/login.php index 98d69af..ca38066 100644 --- a/src/web/views/login.php +++ b/src/web/views/login.php @@ -1,22 +1,33 @@ - - - - - + +
+ + +
+
+ + +
+ diff --git a/src/web/views/message.php b/src/web/views/message.php index a071409..a8c074a 100644 --- a/src/web/views/message.php +++ b/src/web/views/message.php @@ -1 +1 @@ -
+
-- cgit v1.2.3-freya