diff options
author | Sheogorath | 2019-06-04 16:09:26 +0200 |
---|---|---|
committer | GitHub | 2019-06-04 16:09:26 +0200 |
commit | ae32a129303fd14b3b2bd2f5b7bb0b0c0c8a7f81 (patch) | |
tree | 78f9f1be4c48a5dad80b332e2727ecc4835d7ee4 /public | |
parent | 9140ca3c9602b2991b187396c153f2a36f68e8a6 (diff) | |
parent | 9e7b081bd934e4245eaa0ae83abcad94b473d622 (diff) |
Merge pull request #93 from ttasovac/master
fixed styling of slides preview
Diffstat (limited to 'public')
-rw-r--r-- | public/css/slide-preview.css | 61 | ||||
-rw-r--r-- | public/js/index.js | 2 |
2 files changed, 63 insertions, 0 deletions
diff --git a/public/css/slide-preview.css b/public/css/slide-preview.css index 1f8288c7..963ee340 100644 --- a/public/css/slide-preview.css +++ b/public/css/slide-preview.css @@ -56,3 +56,64 @@ height: 1.5em; border: 3px solid #777; } + +.markdown-body.slides aside.notes { + display: none; +} + +.markdown-body.slides ul, .markdown-body.slides ol { + display: inline-block; + text-align: left; + margin: 0 0 0 1em; + padding: 0; +} + +.markdown-body.slides table { + width: 50%; + margin: 0 auto; + border-collapse: collapse; + border-spacing: 0; + display: table; +} + +.markdown-body.slides table th, .markdown-body.slides table td { + text-align: left; + padding: 0.2em 0.5em 0.2em 0.5em; + border:none; + border-bottom: 1px solid; +} + +.markdown-body.slides table tr { + border-top: 0; + background-color: #fff; +} + +.markdown-body.slides table tr:nth-child(2n) { + background-color: inherit; +} + +.markdown-body.slides table tbody tr:last-child th, .markdown-body.slides table tbody tr:last-child td { + border-bottom: none; +} + +.markdown-body.slides h1, .markdown-body.slides h2 { + border-bottom: 0; +} + +.night .markdown-body.slides h1, +.night .markdown-body.slides h2, +.night .markdown-body.slides h3, +.night .markdown-body.slides h4, +.night .markdown-body.slides h5, +.night .markdown-body.slides h6 { + color: black; +} + +.markdown-body section > section:last-child { + margin-bottom: 1.5em !important; +} + +/* slides previews get a black background, controlled by js */ +.ui-view-area.black { + background-color: black !important;; +} diff --git a/public/js/index.js b/public/js/index.js index d5345a8c..ff381598 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -2740,6 +2740,7 @@ function updateViewInner () { delete md.metaError var rendered = md.render(value) if (md.meta.type && md.meta.type === 'slide') { + ui.area.view.addClass('black') var slideOptions = { separator: '^(\r\n?|\n)---(\r\n?|\n)$', verticalSeparator: '^(\r\n?|\n)----(\r\n?|\n)$' @@ -2756,6 +2757,7 @@ function updateViewInner () { if (lastMeta.type && lastMeta.type === 'slide') { refreshView() ui.area.markdown.removeClass('slides') + ui.area.view.removeClass('black') appState.syncscroll = true checkSyncToggle() } |