Use a baseof template for better organization

This commit is contained in:
dzello 2018-04-26 16:20:41 -07:00
parent 6d2a5bab37
commit 10fcf53bcf
2 changed files with 67 additions and 64 deletions

View file

@ -0,0 +1,54 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{{ .Site.Title }}</title>
<meta name="description" content="{{ .Site.Params.Description }}">
<meta name="author" content="{{ .Site.Author.name }}">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="{{ "css/reveal.css" | relURL }}">
{{ $theme := or .Site.Params.reveal_theme "black" }}
<link rel="stylesheet" href="{{ printf "/css/theme/%s.css" $theme | relURL }}" id="theme">
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="{{ "/lib/css/zenburn.css" | relURL }}">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? '{{ "css/print/pdf.css" | relURL }}' : '{{ "css/print/paper.css" | relURL }}';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
<!--[if lt IE 9]>
<script src="{{ "lib/js/html5shiv.js" | relURL }}"></script>
<![endif]-->
</head>
<body>
{{ block "main" . }}
{{ end }}
<script src="{{ "/lib/js/head.min.js" | relURL }}"></script>
<script src="{{ "/js/reveal.js" | relURL }}"></script>
<script>
// More info https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
transition: 'slide', // none/fade/slide/convex/concave/zoom
// More info https://github.com/hakimel/reveal.js#dependencies
dependencies: [
{ src: '{{ "lib/js/classList.js" | relURL }}', condition: function() { return !document.body.classList; } },
{ src: '{{ "plugin/markdown/marked.js" | relURL }}', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: '{{ "plugin/markdown/markdown.js" | relURL }}', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: '{{ "plugin/highlight/highlight.js" | relURL }}', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: '{{ "plugin/search/search.js" | relURL }}', async: true },
{ src: '{{ "plugin/zoom-js/zoom.js" | relURL }}', async: true },
{ src: '{{ "plugin/notes/notes.js" | relURL }}', async: true }
]
});
</script>
</body>
</html>

View file

@ -1,66 +1,15 @@
<!doctype html> {{ define "main" }}
<html lang="en"> <div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<head> <div class="slides">
<meta charset="utf-8"> <!-- Find all pages with a type of reveal -->
<title>{{ .Site.Title }}</title> {{ range (where .Data.Pages "Type" "reveal") }}
<meta name="description" content="{{ .Site.Params.Description }}"> <!-- Split the processed content by <hr /> tag -->
<meta name="author" content="{{ .Site.Author.name }}"> {{ range (split .Content "<hr />") }}
<meta name="apple-mobile-web-app-capable" content="yes"> <!-- Output the content as safe -->
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> <section>{{ . | safeHTML }}</section>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="{{ "css/reveal.css" | relURL }}">
{{ $theme := or .Site.Params.reveal_theme "black" }}
<link rel="stylesheet" href="{{ printf "/css/theme/%s.css" $theme | relURL }}" id="theme">
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="{{ "/lib/css/zenburn.css" | relURL }}">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? '{{ "css/print/pdf.css" | relURL }}' : '{{ "css/print/paper.css" | relURL }}';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
<!--[if lt IE 9]>
<script src="{{ "lib/js/html5shiv.js" | relURL }}"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<!-- Find all pages with a type of reveal -->
{{ range (where .Data.Pages "Type" "reveal") }}
<!-- Split the processed content by <hr /> tag -->
{{ range (split .Content "<hr />") }}
<!-- Output the content as safe -->
<section>{{ . | safeHTML }}</section>
{{ end }}
{{ end }} {{ end }}
</div> {{ end }}
</div> </div>
<script src="{{ "/lib/js/head.min.js" | relURL }}"></script> </div>
<script src="{{ "/js/reveal.js" | relURL }}"></script> {{ end }}
<script>
// More info https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
transition: 'slide', // none/fade/slide/convex/concave/zoom
// More info https://github.com/hakimel/reveal.js#dependencies
dependencies: [
{ src: '{{ "lib/js/classList.js" | relURL }}', condition: function() { return !document.body.classList; } },
{ src: '{{ "plugin/markdown/marked.js" | relURL }}', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: '{{ "plugin/markdown/markdown.js" | relURL }}', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: '{{ "plugin/highlight/highlight.js" | relURL }}', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: '{{ "plugin/search/search.js" | relURL }}', async: true },
{ src: '{{ "plugin/zoom-js/zoom.js" | relURL }}', async: true },
{ src: '{{ "plugin/notes/notes.js" | relURL }}', async: true }
]
});
</script>
</body>
</html>