Skip to content

Instantly share code, notes, and snippets.

@brennop
Last active March 14, 2020 15:28
Show Gist options
  • Save brennop/f75b7ba1ce575f3b8a764f04e36faadf to your computer and use it in GitHub Desktop.
Save brennop/f75b7ba1ce575f3b8a764f04e36faadf to your computer and use it in GitHub Desktop.
Pure markdown + css presentation
/*
Pure markdown + css presentation template
Usage:
1 - write your markdown
2 - compile using some tool that wraps sections in <section> tags
3 - include this css on the file
Example:
pandoc -s slides.md --css slides.css --section-divs
*/
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono&display=swap');
html {
overflow: hidden;
font-family: 'Roboto', sans-serif;
font-size: 24px;
}
body {
margin: 0;
height: 100vh;
scroll-snap-type: x mandatory;
overflow-x: scroll;
display: flex;
}
body > section {
width: 100vw;
box-sizing: border-box;
scroll-snap-align: start;
flex-shrink: 0;
padding: 3em;
display: flex;
flex-direction: column;
justify-content: center;
}
h1 {
margin-top: 0;
margin-bottom: 0.5em;
font-size: 2em;
}
img {
max-width: 100%;
max-height: 400px;
}
blockquote {
color: #666666;
margin: 2em 0;
padding-left: 2em;
border-left: 0.5em #EEE solid;
}
div.sourceCode {
font-family: Roboto Mono;
padding: 1em;
border-radius: 20px;
width: max-content;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment