File tree Expand file tree Collapse file tree 2 files changed +22
-10
lines changed Expand file tree Collapse file tree 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>(
183183 if layout. logo. is_empty( ) {
184184 format!( "<a href='{path}index.html'>\
185185 <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>",
188187 path=p,
189188 static_root_path=static_root_path,
190189 suffix=page. resource_suffix)
191190 } else {
192191 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>",
195193 p,
196194 layout. logo)
197195 }
Original file line number Diff line number Diff line change @@ -183,16 +183,24 @@ nav.sub {
183183}
184184
185185.logo-container {
186- height : 0 ;
187- padding-bottom : 50% ;
188- }
189-
190- .sidebar img {
186+ height : 100px ;
187+ width : 100px ;
188+ position : relative;
191189 margin : 20px auto;
192190 display : block;
193191 margin-top : 10px ;
194192}
195193
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+
196204.sidebar .location {
197205 border : 1px solid;
198206 font-size : 17px ;
@@ -1035,14 +1043,20 @@ span.since {
10351043 padding : 0 ;
10361044 }
10371045
1038- .sidebar img {
1046+ .sidebar . logo-container {
10391047 width : 35px ;
1048+ height : 35px ;
10401049 margin-top : 5px ;
10411050 margin-bottom : 5px ;
10421051 float : left;
10431052 margin-left : 50px ;
10441053 }
10451054
1055+ .sidebar .logo-container > img {
1056+ max-width : 35px ;
1057+ max-height : 35px ;
1058+ }
1059+
10461060 .sidebar-menu {
10471061 position : fixed;
10481062 z-index : 10 ;
You can’t perform that action at this time.
0 commit comments