This commit is contained in:
Michał Gdula 2022-08-15 10:56:05 +00:00
parent 6a6fac8c66
commit b7362ca195
18 changed files with 776 additions and 746 deletions

0
.gitmodules vendored
View file

View file

@ -1,5 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
@ -14,10 +15,7 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Secular+One&display=swap"> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Secular+One&display=swap">
<!-- JQuery --> <!-- JQuery -->
<script <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous">
src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
crossorigin="anonymous">
</script> </script>
<!-- Sniffle script! --> <!-- Sniffle script! -->
@ -28,6 +26,7 @@
<script src="Flyout/flyout.js"></script> <script src="Flyout/flyout.js"></script>
<link rel='stylesheet' href='Flyout/flyout.css'> <link rel='stylesheet' href='Flyout/flyout.css'>
</head> </head>
<body> <body>
<?php <?php
include "ui/required.php"; include "ui/required.php";
@ -63,4 +62,5 @@
<?php include "ui/footer.php"; ?> <?php include "ui/footer.php"; ?>
</body> </body>
</html> </html>

View file

@ -1,5 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
@ -14,10 +15,7 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Secular+One&display=swap"> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Secular+One&display=swap">
<!-- JQuery --> <!-- JQuery -->
<script <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous">
src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
crossorigin="anonymous">
</script> </script>
<!-- Sniffle script! --> <!-- Sniffle script! -->
@ -28,6 +26,7 @@
<script src="../Flyout/flyout.js"></script> <script src="../Flyout/flyout.js"></script>
<link rel='stylesheet' href='../Flyout/flyout.css'> <link rel='stylesheet' href='../Flyout/flyout.css'>
</head> </head>
<body> <body>
<?php <?php
include "../ui/required.php"; include "../ui/required.php";
@ -76,4 +75,5 @@
<?php include "../ui/footer.php"; ?> <?php include "../ui/footer.php"; ?>
</body> </body>
</html> </html>

View file

