From 8e9ef5ba62b8bee028428384ad5666e245eb854c Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Sun, 17 Feb 2019 21:53:36 +0100 Subject: content update --- slides/vendor/slides.css | 223 ----------------------------------------------- slides/vendor/slides.js | 140 ----------------------------- 2 files changed, 363 deletions(-) delete mode 100644 slides/vendor/slides.css delete mode 100644 slides/vendor/slides.js (limited to 'slides/vendor') diff --git a/slides/vendor/slides.css b/slides/vendor/slides.css deleted file mode 100644 index 36d22da..0000000 --- a/slides/vendor/slides.css +++ /dev/null @@ -1,223 +0,0 @@ -@charset "utf-8"; -@import url("https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900&subset=latin-ext"); - -* { - box-sizing: border-box; - background-color: transparent; - margin: 0; - padding: 0; - border: 0; - outline: none; - text-decoration: none; - position: relative; - box-shadow: none; - -moz-osx-font-smoothing: grayscale !important; - text-rendering: optimizeLegibility !important; - -webkit-font-smoothing: antialiased !important; -} - -body { - font-family: "Roboto", sans-serif; - color: #222; - font-size: 24px; - margin: 0; - padding: 0; - line-height: 270%; - font-weight: 400; - color: #111; -} - -.wrapper { - overflow: auto; -} - -a { - color: crimson; - font-weight: 500; -} - -img { - max-width: 100%; - margin-top: 30px; -} - -table { - border-collapse: collapse; - border-spacing: 0; -} - -section { - padding: 70px 100px; -} - -nav { - position: fixed; - right: 50px; - bottom: 20px; - font-size: 80%; - font-weight: 500; -} - -figcaption { - color: #888; - font-size: 80%; - margin: 0; - padding: 0; - line-height: 0; - font-weight: 600; -} - -hr { - border-top: 3px solid #eee; - margin: 50px 0 40px 0; -} - -ul, -ol { - margin-left: 30px; -} - -ol { - list-style-type: lower-roman; -} - -h1, -h2, -h3, -h4, -h5, -h6 { - margin: 0 0 50px 0; - font-weight: 700; - display: block; - color: #000; -} - -h1 { - font-size: 300%; - margin-bottom: 100px; - line-height: 130%; -} - -h2 { - font-size: 200%; -} - -h3 { - font-size: 160%; - margin-bottom: 20px; -} - -h4 { - font-size: 140%; - margin-bottom: 20px; -} - -h5 { - font-size: 120%; - margin-bottom: 20px; -} - -h6 { - font-size: 100%; - margin-bottom: 20px; -} - -p { - display: block; - margin: 15px auto; - line-height: 160%; - color: inherit; -} - -q { - display: inline-block; - font-size: 200%; - font-weight: 600; - padding: 100px 0 30px 0; -} - -/*grid*/ -.grid { - display: grid; - grid-column-gap: 20px; - grid-row-gap: 20px; - text-align: left; -} - -.grid>* { - border: 0px dotted black; -} - -.col-1-1 { - grid-template-columns: 1fr 1fr; -} - -.col-1-2 { - grid-template-columns: 1fr 2fr; -} - -.col-2-1 { - grid-template-columns: 2fr 1fr; -} - -/* aligments */ -.left { - text-align: left; -} - -.right { - text-align: right; -} - -.center { - text-align: center; - margin-left: auto; - margin-right: auto; -} - -.top { - vertical-align: top; -} - -.middle { - vertical-align: middle; -} - -.bottom { - vertical-align: bottom; -} - -.full-width { - width: 100%; -} - -/* other */ -.hide { - display: none; -} - -.show { - display: block; -} - -/* presentation mode */ -.wrapper:-webkit-full-screen { - width: 100%; - height: 100%; - background: #fff; - padding: 50px; - font-size: 28px; - line-height: 250%; -} - -/* prism line numbers */ -pre[class*=language-] { - display: block; - background: #fff; - padding: 0; - margin-bottom: 20px; - font-family: 'Courier New', Courier, monospace; - font-size: 90%; - font-weight: 500; -} diff --git a/slides/vendor/slides.js b/slides/vendor/slides.js deleted file mode 100644 index c987e51..0000000 --- a/slides/vendor/slides.js +++ /dev/null @@ -1,140 +0,0 @@ -window.addEventListener('load', function(evt) { - - let main = document.querySelector('main'); - let nav = document.querySelector('nav'); - let wrapper = document.querySelector('div.wrapper'); - let hash = window.location.hash.slice(1, window.location.hash.length); - - if (hash.length > 0) { - - fetch(`presentations/${hash}/default.pug`).then(function(response) { - response.text().then(function(template) { - if (response.status == 200) { - main.innerHTML = jade.render(template, {}); - initSlideshow(); - } else { - main.innerHTML = '

Presentation does not exists!

'; - } - }).catch(function(error) { - console.log(error); - }); - }); - - fetch(`presentations/${hash}/meta.json`).then(function(response) { - response.json().then(function(data) { - document.title = data.title; - }).catch(function(error) { - console.log(error); - }); - }); - - } - - function initSlideshow() { - - // mathjax formulas - MathJax.Hub.Config({ - //displayAlign: 'left', - extensions: ['tex2jax.js'], - jax: ['input/TeX', 'output/SVG'], - tex2jax: { - skipTags: ['script', 'noscript', 'style', 'textarea', 'code'], - inlineMath: [ - ['$', '$'], - ["\\(", "\\)"] - ], - displayMath: [ - ['$$', '$$'], - ["\\[", "\\]"] - ], - } - }); - MathJax.Hub.Configured(); - - // syntax highlighting - Prism.highlightAll(); - - // initializes slides - function showSlide(slides, op) { - let tmpIdx = currentIdx + op; - if (tmpIdx >= 0 && tmpIdx < slides.length) { - slides.forEach(function(slide) { - slide.classList.add('hide'); - }); - slides[tmpIdx].classList.remove('hide'); - window.scrollTo(0, 0); - nav.innerHTML = `${tmpIdx+1} / ${slides.length}`; - currentIdx = tmpIdx; - } - } - - // fixes images relative path - document.querySelectorAll('img').forEach(function(image) { - image.src = `presentations/${hash}/${image.getAttribute('src')}`; - }); - - let slides = document.querySelectorAll('section'); - let currentIdx = 0; - showSlide(slides, currentIdx); - - document.addEventListener('keydown', function(evt) { - switch (evt.code) { - case 'ArrowRight': - { - showSlide(slides, 1); - break; - } - case 'ArrowLeft': - { - showSlide(slides, -1); - break; - } - case 'KeyF': - { - if (wrapper.requestFullscreen) { - wrapper.requestFullscreen(); - } else if (wrapper.mozRequestFullScreen) { - wrapper.mozRequestFullScreen(); - } else if (wrapper.webkitRequestFullscreen) { - wrapper.webkitRequestFullscreen(); - } else if (wrapper.msRequestFullscreen) { - wrapper.msRequestFullscreen(); - } - break; - } - } - }, false); - - - //var elem = document.getElementById("myvideo"); - //if (elem.requestFullscreen) { - // elem.requestFullscreen(); - //} - - } - -}, false); - - -// hide mouse after 5seconds -(function() { - var mouseTimer = null, - cursorVisible = true; - - function disappearCursor() { - mouseTimer = null; - document.body.style.cursor = 'none'; - cursorVisible = false; - } - - document.onmousemove = function() { - if (mouseTimer) { - window.clearTimeout(mouseTimer); - } - if (!cursorVisible) { - document.body.style.cursor = 'default'; - cursorVisible = true; - } - mouseTimer = window.setTimeout(disappearCursor, 2000); - }; -})(); -- cgit v1.2.3