Skip to content

Commit f811271

Browse files
committed
Preload top-hero images
1 parent 9cecfe3 commit f811271

File tree

6 files changed

+12
-2
lines changed

6 files changed

+12
-2
lines changed

_includes/head.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
<link rel="stylesheet" href="/assets/css/beacon.css">
1818
{% endif %}
1919

20+
{% if page.preload_image %}
21+
<link rel="preload" href="{{ page.preload_image | absolute_url }}" as="image">
22+
{% endif %}
2023

2124
<!-- Open Graph Tags-->
2225
<meta property="og:title" content="{{ page.title }}">

assets/css/beacon.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
---
22
---
33
.beacon-hero {
4-
background-image: url(../img/beacon_banner.jpg);
4+
background-image:
5+
url(../img/beacon_banner.jpg),
6+
//fallback while loading
7+
linear-gradient(135deg, var(--primary-color) 60%, var(--accent-color) 90%);
58
height: 500px;
69

710
.hero-content {

assets/css/frontpage.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
background-image: linear-gradient(104.31deg, rgba(0, 0, 0, 0.76) 39%, rgba(230, 50, 53, 0.81) 90%),
55
url(../img/frontpage_banner.jpg);
66

7+
background-blend-mode: overlay, screen, overlay;
8+
79
height: 500px;
810
}
911

assets/css/main.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ html {
6060
.hero {
6161
height: 450px;
6262

63-
background-blend-mode: overlay;
63+
background-color: black;
6464
background-size: cover;
6565
background-position: center;
6666

beacon.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
layout: frontpage
33
title: SensorFu Beacon - Always know if your network leaks!
44
description: SensorFu Ltd manufactures and sells advanced automatic security policy checks. SensorFu’s first product, SensorFu Beacon, assures the isolation of computer networks.
5+
preload_image: /assets/img/beacon_banner.jpg
56
---
67

78
<div class="hero beacon-hero">

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
layout: frontpage
33
title: SensorFu Beacon - Always know if your network leaks!
44
description: SensorFu Ltd manufactures and sells advanced automatic security policy checks. SensorFu’s first product, SensorFu Beacon, assures the isolation of computer networks.
5+
preload_image: /assets/img/frontpage_banner.jpg
56
---
67
<div class="hero front-hero">
78
<div class="container-xl">

0 commit comments

Comments
 (0)