1extends layout
2include mixins/flashmessages
3
4block content
5 +flashmessages()
6 .card
7 .flex.flex-center.m-v-md
8 h2.aubergine #{userInfo.username}'s Profile
9 hr
10
11 .flex.flex-center.m-v-md
12 if userInfo.avatar
13 img(src=`${userInfo.avatar}` alt=`${userInfo.username}'s avatar` class="avatar avatar-big")
14 div(class={"p-l-sm": userInfo.avatar })
15 p.no-margin
16 strong Username:
17 |#{userInfo.username}
18 p.no-margin
19 strong Role:
20 |#{userInfo.roleFormatted}
21 p.no-margin
22 strong Email:
23 a(href=`mailto:${userInfo.email}`).underline--hover #{userInfo.email}
24 p.no-margin
25 strong Website:
26 if (userInfo.website)
27 a(href=`${userInfo.website}`).underline--hover #{userInfo.website}
28 else
29 | -
30 p.no-margin
31 strong Joined on:
32 |#{userInfo.createdAtFormatted}
33
34 .m-t-sm
35 h3.aubergine Stats
36 hr
37 p.no-margin
38 strong Posts:
39 |#{postCount}
40 p.no-margin
41 strong Replies:
42 |#{replyCount}
43
44 if (sameUser)
45 .card
46 .flex.flex-center.m-v-md
47 h2.aubergine Change password
48 hr
49
50 form(action="/change-password" method="post" autocomplete="off" class="m-v-md")
51 .m-v-sm
52 label(for="password_old" class="hidden") Current password
53 input(
54 type='password' name='password_old' id="password_old"
55 required='' minlength='8' maxlength='255' autocomplete="off"
56 autofocus='' placeholder='Current password'
57 ).input-border.p-sm
58
59 .m-v-sm
60 label(for="password" class="hidden") New password
61 input(
62 type='password' name='password' id="password"
63 required='' minlength='8' maxlength='255'
64 autofocus='' placeholder='New password'
65 ).input-border.p-sm
66 .m-v-sm
67 label(for="password_confirm" class="hidden") Confirm new password
68 input(
69 type='password' name='password_confirm' id="password_confirm"
70 required='' minlength='8' maxlength='255'
71 autofocus='' placeholder='Confirm new password'
72 ).input-border.p-sm
73
74 .m-v-md
75 input(type='submit' value='Change password').button.button-primary
76
77 p.no-margin.font-small
78 strong Note:
79 | Changing passwords will log you out.
80
81 .card
82 .flex.flex-center.m-v-md
83 h2.aubergine Update profile
84 hr
85
86 form(action="/update-profile" method="post" autocomplete="off" class="m-v-md")
87 .m-v-sm
88 label(for="avatar") Avatar URL
89 input(
90 type='text' name='avatar' id="avatar" class="full-width"
91 placeholder='https://foo.com/images/my-avatar.png'
92 value=`${userInfo.avatar ? userInfo.avatar: ''}`
93 ).input-border.p-sm
94 .m-v-sm
95 label(for="website") Website
96 input(
97 type='text' name='website' id="website" class="full-width"
98 placeholder='https://mysite.com'
99 value=`${userInfo.website ? userInfo.website : ''}`
100 ).input-border.p-sm
101
102 .m-v-md
103 input(type='submit' value='Update profile').button.button-primary
104
105
106
107