diff --git a/doc/user/sass/book.scss b/doc/user/sass/book.scss
index 4e5f1729a..d39d71db1 100644
--- a/doc/user/sass/book.scss
+++ b/doc/user/sass/book.scss
@@ -47,6 +47,16 @@ $sidebar-width: 300px;
transform-origin: top left;
}
}
+
+.colorbox-inline img {
+ max-width: 100%;
+}
+
+.icon-image {
+ display:inline;
+ max-height: 1.4em;
+}
+
.back-button {
background: #ddd;
border: 1px solid #bbb;
diff --git a/doc/user/static/image.js b/doc/user/static/image.js
index f139da139..d97201893 100644
--- a/doc/user/static/image.js
+++ b/doc/user/static/image.js
@@ -3,14 +3,23 @@ $(document).ready(function() {
jQuery('a.thumbnail').colorbox({rel:'gal'});
jQuery('a.gallery_image').colorbox({rel:'gal'});
jQuery(".youtube").colorbox({iframe:true, innerWidth:'75%', innerHeight:'75%'});
- jQuery("a.colorbox-inline").colorbox({inline:true});
if(window.innerWidth >= 1920) {
+
$("img.scaled-image").each(function(idx, elm){
$(elm).css("margin-bottom", elm.height * -0.333);
}).on("load", function(e){
$(e.target).css("margin-bottom", e.target.height * -0.333);
});
+ $("a.colorbox-inline").each(function(idx, elm){
+ let child = $(elm).children("img")[0];
+ let w = (child.naturalWidth * 0.666) + 1
+ let h = (child.naturalHeight * 0.666) + 1
+ $(elm).colorbox({inline: true, innerWidth: w, innerHeight: h, scrolling: false});
+ });
+ }
+ else {
+ jQuery("a.colorbox-inline").colorbox({inline:true});
}
$(".back-button")
.html("Go Back")
diff --git a/doc/user/templates/shortcodes/icon.html b/doc/user/templates/shortcodes/icon.html
new file mode 100644
index 000000000..a673243bd
--- /dev/null
+++ b/doc/user/templates/shortcodes/icon.html
@@ -0,0 +1,5 @@
+
\ No newline at end of file
diff --git a/doc/user/templates/shortcodes/lightbox.html b/doc/user/templates/shortcodes/lightbox.html
index c30de785e..68917c434 100644
--- a/doc/user/templates/shortcodes/lightbox.html
+++ b/doc/user/templates/shortcodes/lightbox.html
@@ -7,7 +7,7 @@