Skip to content

Commit 1066ba1

Browse files
committed
Add background to map cards
1 parent c778543 commit 1066ba1

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

_includes/mapCard.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
<div class="col-md-4 mb-5">
55
<div class="card h-100">
66
<div class="relative-container">
7-
<a href="{{ include.map.url | relative_url }}"><img class="card-img-top" src="{{ gpffd_png_file.name }}" style="width:100%;height:400px;object-fit: contain;" class="w3-hover-opacity"></a>
7+
<a href="{{ include.map.url | relative_url }}"><img class="card-img-top map-card-image-board" src="{{ gpffd_png_file.name }}"></a>
8+
<img class="card-img-top map-card-image-background" src="backgrounds/{{ include.map.background }}.webp">
89
<div class="top-right-absolute">
910
{% if include.map.changeLog -%}
1011
{%- assign firstChange = include.map.changeLog | first -%}

_layouts/default.html

+21
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,48 @@
1919
position: absolute;
2020
bottom: 8px;
2121
left: 16px;
22+
z-index: 3;
2223
}
2324
.top-left-absolute {
2425
position: absolute;
2526
top: 8px;
2627
left: 16px;
28+
z-index: 3;
2729
}
2830
.top-right-absolute {
2931
position: absolute;
3032
top: 8px;
3133
right: 16px;
34+
z-index: 3;
3235
}
3336
.bottom-right-absolute {
3437
position: absolute;
3538
bottom: 8px;
3639
right: 16px;
40+
z-index: 3;
3741
}
3842
.centered-absolute {
3943
position: absolute;
4044
top: 50%;
4145
left: 50%;
4246
transform: translate(-50%, -50%);
47+
z-index: 3;
48+
}
49+
.map-card-image-board {
50+
width:100%;
51+
height:400px;
52+
object-fit:contain;
53+
position:absolute;
54+
filter: drop-shadow(0 0 6px #000b);
55+
z-index: 2;
56+
}
57+
.map-card-image-background {
58+
width:100%;
59+
height:400px;
60+
object-fit:cover;
61+
position:relative;
62+
filter: blur(1px) grayscale(50%) contrast(50%) opacity(50%);
63+
z-index: 1;
4364
}
4465
</style>
4566
</head>

0 commit comments

Comments
 (0)