@ -1,5 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
@ -14,10 +15,7 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Secular+One&display=swap"> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Secular+One&display=swap">
<!-- JQuery --> <!-- JQuery -->
<script <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous">
src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
crossorigin="anonymous">
</script> </script>
<!-- Sniffle script! --> <!-- Sniffle script! -->
@ -28,13 +26,14 @@
<script src="../Flyout/flyout.js"></script> <script src="../Flyout/flyout.js"></script>
<link rel='stylesheet' href='../Flyout/flyout.css'> <link rel='stylesheet' href='../Flyout/flyout.css'>
</head> </head>
<body> <body>
<?php <?php
include "../ui/required.php"; include "../ui/required.php";
include "../ui/nav.php"; include "../ui/nav.php";
// Check if the user is already logged in, if yes then redirect him to welcome page // Check if the user is already logged in, if yes then redirect him to welcome page
if(isset($_SESSION["loggedin"]) && $_SESSION["loggedin"] === true){ if (isset($_SESSION["loggedin"]) && $_SESSION["loggedin"] === true) {
?> ?>
<script> <script>
sniffleAdd('Whatcha doing here?', 'You are already logged in! No need to try again', 'var(--black)', '<?php echo $root_dir; ?>assets/icons/warning.svg'); sniffleAdd('Whatcha doing here?', 'You are already logged in! No need to try again', 'var(--black)', '<?php echo $root_dir; ?>assets/icons/warning.svg');
@ -72,4 +71,5 @@
<?php include "../ui/footer.php"; ?> <?php include "../ui/footer.php"; ?>
</body> </body>
</html> </html>

View file

@ -1,5 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
@ -14,10 +15,7 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Secular+One&display=swap"> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Secular+One&display=swap">
<!-- JQuery --> <!-- JQuery -->
<script <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous">
src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
crossorigin="anonymous">
</script> </script>
<!-- Sniffle script! --> <!-- Sniffle script! -->
@ -28,13 +26,14 @@
<script src="../Flyout/flyout.js"></script> <script src="../Flyout/flyout.js"></script>
<link rel='stylesheet' href='../Flyout/flyout.css'> <link rel='stylesheet' href='../Flyout/flyout.css'>
</head> </head>
<body> <body>
<?php <?php
include "../ui/required.php"; include "../ui/required.php";
include "../ui/nav.php"; include "../ui/nav.php";
// Check if the user is logged in, otherwise redirect to login page // Check if the user is logged in, otherwise redirect to login page
if(!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true){ if (!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true) {
header("location: https://superdupersecteteuploadtest.fluffybean.gay/account/login.php"); header("location: https://superdupersecteteuploadtest.fluffybean.gay/account/login.php");
exit; exit;
} }
@ -68,4 +67,5 @@
<?php include "../ui/footer.php"; ?> <?php include "../ui/footer.php"; ?>
</body> </body>
</html> </html>

View file

@ -1,5 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
@ -14,10 +15,7 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Secular+One&display=swap"> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Secular+One&display=swap">
<!-- JQuery --> <!-- JQuery -->
<script <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous">
src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
crossorigin="anonymous">
</script> </script>
<!-- Sniffle script! --> <!-- Sniffle script! -->
@ -28,6 +26,7 @@
<script src="../Flyout/flyout.js"></script> <script src="../Flyout/flyout.js"></script>
<link rel='stylesheet' href='../Flyout/flyout.css'> <link rel='stylesheet' href='../Flyout/flyout.css'>
</head> </head>
<body> <body>
<?php <?php
include "../ui/required.php"; include "../ui/required.php";
@ -70,4 +69,5 @@
<?php include "../ui/footer.php"; ?> <?php include "../ui/footer.php"; ?>
</body> </body>
</html> </html>

View file

@ -81,7 +81,7 @@ if (isset($_POST['submit'])) {
?> ?>
<script> <script>
sniffleAdd('O hi <?php echo $_SESSION["username"]; ?>', 'You are now logged in! You will be redirected in a few seconds', 'var(--green)', '../assets/icons/hand-waving.svg'); sniffleAdd('O hi <?php echo $_SESSION["username"]; ?>', 'You are now logged in! You will be redirected in a few seconds', 'var(--green)', '../assets/icons/hand-waving.svg');
setTimeout(function(){window.location.href = "../index.php?login=success";}, 4000); setTimeout(function(){window.location.href = "../index.php?login=success";}, 2000);
</script> </script>
<?php <?php
} else { } else {

View file

@ -210,7 +210,7 @@ if (isset($_POST['submit'])) {
?> ?>
<script> <script>
sniffleAdd('Success!', 'You account made for <?php echo $username; ?>!!!!! You will be redirected in a moment to login', 'var(--green)', '../assets/icons/hand-waving.svg'); sniffleAdd('Success!', 'You account made for <?php echo $username; ?>!!!!! You will be redirected in a moment to login', 'var(--green)', '../assets/icons/hand-waving.svg');
setTimeout(function(){window.location.href = "../account/login.php";}, 4000); setTimeout(function(){window.location.href = "../account/login.php";}, 2000);
</script> </script>
<?php <?php
} else { } else {

View file

@ -218,7 +218,7 @@ nav .btn {
} }
.nsfw-blur { .nsfw-blur {
filter: blur(10px); filter: blur(8px);
} }
.nsfw-warning { .nsfw-warning {
@ -236,21 +236,24 @@ nav .btn {
align-items: center; align-items: center;
text-decoration: none; text-decoration: none;
font-family: "Secular One", sans-serif; font-family: "Secular One", sans-serif;
background-color: rgba(21, 21, 21, 0.7333333333);
} }
.nsfw-warning span { .nsfw-warning span {
color: #B66467; color: #B66467;
text-align: center; text-align: center;
text-shadow: 0 0 2px #151515; }
.nsfw-warning span::after {
content: " Content";
} }
.nsfw-warning img { .nsfw-warning img {
margin: 0.25rem; margin: 0.25rem;
width: 2rem; width: 2.5rem;
height: 2rem; height: 2.5rem;
} }
@media (max-width: 500px) { @media (max-width: 500px) {
.nsfw-warning span { .nsfw-warning span::after {
display: none; content: none;
} }
} }
/* /*
@ -675,9 +678,16 @@ footer > * {
margin-top: 0; margin-top: 0;
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
} }
footer a { footer p {
margin: 0.5rem; margin: 0 0.5rem;
text-decoration: none; text-decoration: none;
font-size: 16px;
font-family: "Secular One", sans-serif;
}
footer a {
margin: 0 0.5rem;
text-decoration: none;
font-size: 16px;
font-family: "Secular One", sans-serif; font-family: "Secular One", sans-serif;
} }
footer a:hover { footer a:hover {

View file

@ -96,8 +96,9 @@
} }
.nsfw-blur { .nsfw-blur {
filter: blur(10px); filter: blur(8px);
} }
.nsfw-warning { .nsfw-warning {
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -110,34 +111,42 @@
position: absolute; position: absolute;
z-index: 5; z-index: 5;
display: flex; flex-direction: column; display: flex;
flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
text-decoration: none; text-decoration: none;
font-family: $font-body; font-family: $font-body;
background-color: $bg-alt;
span { span {
color: $red; color: $red;
text-align: center; text-align: center;
text-shadow: 0 0 2px $black;
&::after {
content: ' Content';
} }
}
img { img {
margin: 0.25rem; margin: 0.25rem;
width: 2rem; width: 2.5rem;
height: 2rem; height: 2.5rem;
} }
} }
@media (max-width: 500px) { @media (max-width: 500px) {
.nsfw-warning { .nsfw-warning {
span { span::after {
display: none; content: none;
} }
} }
} }
/* /*
|------------------------------------------------------------- |-------------------------------------------------------------
| IMAGE | IMAGE
@ -213,6 +222,7 @@
border-radius: $rad; border-radius: $rad;
font-family: $font-body; font-family: $font-body;
&::before { &::before {
content: '# '; content: '# ';
} }

View file

@ -13,10 +13,20 @@ footer {
width: calc(100% - 1.4rem); width: calc(100% - 1.4rem);
a { p {
margin: 0.5rem; margin: 0 0.5rem;
text-decoration: none; text-decoration: none;
font-size: 16px;
font-family: $font-body;
}
a {
margin: 0 0.5rem;
text-decoration: none;
font-size: 16px;
font-family: $font-body; font-family: $font-body;

View file

@ -1,5 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
@ -14,10 +15,7 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Secular+One&display=swap"> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Secular+One&display=swap">
<!-- JQuery --> <!-- JQuery -->
<script <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous">
src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
crossorigin="anonymous">
</script> </script>
<!-- Sniffle script! --> <!-- Sniffle script! -->
@ -28,6 +26,7 @@
<script src="Flyout/flyout.js"></script> <script src="Flyout/flyout.js"></script>
<link rel='stylesheet' href='Flyout/flyout.css'> <link rel='stylesheet' href='Flyout/flyout.css'>
</head> </head>
<body> <body>
<?php <?php
/* /*
@ -110,7 +109,7 @@
|------------------------------------------------------------- |-------------------------------------------------------------
*/ */
if (isset($image['imagename'])) { if (isset($image['imagename'])) {
$image_path = "images/".$image['imagename']; $image_path = "images/" . $image['imagename'];
$image_alt = $image['alt']; $image_alt = $image['alt'];
} else { } else {
$image_path = "assets/no_image.png"; $image_path = "assets/no_image.png";
@ -170,32 +169,32 @@
<h2>Details</h2> <h2>Details</h2>
<?php <?php
// User // User
echo "<p>Author: ".$image_author."</p>"; echo "<p>Author: " . $image_author . "</p>";
// Image ID // Image ID
echo "<p>ID: ".$image['id']."</p>"; echo "<p>ID: " . $image['id'] . "</p>";
// File name // File name
if (strlen($image['imagename']) > 30) { if (strlen($image['imagename']) > 30) {
echo "<p>File Name: ".substr($image['imagename'], 0, 30)."...</p>"; echo "<p>File Name: " . substr($image['imagename'], 0, 30) . "...</p>";
} else { } else {
echo "<p>File Name: ".$image['imagename']."</p>"; echo "<p>File Name: " . $image['imagename'] . "</p>";
} }
// File extention // File extention
echo "<p>File Type: ".pathinfo($image['imagename'], PATHINFO_EXTENSION)."</p>"; echo "<p>File Type: " . pathinfo($image['imagename'], PATHINFO_EXTENSION) . "</p>";
// Image resolution // Image resolution
list($width, $height) = getimagesize($image_path); list($width, $height) = getimagesize($image_path);
echo "<p>Image resolution: ".$width."x".$height."</p>"; echo "<p>Image resolution: " . $width . "x" . $height . "</p>";
// Image Upload date // Image Upload date
echo "<p>Last updated: +0 ".$image['upload']."</p>"; echo "<p>Last updated: +0 " . $image['upload'] . "</p>";
echo "<br>"; echo "<br>";
// Image download // Image download
echo "<a class='btn btn-good' href='images/".$image['imagename']."' download='".$image['imagename']."'><img class='svg' src='assets/icons/download.svg'>Download image</a>"; echo "<a class='btn btn-good' href='images/" . $image['imagename'] . "' download='" . $image['imagename'] . "'><img class='svg' src='assets/icons/download.svg'>Download image</a>";
// Copy image // Copy image
?> ?>
@ -220,9 +219,9 @@
$image_tags_array = explode(" ", $image['tags']); $image_tags_array = explode(" ", $image['tags']);
foreach ($image_tags_array as $tag) { foreach ($image_tags_array as $tag) {
if ($tag == "nsfw") { if ($tag == "nsfw") {
echo "<p id='tag' class='tag btn-bad'>".$tag."</p>"; echo "<p id='tag' class='tag btn-bad'>" . $tag . "</p>";
} else { } else {
echo "<p id='tag' class='tag btn-good'>".$tag."</p>"; echo "<p id='tag' class='tag btn-good'>" . $tag . "</p>";
} }
} }
} else { } else {
@ -391,4 +390,5 @@
<?php include "ui/footer.php"; ?> <?php include "ui/footer.php"; ?>
</body> </body>
</html> </html>

6
setup.json Normal file
View file

@ -0,0 +1,6 @@
{
"name": "Only Legs",
"description": "A simple gallery with multiple users in mind",
"version": "15.08.22",
"license":"GPL 3.0"
}

View file

@ -1 +0,0 @@
<?php

View file

@ -1,6 +1,6 @@
<nav class="nav-root flex-left"> <nav class="nav-root flex-left">
<div class="nav-name flex-left"> <div class="nav-name flex-left">
<p>Lynx Gallery</p> <p><?php echo $setup_json['name']; ?></p>
</div> </div>
<div class="nav-links flex-left"> <div class="nav-links flex-left">
<a class='btn' href='<?php echo $root_dir; ?>index.php'><img class='svg' src='<?php echo $root_dir; ?>assets/icons/house.svg'><span class='nav-hide'>Home</span></a> <a class='btn' href='<?php echo $root_dir; ?>index.php'><img class='svg' src='<?php echo $root_dir; ?>assets/icons/house.svg'><span class='nav-hide'>Home</span></a>

View file

@ -47,11 +47,6 @@ include $root_dir."app/image/image_privilage.php";
include $root_dir."app/server/secrete.php"; include $root_dir."app/server/secrete.php";
?> ?>
<script> <script>
/*
This is a little secrete for the ones who care, nothing important
*/
console.log(" . . /|/| . . . . . . . \n .. /0 0 \\ . . . . . .. \n (III% . \\________, . . \n .. .\\_, .%###%/ \\'\\,.. \n . . . .||#####| |'\\ \\. \n .. . . ||. . .|/. .\\V. \n . . . .|| . . || . . . \n .. . . ||. . .||. . .. \n . . . .|| . . || . . . \n .. . . ||. . .||. . .. \n . . . .|| . . || . . . \n .. . . ||. . .||. . .. \n . . . .|| . . || . . . \n .. . . ||. . .||. . .. \n . . . .|| . . || . . . \n .. . . ||. . .||. . .. \n . . . .|| . . || . . . \n .. . . ||. . .||. . .. \n . . . .|| . . || . . . \n .. . . ||. . .||. . .. \n . . . .|| . . || . . . \n .. . . ||. . .||. . .. \n . . . cc/ . .cc/ . . .");
/* /*
Gets Querys from the URL the user is at Gets Querys from the URL the user is at
Used by Sniffle to display notificaions Used by Sniffle to display notificaions

View file

@ -1,5 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
@ -14,10 +15,7 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Secular+One&display=swap"> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Secular+One&display=swap">
<!-- JQuery --> <!-- JQuery -->
<script <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous">
src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
crossorigin="anonymous">
</script> </script>
<!-- Sniffle script! --> <!-- Sniffle script! -->
@ -56,7 +54,7 @@
data: formData, data: formData,
contentType: false, contentType: false,
processData: false, processData: false,
success: function(response){ success: function(response) {
$("#sniffle").html(response); $("#sniffle").html(response);
} }
}); });
@ -72,6 +70,7 @@
}); });
</script> </script>
</head> </head>
<body> <body>
<?php <?php
include "ui/required.php"; include "ui/required.php";
@ -81,7 +80,7 @@
if (!loggedin()) { if (!loggedin()) {
echo " echo "
<script> <script>
sniffleAdd('Who are you!', 'You must be loggedin to upload things, sowwy!', 'var(--red)', '".$root_dir."assets/icons/cross.svg'); sniffleAdd('Who are you!', 'You must be loggedin to upload things, sowwy!', 'var(--red)', '" . $root_dir . "assets/icons/cross.svg');
</script> </script>
"; ";
} }
@ -101,4 +100,5 @@
<?php include "ui/footer.php"; ?> <?php include "ui/footer.php"; ?>
</body> </body>
</html> </html>