cleaned up profile.ejs

This commit is contained in:
rainbow napkin 2024-12-15 16:45:55 -05:00
parent 169b863965
commit 1d3906247a
8 changed files with 152 additions and 44 deletions

View 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>

View 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>

View 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>

View 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>
<% } %>

View 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>

View 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>

View 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>

View file

@ -30,52 +30,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<% 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>
<% } %>
<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>
<% }); %>
<%- include('partial/profile/image', {profile, selfProfile}); %>
<%- include('partial/profile/tokeCount', {profile, selfProfile}); %>
<%- include('partial/profile/signature', {profile, selfProfile}); %>
<%- include('partial/profile/date', {profile, selfProfile}); %>
<%- include('partial/profile/badges', {profile, selfProfile}); %>
</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){ %>
<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.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>
<%- include('partial/profile/settings', {profile, selfProfile}); %>
<% } %>
<% }else if(user){ %>
<h1 class="profile-item" id="profile-error-label">Profile not found!</h1>