Initial commit.
This commit is contained in:
commit
f0c91b4e55
78 changed files with 5054 additions and 0 deletions
83
src/views/profile.ejs
Normal file
83
src/views/profile.ejs
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
<!--Canopy - The next generation of stoner streaming software
|
||||
Copyright (C) 2024 Rainbownapkin and the TTN Community
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.-->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<%- include('partial/styles', {instance, user}); %>
|
||||
<% var selfProfile = user ? profile ? profile.user == user.user : false : false %>
|
||||
<link rel="stylesheet" type="text/css" href="/css/profile.css">
|
||||
<% if(profile){ %>
|
||||
<title><%= instance %> - Profile: <%= profile.user %></title>
|
||||
<% } else { %>
|
||||
<title><%= instance %> - Profile: Logged Out</title>
|
||||
<% } %>
|
||||
</head>
|
||||
<body>
|
||||
<%- include('partial/navbar', {user}); %>
|
||||
<% if(profile){ %>
|
||||
<div class="profile" id="profile-div">
|
||||
<h1 class="profile-item" id="profile-username"><%= profile.user %></h1>
|
||||
<img class="profile-item" id="profile-img" src="<%= profile.img %>">
|
||||
<% if(selfProfile){ %>
|
||||
<p class="profile-item-edit">(<a class="profile-item-edit" id="profile-img-edit" href="javascript:">edit</a>)</p>
|
||||
<% } %>
|
||||
<p class="profile-item" id="profile-tokes">tokes: <%= profile.tokes %> (Not yet implemented)</p>
|
||||
|
||||
<span class="profile-item" id="profile-signature">
|
||||
<p class="profile-item profile-item-label" id="profile-signature-label">Signature: <span class="profile-content" id="profile-signature-content"><%= profile.signature %></span></p>
|
||||
<% if(selfProfile){ %>
|
||||
<p class="profile-item-edit">(<a class="profile-item-edit" id="profile-signature-edit" href="javascript:">edit</a>)</p>
|
||||
<% } %>
|
||||
</span>
|
||||
|
||||
<span class="profile-item" id="profile-bio">
|
||||
<p class="profile-item profile-item-label" id="profile-bio-label">Bio: <span class="profile-content" id="profile-bio-content"><%= profile.bio %></span></p>
|
||||
<% if(selfProfile){ %>
|
||||
<p class="profile-item-edit">(<a class="profile-item-edit" id="profile-bio-edit" href="javascript:">edit</a>)</p>
|
||||
<% } %>
|
||||
</span>
|
||||
|
||||
<p class="profile-item" id="profile-creation-date">Joined: <%= profile.date %></p>
|
||||
<div class="profile-item" id="profile-badge-shelf">
|
||||
<h3 class="profile-item" id="no-badge-label">Badgeless?</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% if(selfProfile){ %>
|
||||
<div class="account-settings" id="account-settings-div">
|
||||
<h3 class="account-settings" id="account-settings-label">Account Settings</h3>
|
||||
<span class="account-settings-password-reset" id="account-settings-password-reset-div">
|
||||
<h4 class="account-settings-password-reset" id="account-settings-password-reset-label">Password Reset:</h4>
|
||||
<input class="account-settings-password-reset" id="account-settings-password-reset-old" placeholder="Current Password" type="password">
|
||||
<input class="account-settings-password-reset" id="account-settings-password-reset-new" placeholder="New Password" type="password">
|
||||
<input class="account-settings-password-reset" id="account-settings-password-reset-confirm" placeholder="Confirm New Password" type="password">
|
||||
</span>
|
||||
<span class="account-settings" id="account-settings-delete">
|
||||
<a href="javascript:" class="account-settings" id="account-settings-delete-link">Delete Account</a>
|
||||
</span>
|
||||
</div>
|
||||
<% } %>
|
||||
<% }else if(user){ %>
|
||||
<h1 class="profile-item" id="profile-error-label">Profile not found!</h1>
|
||||
<% } else {%>
|
||||
<h1 class="profile-item" id="profile-error-label">Please login to view your profile!</h1>
|
||||
<% } %>
|
||||
</body>
|
||||
<footer>
|
||||
<%- include('partial/scripts', {user}); %>
|
||||
<script src="/js/profile.js"></script>
|
||||
</footer>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue