summaryrefslogtreecommitdiff
path: root/views/index.ejs
diff options
context:
space:
mode:
Diffstat (limited to 'views/index.ejs')
-rw-r--r--views/index.ejs188
1 files changed, 127 insertions, 61 deletions
diff --git a/views/index.ejs b/views/index.ejs
index 04d1cce..48144ba 100644
--- a/views/index.ejs
+++ b/views/index.ejs
@@ -95,12 +95,14 @@
</div>
</nav>
- <div class="container my-5 hideme">
- <form action="/submitEntry" method="POST" class="my-4 form-inline">
+ <div class="container my-5">
+ <form action="/submitEntry" method="POST" class="my-4 form-inline hideme">
<div class="row">
<div class="col-sm">
<label for="transactionType" class="sr-only">Type of transaction</label>
- <select name="transactionType" id="transactionType" class="form-control mr-2" <% if (name === null) { %> disabled <% } %>>
+ <select name="transactionType" id="transactionType" class="form-control mr-2"
+ <% if (name === null) { %> disabled data-toggle="tooltip" data-placement="top"
+ title="Login to submit" <% } %>>
<option value="purchase">Purchase</option>
<option value="sale">Sale</option>
<option value="trade">Trade</option>
@@ -108,16 +110,21 @@
<label for="carsType" class="sr-only">Cars</label>
<input type="text" name="carsType" id="carsType" class="form-control mr-2"
- placeholder="Car(s)" min="2" max="16" required <% if (name === null) { %> disabled <% } %>>
+ placeholder="Car(s)" min="2" max="16" required <% if (name === null) { %> disabled
+ data-toggle="tooltip" data-placement="top"
+ title="Login to submit" <% } %>>
<label for="sellerType" class="sr-only">Seller, Buyer or Trader's Name</label>
<input type="text" name="sellerType" id="sellerType" class="form-control mr-2"
placeholder="Seller/ Buyer/ Trader's Name" min="1" max="50" required
- <% if (name === null) { %> disabled <% } %>>
+ <% if (name === null) { %> disabled data-toggle="tooltip" data-placement="top"
+ title="Login to submit" <% } %>>
<label for="priceType" class="sr-only">Price or Received Cars</label>
<input type="text" name="priceType" id="priceType" class="form-control mr-2"
placeholder="Price/ Received Car(s)" min="1" required <% if (name === null) { %> disabled
+ data-toggle="tooltip" data-placement="top"
+ title="Login to submit"
<% } %>>
<% if (name === null) { %>
@@ -131,116 +138,175 @@
</div>
</form>
- <div class="row">
+ <div class="row">
<div class="col-sm">
- <h3 id="white-txt">Purchases</h3>
+ <h3 id="white-txt" class="hideme">Purchases</h3>
<table class="table table-striped">
- <thead>
+ <thead class="hideme">
<tr>
- <th id="white-txt">Car(s)</th>
- <th id="white-txt">Seller</th>
- <th id="white-txt">Price</th>
- <th id="white-txt">TOS</th>
+ <th id="white-txt" class="hideme">Car(s)</th>
+ <th id="white-txt" class="hideme">Seller</th>
+ <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>
</tr>
</thead>
- <tbody>
+ <tbody class="hideme">
<% if (name === null) { %>
<tr>
- <td id="white-txt" class="highlightable">RX7</td>
- <td id="white-txt" class="highlightable">Sin</td>
- <td id="white-txt" class="highlightable">150000</td>
- <td id="white-txt" class="highlightable">2020-05-06T08:08:34.827Z</td>
+ <td id="white-txt" class="highlightable hideme">RX7</td>
+ <td id="white-txt" class="highlightable hideme">Sin</td>
+ <td id="white-txt" class="highlightable hideme">150000</td>
+ <td id="white-txt" class="highlightable hideme">2020-05-06T08:08:34.827Z</td>
</tr>
<% } else { %>
- <% loop.forEach(lp => { %>
+ <% if (loopCount < 1) { %>
<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"></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 { %>
+ <% loop.forEach(lp => { %>
+ <tr>
+ <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>
+ </tr>
+ <% }) %>
+ <% } %>
<% } %>
</tbody>
</table>
</div>
<div class="col-sm">
- <h3 id="white-txt">Sales</h3>
+ <h3 id="white-txt" class="hideme">Sales</h3>
<table class="table table-striped">
- <thead>
+ <thead class="hideme">
<tr>
- <th id="white-txt">Car(s)</th>
- <th id="white-txt">Buyer</th>
- <th id="white-txt">Price</th>
- <th id="white-txt">TOS</th>
+ <th id="white-txt" class="hideme">Car(s)</th>
+ <th id="white-txt" class="hideme">Buyer</th>
+ <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>
</tr>
</thead>
- <tbody>
+ <tbody class="hideme">
<% if (name === null) { %>
<tr>
- <td id="white-txt" class="highlightable">R34</td>
- <td id="white-txt" class="highlightable">Sin</td>
- <td id="white-txt" class="highlightable">180000</td>
- <td id="white-txt" class="highlightable">2020-05-04T02:02:56.8F9J</td>
+ <td id="white-txt" class="highlightable hideme">R34</td>
+ <td id="white-txt" class="highlightable hideme">Sin</td>
+ <td id="white-txt" class="highlightable hideme">180000</td>
+ <td id="white-txt" class="highlightable hideme">2020-05-04T02:02:56.8F9J</td>
</tr>
<% } else { %>
- <% loop2.forEach(lp => { %>
+ <% if (loop2Count < 1) { %>
<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"></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 { %>
+ <% loop2.forEach(lp => { %>
+ <tr>
+ <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>
+ </tr>
+ <% }) %>
+ <% } %>
<% } %>
</tbody>
</table>
</div>
<div class="col-sm">
- <h3 id="white-txt">Trades</h3>
+ <h3 id="white-txt" class="hideme">Trades</h3>
<table class="table table-striped">
- <thead>
+ <thead class="hideme">
<tr>
<th id="white-txt">Received Car(s)</th>
<th id="white-txt">Trader</th>
<th id="white-txt">Traded Car(s)</th>
- <th id="white-txt">TOS</th>
+ <th id="white-txt" data-toggle="tooltip" data-placement="top" title="Time of Sale">TOS</th>
</tr>
</thead>
- <tbody>
+ <tbody class="hideme">
<% 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>
<% } else { %>
- <% loop3.forEach(lp => { %>
+ <% if (loop3Count < 1) { %>
<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"></td>
+ <td id="white-txt" class="highlightable"></td>
+ <td id="white-txt" class="highlightable"></td>
+ <td id="white-txt" class="highlightable"></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>
+ </tr>
+ <% }) %>
+ <% } %>
<% } %>
</tbody>
</table>
</div>
</div>
- <div class="newest hideme" style="position: absolute; top: 5%; left: 5%;">
- <h1 id="white-txt">TODO:</h1>
- <ul style="position: relative; left: -25%;">
- <li id="white-txt">Add more API features</li>
- <li id="white-txt">Add delete and change features (lol)</li>
- <li id="white-txt">Add marketplace</li>
- <li id="white-txt">Add automated password, email and<br /> username change requests</li>
- <li id="white-txt">Add feature which imports old Sin's <br /> SS Logger desktop app data into web app.</li>
- </ul>
- </div>
+ <% if (name === 'sin') { %>
+ <div class="newest hideme" style="position: fixed; top: 5%; left: 5%;">
+ <table class="table table-striped">
+ <thead>
+ <tr>
+ <th id="white-txt">Users</th>
+ <th id="white-txt">Entries</th>
+ <th id="white-txt">Uptime</th>
+ </tr>
+ </thead>
+ <tbody>
+ <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>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <% } %>
+
+ <% if (req.session.exampleVideo) { %>
+ <div class="example-video__container hideme" style="position: absolute; bottom: 15px; left: 15px;">
+ <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>
+ </form>
+ <br />
+
+ <iframe src="https://streamable.com/e/669gny?autoplay=1" width="578" height="325" frameborder="0"
+ allowfullscreen id="example-video"></iframe>
+ </div>
+ <% } else { %>
+ <div class="example-video__container hideme" style="position: fixed; bottom: 15px; left: 15px;">
+ <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>
+ <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).