diff --git a/Flyout/.flyout.css.swp b/Flyout/.flyout.css.swp deleted file mode 100644 index c092334..0000000 Binary files a/Flyout/.flyout.css.swp and /dev/null differ diff --git a/Sniffle/sniffle.css b/Sniffle/sniffle.css index 369fe4c..10b9686 100644 --- a/Sniffle/sniffle.css +++ b/Sniffle/sniffle.css @@ -45,6 +45,8 @@ border-radius: var(--rad); + transition: margin-top 1s cubic-bezier(.19,1,.22,1); + -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; @@ -53,12 +55,10 @@ user-select: none; } .sniffle-notification:hover { - transform: scale(1.05); - cursor: pointer; } -.sniffle-notification:not(:nth-of-type(1), :nth-of-type(2), :nth-of-type(3), :nth-of-type(4), :nth-of-type(5)) { +.sniffle-notification:not(:nth-of-type(1), :nth-of-type(2), :nth-of-type(3), :nth-of-type(4)) { display: none; opacity: 0; } @@ -71,30 +71,23 @@ .sniffle-notification:nth-of-type(2) { z-index: -1; transform: scale(0.95); - margin-top: -5rem; + margin-top: -4.8rem; opacity: 1; transition: transform 1.25s, opacity 0.5s; } .sniffle-notification:nth-of-type(3) { z-index: -2; transform: scale(0.9); - margin-top: -5rem; + margin-top: -4.8rem; opacity: 1; transition: transform 1.5s, opacity 0.75s; } .sniffle-notification:nth-of-type(4) { z-index: -3; transform: scale(0.85); - margin-top: -5rem; - opacity: 1; - transition: transform 1.75s, opacity 1s; -} -.sniffle-notification:nth-of-type(5) { - z-index: -4; - transform: scale(0.80); - margin-top: -5rem; + margin-top: -4.8rem; opacity: 0; - transition: transform 2s, opacity 1.25s; + transition: transform 1.75s, opacity 1s; } /* diff --git a/account.php b/account.php index 2a6f505..1cf3bc7 100644 --- a/account.php +++ b/account.php @@ -30,7 +30,7 @@ Logout is_admin($_SESSION['id'])) { + if ($user_info->is_admin($conn, $_SESSION['id'])) { ?>

Admin controlls

@@ -52,6 +52,12 @@

Logs

+
+

ID

+

User IP

+

Action

+

Time

+

Bans

+
+

ID

+

User IP

+

Reason

+

Lenght

+

Time

+
mins

" . $log_time->format('Y-m-d H:i:s T') . "
" . $diff->time($ban['time']) . "

"; + echo "

" . $log_time->format('Y-m-d H:i:s T') . " | " . $diff->time($ban['time']) . "

"; ?>
+
+

User settings

+
+ +
+

ID

+

Username

+

Last Modified

+

User Options

+

+

+
+ "; + } else { + echo "
"; + } + ?> +

+

+ " . $user_time->format('Y-m-d H:i:s T') . " | " . $diff->time($user['created_at']) . "

"; + + if ($user['id'] == 1) { + ?> + + + + + + + + +
+ + +
+ + + + + + get_image_info($conn, $_POST['id']); // If user owns image or has the ID of 1 - if ($image_info->image_privilage($image_array['author']) || $_SESSION['id'] == 1) { + if ($image_info->image_privilage($image_array['author']) || $user_info->is_admin($conn, $_SESSION['id'])) { // Delete from table $sql = "DELETE FROM images WHERE id = ?"; if ($stmt = mysqli_prepare($conn, $sql)) { @@ -101,7 +101,7 @@ if (isset($_POST['submit_description'])) { // Get all image info $image_array = $image_info->get_image_info($conn, $_POST['id']); // If user owns image or has the ID of 1 - if ($image_info->image_privilage($image_array['author']) || $_SESSION['id'] == 1) { + if ($image_info->image_privilage($image_array['author']) || $user_info->is_admin($conn, $_SESSION['id'])) { // getting ready forSQL asky asky $sql = "UPDATE images SET alt=? WHERE id=?"; @@ -159,7 +159,7 @@ if (isset($_POST['submit_tags'])) { // Get all image info $image_array = $image_info->get_image_info($conn, $_POST['id']); // If user owns image or has the ID of 1 - if ($image_info->image_privilage($image_array['author']) || $_SESSION['id'] == 1) { + if ($image_info->image_privilage($image_array['author']) || $user_info->is_admin($conn, $_SESSION['id'])) { // Clean input $tags_string = $make_stuff->tags(trim($_POST['input'])); @@ -218,7 +218,7 @@ if (isset($_POST['submit_tags'])) { */ if (isset($_POST['submit_author'])) { // If user has the ID of 1 - if ($user_info->is_admin($_SESSION['id'])) { + if ($user_info->is_admin($conn, $_SESSION['id'])) { // getting ready forSQL asky asky $sql = "UPDATE images SET author=? WHERE id=?"; diff --git a/assets/icons/arrow-clockwise.svg b/assets/icons/arrow-clockwise.svg new file mode 100644 index 0000000..08457f9 --- /dev/null +++ b/assets/icons/arrow-clockwise.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/arrows-out-simple.svg b/assets/icons/arrows-out-simple.svg new file mode 100644 index 0000000..17e103d --- /dev/null +++ b/assets/icons/arrows-out-simple.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/scan.svg b/assets/icons/scan.svg new file mode 100644 index 0000000..fd3f518 --- /dev/null +++ b/assets/icons/scan.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/css/main.css b/css/main.css index 5f3ae54..0ec690c 100644 --- a/css/main.css +++ b/css/main.css @@ -328,6 +328,8 @@ nav .btn { } .preview-button { + width: 1.5rem; + padding: 0; position: absolute; bottom: 0.5rem; right: 0.5rem; @@ -344,6 +346,10 @@ nav .btn { opacity: 0.8; box-shadow: 6px 6px 2px rgba(21, 21, 21, 0.4); } +.preview-button img { + width: 1.5rem; + display: block; +} .preview-button:hover { outline: #E8E3E3 0.2rem solid; color: #E8E3E3; @@ -650,7 +656,7 @@ nav .btn { flex-direction: row; justify-content: space-between; } -.log:nth-child(odd) { +.log:nth-child(even) { background-color: rgba(255, 255, 255, 0.0666666667); } .log > * { @@ -669,6 +675,14 @@ nav .btn { } .log > *:nth-child(4) { width: 40%; + margin: 0; +} + +.log:first-of-type { + background-color: #151515; + position: -webkit-sticky; + position: sticky; + top: 0; } .bans { @@ -690,7 +704,7 @@ nav .btn { flex-direction: row; justify-content: space-between; } -.ban:nth-child(odd) { +.ban:nth-child(even) { background-color: rgba(255, 255, 255, 0.0666666667); } .ban > * { @@ -705,17 +719,83 @@ nav .btn { width: 17%; } .ban > *:nth-child(3) { - width: 38%; + width: 34%; } .ban > *:nth-child(4) { width: 10%; } .ban > *:nth-child(5) { - width: 30%; + width: 34%; + margin: 0; } .perm { - border: 1px #B66467 solid; + border: 3px #B66467 solid; +} + +.ban:first-of-type { + background-color: #151515; + position: -webkit-sticky; + position: sticky; + top: 0; +} + +.user-settings { + width: 100%; + max-height: 21rem; + min-height: auto; + padding: 0; + overflow-y: scroll; + display: flex; + flex-direction: column; + background-color: #151515; + border-radius: calc(0.25rem - (0.5rem + 3px)); +} + +.user { + min-width: 769px; + padding: 0.5rem; + display: flex; + flex-direction: row; + justify-content: space-between; +} +.user:nth-child(even) { + background-color: rgba(255, 255, 255, 0.0666666667); +} +.user > * { + margin: 0 0.5rem 0 0; + padding: 0; + word-wrap: break-word; +} +.user > *:nth-child(1) { + width: 5%; +} +.user > *:nth-child(2) { + width: 15%; +} +.user > *:nth-child(3) { + width: 35%; +} +.user > *:nth-child(4) { + width: 15%; +} +.user > *:nth-child(5) { + width: 15%; +} +.user > *:nth-child(6) { + width: 15%; + margin: 0; +} + +.is-admin { + background-color: #8C977D !important; +} + +.user:first-of-type { + background-color: #151515; + position: -webkit-sticky; + position: sticky; + top: 0; } .signup-root { diff --git a/css/scss/_body.scss b/css/scss/_body.scss index 053d2bf..8ae5521 100644 --- a/css/scss/_body.scss +++ b/css/scss/_body.scss @@ -207,6 +207,10 @@ } .preview-button { + width: 1.5rem; + + padding: 0; + position: absolute; bottom: 0.5rem; right: 0.5rem; @@ -231,6 +235,12 @@ box-shadow: $shadow; + img { + width: 1.5rem; + + display: block; + } + &:hover { outline: $white 0.2rem solid; color: $fg; @@ -369,7 +379,7 @@ justify-content: space-between; - &:nth-child(odd) { + &:nth-child(even) { background-color: #ffffff11; } @@ -389,9 +399,15 @@ } &:nth-child(4) { width: 40%; + margin: 0; } } } +.log:first-of-type { + background-color: $bg; + position: sticky; + top: 0; +} .bans { width: 100%; @@ -415,7 +431,7 @@ justify-content: space-between; - &:nth-child(odd) { + &:nth-child(even) { background-color: #ffffff11; } @@ -431,18 +447,85 @@ width: 17%; } &:nth-child(3) { - width: 38%; + width: 34%; } &:nth-child(4) { width: 10%; } &:nth-child(5) { - width: 30%; + width: 34%; + margin: 0; } } } .perm { - border: 1px $red solid; + border: 3px $red solid; +} +.ban:first-of-type { + background-color: $bg; + position: sticky; + top: 0; +} + +.user-settings { + width: 100%; + max-height: 21rem; min-height: auto; + + padding: 0; + + overflow-y: scroll; + + display: flex; flex-direction: column; + + background-color: $bg; + border-radius: calc($rad - (0.5rem + 3px)); +} +.user { + min-width: 769px; + + padding: 0.5rem; + + display: flex; flex-direction: row; + + justify-content: space-between; + + &:nth-child(even) { + background-color: #ffffff11; + } + + & > * { + margin: 0 0.5rem 0 0; + padding: 0; + word-wrap: break-word; + + &:nth-child(1) { + width: 5%; + } + &:nth-child(2) { + width: 15%; + } + &:nth-child(3) { + width: 35%; + } + &:nth-child(4) { + width: 15%; + } + &:nth-child(5) { + width: 15%; + } + &:nth-child(6) { + width: 15%; + margin: 0; + } + } +} +.is-admin { + background-color: $green !important; +} +.user:first-of-type { + background-color: $bg; + position: sticky; + top: 0; } .signup-root { diff --git a/image.php b/image.php index 0092334..1929a3f 100644 --- a/image.php +++ b/image.php @@ -123,7 +123,7 @@ | Check user privilge |------------------------------------------------------------- */ - if ($image_info->image_privilage($image['author']) || $user_info->is_admin($_SESSION['id'])) { + if ($image_info->image_privilage($image['author']) || $user_info->is_admin($conn, $_SESSION['id'])) { $privilaged = True; } else { $privilaged = False; @@ -132,7 +132,7 @@ if (is_file("images/previews/".$image['imagename'])) { echo "
".$image_alt." - +
"; ?>