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/index.ejs | |
| 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/index.ejs')
| -rw-r--r-- | views/index.ejs | 90 |
1 files changed, 67 insertions, 23 deletions
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" |