How do I properly add logos to the top of the title slide?
After some trial and error, I came up with this which I add to the css file.
.title-slide.remark-slide-content:before{
position: absolute;
content:url(logo.svg);
height:60px;
}
This seems to work for one logo and it's positioned on the top right. I would like to add another logo on the top left too. Is there a better way to do this?
Our tip: Include the logo at the beginning and at the end of your presentation and avoid placing it on every slide. The only exceptions to this are self-running presentations. In this case, your logo should be visible on every slide.
Click the “Insert” tab along the top menu and then click the “Header & Footer” button to add a header to the slides if none is present.
One way would be to create a custom title slide using seal: false
with some divs.
---
title: "Presentation Ninja"
subtitle: "⚔<br/>with xaringan"
author: "Yihui Xie"
date: "2016/12/12"
output:
xaringan::moon_reader:
lib_dir: libs
nature:
highlightStyle: github
highlightLines: true
countIncrementalSlides: false
seal: false
---
<div class="my-logo-left"></div>
<div class="my-logo-right"></div>
# hello
---
CSS
.my-logo-left {
content: "";
position: absolute;
top: 15px;
left: 20px;
height: 40px;
width: 120px;
background-repeat: no-repeat;
background-size: contain;
background-image: url(https://www.r-project.org/logo/Rlogo.png);
}
.my-logo-right {
content: "";
position: absolute;
top: 15px;
right: 8px;
height: 40px;
width: 120px;
background-repeat: no-repeat;
background-size: contain;
background-image: url(https://www.r-project.org/logo/Rlogo.png);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With