Skip to content

Commit 1e25d5e

Browse files
committed
Add hk promo
1 parent b29fcaf commit 1e25d5e

7 files changed

Lines changed: 89 additions & 4 deletions

File tree

src/_layouts/post.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@ <h1 class="post-title" data-pagefind-meta="title">{{ page.title | markdownify }}
4545

4646
{% if page.image %}
4747
<div class="featured-image-container mb-4">
48+
<div class="wishlist-promo">
49+
<div class="wishlist-promo-glass">
50+
<iframe src="https://store.steampowered.com/widget/3107870/" frameborder="0"></iframe>
51+
</div>
52+
53+
<img class="wishlist-promo-overlay wishlist-promo-overlay-left d-none d-md-block" src="/assets/img/posts/overlay-left.png" alt="">
54+
<img class="wishlist-promo-overlay wishlist-promo-overlay-right d-none d-xs-block" src="/assets/img/posts/overlay-right.png" alt="">
55+
<img class="wishlist-promo-overlay wishlist-promo-overlay-right d-xs-none d-sm-block" src="/assets/img/posts/overlay-right-mobile.png" alt="">
56+
</div>
4857
<img width="2048" height="400" class="featured-image" fetchpriority="high" src="{% if page.image contains ' ://' %} {{ page.image | replace_first: 'assets/img/social/', 'assets/img/cover/' }}{% else %}{{site.baseurl }}/{{ page.image | replace_first: 'assets/img/social/', 'assets/img/cover/' }}{% endif %}" alt="{{ page.title }}">
4958
{% comment %}
5059
{% if page.thumbtext %}

src/static/bundle.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
@use "./scss/pagefind" as *;
77
@use "./scss/theme" as *;
88
@use "./scss/rouge" as *;
9+
@use "./scss/wishlistpromo" as *;
910
@use "./scss/gist" as *;
12.8 KB
Loading
37.9 KB
Loading
38.2 KB
Loading

src/static/scss/theme.scss

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,15 +172,16 @@ img {
172172

173173
.featured-image {
174174
width: 100%;
175-
height: auto;
176175
display: block;
177176
margin-bottom: 2rem;
178177
margin-left: 0;
179178
margin-right: 0;
180179
box-shadow: rgba(0, 0, 0, 0.7) 0 -2px 4px 1;
181-
@media (max-width: 767.98px) {
182-
height: 192px;
183-
}
180+
//height: auto;
181+
//@media (max-width: 767.98px) {
182+
// height: 192px;
183+
//}
184+
height: 208px;
184185
}
185186

186187
.featured-image-text {

src/static/scss/wishlistpromo.scss

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
.wishlist-promo {
2+
position: absolute;
3+
top: 28px;
4+
right: 32px;
5+
width: min(700px, 100%);
6+
height: calc(200px - 33.5px);
7+
transform: scale(0.9);
8+
transform-origin: top right;
9+
overflow: visible;
10+
}
11+
12+
.wishlist-promo-glass {
13+
position: relative;
14+
width: 100%;
15+
border-radius: 4px;
16+
box-shadow: 0 0 48px rgba(0, 0, 0, 0.7);
17+
height: calc(200px - 33.5px);
18+
overflow: visible;
19+
}
20+
21+
.wishlist-promo-glass::before {
22+
content: '';
23+
position: absolute;
24+
inset: 0;
25+
border-radius: 4px;
26+
background: rgb(20 20 20 / 0.35);
27+
height: calc(200px - 33.5px);
28+
backdrop-filter: blur(8px) saturate(80%) contrast(2);
29+
-webkit-backdrop-filter: blur(8px) saturate(80%) contrast(2);
30+
z-index: 0;
31+
pointer-events: none;
32+
}
33+
34+
.wishlist-promo-glass > iframe {
35+
position: relative;
36+
z-index: 1;
37+
display: block;
38+
width: 100%;
39+
height: 200px;
40+
opacity: 0.85;
41+
border: 0;
42+
background: transparent;
43+
filter: saturate(150%);
44+
overflow: visible;
45+
}
46+
47+
.wishlist-promo-overlay {
48+
position: absolute;
49+
z-index: 2;
50+
pointer-events: none;
51+
user-select: none;
52+
53+
display: block;
54+
max-width: none;
55+
max-height: none;
56+
57+
object-fit: contain;
58+
top: 0;
59+
width: auto;
60+
}
61+
62+
.wishlist-promo-overlay-left {
63+
left: 0;
64+
height: 314px;
65+
object-position: left top;
66+
transform: translate(-116px, -70px);
67+
}
68+
69+
.wishlist-promo-overlay-right {
70+
right: 0;
71+
height: 314px;
72+
object-position: right top;
73+
transform: translate(124.5px, -72.5px);
74+
}

0 commit comments

Comments
 (0)