I'm trying to make an entire presentation in Jupyter. I have tried some HTML-CSS in browser first where works almost fine:
HTML index.html
:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>title</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<div id="content-wrap">
<header>
<h1 id="firstSlideTitle" class="text">This is a long miltiline title for a random topic which nobody cares about!</h1>
<Lorem></Lorem>
</header>
<img src="pics/Python_logo.svg" id="firstSlidePic" alt="PythonLogo" class="center">
</div>
<footer>
<hr>
<img src="pics/by-nc-nd.svg">
<p id="twitter" class="text"><a><i class="fa fa-twitter">twitter</i></a></p>
</footer>
</body>
</html>
where you can find the python logo and the Creative Commons logo. and the CSS style.css
:
body {
position: relative;
min-height: 90vh;
}
#content-wrap {
padding-bottom: 2.5rem;
}
.text {
font-family: computer Modern;
}
#firstSlideTitle {
width: 80%;
font-size: 300%;
font-weight: bold;
text-align: center;
margin: auto;
margin-top: 40px;
border-style: solid;
border-radius: 15px;
}
#firstSlidePic {
width: 50%;
height: auto;
padding: 40px;
}
.center {
display: block;
margin-left: auto;
margin-right: auto;
}
footer {
position: absolute;
bottom: 0px;
width: 100%;
height: 2.5rem;
}
#twitter{
float: right;
width: 33.3%;
text-align: right;
}
which the result is almost OK:
I tried putting the CSS code inside a <style>...</style>
tag in a code cell in Jupyter, equipped with %%html
magic. Also had to change all the id
s to classe
s because Python-Jupyter can't handle the #
s, considering them as python comments. You can find the cell in this Github Gist. However, the result is more of a disappointment:
I have tried some workarounds but none of them are good enough. I would appreciate if you could help me know how to do it.