diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e69de29..0000000 diff --git a/LICENSE.md b/GitHub/LICENSE.md similarity index 100% rename from LICENSE.md rename to GitHub/LICENSE.md diff --git a/about.php b/about.php index ee9296e..3f7ce90 100644 --- a/about.php +++ b/about.php @@ -1,66 +1,45 @@ + - - - Lynx Gallery - - - - - - - - - - - - - - - - - - - + + + - + -
-

What is Fluffys Amazing Gallery?

-

Fluffys Amazing Gallery is a smol project I originally started to control the images on my main page, but quickly turned into something much bigger...

-

What Do I want this to become in the future? No clue, but I do want this to be usable by others, if its a file they download a docker image they setup on your own web server.

-

Will it become that any time soon? No, but. I am going to work on this untill it becomes what I want it to be!

+
+

What is Fluffys Amazing Gallery?

+

Fluffys Amazing Gallery is a smol project I originally started to control the images on my main page, but quickly turned into something much bigger...

+

What Do I want this to become in the future? No clue, but I do want this to be usable by others, if its a file they download a docker image they setup on your own web server.

+

Will it become that any time soon? No, but. I am going to work on this untill it becomes what I want it to be!

-
+
-

Can you add "A" or "B"?

-

No.

+

Can you add "A" or "B"?

+

No.

-
+
-

How do I use this!

-

First you must obtain the invite code. If you don't have one and are interested in trying this, feel free to DM me on Telegram!

-

But once you're done doing that, you can start making your account at the signup page here.

-

From there you should be able to go and login at this fancy page here!

-

Now you should see "Welcome (your username)" at the homepage. From there navigate to the navbar and click on the upload button. Choose your file, enter the description and your image is up!

+

How do I use this!

+

First you must obtain the invite code. If you don't have one and are interested in trying this, feel free to DM me on Telegram!

+

But once you're done doing that, you can start making your account at the signup page here.

+

From there you should be able to go and login at this fancy page here!

+

Now you should see "Welcome (your username)" at the homepage. From there navigate to the navbar and click on the upload button. Choose your file, enter the description and your image is up!

-
+
-

Credits!

-

To Carty for being super cool again and helping me get started with SQL and PHP!

-

To Phosphor for providing nice SVG icons.

-

To mrHDash...

-
+

Credits!

+

To Carty for being super cool again and helping me get started with SQL and PHP!

+

To Phosphor for providing nice SVG icons.

+

To mrHDash...

+
- + - + + \ No newline at end of file diff --git a/account/account.php b/account/account.php index 86feae8..b8df11b 100644 --- a/account/account.php +++ b/account/account.php @@ -1,79 +1,126 @@ + - - - Lynx Gallery - - - - - - - - - - - - - - - - - - - + + - + -
-

Account settings

- "; - if ($_SESSION["id"] == 1) { - echo "

Invite Codes

"; - $token_request = mysqli_query($conn, "SELECT * FROM tokens WHERE used = 0"); - while ($token = mysqli_fetch_array($token_request)) { - ?> - - - - - -
-

Danger ahead

-

Resetting your password regularly is a good way of keeping your account safe

- Reset Password -
-

Don't leave! I'm with the science team!

- Logout - -

You must be logged in to change your account settings!

- Login! - -
+ +
+

Account settings

+
+ Invite Codes"; + $token_request = mysqli_query($conn, "SELECT * FROM tokens WHERE used = 0"); + while ($token = mysqli_fetch_array($token_request)) { + ?> + + + + +
+

Danger ahead

+

Resetting your password regularly is a good way of keeping your account safe

+ Reset Password +
+

Don't leave! I'm with the science team!

+ Logout +
+ +
+

Login

+

Passwords are important to keep safe. Don't tell anyone your password, not even Fluffy!

+
+
+ + +
+ +
+ +
+ - +
+

Make account

+

And amazing things happened here...

+
+
+ +
+ + +
+ +
+ +
+ +
+ + + + + + - + + \ No newline at end of file diff --git a/account/login.php b/account/login.php deleted file mode 100644 index 8d2a939..0000000 --- a/account/login.php +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - Lynx Gallery - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Login

-

Passwords are important to keep safe. Don't tell anyone your password, not even Fluffy!

