mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-02 16:41:24 +03:00
03b1e9c3bd
- wired up a basic minification package - accepts config for css or js files and can concat and minify them into a single file for each type - this will be used for generating merged css and js files for various cards, controlled by theme config
9 lines
328 B
JavaScript
9 lines
328 B
JavaScript
var images = document.querySelectorAll('.kg-gallery-image img');
|
|
images.forEach(function (image) {
|
|
var container = image.closest('.kg-gallery-image');
|
|
var width = image.attributes.width.value;
|
|
var height = image.attributes.height.value;
|
|
var ratio = width / height;
|
|
container.style.flex = ratio + ' 1 0%';
|
|
})
|