File tree Expand file tree Collapse file tree 2 files changed +36
-14
lines changed Expand file tree Collapse file tree 2 files changed +36
-14
lines changed Original file line number Diff line number Diff line change 25
25
// Meta
26
26
</p>
27
27
</div>
28
+ <a class="author-profile__edit-button">Edit Profile</a>
28
29
</div>
29
30
*/
30
31
31
32
.author-profile {
32
- padding-right : $spacing-unit ;
33
+ padding-bottom : $spacing-unit ;
33
34
34
- @media only screen and (max-width : $desktop ){
35
+ @media only screen and (max-width : $desktop ) and ( min-width : $mobile ) {
35
36
padding : 0 0 ($spacing-unit * 1.5 ) 0 ;
37
+ display : flex ;
38
+ align-items : center ;
36
39
37
- img {
40
+ img {
41
+ height : 175px ;
42
+ margin-right : $spacing-unit ;
43
+ }
44
+ }
45
+
46
+ @media only screen and (max-width : $mobile ) {
47
+ img {
38
48
display : none ;
49
+ margin-right : 0 ;
39
50
}
40
51
}
41
52
42
53
h1 .author-profile__name {
43
- padding : 10px 0 ;
44
- border-top : 2px solid $border-color ;
45
- border-bottom : 2px solid $border-color ;
46
- margin : 20px 0 ;
47
- word-break : break-all ;
54
+ @include h2 ;
55
+ overflow : hidden ;
56
+ text-overflow : ellipsis ;
57
+ padding : $spacing-unit 0 $spacing-unit / 2 ;
48
58
49
59
@media only screen and (max-width : $desktop ){
50
60
border-top : 0 ;
56
66
& __meta {
57
67
font-style : italic ;
58
68
}
69
+
70
+ & __edit-button {
71
+ margin-top : $spacing-unit ;
72
+ width : 100% ;
73
+ text-align : center ;
74
+ }
59
75
}
Original file line number Diff line number Diff line change 22
22
< div class ="author-profile ">
23
23
{% set alt = "Avatar for {} from gravatar.com".format(user.name|default(user.username, true)) %}
24
24
< img src ="{{ gravatar(user.email, size=225) }} " alt ="{{ alt }} " title ="{{ alt }} ">
25
- < h1 class ="author-profile__name "> {{ user.name|default(user.username, true) }}</ h1 >
26
- < div class ="author-profile__meta ">
27
- < p > < i class ="fa fa-user-circle " aria-hidden ="true "> </ i > {{ user.username }}</ p >
28
- {% if user.date_joined %}
29
- < p > < i class ="fa fa-calendar-o " aria-hidden ="true "> </ i > Joined on {{ user.date_joined|format_date() }}</ p >
30
- {% endif %}
25
+ < div >
26
+ < h1 class ="author-profile__name "> {{ user.name|default(user.username, true) }}</ h1 >
27
+ < div class ="author-profile__meta ">
28
+ < p > < i class ="fa fa-user-circle " aria-hidden ="true "> </ i > {{ user.username }}</ p >
29
+ {% if user.date_joined %}
30
+ < p > < i class ="fa fa-calendar-o " aria-hidden ="true "> </ i > Joined on {{ user.date_joined|format_date() }}</ p >
31
+ {% endif %}
32
+ </ div >
33
+
34
+ <!-- if this user is logged in -->
35
+ < a href ="{{ request.route_path('manage.profile') }} " class ="button button--primary author-profile__edit-button "> Edit Profile</ a >
36
+ <!-- endif -->
31
37
</ div >
32
38
</ div >
33
39
</ div >
You can’t perform that action at this time.
0 commit comments