mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2025-01-29 17:28:27 +00:00
Working on getting new Modules working
This commit is contained in:
parent
c8f434e106
commit
21152358f1
1
assets/icons/hand-waving.svg
Normal file
1
assets/icons/hand-waving.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="192" height="192" fill="#e8e3e3" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"></rect><path d="M94,61.4a20,20,0,0,1,34.6-20l30,51.9" fill="none" stroke="#e8e3e3" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path><path d="M67.4,95.2l-16-27.7A20,20,0,0,1,86,47.5l34,58.9" fill="none" stroke="#e8e3e3" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path><path d="M154,165.3a39.9,39.9,0,0,1,14.6-54.6l-10-17.4a20,20,0,0,1,34.7-20l20,34.7A80,80,0,0,1,74.7,188l-42-72.8a20,20,0,0,1,34.7-20l22,38.1" fill="none" stroke="#e8e3e3" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path><path d="M81.1,240A110.3,110.3,0,0,1,48,204" fill="none" stroke="#e8e3e3" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path><path d="M176,31a51.7,51.7,0,0,1,45,26" fill="none" stroke="#e8e3e3" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path></svg>
|
After Width: | Height: | Size: 995 B |
1
assets/icons/warning.svg
Normal file
1
assets/icons/warning.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="192" height="192" fill="#e8e3e3" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"></rect><line x1="128" y1="104" x2="128" y2="144" fill="none" stroke="#e8e3e3" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></line><path d="M114.2,40l-88,152A16,16,0,0,0,40,216H216a16,16,0,0,0,13.8-24l-88-152A15.9,15.9,0,0,0,114.2,40Z" fill="none" stroke="#e8e3e3" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path><circle cx="128" cy="180" r="12"></circle></svg>
|
After Width: | Height: | Size: 549 B |
|
@ -6,6 +6,9 @@ nav {
|
|||
|
||||
width: calc(100vh - 2rem)); height: 2.5rem;
|
||||
|
||||
position: sticky; z-index: 99;
|
||||
top: 1rem;
|
||||
|
||||
align-items: center;
|
||||
vertical-align: middle;
|
||||
|
||||
|
|
79
image.php
79
image.php
|
@ -1,23 +1,3 @@
|
|||
<?php
|
||||
// Used for background dimming
|
||||
echo "<div class='flyout-dim'></div>";
|
||||
// Div Start
|
||||
echo "<div class='flyout flex-down default-window between'>";
|
||||
|
||||
|
||||
// Header for the flyout, must be included
|
||||
echo "<h2 class='space-bottom'>Header</h2>";
|
||||
// Flyout content, must be included!!!!
|
||||
echo "<p class='space-bottom'>Description</p>";
|
||||
// Flyout button, not required so must need more information when added
|
||||
echo $action;
|
||||
// Exit button + Div End
|
||||
echo "<button class='btn alert-default space-top flyout-close'>Close</button>
|
||||
</div>";
|
||||
// Must be included with flyout.php
|
||||
echo "<script src='scripts/flyout.js'></script>";
|
||||
?>
|
||||
|
||||
<?php
|
||||
include "ui/required.php";
|
||||
|
||||
|
@ -378,48 +358,51 @@ if (image_privilage($image['author']) || is_admin($_SESSION['id'])) {
|
|||
Checking is done prior to here
|
||||
*/
|
||||
if ($privilaged) {
|
||||
// Danger zone
|
||||
echo "<div class='danger-zone flex-down default-window'>
|
||||
<h2>Danger zone</h2>";
|
||||
?>
|
||||
<!-- Danger zone -->
|
||||
<div class='danger-zone flex-down default-window'>
|
||||
<h2>Danger zone</h2>
|
||||
|
||||
// Delete
|
||||
echo "<form method='POST'>
|
||||
<button class='btn alert-low flyout-display' type='submit' name='delete_flyout'><img class='svg' src='assets/icons/trash.svg'>Delete image</button>
|
||||
</form>";
|
||||
<!-- Delete -->
|
||||
<button id='deleteButton' class='btn alert-low'><img class='svg' src='assets/icons/trash.svg'>Delete image</button>
|
||||
<script>
|
||||
$('#deleteButton').click(function(){
|
||||
flyoutShow('Are you sure?', 'Deleting this image is pernament, there is no going back after this!!!!!', '<button class="btn alert-low"><img class="svg" src="assets/icons/trash.svg">Delete image</button>');
|
||||
});
|
||||
</script>
|
||||
|
||||
// Edit description
|
||||
echo "<form method='POST'>
|
||||
<button class='btn alert-low space-top-small flyout-display' type='submit' name='description_flyout'><img class='svg' src='assets/icons/edit.svg'>Edit description</button>
|
||||
</form>";
|
||||
<!-- Edit description -->
|
||||
<button id='editButton' class='btn alert-low space-top-small'><img class='svg' src='assets/icons/edit.svg'>Edit description</button>
|
||||
<script>
|
||||
$('#editButton').click(function(){
|
||||
flyoutShow('Enter new Description/Alt', 'Whatcha gonna put in there 👀', '<button class="btn alert-low"><img class="svg" src="assets/icons/edit.svg">Update information</button>');
|
||||
});
|
||||
</script>
|
||||
|
||||
// Edit tags
|
||||
echo "<form method='POST'>
|
||||
<button class='btn alert-low space-top-small flyout-display' type='submit' name='tags_flyout'><img class='svg' src='assets/icons/edit.svg'>Add image tags</button>
|
||||
</form>";
|
||||
<!-- Edit tags -->
|
||||
<button id='tagButton' class='btn alert-low space-top-small'><img class='svg' src='assets/icons/edit.svg'>Add image tags</button>
|
||||
<script>
|
||||
$('#tagButton').click(function(){
|
||||
flyoutShow('Tags', 'Add image tags here! This is still being tested so your tags may be removed later on. Tags ONLY accept, letters, numbers and underscores. Hyphens will be stitched to underscores and spaces will seperate the different tags from eachother.', '<input class="btn alert-default space-bottom" type="text" name="add_tags" placeholder="Tags are seperated by spaces"><button class="btn alert-low"><img class="svg" src="assets/icons/edit.svg">Add tags</button>');
|
||||
});
|
||||
</script>
|
||||
|
||||
// Edit authro
|
||||
<!-- Edit authro -->
|
||||
<?php
|
||||
if (is_admin($_SESSION['id'])) {
|
||||
echo "<form id='author_form' method='POST' action='ui/image_interaction.php'>
|
||||
?>
|
||||
<form id='author_form' method='POST' action='ui/image_interaction.php'>
|
||||
<input id='author_header' type='hidden' name='header' value='Who owns the image?????'>
|
||||
<input id='author_description' type='hidden' name='description' value='Enter ID of image owner'>
|
||||
<button id='author_submit' class='btn alert-low space-top-small flyout-display' type='submit' name='author_flyout'><img class='svg' src='assets/icons/edit.svg'>Edit author</button>
|
||||
</form>";
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
|
||||
echo "<button id='flyoutShow' class='btn'>Show flyout!</button>";
|
||||
|
||||
echo"<script>$('#flyoutShow').click(function(){
|
||||
flyoutShow('Flyout Header', 'A very very cool description', '<button>Im a cool button!</button>');
|
||||
});</script>";
|
||||
|
||||
echo "</div>";
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
// Must be included with flyout.php
|
||||
echo "<script src='scripts/flyout.js'></script>";
|
||||
|
||||
include "ui/top.html";
|
||||
include "ui/footer.php";
|
||||
?>
|
||||
|
|
|
@ -33,11 +33,13 @@
|
|||
?>
|
||||
|
||||
<script>
|
||||
sniffleAdd("Warning", "The website is currently being worked on, people who have accounts, I ask you kindly to not post anything. Thank you.", "var(--red)", "<?php echo $root_dir ?>assets/icons/warning.svg");
|
||||
|
||||
if (params.del == "true") {
|
||||
sniffleAdd("Image Deleted", "Successfully deleted image: <?php echo $_GET['id']; ?>", "var(--green)");
|
||||
sniffleAdd("Image Deleted", "Successfully deleted image: <?php echo $_GET['id']; ?>", "var(--green)", "<?php echo $root_dir ?>assets/icons/trash.svg");
|
||||
}
|
||||
if (params.login == "success") {
|
||||
sniffleAdd("Logged in", "O hi <?php echo $_SESSION['username']; ?>", "var(--green)");
|
||||
sniffleAdd("Logged in", "O hi <?php echo $_SESSION['username']; ?>", "var(--green)", "<?php echo $root_dir ?>assets/icons/hand-waving.svg");
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -71,9 +71,9 @@ echo "<div id='notify-root' class='notify-root'></div>";
|
|||
|
||||
<!-- Div for information flyouts, controlled by Flyout.js -->
|
||||
<div id='flyoutDim' class='flyout-dim'></div>
|
||||
<div id='flyoutRoot' class='flyout'>
|
||||
<p id='flyoutHeader' class='flyout-header'>Header</p>
|
||||
<p id='flyoutDescription' class='flyout-description'>Description</p>
|
||||
<div id='flyoutActionbox' class='flyout-actionbox'></div>
|
||||
<button onclick='flyoutClose()'>Close</button>
|
||||
<div id='flyoutRoot' class='flyout flex-down'>
|
||||
<p id='flyoutHeader' class='flyout-header space-bottom'>Header</p>
|
||||
<p id='flyoutDescription' class='flyout-description space-bottom'>Description</p>
|
||||
<div id='flyoutActionbox' class='flyout-actionbox space-bottom-small'></div>
|
||||
<button onclick='flyoutClose()' class='btn alert-default'>Close</button>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue