-
Notifications
You must be signed in to change notification settings - Fork 225
/
me.jade
185 lines (170 loc) · 7.2 KB
/
me.jade
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
extends ../../layouts/default
block intro
block flash-messages
block content
.container-sm
.page-intro
p.lead Hi #{user.name.first}, these are your settings and
a(href=user.url) profile details
//- if nextMeetup
.alert.alert-info
span.entypo.entypo-calendar
| The next meetup has been announced -
a(href=nextMeetup.url).alert-link= nextMeetup._.startDate.format('dddd D MMM YYYY')
.page-content.tile.ph-2.pv-2.mb-2
+flash-messages(messages)
form(method='post', enctype='multipart/form-data', autocomplete='off', novalidate).form-horizontal
input(type='hidden', name='action', value='profile.details')
h3 Private Info
.form-group
label.col-sm-2.control-label Name
.col-sm-10: .form-row
.col-xs-6: input(type='text', name='name.first' value=user.name.first).form-control
.col-xs-6: input(type='text', name='name.last' value=user.name.last).form-control
.form-group
label.col-sm-2.control-label Email
.col-sm-10: input(type='email', name='email' value=user.email).form-control
.form-group
strong.col-sm-2.control-label Notify me
.col-sm-10
.checkbox: label
input(type='checkbox', name='notifications.meetups' value='true' checked=user.notifications.meetups)
| When there is a new meetup
.checkbox: label
input(type='checkbox', name='notifications.posts' value='true' checked=user.notifications.posts)
| When there is a new post
hr.mv-2
h3 Your Services
p.help-block.mb-2 You can authenticate yourself on the SydJS website with any of the services you connect. When connected, links to your Twitter and Github will be displayed on your profile.
//- Unconfigured Services
if !user.services.github.isConfigured
.form-group
label.col-sm-2.control-label Github
.col-sm-10
a(href='/auth/github', title='Connect your Github account').btn.btn-github
span.entypo-social.entypo-github
| Connect your Github account
if !user.services.twitter.isConfigured
.form-group
label.col-sm-2.control-label Twitter
.col-sm-10
a(href='/auth/twitter', title='Connect your Twitter account').btn.btn-twitter
span.entypo-social.entypo-twitter
| Connect your Twitter account
if !user.services.google.isConfigured
.form-group
label.col-sm-2.control-label Google
.col-sm-10
a(href='/auth/google', title='Connect your Google account').btn.btn-google
span.entypo-social.entypo-google-circles
| Connect your Google account
if !user.services.facebook.isConfigured
.form-group
label.col-sm-2.control-label Facebook
.col-sm-10
a(href='/auth/facebook', title='Connect your Google account').btn.btn-facebook
span.entypo-social.entypo-facebook
| Connect your Facebook account
//- Configured Services
if user.services.github.isConfigured || user.services.twitter.isConfigured || user.services.google.isConfigured || user.services.facebook.isConfigured
hr.line-dashed
if user.services.github.isConfigured
.form-group
label.col-sm-2.control-label Github
.col-sm-10.text-muted.faux-label
span.entypo-social.entypo-github
| Your account is connected.
a(href='?disconnect=github', title='Revoke authorization of your Github account') Disconnect
if user.services.twitter.isConfigured
.form-group
label.col-sm-2.control-label Twitter
.col-sm-10.text-muted.faux-label
span.entypo-social.entypo-twitter
| Your account is connected.
a(href='?disconnect=twitter', title='Revoke authorization of your Twitter account') Disconnect
if user.services.google.isConfigured
.form-group
label.col-sm-2.control-label Google
.col-sm-10.text-muted.faux-label
span.entypo-social.entypo-google-circles
| Your account is connected.
a(href='?disconnect=google', title='Revoke authorization of your Google account') Disconnect
if user.services.facebook.isConfigured
.form-group
label.col-sm-2.control-label Facebook
.col-sm-10.text-muted.faux-label
span.entypo-social.entypo-facebook
| Your account is connected.
a(href='?disconnect=facebook', title='Revoke authorization of your Facebook account') Disconnect
//- Public Info
hr.mv-2
h3 Public Info
.form-group
label.col-sm-2 Public
.col-sm-10
label.checkbox-inline
input(type='checkbox', name='isPublic', value='true', checked=user.isPublic ? 'true' : null)
| Show my profile on the SydJS website
.form-group
label.col-sm-2.control-label Website
.col-sm-10: input(type='text', name='website' value=user.website).form-control
.form-group
label.col-sm-2.control-label Bio
br
.text-muted (markdown)
.col-sm-10
textarea(name='bio', rows=5).form-control=user.bio.md
.form-group
label.col-sm-2.control-label Photo
.col-sm-10
if user.photo.exists
.row
.col-sm-3: img(src=user._.photo.thumbnail(120,120)).img-responsive
.col-sm-9: input(type='file', name='photo_upload')
else
input(type='file', name='photo_upload')
.form-group
label.col-sm-2.control-label Mentoring
.col-sm-10
.checkbox: label
input(type='checkbox', name='mentoring.available', value='true', checked=user.mentoring.available)
| Available as a mentor
.mentoring-fields
.form-group
.col-sm-10.col-sm-offset-2
.checkbox: label
input(type='checkbox', name='mentoring.free', value='true', checked=user.mentoring.free)
| For Free
.checkbox: label
input(type='checkbox', name='mentoring.paid', value='true', checked=user.mentoring.paid)
| For Payment
.checkbox: label
input(type='checkbox', name='mentoring.swap', value='true', checked=user.mentoring.swap)
| For Swap
.form-group
label.col-sm-2.control-label I have...
.col-sm-10
input(type='text', name='mentoring.have', placeholder='eg; Ruby, Python', value=user.mentoring.have).form-control
.form-group
label.col-sm-2.control-label I want...
.col-sm-10
input(type='text', name='mentoring.want', placeholder='eg; HTML, CSS', value= user.mentoring.want).form-control
hr.mv-2
button(type='submit', data-loading-text="Saving...").btn.btn-primary Save profile
.ui-reveal
.ui-reveal__initial
button(type='button').btn.btn-link.ui-reveal__trigger Change Password
.ui-reveal__hidden
form(method='post', autocomplete='off')
input(type='hidden', name='action', value='profile.password')
h3 Change password
.form-group
label(for='change-passwordNew').sr-only New Password
input(type='password', name='password', placeholder='New Password', id='change-passwordNew').form-control
.form-group
label(for='change-passwordConfirm').sr-only Confirm Password
input(type='password', name='password_confirm', placeholder='Confirm Password', id='signin-passwordConfirm').form-control
.form-group
button(type='submit', data-loading-text="Changing...").btn.btn-primary Change
block js
script(src='/js/views/me.js')