Fix image position and display
This commit is contained in:
parent
184e3a3f92
commit
9db0fd7fd6
2 changed files with 22 additions and 10 deletions
|
@ -183,15 +183,13 @@ pub fn render<T: fmt::Display, S: fmt::Display>(
|
|||
if layout.logo.is_empty() {
|
||||
format!("<a href='{path}index.html'>\
|
||||
<div class='logo-container'>\
|
||||
<img src='{static_root_path}rust-logo{suffix}.png' \
|
||||
alt='logo' width='100'></div></a>",
|
||||
<img src='{static_root_path}rust-logo{suffix}.png' alt='logo'></div></a>",
|
||||
path=p,
|
||||
static_root_path=static_root_path,
|
||||
suffix=page.resource_suffix)
|
||||
} else {
|
||||
format!("<a href='{}index.html'>\
|
||||
<div class='logo-container'>\
|
||||
<img src='{}' alt='logo' width='100'></div></a>",
|
||||
<div class='logo-container'><img src='{}' alt='logo'></div></a>",
|
||||
p,
|
||||
layout.logo)
|
||||
}
|
||||
|
|
|
@ -183,16 +183,24 @@ nav.sub {
|
|||
}
|
||||
|
||||
.logo-container {
|
||||
height: 0;
|
||||
padding-bottom: 50%;
|
||||
}
|
||||
|
||||
.sidebar img {
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
position: relative;
|
||||
margin: 20px auto;
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.logo-container > img {
|
||||
max-width: 100px;
|
||||
max-height: 100px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
display: block;
|
||||
}
|
||||
|
||||
.sidebar .location {
|
||||
border: 1px solid;
|
||||
font-size: 17px;
|
||||
|
@ -1035,14 +1043,20 @@ span.since {
|
|||
padding: 0;
|
||||
}
|
||||
|
||||
.sidebar img {
|
||||
.sidebar .logo-container {
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
float: left;
|
||||
margin-left: 50px;
|
||||
}
|
||||
|
||||
.sidebar .logo-container > img {
|
||||
max-width: 35px;
|
||||
max-height: 35px;
|
||||
}
|
||||
|
||||
.sidebar-menu {
|
||||
position: fixed;
|
||||
z-index: 10;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue