Manual: fixes for High DPI and icon short code
This commit is contained in:
1 parent
ba61d5de76
commit
88c42ee6bd
4 files changed
+26
-2
No files matched your search
@@ -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;
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<img
|
||||
class="icon-image"
|
||||
src="{{name}}.png"
|
||||
alt="{{alt}}"
|
||||
/>
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<div id="colorbox-inline-content" style="display: none;">
|
||||
<div id="{{name}}-screen">
|
||||
<img style="max-height:95vh"
|
||||
<img class = "scaled-image" style="max-height:95vh"
|
||||
srcset="{{name}}-SDPI.png 770w,
|
||||
{{name}}.png 771w"
|
||||
sizes="(min-width: 1920px) 771px, 770px"
|
||||
|
||||
Reference in new issue
Block a user