diff --git a/assets/1.svg b/assets/1.svg deleted file mode 100644 index 81e1783..0000000 --- a/assets/1.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/bg.svg b/assets/bg.svg index 6ee2feb..ef17c83 100644 --- a/assets/bg.svg +++ b/assets/bg.svg @@ -1,7 +1 @@ - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/assets/bg2.svg b/assets/bg2.svg new file mode 100644 index 0000000..c717e46 --- /dev/null +++ b/assets/bg2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/footer.svg b/assets/footer.svg deleted file mode 100644 index d271bf7..0000000 --- a/assets/footer.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/nav.svg b/assets/nav.svg deleted file mode 100644 index 420562f..0000000 --- a/assets/nav.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/css/gallery.css b/css/gallery.css index 1798c18..6eeaf03 100644 --- a/css/gallery.css +++ b/css/gallery.css @@ -22,7 +22,7 @@ max-width: 300px; height: 200px; - background-color: var(--gray); + background-color: var(--bg-2); border-radius: var(--rad); flex: 1 0 150px; diff --git a/css/master.css b/css/master.css index 8f55917..413bc50 100644 --- a/css/master.css +++ b/css/master.css @@ -14,6 +14,7 @@ --fg-dark: #151515; --red: #B66467; + --orange: #FF7700; --green: #8C977D; --black: #151515; --white: #E8E3E3; @@ -29,16 +30,20 @@ html { margin: 0; padding: 0; - height: 100vh; width: 100vw; + min-height: 100vh; max-width: 100vw; background-color: var(--bg-2); + background-image: url("../assets/bg2.svg"); + + background-position: center; + background-size: cover; + background-repeat: no-repeat; + background-attachment: fixed; } body { margin: 0 auto; padding: 1rem; - min-height: calc(100vh - 1rem); - - max-width: 1500px; + min-height: calc(100vh - 2rem); max-width: 1500px; display: flex; flex-direction: column; @@ -70,13 +75,17 @@ body { } .alert { - margin: 0; padding: 1rem; + margin: 0 auto; padding: 1rem; width: inherit; + text-align: center; + display: inline-block; border-radius: var(--rad); + + outline: 0.5rem solid var(--bg); } .alert-high { background-color: var(--green); diff --git a/css/nav.css b/css/nav.css index 53b2853..e858e07 100644 --- a/css/nav.css +++ b/css/nav.css @@ -16,3 +16,10 @@ nav { border-radius: var(--rad); box-shadow: var(--shadow); } + +nav h3 { + margin: 0; +} +nav hr { + margin: 0.5rem 0.2rem; padding: 0; +} diff --git a/image.php b/image.php index 578f3ae..dd457ea 100644 --- a/image.php +++ b/image.php @@ -8,49 +8,44 @@ - - Could not connect to database

"; + include("ui/header.php"); + include_once("ui/conn.php"); + + // Get image ID + // Getting all image info from table + $get_image = "SELECT * FROM swag_table WHERE id = ".$_GET['id']; + $image_results = mysqli_query($conn, $get_image); + $image = mysqli_fetch_assoc($image_results); + + if (!isset($_GET['id'])) { + echo "

No ID present

"; + + $image_path = "assets/no_image.png"; + $image_alt = "No image could be found, sowwy"; + } elseif (empty($image['imagename'])) { + echo "

Could not find image with ID: ".$_GET['id']."

"; + + $image_path = "assets/no_image.png"; + $image_alt = "No image could be found, sowwy"; + } else { + $image_path = "images/".$image['imagename']; + $image_alt = $image['alt']; } ?>
- "; - - if (!isset($_GET['id'])) { - echo "cannot obtain image"; - } - ?> + "; ?>

Description

".$image_alt."

"; - }else{ + if (empty($image_alt)) { echo "

Image uploaded prior to description being added

"; + }else{ + echo "

".$image_alt."

"; } ?> @@ -93,7 +88,7 @@ // Deleted image header("Location:index.php?del=true&id=".$image['id']); } - }else{ + } else { // Could not delete from file echo "

Error: Coult not delete image

"; } @@ -101,6 +96,6 @@ ?>
- + diff --git a/index.php b/index.php index 70a3e39..f4c3fdb 100644 --- a/index.php +++ b/index.php @@ -10,7 +10,7 @@ - + Could not connect to database

"; - } + include_once("ui/conn.php"); // My terrible workaround for not being able to show deletion status up here @@ -45,7 +40,7 @@ // Getting thumbnail if (file_exists("images/thumbnails/".$row['imagename'])) { $image_path = "images/thumbnails/".$row['imagename']; - }else{ + } else { $image_path = "images/".$row['imagename']; } @@ -57,6 +52,6 @@ ?> - + diff --git a/ui/conn.php b/ui/conn.php new file mode 100644 index 0000000..3a63d54 --- /dev/null +++ b/ui/conn.php @@ -0,0 +1,8 @@ +Could not connect to database

"; +} +?> diff --git a/ui/footer.php b/ui/footer.php index df53ebc..142871f 100644 --- a/ui/footer.php +++ b/ui/footer.php @@ -5,12 +5,12 @@

Twitter

Discord

-