Design changes

This commit is contained in:
Clayton Jensen
2020-05-28 19:36:17 -05:00
parent 1d3087fcad
commit b4407616f6

View File

@@ -15,10 +15,6 @@
<a style="border-radius: 50px;" class="nav-link active" id="home-tab" data-toggle="tab" href="#home"
role="tab" aria-controls="home" aria-selected="true"><i class="fas fa-home"></i> Home</a>
</li>
<li class="nav-item" id="updateStatistics">
<a style="border-radius: 50px;" class="nav-link" id="stats-tab" data-toggle="tab" href="#stats"
role="tab" aria-controls="stats" aria-selected="false"><i class="fas fa-server"></i> Statistics</a>
</li>
<li class="nav-item" id="updateShortens">
<a style="border-radius: 50px;" class="nav-link" id="urls-tab" data-toggle="tab" href="#urls"
role="tab" aria-controls="urls" aria-selected="false"><i class="fas fa-compress-alt"></i> URL
@@ -29,6 +25,11 @@
role="tab" aria-controls="images" aria-selected="false"><i class="fas fa-images"></i> Your
Images</a>
</li>
<li class="nav-item" id="updateStatistics">
<a style="border-radius: 50px;" class="nav-link" id="stats-tab" data-toggle="tab" href="#stats"
role="tab" aria-controls="stats" aria-selected="false"><i class="fas fa-server"></i>
Statistics</a>
</li>
<% if (user.administrator) { %>
<li class="nav-item">
<a style="border-radius: 50px;" class="nav-link" id="contact-tab" data-toggle="tab" href="#users"
@@ -41,41 +42,42 @@
<div class="tab-pane fade show active m-3" id="home" role="tabpanel" aria-labelledby="home-tab">
<h2>
Welcome back, <%= user.username %>!
<%if(user.administrator){%><span
class="badge badge-pill badge-danger">Admin</span>
<%}else{%><span
class="badge badge-pill badge-primary">User</span>
<%if(user.administrator){%><span class="badge badge-pill badge-danger">Admin</span>
<%}else{%><span class="badge badge-pill badge-primary">User</span>
<%}%>
</h2>
<p>You have <b><%= images.length %></b> images saved.</p>
<h4>API Token</h4>
<button type="button" class="btn btn-sm btn-primary" onclick="copyToken('<%=user.token%>')"
style="border-radius: 50px;"><i class="fas fa-copy"></i> Copy</button>
<button type="button" class="btn btn-sm btn-danger"
id="regenToken" style="border-radius: 50px;"><i class="fas fa-cog"></i> Regenerate</button>
<h4 style="margin-top:12px">Update your Profile</h4>
<form>
<div class="form-group">
<label for="usernameSave">Username</label>
<input value="<%= user.username %>" type="text" class="form-control" id="usernameSave"
placeholder="Username">
</div>
<hr>
<h4>API Token</h4>
<button type="button" class="btn btn-sm btn-primary" onclick="copyToken('<%=user.token%>')"
style="border-radius: 50px;"><i class="fas fa-copy"></i> Copy</button>
<button type="button" class="btn btn-sm btn-danger" id="regenToken"
style="border-radius: 50px;"><i class="fas fa-cog"></i> Regenerate</button>
<hr>
<h4 style="margin-top:12px">Update Your Profile</h4>
<form>
<div class="form-group">
<label for="usernameSave">Username</label>
<input value="<%= user.username %>" type="text" class="form-control" id="usernameSave"
placeholder="Username">
</div>
<div class="form-group">
<label for="passwordSave">Password</label>
<input type="password" class="form-control" id="passwordSave" placeholder="Password">
</div>
<button type="button" class="btn btn-primary" id="saveUser"
style="border-radius: 50px; width:100%;"><i class="fas fa-pen"></i> Save
</button>
</form>
<br>
<a class="btn btn-danger" href="/logout" style="border-radius: 50px; width:100%;"><i
class="fas fa-sign-out-alt"></i> Logout</a>
<div class="form-group">
<label for="passwordSave">Password</label>
<input type="password" class="form-control" id="passwordSave" placeholder="Password">
</div>
<button type="button" class="btn btn-primary" id="saveUser"
style="border-radius: 50px; width:100%;"><i class="fas fa-pen"></i> Save
</button>
</form>
<br>
<a class="btn btn-danger" href="/logout" style="border-radius: 50px; width:100%;"><i
class="fas fa-sign-out-alt"></i> Logout</a>
</div>
<div class="tab-pane fade m-3" id="stats" role="tabpanel" aria-labelledby="stats-tab">
<h3>Statistics</h3>
<h5 id="statsDescription"></h5>
<hr>
<div class="container-fluid pt-2">
<div class="row">
<div class="col-sm-6">
@@ -83,17 +85,17 @@
<div class="card-body">
<h5 class="card-title">Leaderboard (Images)</h5>
<p class="card-text">
<table class="table">
<thead>
<tr>
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Username</th>
<th scope="col">Images</th>
</tr>
</thead>
<tbody id="statsLeaderboardImages">
</tbody>
</table>
</tr>
</thead>
<tbody id="statsLeaderboardImages">
</tbody>
</table>
</p>
</div>
</div>
@@ -103,17 +105,17 @@
<div class="card-body">
<h5 class="card-title">Leaderboard (Views)</h5>
<p class="card-text">
<table class="table">
<thead>
<tr>
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Username</th>
<th scope="col">Views</th>
</tr>
</thead>
<tbody id="statsLeaderboardImageViews">
</tbody>
</table>
</tr>
</thead>
<tbody id="statsLeaderboardImageViews">
</tbody>
</table>
</p>
</div>
</div>
@@ -122,21 +124,21 @@
</div>
</div>
<div class="tab-pane fade m-3" id="images" role="tabpanel" aria-labelledby="images-tab">
<h3>Your Images</h3>
<h3>Browse Your Images</h3>
<hr>
<div class="container-fluid pt-2">
<div class="row" id="typexImages">
</div>
</div>
<nav aria-label="TypeX Images" class="m-2">
<ul class="pagination justify-content-center" id="typexImagePagination">
</ul>
<ul class="pagination justify-content-center" id="typexImagePagination"></ul>
</nav>
</div>
<div class="tab-pane fade m-3" id="urls" role="tabpanel" aria-labelledby="urls-tab">
<h3>Shorten a URL</h3>
<h3>Shorten A URL</h3>
<hr>
<form>
<div class="form-group">
<label for="urlToShorten">URL</label>
@@ -145,16 +147,16 @@
<button type="button" class="btn btn-primary" id="shortenURL"
onclick="shortURL('<%=user.token%>', document.getElementById('urlToShorten').value)"
style="border-radius: 50px; width:100%;">Shorten</button>
style="border-radius: 50px; width:25%;">Shorten</button>
</form>
<h3 style="margin-top:5px;">Your Shortens</h3>
<table class="table m-2">
<thead>
<tr>
<th scope="col">ID</th>
<th scope="col">Origin</th>
<th scope="col">Shortened</th>
</tr>
<tr>
<th scope="col">ID</th>
<th scope="col">Origin</th>
<th scope="col">Shortened</th>
</tr>
</thead>
<tbody id="shortensTableShortens">
</tbody>