From 1d3906247a143e40512dd18c7075473d78086451 Mon Sep 17 00:00:00 2001 From: rainbow napkin Date: Sun, 15 Dec 2024 16:45:55 -0500 Subject: [PATCH] cleaned up profile.ejs --- src/views/partial/profile/badges.ejs | 18 +++++++++ src/views/partial/profile/bio.ejs | 21 +++++++++++ src/views/partial/profile/date.ejs | 16 ++++++++ src/views/partial/profile/image.ejs | 19 ++++++++++ src/views/partial/profile/settings.ejs | 27 +++++++++++++ src/views/partial/profile/signature.ejs | 21 +++++++++++ src/views/partial/profile/tokeCount.ejs | 24 ++++++++++++ src/views/profile.ejs | 50 +++---------------------- 8 files changed, 152 insertions(+), 44 deletions(-) create mode 100644 src/views/partial/profile/badges.ejs create mode 100644 src/views/partial/profile/bio.ejs create mode 100644 src/views/partial/profile/date.ejs create mode 100644 src/views/partial/profile/image.ejs create mode 100644 src/views/partial/profile/settings.ejs create mode 100644 src/views/partial/profile/signature.ejs create mode 100644 src/views/partial/profile/tokeCount.ejs diff --git a/src/views/partial/profile/badges.ejs b/src/views/partial/profile/badges.ejs new file mode 100644 index 0000000..ebd15c8 --- /dev/null +++ b/src/views/partial/profile/badges.ejs @@ -0,0 +1,18 @@ + +
+

Badgeless?

+
\ No newline at end of file diff --git a/src/views/partial/profile/bio.ejs b/src/views/partial/profile/bio.ejs new file mode 100644 index 0000000..6d6b662 --- /dev/null +++ b/src/views/partial/profile/bio.ejs @@ -0,0 +1,21 @@ + + +

Bio: <%- profile.bio %>

+<% if(selfProfile){ %> +

(edit)

+<% } %> +
\ No newline at end of file diff --git a/src/views/partial/profile/date.ejs b/src/views/partial/profile/date.ejs new file mode 100644 index 0000000..35b9e09 --- /dev/null +++ b/src/views/partial/profile/date.ejs @@ -0,0 +1,16 @@ + +

Joined: <%- profile.date.toUTCString(); %>

\ No newline at end of file diff --git a/src/views/partial/profile/image.ejs b/src/views/partial/profile/image.ejs new file mode 100644 index 0000000..5d818a4 --- /dev/null +++ b/src/views/partial/profile/image.ejs @@ -0,0 +1,19 @@ + + +<% if(selfProfile){ %> +

(edit)

+<% } %> \ No newline at end of file diff --git a/src/views/partial/profile/settings.ejs b/src/views/partial/profile/settings.ejs new file mode 100644 index 0000000..480f99e --- /dev/null +++ b/src/views/partial/profile/settings.ejs @@ -0,0 +1,27 @@ + +
+ + + +
\ No newline at end of file diff --git a/src/views/partial/profile/signature.ejs b/src/views/partial/profile/signature.ejs new file mode 100644 index 0000000..85854d2 --- /dev/null +++ b/src/views/partial/profile/signature.ejs @@ -0,0 +1,21 @@ + + +

Signature: <%- profile.signature %>

+ <% if(selfProfile){ %> +

(edit)

+ <% } %> +
\ No newline at end of file diff --git a/src/views/partial/profile/tokeCount.ejs b/src/views/partial/profile/tokeCount.ejs new file mode 100644 index 0000000..b6d2361 --- /dev/null +++ b/src/views/partial/profile/tokeCount.ejs @@ -0,0 +1,24 @@ + + +

tokes: <%- profile.tokeCount %>

+ +
+
+ <% profile.tokes.forEach((count, toke) => { %> +

!<%- toke %>: <%- count %>

+ <% }); %> +
\ No newline at end of file diff --git a/src/views/profile.ejs b/src/views/profile.ejs index 076a121..4084ed4 100644 --- a/src/views/profile.ejs +++ b/src/views/profile.ejs @@ -30,52 +30,14 @@ along with this program. If not, see .--> <% if(profile){ %>

<%- profile.user %>

- - <% if(selfProfile){ %> -

(edit)

- <% } %> - -

tokes: <%- profile.tokeCount %>

- -
-
- <% profile.tokes.forEach((count, toke) => { %> -

!<%- toke %>: <%- count %>

- <% }); %> -
- -

Signature: <%- profile.signature %>

- <% if(selfProfile){ %> -

(edit)

- <% } %> -
- - -

Bio: <%- profile.bio %>

- <% if(selfProfile){ %> -

(edit)

- <% } %> -
- -

Joined: <%- profile.date.toUTCString(); %>

-
-

Badgeless?

-
+ <%- 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}); %>
- <% if(selfProfile){ %> - + <%- include('partial/profile/settings', {profile, selfProfile}); %> <% } %> <% }else if(user){ %>

Profile not found!