diff --git a/Sniffle/sniffle.css b/Sniffle/sniffle.css index d3f1d6e..27fda32 100644 --- a/Sniffle/sniffle.css +++ b/Sniffle/sniffle.css @@ -43,9 +43,14 @@ box-shadow: var(--shadow); - transition: transform 1s cubic-bezier(.19,1,.22,1), opacity 0.25s cubic-bezier(.19,1,.22,1); - border-radius: var(--rad); + + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } .sniffle-notification:hover { transform: scale(1.05); @@ -53,25 +58,36 @@ cursor: pointer; } -.sniffle-notification:not(:nth-of-type(1), :nth-of-type(2), :nth-of-type(3)) { +.sniffle-notification:not(:nth-of-type(1), :nth-of-type(2), :nth-of-type(3), :nth-of-type(4)) { display: none; opacity: 0; } .sniffle-notification:nth-of-type(1) { z-index: 1; transform: scale(1); + opacity: 1; + transition: transform 1s cubic-bezier(.19,1,.22,1), opacity 0.25s cubic-bezier(.19,1,.22,1); } .sniffle-notification:nth-of-type(2) { z-index: -1; transform: scale(0.95); - transition: none; 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); - transition: none; 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: -4.8rem; + opacity: 0; + transition: transform 1.75s, opacity 1s; } /* diff --git a/account.php b/account.php index 3817bba..c99fcce 100644 --- a/account.php +++ b/account.php @@ -11,8 +11,10 @@ require_once __DIR__."/ui/nav.php"; use App\Account; + use App\Diff; $user_info = new Account(); + $diff = new Diff(); ?>

" . $log_time->format('d/m/Y H:i:s T') . "

"; + echo "

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

"; + ?> + + + +
+

Bans/Timeouts

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

+

+

+

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

"; ?>
- - - - + + + + = 5) { + mysqli_query($conn,"INSERT INTO bans (ipaddress, reason, length, permanent) VALUES('$user_ip','Attempted password too many times', '60', '0')"); + } else { + // Checking if Username is empty + if (empty(trim($_POST["username"]))) { + ?> + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff($ago); + + $diff->w = floor($diff->d / 7); + $diff->d -= $diff->w * 7; + + $string = array( + 'y' => 'year', + 'm' => 'month', + 'w' => 'week', + 'd' => 'day', + 'h' => 'hour', + 'i' => 'minute', + 's' => 'second', + ); + foreach ($string as $k => &$v) { + if ($diff->$k) { + $v = $diff->$k . ' ' . $v . ($diff->$k > 1 ? 's' : ''); + } else { + unset($string[$k]); + } + } + + if (!$full_date) $string = array_slice($string, 0, 1); + return $string ? implode(', ', $string) . ' ago' : 'just now'; + } +} \ No newline at end of file diff --git a/css/main.css b/css/main.css index ed0b881..f6619bc 100644 --- a/css/main.css +++ b/css/main.css @@ -671,6 +671,53 @@ nav .btn { width: 20%; } +.bans { + width: 100%; + max-height: 20rem; + min-height: 5rem; + padding: 0; + overflow-y: scroll; + display: flex; + flex-direction: column; + background-color: #151515; + border-radius: calc(0.25rem - (0.5rem + 3px)); +} + +.ban { + min-width: 769px; + padding: 0.5rem; + display: flex; + flex-direction: row; + justify-content: space-between; +} +.ban:nth-child(odd) { + background-color: rgba(255, 255, 255, 0.0666666667); +} +.ban > * { + margin: 0 0.5rem 0 0; + padding: 0; + word-wrap: break-word; +} +.ban > *:nth-child(1) { + width: 5%; +} +.ban > *:nth-child(2) { + width: 20%; +} +.ban > *:nth-child(3) { + width: 45%; +} +.ban > *:nth-child(4) { + width: 10%; +} +.ban > *:nth-child(5) { + width: 20%; +} + +.perm { + border: 1px #B66467 solid; +} + .signup-root { margin-bottom: 1rem; padding: 0.5rem 0.5rem 0 0.5rem; diff --git a/css/scss/_body.scss b/css/scss/_body.scss index 75a537e..47073bd 100644 --- a/css/scss/_body.scss +++ b/css/scss/_body.scss @@ -393,6 +393,58 @@ } } +.bans { + width: 100%; + max-height: 20rem; min-height: 5rem; + + padding: 0; + + overflow-y: scroll; + + display: flex; flex-direction: column; + + background-color: $bg; + border-radius: calc($rad - (0.5rem + 3px)); +} +.ban { + min-width: 769px; + + padding: 0.5rem; + + display: flex; flex-direction: row; + + justify-content: space-between; + + &:nth-child(odd) { + background-color: #ffffff11; + } + + & > * { + margin: 0 0.5rem 0 0; + padding: 0; + word-wrap: break-word; + + &:nth-child(1) { + width: 5%; + } + &:nth-child(2) { + width: 20%; + } + &:nth-child(3) { + width: 45%; + } + &:nth-child(4) { + width: 10%; + } + &:nth-child(5) { + width: 20%; + } + } +} +.perm { + border: 1px $red solid; +} + .signup-root { @include defaultDecoration($page-accent); @include defaultFont();