@korbiniankuhn/markdown-slides 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/css/styles.css +1 -1
- package/app/scripts/slides.js +29 -23
- package/cli.js +2 -2
- package/package.json +1 -1
package/app/css/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--color-bg: #f6f8fa;--color-bg-slide: #fff;--color-bg-code: #f6f8fa;--color-bg-backdrop: rgba(0, 0, 0, .3);--color-bg-presentation: #eee;--color-text: #222;--color-border: #eaedef;--color-primary: #e51433;--color-success: #14e564;--color-white: #fff;--color-black: #222;--color-grey: #888}body.dark{--color-bg: #000;--color-bg-slide: #0e0f0f;--color-bg-code: #202021;--color-bg-backdrop: rgba(0, 0, 0, .3);--color-text: #f6f8fa;--color-border: #343535}.text-primary{color:var(--color-primary)}.bg-primary{background-color:var(--color-primary)}.dark-only{display:none}body.dark .dark-only{display:block}body.dark .light-only{display:none}:fullscreen .nofullscreen{display:none}html{box-sizing:border-box}body{--size: 1rem;font-family:HdM Frutiger Next Pro,sans-serif;font-size:calc(var(--size) * 1.5);line-height:1.5;font-weight:400;margin:0;padding:0;background-color:var(--color-bg);color:var(--color-text)}h1,h2,h3,h4,h5,h6{margin:calc(var(--size) * .5) 0;margin-top:var(--size)}h1{font-size:calc(var(--size) * 3);font-weight:600}h2{color:var(--color-primary);font-size:calc(var(--size) * 3);font-weight:500}h3{color:var(--color-primary);font-size:calc(var(--size) * 2);font-weight:500}h4{font-size:calc(var(--size) * 1.75);font-weight:500}h5{font-size:calc(var(--size) * 1.5);font-weight:600}h6{font-size:calc(var(--size) * 1.5);font-weight:500}blockquote{border-left:5px solid var(--color-primary);margin:calc(var(--size) * .5) 0;padding:calc(var(--size) * .25) calc(var(--size) * 1)}a{color:var(--color-primary)}button{font-size:calc(var(--size) * 1);padding:calc(var(--size) * .2) calc(var(--size) * .5);cursor:pointer;border-radius:3px;border:1px solid var(--color-border);background:var(--color-bg-code);color:var(--color-text)}button:hover{background:var(--color-border)}button.active{border-color:var(--color-primary)}ul,p{font-size:calc(var(--size) * 1.5);margin:calc(var(--size) * .5) 0}b,strong{font-weight:500}.noscroll{overflow:hidden}.spacer{display:block}.spacer.sm{height:var(--size)}.spacer.md{height:calc(var(--size) * 2)}.spacer.lg{height:calc(var(--size) * 3)}.spacer.xl{height:calc(var(--size) * 4)}.main{position:absolute;inset:0;display:flex}.left{flex:1 1 auto}.right,.separator{display:none}.inner{position:relative;width:100%;height:100%;box-sizing:border-box}.presentation-parent .left{margin:var(--size);margin-right:0}.presentation-parent .left .inner{border:1px solid var(--color-border);width:unset;height:unset;max-width:100%;max-height:100%}.presentation-parent .right{display:block;width:20%;min-width:200px;max-width:400px;margin:var(--size);margin-left:0;border:1px solid var(--color-border)}.presentation-parent .separator{display:block;width:var(--size);cursor:col-resize}.slides-container{top:var(--header-height);left:0;right:0;bottom:0;position:absolute;overflow-y:scroll;background:var(--color-bg)}.backdrop{position:absolute;inset:0;background:var(--color-bg-backdrop);backdrop-filter:blur(10px);z-index:-1;opacity:0;transition:opacity .5s;overflow:hidden;display:flex;flex-direction:column;align-items:flex-start}.backdrop.active{z-index:5;opacity:1}.menu{height:100vh;transform:translate(-100vw);box-sizing:border-box;transition:.5s;position:relative;background:var(--color-bg-slide);width:auto;min-width:250px;padding:0;display:flex;flex-direction:column}.backdrop.active .menu{transform:translate(0)}.menu-header{padding:var(--size);padding-bottom:0;display:flex;flex-direction:column;font-weight:700;border-bottom:1px solid var(--color-border)}.menu-header a{text-decoration:none;font-size:calc(var(--size) * 1.25);margin-bottom:var(--size);color:var(--color-text)}.menu-header a:hover{color:var(--color-primary)}.menu-footer{padding:var(--size);display:flex;flex-direction:column;font-size:var(--size);border-top:1px solid var(--color-border)}.menu-footer div{display:flex;margin-top:calc(var(--size) * .5)}.menu-footer div :first-child{flex:1}.menu-footer div button{margin-left:calc(var(--size) * .5)}.menu-content{overflow-y:scroll;flex:1;padding:var(--size);padding-top:0}.menu ul{margin:calc(var(--size) * .5) 0;padding:0;list-style:none;font-size:calc(var(--size) * 1.25);font-weight:600}.menu ul li{margin:calc(var(--size) * .25) 0}.menu ul a{color:var(--color-text);text-decoration:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center}.menu ul a span.slide-number{font-weight:400;color:var(--color-grey);font-size:var(--size);margin-left:5px}.menu ul a:hover{color:var(--color-primary)}.menu ul a:hover span.slide-number{font-weight:600;color:var(--color-primary)}.menu ul ul{margin:0;font-size:var(--size);font-weight:400}.menu ul ul li{margin:0}.menu ul ul ul{font-size:var(--size);margin-left:var(--size)}section.slide{position:relative;box-sizing:border-box;background-color:var(--color-bg-slide);min-height:100%;display:flex;flex-direction:column;margin-bottom:calc(var(--size) * 2);padding-top:calc(var(--size) * 2);font-size:calc(var(--size) * 1.5)}section.slide .content{box-sizing:border-box;padding:0 calc(var(--size) * 2);flex:1;width:100%;overflow-x:scroll;display:flex;flex-direction:column;justify-content:center}section.slide:last-child{margin-bottom:0}section.slide:first-child .content{align-items:center}section.slide:first-child h1{margin:0}section.slide:first-child a.lecture-title{margin-bottom:calc(var(--size) * 1)}section.slide:first-child img.logo{height:calc(var(--size) * 6)}section.slide:first-child .university{text-transform:uppercase}img.default,video.default{display:block;max-width:100%;max-height:80vh;position:relative;margin-left:auto;margin-right:auto}img.default.broken,video.default.broken{border:1px solid var(--color-border);background:var(--color-code);color:var(--color-primary);padding:var(--size)}video.default{border:1px solid var(--color-border)}.video-print-placeholder{display:none}.row{display:flex;flex-direction:row;justify-content:space-between;margin-bottom:var(--size)}.column{width:100%;padding-right:var(--size)}.column:last-child{padding-right:0}.notes{display:none}.semester{display:inline-block;margin:calc(var(--size) * 1) 0;font-size:calc(var(--size) * 2.5);line-height:calc(var(--size) * 2.5);padding:calc(var(--size) * .7) calc(var(--size) * 1.25);padding-bottom:calc(var(--size) * .2);background:var(--color-primary);color:var(--color-white);font-weight:500}.table-container{width:100%;overflow-x:auto}table{min-width:100%;border-collapse:collapse;font-size:calc(var(--size) * 1.25);margin:var(--size) 0}table code{font-size:calc(var(--size) * 1.25)}table th{text-align:left;font-weight:600;background-color:none}table td,table th{padding:calc(var(--size) * .5);border:1px solid var(--color-border)}table tr:nth-child(odd) td{background-color:var(--color-bg)}.toast-wrapper{position:fixed;bottom:calc(var(--size) * 2);width:100vw;display:flex;justify-content:center;z-index:10}.toast{padding:calc(var(--size) * .5) var(--size) calc(var(--size) * .25) var(--size);background:var(--color-black);color:var(--color-white);max-width:90vw;box-sizing:border-box;border-radius:calc(var(--size) * .2);font-size:calc(var(--size) * 1.25);box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f;animation:toast-animation .5s}@keyframes toast-animation{0%{opacity:0;transform:scale(.75)}to{opacity:1;transform:scale(1)}}:root{--hljs-red: #d73a49;--hljs-purple: #6f42c1;--hljs-blue: #005cc5;--hljs-dark-blue: #032f62;--hljs-orange: #e36209;--hljs-grey: #6a737d;--hljs-green: #22863a;--hljs-dark: #24292e;--hljs-yellow: #735c0f;--hljs-red-2: #b31d28}body.dark{--hljs-red: #ff7b72;--hljs-purple: #d2a8ff;--hljs-blue: #79c0ff;--hljs-dark-blue: #a5d6ff;--hljs-orange: #ffa657;--hljs-grey: #8b949e;--hljs-green: #7ee787;--hljs-dark: #c9d1d9;--hljs-yellow: #aff5b4;--hljs-red-2: #ffdcd7}.code-wrapper{position:relative;margin:.75em 0}.code-wrapper button.copy{position:absolute;top:calc(var(--size) * .5);right:calc(var(--size) * .5);cursor:pointer;opacity:0;transition:opacity .2s}.code-wrapper:hover button.copy{opacity:1}code{font-family:Inconsolata,monospace;font-size:calc(var(--size) * 1.5);color:var(--color-text);background:var(--color-bg-code);padding:0 5px}pre{margin:0}pre code{font-size:calc(var(--size) * 1.25)}pre code{display:block;overflow-x:auto;padding:var(--size)}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:var(--hljs-red)}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:var(--hljs-purple)}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:var(--hljs-blue)}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:var(--hljs-dark-blue)}.hljs-built_in,.hljs-symbol{color:var(--hljs-orange)}.hljs-code,.hljs-comment,.hljs-formula{color:var(--hljs-grey)}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:var(--hljs-green)}.hljs-subst{color:var(--hljs-dark)}.hljs-section{color:var(--hljs-blue);font-weight:700}.hljs-bullet{color:var(--hljs-gold)}.hljs-emphasis{color:var(--hljs-dark);font-style:italic}.hljs-strong{color:var(--hljs-dark);font-weight:700}.hljs-addition{color:var(--hljs-green);background-color:#f0fff4}.hljs-deletion{color:var(--hljs-red-2);background-color:#ffeef0}body{--header-height: calc(50px + calc(var(--size) * 2) + 1px)}.header{position:absolute;top:0;background:var(--color-bg-slide);box-sizing:border-box;width:100%;padding:var(--size) calc(var(--size) * 2);display:flex;justify-content:space-between;font-size:var(--size);z-index:3;border-bottom:1px solid var(--color-border)}.header img.logo{height:50px}.header-left{display:flex;align-items:center}.header-left a{cursor:pointer;color:var(--color-grey);display:flex;align-items:center}.header-left a span{margin-left:calc(var(--size) * .5);transform:translateY(2px)}.footer{box-sizing:border-box;padding:var(--size);display:flex;justify-content:space-between;color:var(--color-grey);font-size:var(--size);position:sticky;bottom:0}@media (max-width:576px){body{--header-height: calc(40px + var(--size) + 1px);font-size:var(--size)}h1,h2{font-size:calc(var(--size) * 2)}h3{font-size:calc(var(--size) * 1.5)}h4{font-size:calc(var(--size) * 1.25)}h5,h6,code{font-size:var(--size)}.header{padding:calc(var(--size) * .5) var(--size)}.header img.logo{height:40px}}.presentation-parent{background:var(--color-bg)}.presentation-parent .left{overflow:hidden}.presentation-parent .left .inner{transform-origin:top left;max-width:unset;max-height:unset}.presentation-parent .right .inner{background:var(--color-bg-slide);display:flex;flex-direction:column}.presentation-parent .right .controls{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap-reverse;border-bottom:1px solid var(--color-border);padding:0 var(--size);height:var(--header-height);box-sizing:border-box}.presentation-parent .right .controls span.duration{font-weight:700;font-size:calc(var(--size) * 2);transform:translateY(calc(var(--size) * .1))}.presentation-parent .right .controls button:first-child{margin-right:var(--size)}.presentation-parent .right .label{font-weight:700;font-size:calc(var(--size) * 1)}.presentation-parent .right .preview{padding:var(--size)}.presentation-parent .right .preview .preview-container{cursor:pointer;border:1px solid var(--color-border)}.presentation-parent .right .preview .preview-container:hover{border-color:var(--color-primary)}.presentation-parent .right .preview .preview-content{--size: .3rem;aspect-ratio:16/9;width:100%;overflow:hidden;pointer-events:none}.presentation-parent .right .preview .preview-content .nopreview{display:none}.presentation-parent .right .preview .preview-content .content{align-items:unset}.presentation-parent .right .preview-notes{flex:1 1 auto;margin:var(--size)}.presentation-parent .right .preview-notes .notes-content{overflow-y:scroll;--size: calc(var(--size) * .7)}.presentation-parent .nopresentation,.presentation-child .nopresentation{display:none}@media print{@page{margin:1cm}.noprint{display:none!important}body{background-color:transparent;--size: 8pt}h1,h2{font-size:calc(var(--size) * 1.5);page-break-after:avoid}h2{page-break-before:always;page-break-after:avoid}h3{font-size:calc(var(--size) * 1.4);page-break-after:avoid}h4,h5,h6{font-size:calc(var(--size) * 1.1);page-break-after:avoid}code{font-size:var(--size);page-break-inside:avoid}a[href^=http]:after{color:var(--color-text);font-size:var(--size);text-decoration:none;content:" (" attr(href) ")"}table,table tr,table td,table th{page-break-inside:avoid}table tr td,table tr th{padding:calc(var(--size) * .5)}p:has(img){page-break-inside:avoid}img{page-break-inside:avoid}video{display:none!important}.video-print-placeholder{display:block;background:var(--color-bg);padding:calc(var(--size) * 2);box-sizing:border-box;text-align:center;border:1px solid var(--color-border)}.video-print-placeholder img{opacity:.5}.main{display:block}.right{display:none!important}.left{margin:0!important}.slides-container{position:relative;top:0;background:unset}.header{display:none}section.slide{min-height:unset;float:none!important;display:block;padding:0}section.slide.title-slide{min-height:100vh;page-break-after:always;display:flex}section.slide .footer{display:none}}
|
|
1
|
+
:root{--color-bg: #f6f8fa;--color-bg-slide: #fff;--color-bg-code: #f6f8fa;--color-bg-backdrop: rgba(0, 0, 0, .3);--color-bg-presentation: #eee;--color-text: #222;--color-border: #eaedef;--color-primary: #e51433;--color-success: #14e564;--color-white: #fff;--color-black: #222;--color-grey: #888}body.dark{--color-bg: #000;--color-bg-slide: #0e0f0f;--color-bg-code: #202021;--color-bg-backdrop: rgba(0, 0, 0, .3);--color-text: #f6f8fa;--color-border: #343535}.text-primary{color:var(--color-primary)}.bg-primary{background-color:var(--color-primary)}.dark-only{display:none}body.dark .dark-only{display:block}body.dark .light-only{display:none}:fullscreen .nofullscreen{display:none}html{box-sizing:border-box}body{--size: 1rem;font-family:HdM Frutiger Next Pro,sans-serif;font-size:calc(var(--size) * 1.5);line-height:1.5;font-weight:400;margin:0;padding:0;background-color:var(--color-bg);color:var(--color-text)}h1,h2,h3,h4,h5,h6{margin:calc(var(--size) * .5) 0;margin-top:var(--size)}h1{font-size:calc(var(--size) * 3);font-weight:600}h2{color:var(--color-primary);font-size:calc(var(--size) * 3);font-weight:500}h3{color:var(--color-primary);font-size:calc(var(--size) * 2);font-weight:500}h4{font-size:calc(var(--size) * 1.75);font-weight:500}h5{font-size:calc(var(--size) * 1.5);font-weight:600}h6{font-size:calc(var(--size) * 1.5);font-weight:500}blockquote{border-left:5px solid var(--color-primary);margin:calc(var(--size) * .5) 0;padding:calc(var(--size) * .25) calc(var(--size) * 1)}a{color:var(--color-primary)}button{font-size:calc(var(--size) * 1);padding:calc(var(--size) * .2) calc(var(--size) * .5);cursor:pointer;border-radius:3px;border:1px solid var(--color-border);background:var(--color-bg-code);color:var(--color-text)}button:hover{background:var(--color-border)}button.active{border-color:var(--color-primary)}ul,p{font-size:calc(var(--size) * 1.5);margin:calc(var(--size) * .5) 0}b,strong{font-weight:500}.noscroll{overflow:hidden}.spacer{display:block}.spacer.sm{height:var(--size)}.spacer.md{height:calc(var(--size) * 2)}.spacer.lg{height:calc(var(--size) * 3)}.spacer.xl{height:calc(var(--size) * 4)}.main{position:absolute;inset:0;display:flex}.left{flex:1 1 auto}.right,.separator{display:none}.inner{position:relative;width:100%;height:100%;box-sizing:border-box}.presentation-parent .left{margin:var(--size);margin-right:0}.presentation-parent .left .inner{border:1px solid var(--color-border);width:unset;height:unset;max-width:100%;max-height:100%}.presentation-parent .right{display:block;width:20%;min-width:200px;max-width:400px;margin:var(--size);margin-left:0;border:1px solid var(--color-border)}.presentation-parent .separator{display:block;width:var(--size);cursor:col-resize}.slides-container{top:var(--header-height);left:0;right:0;bottom:0;position:absolute;overflow-y:scroll;background:var(--color-bg)}.backdrop{position:absolute;inset:0;background:var(--color-bg-backdrop);backdrop-filter:blur(10px);z-index:-1;opacity:0;transition:opacity .5s;overflow:hidden;display:flex;flex-direction:column;align-items:flex-start}.backdrop.active{z-index:5;opacity:1}.menu{height:100vh;transform:translate(-100vw);box-sizing:border-box;transition:.5s;position:relative;background:var(--color-bg-slide);width:auto;min-width:250px;padding:0;display:flex;flex-direction:column}.backdrop.active .menu{transform:translate(0)}.menu-header{padding:var(--size);padding-bottom:0;display:flex;flex-direction:column;font-weight:700;border-bottom:1px solid var(--color-border)}.menu-header a{text-decoration:none;font-size:calc(var(--size) * 1.25);margin-bottom:var(--size);color:var(--color-text)}.menu-header a:hover{color:var(--color-primary)}.menu-footer{padding:var(--size);display:flex;flex-direction:column;font-size:var(--size);border-top:1px solid var(--color-border)}.menu-footer div{display:flex;margin-top:calc(var(--size) * .5)}.menu-footer div :first-child{flex:1}.menu-footer div button{margin-left:calc(var(--size) * .5)}.menu-content{overflow-y:scroll;flex:1;padding:var(--size);padding-top:0}.menu ul{margin:calc(var(--size) * .5) 0;padding:0;list-style:none;font-size:calc(var(--size) * 1.25);font-weight:600}.menu ul li{margin:calc(var(--size) * .25) 0}.menu ul a{color:var(--color-text);text-decoration:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center}.menu ul a span.slide-number{font-weight:400;color:var(--color-grey);font-size:var(--size);margin-left:5px}.menu ul a:hover{color:var(--color-primary)}.menu ul a:hover span.slide-number{font-weight:600;color:var(--color-primary)}.menu ul ul{margin:0;font-size:var(--size);font-weight:400}.menu ul ul li{margin:0}.menu ul ul ul{font-size:var(--size);margin-left:var(--size)}section.slide{position:relative;box-sizing:border-box;background-color:var(--color-bg-slide);min-height:100%;display:flex;flex-direction:column;margin-bottom:calc(var(--size) * 2);padding-top:calc(var(--size) * 2);font-size:calc(var(--size) * 1.5)}section.slide .content{box-sizing:border-box;padding:0 calc(var(--size) * 2);flex:1;width:100%;overflow-x:scroll;display:flex;flex-direction:column;justify-content:center}section.slide:last-child{margin-bottom:0}section.slide:first-child .content{align-items:center}section.slide:first-child h1{margin:0}section.slide:first-child a.lecture-title{margin-bottom:calc(var(--size) * 1)}section.slide:first-child img.logo{height:calc(var(--size) * 6)}section.slide:first-child .university{text-transform:uppercase}img.default,video.default{display:block;max-width:100%;max-height:80vh;position:relative;margin-left:auto;margin-right:auto}img.default.broken,video.default.broken{border:1px solid var(--color-border);background:var(--color-code);color:var(--color-primary);padding:var(--size)}video.default{border:1px solid var(--color-border)}.video-print-placeholder{display:none}.row{display:flex;flex-direction:row;justify-content:space-between;margin-bottom:var(--size)}.column{width:100%;padding-right:var(--size)}.column:last-child{padding-right:0}.notes{display:none}.semester{display:inline-block;margin:calc(var(--size) * 1) 0;font-size:calc(var(--size) * 2.5);line-height:calc(var(--size) * 2.5);padding:calc(var(--size) * .7) calc(var(--size) * 1.25);padding-bottom:calc(var(--size) * .2);background:var(--color-primary);color:var(--color-white);font-weight:500}.table-container{width:100%;overflow-x:auto}table{min-width:100%;border-collapse:collapse;font-size:calc(var(--size) * 1.25);margin:var(--size) 0}table code{font-size:calc(var(--size) * 1.25)}table th{text-align:left;font-weight:600;background-color:none}table td,table th{padding:calc(var(--size) * .5);border:1px solid var(--color-border)}table tr:nth-child(odd) td{background-color:var(--color-bg)}.toast-wrapper{position:fixed;bottom:calc(var(--size) * 2);width:100vw;display:flex;justify-content:center;z-index:10}.toast{padding:calc(var(--size) * .5) var(--size) calc(var(--size) * .25) var(--size);background:var(--color-black);color:var(--color-white);max-width:90vw;box-sizing:border-box;border-radius:calc(var(--size) * .2);font-size:calc(var(--size) * 1.25);box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f;animation:toast-animation .5s}@keyframes toast-animation{0%{opacity:0;transform:scale(.75)}to{opacity:1;transform:scale(1)}}:root{--hljs-red: #d73a49;--hljs-purple: #6f42c1;--hljs-blue: #005cc5;--hljs-dark-blue: #032f62;--hljs-orange: #e36209;--hljs-grey: #6a737d;--hljs-green: #22863a;--hljs-dark: #24292e;--hljs-yellow: #735c0f;--hljs-red-2: #b31d28}body.dark{--hljs-red: #ff7b72;--hljs-purple: #d2a8ff;--hljs-blue: #79c0ff;--hljs-dark-blue: #a5d6ff;--hljs-orange: #ffa657;--hljs-grey: #8b949e;--hljs-green: #7ee787;--hljs-dark: #c9d1d9;--hljs-yellow: #aff5b4;--hljs-red-2: #ffdcd7}.code-wrapper{position:relative;margin:.75em 0}.code-wrapper button.copy{position:absolute;top:calc(var(--size) * .5);right:calc(var(--size) * .5);cursor:pointer;opacity:0;transition:opacity .2s}.code-wrapper:hover button.copy{opacity:1}code{font-family:Inconsolata,monospace;font-size:calc(var(--size) * 1.5);color:var(--color-text);background:var(--color-bg-code);padding:0 5px}pre{margin:0}pre code{font-size:calc(var(--size) * 1.25)}pre code{display:block;overflow-x:auto;padding:var(--size)}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:var(--hljs-red)}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:var(--hljs-purple)}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:var(--hljs-blue)}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:var(--hljs-dark-blue)}.hljs-built_in,.hljs-symbol{color:var(--hljs-orange)}.hljs-code,.hljs-comment,.hljs-formula{color:var(--hljs-grey)}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:var(--hljs-green)}.hljs-subst{color:var(--hljs-dark)}.hljs-section{color:var(--hljs-blue);font-weight:700}.hljs-bullet{color:var(--hljs-gold)}.hljs-emphasis{color:var(--hljs-dark);font-style:italic}.hljs-strong{color:var(--hljs-dark);font-weight:700}.hljs-addition{color:var(--hljs-green);background-color:#f0fff4}.hljs-deletion{color:var(--hljs-red-2);background-color:#ffeef0}body{--header-height: calc(50px + calc(var(--size) * 2) + 1px)}.header{position:absolute;top:0;background:var(--color-bg-slide);box-sizing:border-box;width:100%;padding:var(--size) calc(var(--size) * 2);display:flex;justify-content:space-between;font-size:var(--size);z-index:3;border-bottom:1px solid var(--color-border)}.header img.logo{height:50px}.header-left{display:flex;align-items:center}.header-left a{cursor:pointer;color:var(--color-grey);display:flex;align-items:center}.header-left a span{margin-left:calc(var(--size) * .5);transform:translateY(2px)}.footer{box-sizing:border-box;padding:var(--size);display:flex;justify-content:space-between;color:var(--color-grey);font-size:var(--size);position:sticky;bottom:0}@media (max-width:576px){body{--header-height: calc(40px + var(--size) + 1px);--size: 1rem}h1,h2{font-size:calc(var(--size) * 2)}h3{font-size:calc(var(--size) * 1.5)}h4{font-size:calc(var(--size) * 1.25)}h5,h6,a,p,code,pre code,li,table,td,th,table code{font-size:var(--size)}.semester{font-size:calc(var(--size) * 1.5)}.header{padding:calc(var(--size) * .5) var(--size)}.header img.logo{height:40px}}.presentation-parent{background:var(--color-bg)}.presentation-parent .left{overflow:hidden}.presentation-parent .left .inner{transform-origin:top left;max-width:unset;max-height:unset}.presentation-parent .right .inner{background:var(--color-bg-slide);display:flex;flex-direction:column}.presentation-parent .right .controls{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap-reverse;border-bottom:1px solid var(--color-border);padding:0 var(--size);height:var(--header-height);box-sizing:border-box}.presentation-parent .right .controls span.duration{font-weight:700;font-size:calc(var(--size) * 2);transform:translateY(calc(var(--size) * .1))}.presentation-parent .right .controls button:first-child{margin-right:var(--size)}.presentation-parent .right .label{font-weight:700;font-size:calc(var(--size) * 1)}.presentation-parent .right .preview{padding:var(--size)}.presentation-parent .right .preview .preview-container{cursor:pointer;border:1px solid var(--color-border)}.presentation-parent .right .preview .preview-container:hover{border-color:var(--color-primary)}.presentation-parent .right .preview .preview-content{--size: .3rem;aspect-ratio:16/9;width:100%;overflow:hidden;pointer-events:none}.presentation-parent .right .preview .preview-content .nopreview{display:none}.presentation-parent .right .preview .preview-content .content{align-items:unset}.presentation-parent .right .preview-notes{flex:1 1 auto;margin:var(--size)}.presentation-parent .right .preview-notes .notes-content{overflow-y:scroll;--size: calc(var(--size) * .7)}.presentation-parent .nopresentation,.presentation-child .nopresentation{display:none}@media print{@page{margin:1cm}.noprint{display:none!important}body{background-color:transparent;--size: 8pt}h1,h2{font-size:calc(var(--size) * 1.5);page-break-after:avoid}h2{page-break-before:always;page-break-after:avoid}h3{font-size:calc(var(--size) * 1.4);page-break-after:avoid}h4,h5,h6{font-size:calc(var(--size) * 1.1);page-break-after:avoid}code{font-size:var(--size);page-break-inside:avoid}a[href^=http]:after{color:var(--color-text);font-size:var(--size);text-decoration:none;content:" (" attr(href) ")"}table,table tr,table td,table th{page-break-inside:avoid}table tr td,table tr th{padding:calc(var(--size) * .5)}p:has(img){page-break-inside:avoid}img{page-break-inside:avoid}video{display:none!important}.video-print-placeholder{display:block;background:var(--color-bg);padding:calc(var(--size) * 2);box-sizing:border-box;text-align:center;border:1px solid var(--color-border)}.video-print-placeholder img{opacity:.5}.main{display:block}.right{display:none!important}.left{margin:0!important}.slides-container{position:relative;top:0;background:unset}.header{display:none}section.slide{min-height:unset;float:none!important;display:block;padding:0}section.slide.title-slide{min-height:100vh;page-break-after:always;display:flex}section.slide .footer{display:none}}
|
package/app/scripts/slides.js
CHANGED
|
@@ -22,8 +22,6 @@
|
|
|
22
22
|
constructor(app, slides) {
|
|
23
23
|
this.app = app;
|
|
24
24
|
this.slides = slides;
|
|
25
|
-
this.container = document.querySelector(".slides-container");
|
|
26
|
-
this.ignoreScrollEvent = false;
|
|
27
25
|
document.body.addEventListener("keydown", (event) => {
|
|
28
26
|
switch (event.code) {
|
|
29
27
|
case "ArrowRight":
|
|
@@ -42,6 +40,9 @@
|
|
|
42
40
|
this.container.addEventListener("scroll", (event) => this._onscroll(event));
|
|
43
41
|
window.addEventListener("resize", (event) => this.resize());
|
|
44
42
|
}
|
|
43
|
+
container = document.querySelector(".slides-container");
|
|
44
|
+
ignoreScrollEvent = false;
|
|
45
|
+
timeout;
|
|
45
46
|
goToSlide(index) {
|
|
46
47
|
const slide = this.slides.getSlide(index);
|
|
47
48
|
this.container.scrollTo(0, slide.offsetTop);
|
|
@@ -98,16 +99,17 @@
|
|
|
98
99
|
var Presentation = class {
|
|
99
100
|
constructor(slides) {
|
|
100
101
|
this.slides = slides;
|
|
101
|
-
this.milliseconds = 0;
|
|
102
|
-
this.lastUpdatedAt = 0;
|
|
103
|
-
this.buttonStopResume = document.querySelector(
|
|
104
|
-
"#button-stop-resume"
|
|
105
|
-
);
|
|
106
|
-
this.durationRef = document.querySelector("#duration");
|
|
107
102
|
document.body.classList.add("presentation-parent");
|
|
108
103
|
this.timerStopResume();
|
|
109
104
|
this.updatePreview();
|
|
110
105
|
}
|
|
106
|
+
milliseconds = 0;
|
|
107
|
+
intervalId;
|
|
108
|
+
lastUpdatedAt = 0;
|
|
109
|
+
buttonStopResume = document.querySelector(
|
|
110
|
+
"#button-stop-resume"
|
|
111
|
+
);
|
|
112
|
+
durationRef = document.querySelector("#duration");
|
|
111
113
|
timerStopResume() {
|
|
112
114
|
if (this.intervalId) {
|
|
113
115
|
clearInterval(this.intervalId);
|
|
@@ -172,10 +174,8 @@
|
|
|
172
174
|
|
|
173
175
|
// packages/app/src/slides.ts
|
|
174
176
|
var Slides = class {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
this.slides = this.container.querySelectorAll("section");
|
|
178
|
-
}
|
|
177
|
+
container = document.querySelector(".slides-container");
|
|
178
|
+
slides = this.container.querySelectorAll("section");
|
|
179
179
|
getCurrentSlideIndex() {
|
|
180
180
|
const currentY = this.container.scrollTop;
|
|
181
181
|
for (let i = 0; i < this.slides.length; i++) {
|
|
@@ -204,10 +204,10 @@
|
|
|
204
204
|
|
|
205
205
|
// packages/app/src/theme.ts
|
|
206
206
|
var Theme = class {
|
|
207
|
+
buttonAuto = document.querySelector("#button-theme-auto");
|
|
208
|
+
buttonLight = document.querySelector("#button-theme-light");
|
|
209
|
+
buttonDark = document.querySelector("#button-theme-dark");
|
|
207
210
|
constructor() {
|
|
208
|
-
this.buttonAuto = document.querySelector("#button-theme-auto");
|
|
209
|
-
this.buttonLight = document.querySelector("#button-theme-light");
|
|
210
|
-
this.buttonDark = document.querySelector("#button-theme-dark");
|
|
211
211
|
window.addEventListener("storage", (event) => {
|
|
212
212
|
if (event.key === "theme") {
|
|
213
213
|
this.updateThemeClass();
|
|
@@ -248,12 +248,21 @@
|
|
|
248
248
|
|
|
249
249
|
// packages/app/src/app.ts
|
|
250
250
|
var App = class {
|
|
251
|
+
type = "slides";
|
|
252
|
+
parent;
|
|
253
|
+
child;
|
|
254
|
+
slides = new Slides();
|
|
255
|
+
theme = new Theme();
|
|
256
|
+
clipboard = new Clipboard();
|
|
257
|
+
interaction = new Interaction(this, this.slides);
|
|
258
|
+
presentation;
|
|
259
|
+
get relative() {
|
|
260
|
+
return this.parent?.window.app || this.child?.window.app;
|
|
261
|
+
}
|
|
251
262
|
constructor() {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
this.interaction = new Interaction(this, this.slides);
|
|
256
|
-
this.parent = window.opener;
|
|
263
|
+
if (window.opener?.app?.type === "slides") {
|
|
264
|
+
this.parent = window.opener;
|
|
265
|
+
}
|
|
257
266
|
if (this.parent) {
|
|
258
267
|
this.presentation = new Presentation(this.slides);
|
|
259
268
|
this.presentation.updatePreviewDimensions(
|
|
@@ -265,9 +274,6 @@
|
|
|
265
274
|
);
|
|
266
275
|
}
|
|
267
276
|
}
|
|
268
|
-
get relative() {
|
|
269
|
-
return this.parent?.window.app || this.child?.window.app;
|
|
270
|
-
}
|
|
271
277
|
startPresentation() {
|
|
272
278
|
document.body.classList.add("presentation-child");
|
|
273
279
|
this.child = window.open(location.href, "_blank", {
|
package/cli.js
CHANGED
|
@@ -188,13 +188,13 @@ Expecting `+z.join(", ")+", got '"+(this.terminals_[b]||b)+"'":J="Parse error on
|
|
|
188
188
|
</div>
|
|
189
189
|
<div class="footer nopreview">
|
|
190
190
|
<div>
|
|
191
|
-
<button
|
|
191
|
+
<!-- <button
|
|
192
192
|
id="present-button"
|
|
193
193
|
onclick="onClickStartPresentation()"
|
|
194
194
|
class="noprint nopresentation"
|
|
195
195
|
>
|
|
196
196
|
Present
|
|
197
|
-
</button>
|
|
197
|
+
</button> -->
|
|
198
198
|
<button
|
|
199
199
|
id="fullscreen-button"
|
|
200
200
|
onclick="onClickFullscreen()"
|