Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xaprb/story.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaron Schwartz <xaprb@users.noreply.github.com>2018-09-06 07:20:08 +0300
committerBaron Schwartz <xaprb@users.noreply.github.com>2018-09-06 07:20:08 +0300
commit66a36c9a7d15ce60ea2144977e5f1f3ed4ee641f (patch)
tree97a8e430e0844629bf13ea65cdd2012e6041b1a6 /layouts
parentb128dacac610c65d232eb542c46699366d48e650 (diff)
add misc sizing to Apron, fix images, footers, and auto-shrinking headers
Diffstat (limited to 'layouts')
-rw-r--r--layouts/slides/single.html15
1 files changed, 15 insertions, 0 deletions
diff --git a/layouts/slides/single.html b/layouts/slides/single.html
index 1bcc28d..1c68fbc 100644
--- a/layouts/slides/single.html
+++ b/layouts/slides/single.html
@@ -44,6 +44,21 @@
countIncrementalSlides: false,
slideNumberFormat: '%current%'
});
+ // Shrink headers until they fit. (They have to be momentarily made
+ // visible first.)
+ $(".remark-slide-content.fit-h1 h1").each(function(i, e) {
+ var $e = $(e);
+ var $p = $e.closest('div.remark-slide-container');
+ var needsToggle = !$p.hasClass('remark-visible');
+ console.log(needsToggle);
+ if ( needsToggle ) $p.toggleClass('remark-visible');
+ while (e.scrollHeight > e.clientHeight + 1 && $e.css('font-size') != '1px') {
+ $e.css('font-size', (parseInt($e.css('font-size')) - 1) + "px");
+ console.log($e.css('font-size') + "sh:" + e.scrollHeight + "ch:" +
+ e.clientHeight);
+ }
+ if ( needsToggle ) $p.toggleClass('remark-visible');
+ });
new QRCode(
document.getElementById("qrcode"),
{