File tree 2 files changed +22
-10
lines changed
2 files changed +22
-10
lines changed Original file line number Diff line number Diff line change @@ -183,15 +183,13 @@ pub fn render<T: fmt::Display, S: fmt::Display>(
183
183
if layout. logo. is_empty( ) {
184
184
format!( "<a href='{path}index.html'>\
185
185
<div class='logo-container'>\
186
- <img src='{static_root_path}rust-logo{suffix}.png' \
187
- alt='logo' width='100'></div></a>",
186
+ <img src='{static_root_path}rust-logo{suffix}.png' alt='logo'></div></a>",
188
187
path=p,
189
188
static_root_path=static_root_path,
190
189
suffix=page. resource_suffix)
191
190
} else {
192
191
format!( "<a href='{}index.html'>\
193
- <div class='logo-container'>\
194
- <img src='{}' alt='logo' width='100'></div></a>",
192
+ <div class='logo-container'><img src='{}' alt='logo'></div></a>",
195
193
p,
196
194
layout. logo)
197
195
}
Original file line number Diff line number Diff line change @@ -183,16 +183,24 @@ nav.sub {
183
183
}
184
184
185
185
.logo-container {
186
- height : 0 ;
187
- padding-bottom : 50% ;
188
- }
189
-
190
- .sidebar img {
186
+ height : 100px ;
187
+ width : 100px ;
188
+ position : relative;
191
189
margin : 20px auto;
192
190
display : block;
193
191
margin-top : 10px ;
194
192
}
195
193
194
+ .logo-container > img {
195
+ max-width : 100px ;
196
+ max-height : 100px ;
197
+ position : absolute;
198
+ left : 50% ;
199
+ top : 50% ;
200
+ transform : translate (-50% , -50% );
201
+ display : block;
202
+ }
203
+
196
204
.sidebar .location {
197
205
border : 1px solid;
198
206
font-size : 17px ;
@@ -1035,14 +1043,20 @@ span.since {
1035
1043
padding : 0 ;
1036
1044
}
1037
1045
1038
- .sidebar img {
1046
+ .sidebar . logo-container {
1039
1047
width : 35px ;
1048
+ height : 35px ;
1040
1049
margin-top : 5px ;
1041
1050
margin-bottom : 5px ;
1042
1051
float : left;
1043
1052
margin-left : 50px ;
1044
1053
}
1045
1054
1055
+ .sidebar .logo-container > img {
1056
+ max-width : 35px ;
1057
+ max-height : 35px ;
1058
+ }
1059
+
1046
1060
.sidebar-menu {
1047
1061
position : fixed;
1048
1062
z-index : 10 ;
You can’t perform that action at this time.
0 commit comments