From 2c6beefa43dc1c7fb29f8e28f78b9e2beff85af5 Mon Sep 17 00:00:00 2001
From: Fluffy-Bean
Date: Sat, 23 Jul 2022 15:03:11 +0100
Subject: [PATCH] General cleanup
---
assets/icons/download.svg | 1 +
assets/icons/edit.svg | 1 +
assets/icons/house.svg | 1 +
assets/icons/trash.svg | 1 +
assets/icons/upload.svg | 1 +
css/footer.css | 2 +-
css/image.css | 9 +++++-
css/master.css | 16 ++++++++--
css/nav.css | 21 ++++++++++++-
edit.php | 63 +++++++++++++++++++++++++++++++++++++++
image.php | 22 ++++++++++----
ui/header.php | 6 ++--
upload.php | 2 ++
13 files changed, 132 insertions(+), 14 deletions(-)
create mode 100644 assets/icons/download.svg
create mode 100644 assets/icons/edit.svg
create mode 100644 assets/icons/house.svg
create mode 100644 assets/icons/trash.svg
create mode 100644 assets/icons/upload.svg
create mode 100644 edit.php
diff --git a/assets/icons/download.svg b/assets/icons/download.svg
new file mode 100644
index 0000000..87ab640
--- /dev/null
+++ b/assets/icons/download.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/icons/edit.svg b/assets/icons/edit.svg
new file mode 100644
index 0000000..8c2e6f1
--- /dev/null
+++ b/assets/icons/edit.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/icons/house.svg b/assets/icons/house.svg
new file mode 100644
index 0000000..bbdf4a6
--- /dev/null
+++ b/assets/icons/house.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/icons/trash.svg b/assets/icons/trash.svg
new file mode 100644
index 0000000..0659293
--- /dev/null
+++ b/assets/icons/trash.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/icons/upload.svg b/assets/icons/upload.svg
new file mode 100644
index 0000000..f98c464
--- /dev/null
+++ b/assets/icons/upload.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/css/footer.css b/css/footer.css
index 3fc2858..e2fddea 100644
--- a/css/footer.css
+++ b/css/footer.css
@@ -16,5 +16,5 @@ footer {
}
.footer-child {
- min-width: 300px;
+ min-width: 200px;
}
diff --git a/css/image.css b/css/image.css
index 2ad3358..afd348f 100644
--- a/css/image.css
+++ b/css/image.css
@@ -5,10 +5,17 @@
margin: 0 0 2rem; padding: 0;
width: calc(100vw - var(--space-medium));
- height: 60vh;
+ height: 69vh;
position: relative;
}
+
+@media (max-width: 600px) {
+ .image-container {
+ height: 40vh;
+ }
+}
+
.image {
max-width: 100%;
width: auto;
diff --git a/css/master.css b/css/master.css
index c2b076f..6f3bbe6 100644
--- a/css/master.css
+++ b/css/master.css
@@ -48,6 +48,7 @@ body {
min-height: calc(100vh - 2rem); max-width: 1500px;
display: flex;
+
flex-direction: column;
justify-content: space-between;
}
@@ -87,7 +88,7 @@ form * {
.alert {
margin: 0 auto; padding: 1rem;
- width: inherit;
+ width: calc(100% - 2rem);
text-align: center;
@@ -114,6 +115,9 @@ form * {
font-size: 16px;
align-items: center;
+ vertical-align: middle;
+
+ text-decoration: underline;
border: none;
border-radius: var(--rad);
@@ -123,7 +127,6 @@ form * {
}
a.btn {
text-align: center;
- text-decoration: none;
}
.space-bottom {
@@ -133,6 +136,15 @@ a.btn {
margin-top: 1rem;
}
+.svg {
+ margin: 0 0.2rem 0.1rem 0;
+ width: 18px; height: 18px;
+
+ vertical-align: middle;
+
+ display: inline;
+}
+
/*
-=-=-= TEXT SIZES =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
*/
diff --git a/css/nav.css b/css/nav.css
index e858e07..d838898 100644
--- a/css/nav.css
+++ b/css/nav.css
@@ -21,5 +21,24 @@ nav h3 {
margin: 0;
}
nav hr {
- margin: 0.5rem 0.2rem; padding: 0;
+ margin: 0.5rem 0; padding: 0;
+
+ opacity: 0;
+}
+
+.nav-name h3, .nav-name {
+ display: block;
+}
+.nav-links {
+ width: auto;
+ justify-content: space-between;
+}
+@media (max-width: 450px) {
+ .nav-name h3, .nav-name {
+ display: none;
+ }
+ .nav-links {
+ width: 100%;
+ justify-content: space-around;
+ }
}
diff --git a/edit.php b/edit.php
new file mode 100644
index 0000000..79762f8
--- /dev/null
+++ b/edit.php
@@ -0,0 +1,63 @@
+
+
+
+
+
+ UwU
+
+
+
+
+
+
+
+
+
+
Modify Information
+
Make sure that the id of the image is correct!
+
+ Information updated!";
+ } elseif ($_GET["r"] == "fail") {
+ // Upload failed
+ echo "
Something fuckywucky
";
+ } elseif ($_GET["r"] == "noinfo") {
+ // No info was present
+ echo "
No description/alt, pls give
";
+ } else {
+ // echo "
Please enter information
";
+ }
+ ?>
+
+
+
+
+
+
+
+
diff --git a/image.php b/image.php
index eefe832..4088d85 100644
--- a/image.php
+++ b/image.php
@@ -6,6 +6,8 @@
UwU
+
+
Information updated
";
+ echo "Information updated
";
}
+ // Check if ID of image in URL
if (!isset($_GET['id'])) {
- echo "No ID present
";
-
+ // No ID
+ echo "No ID present
";
+ // Replacement "no image" image and description
$image_path = "assets/no_image.png";
$image_alt = "No image could be found, sowwy";
} elseif (empty($image['imagename'])) {
+ // proposed ID not avalible
echo "Could not find image with ID: ".$_GET['id']."
";
-
+ // Replacement "no image" image and description
$image_path = "assets/no_image.png";
$image_alt = "No image could be found, sowwy";
} else {
+ // Image avalible
$image_path = "images/".$image['imagename'];
$image_alt = $image['alt'];
}
@@ -70,6 +77,9 @@
// Image resolution
list($width, $height) = getimagesize($image_path);
echo "Image resolution: ".$width."x".$height."
";
+
+ // Image download
+ echo " Download image ";
?>
@@ -79,7 +89,7 @@
";
- echo "Delete image ";
+ echo " Delete image ";
echo "";
// Check if query is set
@@ -101,7 +111,7 @@
?>
- Modify image content"; ?>
+ Modify image content"; ?>
diff --git a/ui/header.php b/ui/header.php
index 927cf27..08ce845 100644
--- a/ui/header.php
+++ b/ui/header.php
@@ -2,9 +2,9 @@
Fluffys Gallery!
-
-
Home
+
diff --git a/upload.php b/upload.php
index 95ee98b..ca16884 100644
--- a/upload.php
+++ b/upload.php
@@ -6,6 +6,8 @@
UwU
+
+