Wrap logo in container to prevent layout reflow
This commit is contained in:
parent
f998182fb4
commit
184e3a3f92
2 changed files with 9 additions and 2 deletions
|
@ -182,14 +182,16 @@ pub fn render<T: fmt::Display, S: fmt::Display>(
|
|||
let p = SlashChecker(&p);
|
||||
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'></a>",
|
||||
alt='logo' width='100'></div></a>",
|
||||
path=p,
|
||||
static_root_path=static_root_path,
|
||||
suffix=page.resource_suffix)
|
||||
} else {
|
||||
format!("<a href='{}index.html'>\
|
||||
<img src='{}' alt='logo' width='100'></a>",
|
||||
<div class='logo-container'>\
|
||||
<img src='{}' alt='logo' width='100'></div></a>",
|
||||
p,
|
||||
layout.logo)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue