cleaned up profile.ejs
This commit is contained in:
parent
169b863965
commit
1d3906247a
18
src/views/partial/profile/badges.ejs
Normal file
18
src/views/partial/profile/badges.ejs
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
<!--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/>.-->
|
||||||
|
<div class="profile-item" id="profile-badge-shelf">
|
||||||
|
<h3 class="profile-item" id="no-badge-label">Badgeless?</h3>
|
||||||
|
</div>
|
||||||
21
src/views/partial/profile/bio.ejs
Normal file
21
src/views/partial/profile/bio.ejs
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
<!--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/>.-->
|
||||||
|
<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>
|
||||||
16
src/views/partial/profile/date.ejs
Normal file
16
src/views/partial/profile/date.ejs
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
<!--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/>.-->
|
||||||
|
<p class="profile-item" id="profile-creation-date">Joined: <%- profile.date.toUTCString(); %></p>
|
||||||
19
src/views/partial/profile/image.ejs
Normal file
19
src/views/partial/profile/image.ejs
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
<!--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/>.-->
|
||||||
|
<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>
|
||||||
|
<% } %>
|
||||||
27
src/views/partial/profile/settings.ejs
Normal file
27
src/views/partial/profile/settings.ejs
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
<!--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/>.-->
|
||||||
|
<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">
|
||||||
|
<button href="javascript:" class="account-settings danger-button" id="account-settings-delete-button">Delete Account</button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
21
src/views/partial/profile/signature.ejs
Normal file
21
src/views/partial/profile/signature.ejs
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
<!--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/>.-->
|
||||||
|
<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>
|
||||||
24
src/views/partial/profile/tokeCount.ejs
Normal file
24
src/views/partial/profile/tokeCount.ejs
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
<!--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/>.-->
|
||||||
|
<span class="profile-item profile-toke-count">
|
||||||
|
<p class="profile-item profile-toke-count">tokes: <%- profile.tokeCount %> </p>
|
||||||
|
<i class="profile-item bi-caret-left-fill profile-toke-count" id="toggle-toke-list"></i>
|
||||||
|
</span>
|
||||||
|
<div class="profile-item dynamic-container" id="profile-tokes">
|
||||||
|
<% profile.tokes.forEach((count, toke) => { %>
|
||||||
|
<p class="profile-item profile-toke" id='profile-tokes<%-toke%>'>!<%- toke %>: <%- count %></p>
|
||||||
|
<% }); %>
|
||||||
|
</div>
|
||||||
|
|
@ -30,52 +30,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
|
||||||
<% if(profile){ %>
|
<% if(profile){ %>
|
||||||
<div class="profile" id="profile-div">
|
<div class="profile" id="profile-div">
|
||||||
<h1 class="profile-item" id="profile-username"><%- profile.user %></h1>
|
<h1 class="profile-item" id="profile-username"><%- profile.user %></h1>
|
||||||
<img class="profile-item" id="profile-img" src="<%- profile.img %>">
|
<%- include('partial/profile/image', {profile, selfProfile}); %>
|
||||||
<% if(selfProfile){ %>
|
<%- include('partial/profile/tokeCount', {profile, selfProfile}); %>
|
||||||
<p class="profile-item-edit">(<a class="profile-item-edit" id="profile-img-edit" href="javascript:">edit</a>)</p>
|
<%- include('partial/profile/signature', {profile, selfProfile}); %>
|
||||||
<% } %>
|
<%- include('partial/profile/date', {profile, selfProfile}); %>
|
||||||
<span class="profile-item profile-toke-count">
|
<%- include('partial/profile/badges', {profile, selfProfile}); %>
|
||||||
<p class="profile-item profile-toke-count">tokes: <%- profile.tokeCount %> </p>
|
|
||||||
<i class="profile-item bi-caret-left-fill profile-toke-count" id="toggle-toke-list"></i>
|
|
||||||
</span>
|
|
||||||
<div class="profile-item dynamic-container" id="profile-tokes">
|
|
||||||
<% profile.tokes.forEach((count, toke) => { %>
|
|
||||||
<p class="profile-item profile-toke" id='profile-tokes<%-toke%>'>!<%- toke %>: <%- count %></p>
|
|
||||||
<% }); %>
|
|
||||||
</div>
|
</div>
|
||||||
<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){ %>
|
<% if(selfProfile){ %>
|
||||||
<p class="profile-item-edit">(<a class="profile-item-edit" id="profile-signature-edit" href="javascript:">edit</a>)</p>
|
<%- include('partial/profile/settings', {profile, selfProfile}); %>
|
||||||
<% } %>
|
|
||||||
</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.toUTCString(); %></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">
|
|
||||||
<button href="javascript:" class="account-settings danger-button" id="account-settings-delete-button">Delete Account</button>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<% } %>
|
<% } %>
|
||||||
<% }else if(user){ %>
|
<% }else if(user){ %>
|
||||||
<h1 class="profile-item" id="profile-error-label">Profile not found!</h1>
|
<h1 class="profile-item" id="profile-error-label">Profile not found!</h1>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue