diff options
| author | 8cy <[email protected]> | 2020-05-11 01:48:50 -0700 |
|---|---|---|
| committer | 8cy <[email protected]> | 2020-05-11 01:48:50 -0700 |
| commit | 62b4b0e853e85664ece1b8bd8b4254813bab43b2 (patch) | |
| tree | d3ea6ded435b7ed92dd2e5d57c39c34fa97af983 /views | |
| parent | yes (diff) | |
| download | slog-62b4b0e853e85664ece1b8bd8b4254813bab43b2.tar.xz slog-62b4b0e853e85664ece1b8bd8b4254813bab43b2.zip | |
big boi changes
- add registration ip to user registration
- add quotes to footer
- add error messages to error page
- make uptime readable
- remove commenting
- login now redircts to previous page
- add admin page + marketplace boilerplate
- add CHANGE PASSWORD
- ADD DELETE ITEM FINALLY
- reposition things and formatting
Diffstat (limited to 'views')
| -rw-r--r-- | views/change-password.ejs | 160 | ||||
| -rw-r--r-- | views/error.ejs | 12 | ||||
| -rw-r--r-- | views/index.ejs | 90 | ||||
| -rw-r--r-- | views/login.ejs | 3 | ||||
| -rw-r--r-- | views/profile.ejs | 8 | ||||
| -rw-r--r-- | views/signup.ejs | 3 |
6 files changed, 243 insertions, 33 deletions
diff --git a/views/change-password.ejs b/views/change-password.ejs new file mode 100644 index 0000000..aa24b28 --- /dev/null +++ b/views/change-password.ejs @@ -0,0 +1,160 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <meta http-equiv="X-UA-Compatible" content="ie=edge"> + <title>Sin's SS Logger | Change Password</title> + <link rel="shortcut icon" href="https://i.imgur.com/69mCrs0.jpg" type="image/jpg"> + <!-- CSS --> + <link rel="stylesheet" href="/css/main.css"> + <link rel="stylesheet" href="/css/now-ui-kit.css"> + <link rel="stylesheet" href="/css/bootstrap.min.css"> + + <style> + html, + body { + background-color: #202124; + user-select: none; + } + + .container { + z-index: 999; + } + + #white-txt { + color: white !important; + } + + .highlightable { + user-select: text; + } + + footer { + position: fixed; + left: 0; + bottom: 3px; + width: 100%; + color: white; + text-align: center; + } + + #pink-link { + color: pink; + } + #pink-link:hover { + color: rgb(214, 161, 170); + } + + #deez-nuts { + cursor: default; + color: white + } + #deez-nuts:hover { + cursor: default; + color: white; + text-decoration: none + } + </style> + <!-- External Libraries --> + <!-- Invisible Scripts --> + <script src="https://code.jquery.com/jquery-3.5.0.min.js" + integrity="sha256-xNzN2a4ltkB44Mc/Jz3pT4iU1cmeR0FkXs4pru/JxaQ=" crossorigin="anonymous"></script> + <script src="/js/now-ui-kit.js"></script> + <script src="/js/main.js"></script> + <!-- External Libraries --> + <!-- Invisible Scripts --> + </head> + <body> + <!-- Visable Scripts --> + + <nav class="navbar navbar-expand-lg bg-transparent hideme" id="navbar-remove"> + <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div class="collapse navbar-collapse" id="navbarSupportedContent"> + <ul class="navbar-nav ml-auto"> + <li class="nav-item"> + <a href="#" class="nav-link disabled" style="opacity: 1;">Database Status: <span + style="color: #99CC33;">Online</span></a> + </li> + <div class="divider-vertical"></div> + <li class="nav-item"> + <a class="nav-link" href="/">Home</a> + </li> + <!--<li class="nav-item"> + <a class="nav-link" href="/discord/bots/uwufier/about/">About</a> + </li>--> + <li class="nav-item active"> + <a href="/profile" class="nav-link">Profile</a> + </li> + <li class="nav-item disabled"> + <a href="#" class="nav-link disabled">API</a> + </li> + <div class="divider-vertical"></div> + <li class="nav-item"> + <a href="https://kyzer.co" class="nav-link">More stuff from Sin</a> + </li> + </ul> + <!-- <button class="btn btn-outline-secondary my-2 my-sm-0 btn-round btn-sm">LOGIN</button> --> + </div> + </nav> + + <div class="container my-5 hideme"> + <div class="row"> + <div class="col-sm"></div> + <div class="col-sm"> + <h4 class="pt-4" id="white-txt"> + Change Password + </h4> + + <form action="/change-password" method="post" class="my-4"> + <div class="form-group"> + <label for="passReset" class="sr-only">Password</label> + <input type="password" name="passReset" id="passReset" class="form-control mr-2 mb-2" + placeholder="Password" pattern=".{3,}" required> + <input type="password" name="passResetCheck" id="passResetCheck" class="form-control mr-2" + placeholder="Confirm Password" pattern=".{3,}" required> + <script> + var password = document.getElementById("passReset"), + confirm_password = document.getElementById("passResetCheck"); + + function validatePassword() { + if (password.value != confirm_password.value) { + confirm_password.setCustomValidity("Passwords do not match!"); + } else { + confirm_password.setCustomValidity(''); + } + } + + password.onchange = validatePassword; + confirm_password.onkeyup = validatePassword; + </script> + <small id="loginUserhelp" class="form-text text-muted">Pick something secure and easy to + remember! Must be atleast 3 characters.</small> + <button type="submit" class="btn btn-success">Reset Password</button> + </div> + </form> + </div> + <div class="col-sm"></div> + </div> + </div> + + <footer class="hideme"> + <link rel="stylesheet" type="text/css" + href="//code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" /> + Made with <i class="icon ion-heart"></i> by <a href="https://kyzer.co/">Sin</a>. | + <span class="highlightable"><%= quote.text %> -<%= quote.author.name %></span> + </footer> + + <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" + integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"> + </script> + <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" + integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"> + </script> + <script src="https://code.jquery.com/jquery-3.5.0.min.js" + integrity="sha256-xNzN2a4ltkB44Mc/Jz3pT4iU1cmeR0FkXs4pru/JxaQ=" crossorigin="anonymous"></script> + </body> +</html>
\ No newline at end of file diff --git a/views/error.ejs b/views/error.ejs index 05344c0..829840d 100644 --- a/views/error.ejs +++ b/views/error.ejs @@ -76,8 +76,8 @@ <!--<li class="nav-item"> <a class="nav-link" href="/discord/bots/uwufier/about/">About</a> </li>--> - <li class="nav-item active"> - <a href="#" class="nav-link">Profile <span class="sr-only">(current)</span></a> + <li class="nav-item"> + <a href="/profile" class="nav-link">Profile</a> </li> <li class="nav-item disabled"> <a href="#" class="nav-link disabled">API</a> @@ -96,10 +96,11 @@ <div class="col-sm"></div> <div class="col-sm"> <h4 class="pt-4" id="white-txt">Error</h4> - <h5 class="pt-2" id="white-txt">If you are here, you probably expirienced some kind of error. + <!-- <h5 class="pt-2" id="white-txt">If you are here, you probably expirienced some kind of error. Because this site is in early access, error codes are currently disabled. If you are repeatedly getting the same error, please join <a href="https://discord.gg/DVwXUwx">Sin's Support - Server</a> on Discord and report a error.</b></h5> + Server</a> on Discord and report a error.</b></h5> --> + <h5 class="pt-2" id="white-txt"><%= errorMsg %></h5> <div class="pt-3"> <a href="#" onclick="window.history.back();"> <button type="submit" class="btn btn-success">Back</button> @@ -113,7 +114,8 @@ <footer class="hideme"> <link rel="stylesheet" type="text/css" href="//code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" /> - Made with <i class="icon ion-heart"></i> by <a href="https://kyzer.co/">Sin</a> (in only 10 hours). + Made with <i class="icon ion-heart"></i> by <a href="https://kyzer.co/">Sin</a>. | + <span class="highlightable"><%= quote.text %> -<%= quote.author.name %></span> </footer> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" diff --git a/views/index.ejs b/views/index.ejs index 48144ba..c3071d3 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -131,9 +131,14 @@ <a href="/login"> <button type="button" class="btn btn-danger">Login to submit</button> </a> - <% } else { %> + <% } else { %> <button type="submit" class="btn btn-success">Submit</button> - <% } %> + <% } %> + + <small class="form-text" style="color: #dc3545;">Known bug: When adding/ + deleting multiple entries at a time, you might have to + refresh the page for changes to show. + </small> </div> </div> </form> @@ -149,9 +154,12 @@ <th id="white-txt" class="hideme">Price</th> <th id="white-txt" class="hideme" data-toggle="tooltip" data-placement="top" title="Time of Sale">TOS</th> + <% if (name === null) { } else { %> + <th id="white-txt" class="hideme"></th> + <% } %> </tr> </thead> - <tbody class="hideme"> + <tbody> <% if (name === null) { %> <tr> <td id="white-txt" class="highlightable hideme">RX7</td> @@ -174,6 +182,15 @@ <td id="white-txt" class="highlightable hideme"><%= lp.seller %></td> <td id="white-txt" class="highlightable hideme"><%= lp.price %></td> <td id="white-txt" class="highlightable hideme"><%= lp.date %></td> + <!-- <td id="white-txt id" class="highlightable" style="display: none;"><%= lp._id %></td> --> + <td class="hideme"> + <form action="/deleteItem/<%= lp._id %>" method="post"> + <button type="submit" class="btn btn-danger" + style="float: right; font-size: 10px !important;" + data-toggle="tooltip" data-placement="top" + title="Delete this entry" data-delete-item-button>Delete</button> + </form> + </td> </tr> <% }) %> <% } %> @@ -191,9 +208,12 @@ <th id="white-txt" class="hideme">Price</th> <th id="white-txt" class="hideme" data-toggle="tooltip" data-placement="top" title="Time of Sale">TOS</th> + <% if (name === null) { } else { %> + <th id="white-txt" class="hideme"></th> + <% } %> </tr> </thead> - <tbody class="hideme"> + <tbody> <% if (name === null) { %> <tr> <td id="white-txt" class="highlightable hideme">R34</td> @@ -216,6 +236,15 @@ <td id="white-txt" class="highlightable hideme"><%= lp.seller %></td> <td id="white-txt" class="highlightable hideme"><%= lp.price %></td> <td id="white-txt" class="highlightable hideme"><%= lp.date %></td> + <!-- <td id="white-txt id" class="highlightable" style="display: none;"><%= lp._id %></td> --> + <td class="hideme"> + <form action="/deleteItem/<%= lp._id %>" method="post"> + <button type="submit" class="btn btn-danger" + style="float: right; font-size: 10px !important;" + data-toggle="tooltip" data-placement="top" + title="Delete this entry" data-delete-item-button>Delete</button> + </form> + </td> </tr> <% }) %> <% } %> @@ -232,29 +261,41 @@ <th id="white-txt">Trader</th> <th id="white-txt">Traded Car(s)</th> <th id="white-txt" data-toggle="tooltip" data-placement="top" title="Time of Sale">TOS</th> + <% if (name === null) { } else { %> + <th id="white-txt" class="hideme"></th> + <% } %> </tr> </thead> - <tbody class="hideme"> + <tbody> <% if (name === null) { %> - <td id="white-txt" class="highlightable">R32</td> - <td id="white-txt" class="highlightable">Sin</td> - <td id="white-txt" class="highlightable">R34</td> - <td id="white-txt" class="highlightable">2020-05-02T06:21:23.2J7F</td> + <td id="white-txt" class="highlightable hideme">R32</td> + <td id="white-txt" class="highlightable hideme">Sin</td> + <td id="white-txt" class="highlightable hideme">R34</td> + <td id="white-txt" class="highlightable hideme">2020-05-02T06:21:23.2J7F</td> <% } else { %> <% if (loop3Count < 1) { %> <tr> - <td id="white-txt" class="highlightable"></td> - <td id="white-txt" class="highlightable"></td> - <td id="white-txt" class="highlightable"></td> - <td id="white-txt" class="highlightable"></td> + <td id="white-txt" class="highlightable hideme"></td> + <td id="white-txt" class="highlightable hideme"></td> + <td id="white-txt" class="highlightable hideme"></td> + <td id="white-txt" class="highlightable hideme"></td> </tr> <% } else { %> <% loop3.forEach(lp => { %> <tr> - <td id="white-txt" class="highlightable"><%= lp.cars %></td> - <td id="white-txt" class="highlightable"><%= lp.seller %></td> - <td id="white-txt" class="highlightable"><%= lp.price %></td> - <td id="white-txt" class="highlightable"><%= lp.date %></td> + <td id="white-txt" class="highlightable hideme"><%= lp.cars %></td> + <td id="white-txt" class="highlightable hideme"><%= lp.seller %></td> + <td id="white-txt" class="highlightable hideme"><%= lp.price %></td> + <td id="white-txt" class="highlightable hideme"><%= lp.date %></td> + <!-- <td id="white-txt id" class="highlightable" style="display: none;"><%= lp._id %></td> --> + <td class="hideme"> + <form action="/deleteItem/<%= lp._id %>" method="post"> + <button type="submit" class="btn btn-danger" + style="float: right; font-size: 10px !important;" + data-toggle="tooltip" data-placement="top" + title="Delete this entry" data-delete-item-button>Delete</button> + </form> + </td> </tr> <% }) %> <% } %> @@ -265,7 +306,8 @@ </div> <% if (name === 'sin') { %> - <div class="newest hideme" style="position: fixed; top: 5%; left: 5%;"> + <div class="newest hideme" style="position: absolute; top: 15px; left: 15px;"> + <!-- <div class="newest hideme" style="position: fixed; top: 5%; left: 5%;"> --> <table class="table table-striped"> <thead> <tr> @@ -278,7 +320,7 @@ <tr> <td id="white-txt" class="highlightable"><%= UserCount %></td> <td id="white-txt" class="highlightable"><%= EntryCount %></td> - <td id="white-txt" class="highlightable"><%= process.uptime() %></td> + <td id="white-txt" class="highlightable"><%= dateString %></td> </tr> </tbody> </table> @@ -286,7 +328,8 @@ <% } %> <% if (req.session.exampleVideo) { %> - <div class="example-video__container hideme" style="position: absolute; bottom: 15px; left: 15px;"> + <div class="example-video__container hideme" style="position: fixed; bottom: 25px; left: 25px;"> + <!-- <div class="example-video__container hideme" style="position: fixed; bottom: 0px; left: 8px;"> --> <form action="/closeExampleVideo" method="post"> <button type="submit" class="btn btn-danger" style="float: right; font-size: 10px !important;" data-toggle="tooltip" data-placement="top" title="Close the demo">Close Demo</button> @@ -297,19 +340,20 @@ allowfullscreen id="example-video"></iframe> </div> <% } else { %> - <div class="example-video__container hideme" style="position: fixed; bottom: 15px; left: 15px;"> + <div class="example-video__container hideme" style="position: fixed; bottom: 15px; left: 25px;"> <form action="/openExampleVideo" method="post"> <button type="submit" class="btn btn-info" style="float: right; font-size: 10px !important;" data-toggle="tooltip" data-placement="top" title="Re-watch the demo">Re-watch Demo</button> </form> </div> - <% } %> + <% } %> </div> <footer class="hideme"> <link rel="stylesheet" type="text/css" href="//code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" /> - Made with <i class="icon ion-heart"></i> by <a href="https://kyzer.co/">Sin</a> (in only 10 hours). + Made with <i class="icon ion-heart"></i> by <a href="https://kyzer.co/">Sin</a>. | + <span class="highlightable"><%= quote.text %> -<%= quote.author.name %></span> </footer> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" diff --git a/views/login.ejs b/views/login.ejs index c282b7f..b2845de 100644 --- a/views/login.ejs +++ b/views/login.ejs @@ -125,7 +125,8 @@ <footer class="hideme"> <link rel="stylesheet" type="text/css" href="//code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" /> - Made with <i class="icon ion-heart"></i> by <a href="https://kyzer.co/">Sin</a> (in only 10 hours). + Made with <i class="icon ion-heart"></i> by <a href="https://kyzer.co/">Sin</a>. | + <span class="highlightable"><%= quote.text %> -<%= quote.author.name %></span> </footer> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" diff --git a/views/profile.ejs b/views/profile.ejs index ff15c3b..3d3e214 100644 --- a/views/profile.ejs +++ b/views/profile.ejs @@ -121,11 +121,12 @@ <input type="submit" style="font-size: 16px;"> </form> --> </h4> + <form action="/logout" method="POST" class="my-4"> <div class="form-group"> <button type="submit" class="btn btn-danger">Logout</button> - <a href="#"> - <button type="button" class="btn btn-primary" style="float: right;">Coming soon!</button> + <a href="/change-password"> + <button type="button" class="btn btn-primary" style="float: right;">Change password</button> </a> </div> </form> @@ -137,7 +138,8 @@ <footer class="hideme"> <link rel="stylesheet" type="text/css" href="//code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" /> - Made with <i class="icon ion-heart"></i> by <a href="https://kyzer.co/">Sin</a> (in only 10 hours). + Made with <i class="icon ion-heart"></i> by <a href="https://kyzer.co/">Sin</a>. | + <span class="highlightable"><%= quote.text %> -<%= quote.author.name %></span> </footer> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" diff --git a/views/signup.ejs b/views/signup.ejs index 3d1356b..25d222d 100644 --- a/views/signup.ejs +++ b/views/signup.ejs @@ -152,7 +152,8 @@ <footer class="hideme"> <link rel="stylesheet" type="text/css" href="//code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" /> - Made with <i class="icon ion-heart"></i> by <a href="https://kyzer.co/">Sin</a> (in only 10 hours). + Made with <i class="icon ion-heart"></i> by <a href="https://kyzer.co/">Sin</a>. | + <span class="highlightable"><%= quote.text %> -<%= quote.author.name %></span> </footer> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" |