This repository has been archived by the owner on Jan 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
page.hbs
75 lines (62 loc) · 2.26 KB
/
page.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{{!< default }}
{{#post}}
{{#if feature_image}}
<style type="text/css">
.cover {
background-image: url({{img_url feature_image size="s"}});
background-image: -webkit-image-set(url({{img_url feature_image size="s"}}) 1x,
url({{img_url feature_image size="l"}}) 2x);
background-image: image-set(url({{img_url feature_image size="s"}}) 1x,
url({{img_url feature_image size="l"}}) 2x);
}
@media(min-width: 768px) {
.cover {
background-image: url({{img_url feature_image size="l"}});
background-image: -webkit-image-set(url({{img_url feature_image size="l"}}) 1x,
url({{img_url feature_image size="xxl"}}) 2x);
background-image: image-set(url({{img_url feature_image size="l"}}) 1x,
url({{img_url feature_image size="xxl"}}) 2x);
}
}
@media(min-width: 1024px) {
.cover {
background-image: url({{img_url feature_image size="xl"}});
background-image: -webkit-image-set(url({{img_url feature_image size="xl"}}) 1x,
url({{img_url feature_image size="3xl"}}) 2x);
background-image: image-set(url({{img_url feature_image size="xl"}}) 1x,
url({{img_url feature_image size="3xl"}}) 2x);
}
}
@media(min-width: 1440px) {
.cover {
background-image: url({{img_url feature_image size="3xl"}});
}
}
</style>
{{/if}}
<section class="cover cover--post {{#if feature_image}}isCoverEnable {{else}}isCoverDisabled{{/if}}">
{{> "cover/cover-page"}}
</section>
<main class='page-container' role='main'>
<article class='page-wrapper u-content-center'>
<section class='page'>
{{content}}
</section>
</article>
</main>
{{#if @labs.members}}
<section class="subscription">
{{> subscription/subscription }}
</section>
{{/if}}
{{/post}}
<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>