Commit 6bf656970d9e4ccb1a46c78917844de6d72aad89
1 parent
cc539151
Exists in
master
and in
4 other branches
Use fieldset. Improved profile
Showing
8 changed files
with
66 additions
and
73 deletions
Show diff stats
app/assets/stylesheets/common.scss
@@ -20,18 +20,6 @@ body { | @@ -20,18 +20,6 @@ body { | ||
20 | float:right; | 20 | float:right; |
21 | } | 21 | } |
22 | 22 | ||
23 | -.profile_avatar_holder { | ||
24 | - float:left; | ||
25 | - width:60px; | ||
26 | - height:60px; | ||
27 | - margin-right:20px; | ||
28 | - img { | ||
29 | - width:60px; | ||
30 | - height:60px; | ||
31 | - background:#eee; | ||
32 | - } | ||
33 | -} | ||
34 | - | ||
35 | 23 | ||
36 | .visible_link, | 24 | .visible_link, |
37 | .author_link { | 25 | .author_link { |
app/assets/stylesheets/sections/header.scss
@@ -156,12 +156,7 @@ header { | @@ -156,12 +156,7 @@ header { | ||
156 | display: block; } } | 156 | display: block; } } |
157 | 157 | ||
158 | .account-links { | 158 | .account-links { |
159 | - background: #79C3E0; | ||
160 | - display: none; | ||
161 | border-radius: 5px; | 159 | border-radius: 5px; |
162 | - width: 100px; | ||
163 | - margin-top: 0; | ||
164 | - float: right; | ||
165 | box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); | 160 | box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); |
166 | position: relative; | 161 | position: relative; |
167 | &:before { | 162 | &:before { |
@@ -171,33 +166,33 @@ header { | @@ -171,33 +166,33 @@ header { | ||
171 | position: absolute; | 166 | position: absolute; |
172 | border: 5px solid transparent; | 167 | border: 5px solid transparent; |
173 | border-color: rgba(255, 255, 255, 0); | 168 | border-color: rgba(255, 255, 255, 0); |
174 | - border-bottom-color: #333; | 169 | + border-bottom-color: #555; |
175 | text-indent: -9999px; | 170 | text-indent: -9999px; |
176 | top: -10px; | 171 | top: -10px; |
177 | line-height: 0; | 172 | line-height: 0; |
178 | right: 10px; | 173 | right: 10px; |
179 | z-index: 10; } | 174 | z-index: 10; } |
180 | - background: #333; | 175 | + background: #555; |
181 | display: none; | 176 | display: none; |
182 | z-index: 100000; | 177 | z-index: 100000; |
183 | @include border-radius(4px); | 178 | @include border-radius(4px); |
184 | width: 100px; | 179 | width: 100px; |
185 | position: absolute; | 180 | position: absolute; |
186 | - right: 10px; | ||
187 | - top: 42px; | 181 | + right: 5px; |
182 | + top: 38px; | ||
188 | margin-top: 0; | 183 | margin-top: 0; |
189 | float: right; | 184 | float: right; |
190 | box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); | 185 | box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); |
191 | a { | 186 | a { |
192 | - color: #EEE; | ||
193 | - padding: 6px 10px; | 187 | + color: #fff; |
188 | + padding: 7px 10px; | ||
194 | display: block; | 189 | display: block; |
195 | text-shadow: none; | 190 | text-shadow: none; |
196 | - border-bottom: 1px solid #555; | 191 | + border-bottom: 1px solid #666; |
197 | font-size: 12px; | 192 | font-size: 12px; |
198 | &:hover { | 193 | &:hover { |
199 | - color:#eee; | ||
200 | - background: #444; | 194 | + color:#fff; |
195 | + background: #333; | ||
201 | } | 196 | } |
202 | } | 197 | } |
203 | } | 198 | } |
app/assets/stylesheets/sections/nav.scss
@@ -6,7 +6,7 @@ ul.main_menu { | @@ -6,7 +6,7 @@ ul.main_menu { | ||
6 | border-radius: 4px; | 6 | border-radius: 4px; |
7 | margin: auto; | 7 | margin: auto; |
8 | margin:30px 0; | 8 | margin:30px 0; |
9 | - border:1px solid #AAA; | 9 | + border:1px solid #BBB; |
10 | height:37px; | 10 | height:37px; |
11 | @include bg-gray-gradient; | 11 | @include bg-gray-gradient; |
12 | position:relative; | 12 | position:relative; |
app/assets/stylesheets/sections/profile.scss
app/views/keys/index.html.haml
app/views/profile/account.html.haml
1 | - if Gitlab.config.omniauth_enabled? | 1 | - if Gitlab.config.omniauth_enabled? |
2 | %fieldset | 2 | %fieldset |
3 | - %legend | ||
4 | - %h3.page_title Social Accounts | 3 | + %legend Social Accounts |
5 | .oauth_select_holder | 4 | .oauth_select_holder |
6 | %p.hint Tip: Click on icon to activate sigin with one of the following services | 5 | %p.hint Tip: Click on icon to activate sigin with one of the following services |
7 | - User.omniauth_providers.each do |provider| | 6 | - User.omniauth_providers.each do |provider| |
@@ -11,10 +10,9 @@ | @@ -11,10 +10,9 @@ | ||
11 | 10 | ||
12 | %fieldset | 11 | %fieldset |
13 | %legend | 12 | %legend |
14 | - %h3.page_title | ||
15 | - Private token | ||
16 | - %span.cred.right | ||
17 | - keep it secret! | 13 | + Private token |
14 | + %span.cred.right | ||
15 | + keep it secret! | ||
18 | .padded | 16 | .padded |
19 | = form_for @user, url: profile_reset_private_token_path, method: :put do |f| | 17 | = form_for @user, url: profile_reset_private_token_path, method: :put do |f| |
20 | .data | 18 | .data |
@@ -31,8 +29,7 @@ | @@ -31,8 +29,7 @@ | ||
31 | = f.submit 'Generate', class: "btn success btn-build-token" | 29 | = f.submit 'Generate', class: "btn success btn-build-token" |
32 | 30 | ||
33 | %fieldset | 31 | %fieldset |
34 | - %legend | ||
35 | - %h3.page_title Password | 32 | + %legend Password |
36 | = form_for @user, url: profile_password_path, method: :put do |f| | 33 | = form_for @user, url: profile_password_path, method: :put do |f| |
37 | .padded | 34 | .padded |
38 | %p.slead After successful password update you will be redirected to login page where you should login with new password | 35 | %p.slead After successful password update you will be redirected to login page where you should login with new password |
app/views/profile/design.html.haml
1 | = form_for @user, url: profile_update_path, remote: true, method: :put do |f| | 1 | = form_for @user, url: profile_update_path, remote: true, method: :put do |f| |
2 | - %div | ||
3 | - %h3.page_title Application theme | ||
4 | - %br | 2 | + %fieldset |
3 | + %legend Application theme | ||
5 | .themes_opts | 4 | .themes_opts |
6 | = label_tag do | 5 | = label_tag do |
7 | .prev | 6 | .prev |
@@ -23,19 +22,19 @@ | @@ -23,19 +22,19 @@ | ||
23 | %br | 22 | %br |
24 | .clearfix | 23 | .clearfix |
25 | 24 | ||
26 | - %h3.page_title Code review | ||
27 | - %br | ||
28 | - .themes_opts | ||
29 | - = label_tag do | ||
30 | - .prev | ||
31 | - = image_tag "white.png" | ||
32 | - = f.radio_button :dark_scheme, false | ||
33 | - White code preview | ||
34 | - = label_tag do | ||
35 | - .prev | ||
36 | - = image_tag "dark.png" | ||
37 | - = f.radio_button :dark_scheme, true | ||
38 | - Dark code preview | 25 | + %fieldset |
26 | + %legend Code review | ||
27 | + .themes_opts | ||
28 | + = label_tag do | ||
29 | + .prev | ||
30 | + = image_tag "white.png" | ||
31 | + = f.radio_button :dark_scheme, false | ||
32 | + White code preview | ||
33 | + = label_tag do | ||
34 | + .prev | ||
35 | + = image_tag "dark.png" | ||
36 | + = f.radio_button :dark_scheme, true | ||
37 | + Dark code preview | ||
39 | 38 | ||
40 | :javascript | 39 | :javascript |
41 | $(function(){ | 40 | $(function(){ |
app/views/profile/show.html.haml
1 | .profile_avatar_holder | 1 | .profile_avatar_holder |
2 | - = image_tag gravatar_icon(@user.email, 90), class: "styled_image" | 2 | + = image_tag gravatar_icon(@user.email, 90) |
3 | %h3.page_title | 3 | %h3.page_title |
4 | = @user.name | 4 | = @user.name |
5 | %br | 5 | %br |
@@ -19,21 +19,23 @@ | @@ -19,21 +19,23 @@ | ||
19 | .control-group | 19 | .control-group |
20 | = f.label :name, class: "control-label" | 20 | = f.label :name, class: "control-label" |
21 | .controls | 21 | .controls |
22 | - = f.text_field :name, class: "input-xlarge" | 22 | + = f.text_field :name, class: "input-xlarge", required: true |
23 | %span.help-block Enter your name, so people you know can recognize you. | 23 | %span.help-block Enter your name, so people you know can recognize you. |
24 | .control-group | 24 | .control-group |
25 | = f.label :email, class: "control-label" | 25 | = f.label :email, class: "control-label" |
26 | .controls | 26 | .controls |
27 | - = f.text_field :email, class: "input-xlarge" | 27 | + = f.text_field :email, class: "input-xlarge", required: true |
28 | %span.help-block We also use email for avatar detection. | 28 | %span.help-block We also use email for avatar detection. |
29 | 29 | ||
30 | .span5.right | 30 | .span5.right |
31 | - %div.tips | ||
32 | - %h6 Tips: | 31 | + %fieldset.tips |
32 | + %legend Tips: | ||
33 | %ul | 33 | %ul |
34 | + %li | ||
35 | + %p You can change your password on Account page | ||
34 | -unless Gitlab.config.disable_gravatar? | 36 | -unless Gitlab.config.disable_gravatar? |
35 | %li | 37 | %li |
36 | - %p.hint You can change your avatar at #{link_to "gravatar.com", "http://gravatar.com"} | 38 | + %p You can change your avatar at #{link_to "gravatar.com", "http://gravatar.com"} |
37 | 39 | ||
38 | - if Gitlab.config.omniauth_enabled? && @user.provider? | 40 | - if Gitlab.config.omniauth_enabled? && @user.provider? |
39 | %li | 41 | %li |
@@ -41,7 +43,6 @@ | @@ -41,7 +43,6 @@ | ||
41 | You can login through #{@user.provider.titleize}! | 43 | You can login through #{@user.provider.titleize}! |
42 | = link_to "click here to change", profile_account_path | 44 | = link_to "click here to change", profile_account_path |
43 | 45 | ||
44 | - %hr | ||
45 | .row | 46 | .row |
46 | .span7 | 47 | .span7 |
47 | .control-group | 48 | .control-group |
@@ -59,23 +60,22 @@ | @@ -59,23 +60,22 @@ | ||
59 | = f.text_area :bio, rows: 6, class: "input-xlarge", maxlength: 250 | 60 | = f.text_area :bio, rows: 6, class: "input-xlarge", maxlength: 250 |
60 | %span.help-block Tell us about yourself in fewer than 250 characters. | 61 | %span.help-block Tell us about yourself in fewer than 250 characters. |
61 | .span5.right | 62 | .span5.right |
62 | - .ui-box.white | ||
63 | - .ui-box-body | ||
64 | - %h4 | ||
65 | - Personal projects: | ||
66 | - %small.right | ||
67 | - %span= current_user.my_own_projects.count | ||
68 | - of | ||
69 | - %span= current_user.projects_limit | 63 | + %fieldset |
64 | + %legend | ||
65 | + Personal projects: | ||
66 | + %small.right | ||
67 | + %span= current_user.my_own_projects.count | ||
68 | + of | ||
69 | + %span= current_user.projects_limit | ||
70 | + .padded | ||
70 | .progress | 71 | .progress |
71 | .bar{style: "width: #{current_user.projects_limit_percent}%;"} | 72 | .bar{style: "width: #{current_user.projects_limit_percent}%;"} |
72 | 73 | ||
73 | - .ui-box.white | ||
74 | - .ui-box-body | ||
75 | - %h4 | ||
76 | - SSH public keys: | ||
77 | - %strong.right= link_to current_user.keys.count, keys_path | ||
78 | - | 74 | + %fieldset |
75 | + %legend | ||
76 | + SSH public keys: | ||
77 | + %strong.right= link_to current_user.keys.count, keys_path | ||
78 | + .padded | ||
79 | = link_to "Add Public Key", new_key_path, class: "btn small" | 79 | = link_to "Add Public Key", new_key_path, class: "btn small" |
80 | 80 | ||
81 | .form-actions | 81 | .form-actions |