-
-
- - -
- -
- Need an account? Sign up! -
- - - - - - diff --git a/account/password-reset.php b/account/password-reset.php index 1692224..9fb6af8 100644 --- a/account/password-reset.php +++ b/account/password-reset.php @@ -1,71 +1,50 @@ + - - - Lynx Gallery - - - - - - - - - - - - - - - - - - - + + + - + // Check if the user is logged in, otherwise redirect to login page + if (!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true) { + header("location: https://superdupersecteteuploadtest.fluffybean.gay/account/login.php"); + exit; + } + ?> -
-

Reset Password

-

After reset, you will be kicked out to login again

-
-
- - -
- -
-
+
+

Reset Password

+

After reset, you will be kicked out to login again

+
+
+ + +
+ +
+
- + - + - + + \ No newline at end of file diff --git a/account/signup.php b/account/signup.php deleted file mode 100644 index 19e5b70..0000000 --- a/account/signup.php +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - Lynx Gallery - - - - - - - - - - - - - - - - - - - - - - - -
-

Make account

-

And amazing things happened here...

-
-
- -
- - -
- -
- -
-
- - - - - - diff --git a/app/account/signup.php b/app/account/account.php similarity index 63% rename from app/account/signup.php rename to app/account/account.php index 7dca167..61ee48d 100644 --- a/app/account/signup.php +++ b/app/account/account.php @@ -1,17 +1,128 @@ + + + + + + + + + + + + - - - - - - - - - - - - + console.log("⣿⣿⣿⣿⣿⡿⠿⠻⠿⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠿⠻⠻⠟⠻⢿⣿⣿⣿⣿"); + console.log("⣿⣿⡟⠁⢀⣠⣤⣤⣤⣤⣄⣀⣀⣀⣹⣿⣿⣷⣄⣀⣀⣀⣀⣤⣤⣤⣤⣀⠐⢽⣿⣿⣿"); + console.log("⣿⣿⣿⣶⣿⡿⣛⡒⠒⠒⢒⠒⣲⠙⣿⣿⣿⣿⠟⣵⡒⢒⠒⠒⡀⣘⡻⣿⣿⣾⣿⣿⣿"); + console.log("⣿⣿⣿⣿⣏⣞⡛⠃⠀⠀⠸⠷⢿⣧⣿⣿⣿⣿⣧⣿⣷⣛⣀⣀⣁⣛⣛⣮⣿⣿⣿⣿⣿"); + console.log("⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿"); + console.log("⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿"); + console.log("⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢏⣾⣿⣿⣿⣿"); + console.log("⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢻⣿⠏⣼⣿⣿⣿⣿⣿"); + console.log("⣿⣿⣿⣿⣿⣿⣿⣿⡿⢿⣿⣿⣿⣿⣿⣿⡿⠿⠿⠿⠟⢛⣉⣴⣿⡏⣸⣿⣿⣿⣿⣿⣿"); + console.log("⣿⣿⣿⣿⣿⣿⣿⣿⣧⣠⣤⣤⣤⣤⣤⣤⣶⣶⣶⣶⣿⣿⣿⣿⣿⠃⣿⣿⣿⣿⣿⣿⣿"); + console.log("⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣾⣿⣿⣿⣿⣿⣿⣿"); + \ No newline at end of file diff --git a/css/main.css b/css/main.css index abee157..2c2e2ee 100644 --- a/css/main.css +++ b/css/main.css @@ -87,6 +87,10 @@ nav .btn { width: auto; } +.nav-mobile { + display: none; +} + @media (max-width: 800px) { .nav-name { display: none; @@ -129,6 +133,9 @@ nav .btn { #back-to-top { bottom: 5rem !important; } + .nav-mobile { + display: block; + } } /* |------------------------------------------------------------- @@ -218,7 +225,7 @@ nav .btn { } .nsfw-blur { - filter: blur(10px); + filter: blur(8px); } .nsfw-warning { @@ -236,21 +243,24 @@ nav .btn { align-items: center; text-decoration: none; font-family: "Secular One", sans-serif; + background-color: rgba(21, 21, 21, 0.7333333333); } .nsfw-warning span { color: #B66467; text-align: center; - text-shadow: 0 0 2px #151515; +} +.nsfw-warning span::after { + content: " Content"; } .nsfw-warning img { margin: 0.25rem; - width: 2rem; - height: 2rem; + width: 2.5rem; + height: 2.5rem; } @media (max-width: 500px) { - .nsfw-warning span { - display: none; + .nsfw-warning span::after { + content: none; } } /* @@ -531,6 +541,7 @@ nav .btn { border-radius: 0rem; border: 0.2rem solid #8C977D; box-shadow: 6px 6px 2px rgba(21, 21, 21, 0.5333333333); + display: none; } .signup-root > * { margin-top: 0; @@ -675,9 +686,16 @@ footer > * { margin-top: 0; margin-bottom: 0.5rem; } -footer a { - margin: 0.5rem; +footer p { + margin: 0 0.5rem; 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; } footer a:hover { diff --git a/css/scss/_body.scss b/css/scss/_body.scss index ee98b2e..219618f 100644 --- a/css/scss/_body.scss +++ b/css/scss/_body.scss @@ -96,8 +96,9 @@ } .nsfw-blur { - filter: blur(10px); + filter: blur(8px); } + .nsfw-warning { width: 100%; height: 100%; @@ -106,38 +107,46 @@ bottom: 0; left: 0; right: 0; - + position: absolute; z-index: 5; - display: flex; flex-direction: column; + display: flex; + flex-direction: column; justify-content: center; align-items: center; text-decoration: none; font-family: $font-body; + background-color: $bg-alt; + span { color: $red; text-align: center; - text-shadow: 0 0 2px $black; + + &::after { + content: ' Content'; + } } + img { margin: 0.25rem; - width: 2rem; - height: 2rem; + width: 2.5rem; + height: 2.5rem; } } @media (max-width: 500px) { .nsfw-warning { - span { - display: none; + span::after { + content: none; } } } + /* |------------------------------------------------------------- | IMAGE @@ -213,6 +222,7 @@ border-radius: $rad; font-family: $font-body; + &::before { content: '# '; } @@ -262,6 +272,8 @@ .signup-root { @include defaultDecoration($green); @include defaultFont(); + // By default its hidden, in place is login + display: none; } /* diff --git a/css/scss/_footer.scss b/css/scss/_footer.scss index ec433c0..dac9c4a 100644 --- a/css/scss/_footer.scss +++ b/css/scss/_footer.scss @@ -13,10 +13,20 @@ footer { width: calc(100% - 1.4rem); - a { - margin: 0.5rem; + p { + margin: 0 0.5rem; 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; diff --git a/css/scss/_navigation.scss b/css/scss/_navigation.scss index bc25098..24a48c1 100644 --- a/css/scss/_navigation.scss +++ b/css/scss/_navigation.scss @@ -57,6 +57,10 @@ nav { width: auto; } +.nav-mobile { + display: none; +} + @media (max-width: 800px) { .nav-name { display: none; @@ -110,4 +114,7 @@ nav { #back-to-top { bottom: 5rem !important; } + .nav-mobile { + display: block; + } } \ No newline at end of file diff --git a/default.json b/default.json new file mode 100644 index 0000000..9c531dd --- /dev/null +++ b/default.json @@ -0,0 +1,36 @@ +{ + "name": "Only Legs", + "description": "A simple gallery with multiple users in mind", + "welcome_msg": [ + "*internal screaming*", + "Don't forget to drink water!", + "Bruh", + "Fluffy made this!", + "maybe", + "I'm gay", + "I wish we were better strangers.", + "Just like Minecraft!", + "If I were you, I'd run now", + "This is the part where I kill you", + "SILICA GEL \"DO NOT EAT\".", + "This was supposed to be a simple project", + "AAAAAAAAAAAAAAAAAAAA", + "Let me out", + "nice", + "I'm glad you're here", + "The weather is dry", + "Need me a man 👀", + "Gods die too.", + "Eat hotchip and lie" + ], + "database": { + "ip": "192.168.0.79", + "port": "3306", + "username": "uwu", + "password": "fennec621", + "database": "gallery" + }, + "testing": true, + "version": "15.08.22", + "license":"GPL 3.0" +} \ No newline at end of file diff --git a/image.php b/image.php index d51bd1f..b657db2 100644 --- a/image.php +++ b/image.php @@ -1,394 +1,373 @@ + - - - Lynx Gallery - - - - - - - - - - - - - - - - - - - + + + - - - - - + + + + + /* + |------------------------------------------------------------- + | Check user privilge + |------------------------------------------------------------- + */ + if (image_privilage($image['author']) || is_admin($_SESSION['id'])) { + $privilaged = True; + } else { + $privilaged = False; + } + ?> -
- ' src='' alt=''> -
+
+ ' src='' alt=''> +
- + -
-

Description

-

-
+
+

Description

+

+
-
-

Details

- Author: ".$image_author."

"; +
+

Details

+ Author: " . $image_author . "

"; - // Image ID - echo "

ID: ".$image['id']."

"; + // Image ID + echo "

ID: " . $image['id'] . "

"; - // File name - if (strlen($image['imagename']) > 30) { - echo "

File Name: ".substr($image['imagename'], 0, 30)."...

"; - } else { - echo "

File Name: ".$image['imagename']."

"; - } + // File name + if (strlen($image['imagename']) > 30) { + echo "

File Name: " . substr($image['imagename'], 0, 30) . "...

"; + } else { + echo "

File Name: " . $image['imagename'] . "

"; + } - // File extention - echo "

File Type: ".pathinfo($image['imagename'], PATHINFO_EXTENSION)."

"; + // File extention + echo "

File Type: " . pathinfo($image['imagename'], PATHINFO_EXTENSION) . "

"; - // Image resolution - list($width, $height) = getimagesize($image_path); - echo "

Image resolution: ".$width."x".$height."

"; + // Image resolution + list($width, $height) = getimagesize($image_path); + echo "

Image resolution: " . $width . "x" . $height . "

"; - // Image Upload date - echo "

Last updated: +0 ".$image['upload']."

"; + // Image Upload date + echo "

Last updated: +0 " . $image['upload'] . "

"; - echo "
"; + echo "
"; - // Image download - echo "Download image"; + // Image download + echo "Download image"; - // Copy image - ?> - - Copy image link"; - ?> -
+ sniffleAdd("Info", "Link has been copied!", "var(--green)", "assets/icons/clipboard-text.svg"); + } + + Copy image link"; + ?> +
-
-

Tags

-
- ".$tag."

"; - } else { - echo "

".$tag."

"; - } - } - } else { - echo "

No tags present

"; - } - ?> -
-
+
+

Tags

+
+ " . $tag . "

"; + } else { + echo "

" . $tag . "

"; + } + } + } else { + echo "

No tags present

"; + } + ?> +
+
- - -
-

Danger zone

+ + +
+

Danger zone

- - - + $("#deleteConfirm").submit(function(event) { + event.preventDefault(); + var deleteSubmit = $("#deleteSubmit").val(); + $("#sniffle").load("app/image/delete_image.php", { + id: , + submit: deleteSubmit + }); + }); + }); + - - - + $("#descriptionConfirm").submit(function(event) { + event.preventDefault(); + var descriptionInput = $("#descriptionInput").val(); + var descriptionSubmit = $("#descriptionSubmit").val(); + $("#sniffle").load("app/image/edit_description.php", { + id: , + input: descriptionInput, + submit: descriptionSubmit + }); + }); + }); + - - - + $("#tagsConfirm").submit(function(event) { + event.preventDefault(); + var tagsInput = $("#tagsInput").val(); + var tagsSubmit = $("#tagsSubmit").val(); + $("#sniffle").load("app/image/edit_tags.php", { + id: , + input: tagsInput, + submit: tagsSubmit + }); + }); + }); + - - - - - "; - } + $("#authorConfirm").submit(function(event) { + event.preventDefault(); + var authorInput = $("#authorInput").val(); + var authorSubmit = $("#authorSubmit").val(); + $("#sniffle").load("app/image/edit_author.php", { + id: , + input: authorInput, + submit: authorSubmit + }); + }); + }); + + "; + } - /* - |------------------------------------------------------------- - | End of displaying all user info - |------------------------------------------------------------- - */ - } - ?> + /* + |------------------------------------------------------------- + | End of displaying all user info + |------------------------------------------------------------- + */ + } + ?> - + + \ No newline at end of file diff --git a/index.php b/index.php index a12aea2..e97bc1c 100644 --- a/index.php +++ b/index.php @@ -1,38 +1,14 @@ + - - - Lynx Gallery - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - + + + + + +<?php echo $setup_json['website']['name']; ?> + + + + + + + + + + + + + + + + + + + + diff --git a/ui/nav.php b/ui/nav.php index 938d915..ec8b258 100644 --- a/ui/nav.php +++ b/ui/nav.php @@ -1,6 +1,6 @@