New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Koenig gallery card support #475

Merged
merged 4 commits into from Aug 30, 2018
Jump to file or symbol
Failed to load files and symbols.
+46 −4
Diff settings

Always

Just for now

Copy path View file

Large diffs are not rendered by default.

Oops, something went wrong.
Copy path View file

Large diffs are not rendered by default.

Oops, something went wrong.
Copy path View file
@@ -1855,11 +1855,13 @@ Usage (In Ghost editor):
text-align: center;
}
.kg-image-card {
.kg-image-card,
.kg-gallery-card {
margin: 0 0 1.5em;
}
.kg-image-card figcaption {
.kg-image-card figcaption,
.kg-gallery-card figcaption {
margin: -1.0em 0 1.5em;
}
@@ -1891,6 +1893,34 @@ Usage (In Ghost editor):
}
}
.kg-gallery-container {
display: flex;
flex-direction: column;
margin: 1.5em auto;
max-width: 1040px;
width: 100vw;
}
.kg-gallery-row {
display: flex;
flex-direction: row;
justify-content: center;
}
.kg-gallery-image img {
display: block;
margin: 0;
width: 100%;
height: 100%;
}
.kg-gallery-row:not(:first-of-type) {
margin: 0.75em 0 0 0;
}
.kg-gallery-image:not(:first-of-type) {
margin: 0 0 0 0.75em;
}
/* 8. Author Template
/* ---------------------------------------------------------- */
Copy path View file
@@ -55,6 +55,18 @@
</div>
{{/if}}
<script>
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%';
})
</script>
{{!-- jQuery + Fitvids, which makes all video embeds responsive --}}
<script
src="https://code.jquery.com/jquery-3.2.1.min.js"
ProTip! Use n and p to navigate between commits in a pull request.