Skip to content

Commit

Permalink
minor formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wei2912 committed May 10, 2023
1 parent db08d76 commit d895e49
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
22 changes: 11 additions & 11 deletions assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,17 @@ function video() {
fitvids('.single-content');
}

function gallery() {
const images = document.querySelectorAll('.kg-gallery-image img');
images.forEach((image) => {
const container = image.closest('.kg-gallery-image');
const width = image.attributes.width.value;
const height = image.attributes.height.value;
const ratio = width / height;
container.style.flex = ratio + ' 1 0%';
});
}

function table() {
if (body.hasClass('post-template') || body.hasClass('page-template')) {
var tables = $('.single-content').find('.table');
Expand Down Expand Up @@ -259,17 +270,6 @@ function modal() {
});
}

function gallery() {
const images = document.querySelectorAll('.kg-gallery-image img');
images.forEach((image) => {
const container = image.closest('.kg-gallery-image');
const width = image.attributes.width.value;
const height = image.attributes.height.value;
const ratio = width / height;
container.style.flex = ratio + ' 1 0%';
});
}

function elasticSearch(query, callback) {
var baseUrl = 'https://advisorysg.ent.ap-southeast-1.aws.found.io';
var engine = 'ghost';
Expand Down
12 changes: 8 additions & 4 deletions author.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,20 @@
<div class="author-image-placeholder u-placeholder square">
{{#if profile_image}}
<img class="author-image lazyload u-object-fit"
data-srcset="{{img_url profile_image size="xs"}}"
src="{{img_url profile_image size="xs"}}"
src="{{img_url profile_image size='xs'}}"
srcset="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
alt="{{name}}">
{{else}}
<img class="author-image u-object-fit" src="{{img_url profile_image size="xs"}}" srcset="{{asset 'images/profile_placeholder.png'}}">
<img class="author-image u-object-fit"
src="{{img_url profile_image size="xs"}}"
srcset="{{asset 'images/profile_placeholder.png'}}">
{{/if}}
</div>
{{#if website}}
<h1 class="author-name"><a href="{{website}}" target="_blank" rel="noopener noreferrer">{{name}}</a>
<h1 class="author-name">
<a href="{{website}}" target="_blank" rel="noopener noreferrer">
{{name}}
</a>
</h1>
{{else}}
<h1 class="author-name">{{name}}</h1>
Expand Down

0 comments on commit d895e49

Please sign in to comment.