This repository has been archived on 2024-06-06. You can view files and clone it, but cannot push or open issues or pull requests.
vitrine/public/bundle-example.html
2022-01-06 15:17:14 +01:00

166 lines
5.1 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bundle example presentation</title>
<meta name="author" content="Josh Dzielak">
<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="./reveal-js/css/reset.css">
<link rel="stylesheet" href="./reveal-js/css/reveal.css"><link rel="stylesheet" href="./reveal-js/css/theme/night.css" id="theme">
<link rel="stylesheet" href="./highlight-js/default.min.css">
<style>
.reveal section pre {
box-shadow: none;
margin-top: 25px;
margin-bottom: 25px;
border: 1px solid lightgrey;
}
.reveal section pre:hover {
border: 1px solid grey;
transition: border 0.3s ease;
}
.reveal section pre > code {
padding: 10px;
}
.reveal table {
font-size: 0.65em;
}
.reveal section.side-by-side h1 {
position: absolute;
}
.reveal section.side-by-side h1:first-of-type {
left: 25%;
}
.reveal section.side-by-side h1:nth-of-type(2) {
right: 25%;
}
.reveal section[data-background-image] a,
.reveal section[data-background-image] p,
.reveal section[data-background-image] h2 {
color: white;
}
.reveal section[data-background-image] a {
text-decoration: underline;
}
</style>
</head>
<body>
<div class="reveal">
<div class="slides">
<section><h1 id="page-bundles">Page Bundles</h1>
</section><section>
<p><a href="https://gohugo.io/content-management/page-bundles/">Hugo page bundles</a> are a useful way to organize content.</p>
</section><section>
<p>To create a reveal-hugo presentation from the <code>index.md</code> file of a leaf page bundle, you need to specify the layout manually.</p>
<pre><code class="language-toml">layout = &quot;bundle&quot;
</code></pre>
</section><section>
<p>Why? By default, reveal-hugo doesn&rsquo;t create pages for single template types (foo.md), only for list template types (_index.md).</p>
</section><section>
<p>This technique can also be used to output an HTML file for any section of a presentation, should you need to.</p>
</section>
<section><p>If more markdown files are present in the bundle, their contents will be added to the presentation.</p>
</section><section>
<p>Specify <code>weight</code> in the frontmatter if it&rsquo;s necessary to order them.</p>
</section><section>
<p>If you don&rsquo;t want them to be included, specify <code>layout = &quot;list&quot;</code> in the front matter instead of <code>layout = &quot;bundle&quot;</code>.</p>
</section><section>
<h2 id="the-end">THE END</h2>
</section>
</div>
<div class="line top"></div>
<div class="line bottom"></div>
<div class="line left"></div>
<div class="line right"></div>
</div>
<script type="text/javascript" src=./reveal-hugo/object-assign.js></script>
<a href="./reveal-js/css/print/" id="print-location" style="display: none;"></a>
<script type="text/javascript">
var printLocationElement = document.getElementById('print-location');
var link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = printLocationElement.href + (window.location.search.match(/print-pdf/gi) ? 'pdf.css' : 'paper.css');
document.getElementsByTagName('head')[0].appendChild(link);
</script>
<script type="application/json" id="reveal-hugo-site-params">{"history":true,"templates":{"grey":{"background":"#424242","transition":"convex"}}}</script>
<script type="application/json" id="reveal-hugo-page-params">{"margin":0.2,"theme":"night"}</script>
<script src="./reveal-js/js/reveal.js"></script>
<script type="text/javascript">
function camelize(map) {
if (map) {
Object.keys(map).forEach(function(k) {
newK = k.replace(/(\_\w)/g, function(m) { return m[1].toUpperCase() });
if (newK != k) {
map[newK] = map[k];
delete map[k];
}
});
}
return map;
}
var revealHugoDefaults = { center: true, controls: true, history: true, progress: true, transition: "slide" };
var revealHugoSiteParams = JSON.parse(document.getElementById('reveal-hugo-site-params').innerHTML);
var revealHugoPageParams = JSON.parse(document.getElementById('reveal-hugo-page-params').innerHTML);
var options = Object.assign({},
camelize(revealHugoDefaults),
camelize(revealHugoSiteParams),
camelize(revealHugoPageParams));
Reveal.initialize(options);
</script>
<script type="text/javascript" src="./reveal-js/plugin/markdown/marked.js"></script>
<script type="text/javascript" src="./reveal-js/plugin/markdown/markdown.js"></script>
<script type="text/javascript" src="./reveal-js/plugin/highlight/highlight.js"></script>
<script type="text/javascript" src="./reveal-js/plugin/zoom-js/zoom.js"></script>
<script type="text/javascript" src="./reveal-js/plugin/notes/notes.js"></script>
<script type="text/javascript">
Reveal.addEventListener('slidechanged', function(event) {
console.log("🎞️ Slide is now " + event.indexh);
});
</script>
</body>
</html>