Skip to content

Commit 110ad67

Browse files
committed
move nav bar to below the landing-page banner
1 parent 94fdce9 commit 110ad67

File tree

11 files changed

+37
-74
lines changed

11 files changed

+37
-74
lines changed

assets/scss/_landingpage.scss

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,14 @@
33
max-width: 100vw;
44
overflow: hidden;
55

6-
@media (max-width: 1200px) {
7-
min-height: 90vh;
8-
}
6+
min-height: 100vh;
97

10-
@media (min-width: 1200px) {
11-
min-height: 100vh;
12-
}
138
background-color: #DFF1FF;
149
}
1510

1611
.landing-page-top-row {
1712
@media (max-width: 1200px) {
18-
min-height: 20vh;
13+
min-height: 25vh;
1914
}
2015

2116
@media (min-width: 1200px) {
@@ -25,7 +20,7 @@
2520

2621
.landing-page-middle-row {
2722
@media (max-width: 1200px) {
28-
min-height: 55vh;
23+
min-height: 60vh;
2924
}
3025

3126
@media (min-width: 1200px) {

assets/scss/templates/_navigation.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
.navigation{
3636
// height: 10%;
3737
top: 0;
38-
position: fixed;
38+
position: sticky;
3939
z-index: 9999;
4040
width: 100%;
4141
}
@@ -107,6 +107,7 @@
107107
display: block;
108108
margin-top: 0; /* remove the gap so it doesn't close */
109109
min-width: 200px;
110+
z-index: 9999;
110111
}
111112
}
112113

config/_default/config.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
baseURL = "https://algorithmaudit.eu"
33
title = "Algorithm Audit"
44
theme = "bigspring-light"
5-
# post pagination
6-
paginate = "6"
75
# post excerpt
86
summaryLength = "15"
97
# disqus short name

layouts/index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
{{ define "pre-main" }}
2+
{{ partial "landingpage/banner.html" . }}
3+
{{ end }}
4+
15
{{ define "main" }}
26
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"
37
rel="stylesheet" />
48

5-
{{ partial "landingpage/banner.html" . }}
6-
79
{{ partial "landingpage/activityfeed.html" . }}
810

911
{{ partial "landingpage/supportedby.html" . }}

layouts/partials/header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{ "<!-- navigation -->" | safeHTML }}
22

3-
<header class="navigation col-12" id="header-navigation">
3+
<header class="navigation col-12 shadow-sm" id="header-navigation">
44
<div class="container col-12" id="header-container">
55

66
<!-- navbar -->

layouts/partials/landingpage/banner.html

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!-- Banner -->
22
{{ with .Params.Banner }}
33
<!-- Desktop -->
4-
<section class="container landing-page-container content mx-0 mt-5 d-xl-block d-none">
4+
<div class="container landing-page-container content mx-0 d-xl-block d-none">
55
<div class="row landing-page-top-row">
66
<div class="landing-page-col col-2 d-block">
77
<div class="shape shape-xl-square-top-left"></div>
@@ -24,13 +24,16 @@
2424
</div>
2525
<div class="landing-page-col landing-page-col-content col-8">
2626
<h1 class="landing-page-title mt-5 mb-0" style="color:#005aa7;">{{.title_line1}}</h1>
27-
<h1 class="landing-page-title mt-0" style="color:#005aa7;">{{.title_line2_before}} <u>{{.title_line2_underline}}</u> {{.title_line2_after}}</h1>
27+
<h1 class="landing-page-title mt-0" style="color:#005aa7;">{{.title_line2_before}}
28+
<u>{{.title_line2_underline}}</u> {{.title_line2_after}}
29+
</h1>
2830
{{ with .slogan }}
2931
<!-- Slogan -->
3032
<div class="slider-wrapper">
3133

3234
<!-- main -->
33-
<h2 class="landing-page-slogan-title mt-5 mb-3 d-inline-block" style="color:#005aa7; font-weight:100;">{{.title}}</h2>
35+
<h2 class="landing-page-slogan-title mt-5 mb-3 d-inline-block" style="color:#005aa7; font-weight:100;">
36+
{{.title}}</h2>
3437
<!-- /main -->
3538

3639
<!-- slider -->
@@ -58,16 +61,14 @@ <h2 class="landing-page-slide-title" style="color:#005aa7; font-weight:100;"><i
5861
<!-- /slider -->
5962

6063
</div>
61-
64+
6265
{{ end }}
6366
</div>
64-
67+
6568
<div class="landing-page-col col-2 d-block">
6669
<div class="shape shape-xl-square-middle-right"></div>
6770
</div>
6871
</div>
69-
<!-- /al-go-pru-dence -->
70-
</div>
7172
<div class="row landing-page-bottom-row">
7273
<div class="landing-page-col col-2 d-block">
7374
<div class="shape shape-xl-square-bottom-left"></div>
@@ -86,11 +87,11 @@ <h2 class="landing-page-slide-title" style="color:#005aa7; font-weight:100;"><i
8687
<div class="shape shape-xl-triangle-bottom-right"></div>
8788
</div>
8889
</div>
89-
</section>
90-
<section class="landing-page-clear-bottom d-xl-block d-none"></section>
90+
<!-- /al-go-pru-dence -->
91+
</div>
9192
<!-- /Desktop -->
9293
<!-- Mobile -->
93-
<section class="container landing-page-container content mx-0 mt-5 d-block d-xl-none">
94+
<div class="container landing-page-container content mx-0 d-block d-xl-none">
9495
<div class="row landing-page-top-row">
9596
<div class="landing-page-col col-12">
9697
<div class="shape shape-sm-square-top-left"></div>
@@ -118,7 +119,8 @@ <h1 class="landing-page-title mt-0" style="color:#005aa7;">
118119
<div class="slider-wrapper">
119120

120121
<!-- main -->
121-
<h2 class="landing-page-slogan-title mt-5 mb-3 d-inline-block" style="color:#005aa7; font-weight:100;">{{.title}}</h2>
122+
<h2 class="landing-page-slogan-title mt-5 mb-3 d-inline-block" style="color:#005aa7; font-weight:100;">
123+
{{.title}}</h2>
122124
<!-- /main -->
123125

124126
<!-- slider -->
@@ -146,12 +148,10 @@ <h2 class="landing-page-slide-title" style="color:#005aa7; font-weight:100;"><i
146148
<!-- /slider -->
147149

148150
</div>
149-
151+
150152
{{ end }}
151153
</div>
152154
</div>
153-
<!-- /al-go-pru-dence -->
154-
</div>
155155
<div class="row landing-page-bottom-row">
156156
<div class="landing-page-col col-12">
157157
<div class="shape shape-sm-circle-bottom-left"></div>
@@ -164,8 +164,8 @@ <h2 class="landing-page-slide-title" style="color:#005aa7; font-weight:100;"><i
164164
<div class="shape shape-sm-square-bottom-most-right"></div>
165165
</div>
166166
</div>
167-
</section>
168-
<section class="landing-page-clear-bottom d-block d-xl-none"></section>
167+
<!-- /al-go-pru-dence -->
168+
</div>
169169
<!-- /Mobile -->
170170
{{ end }}
171171
<!-- /Banner -->

package-lock.json

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"dependencies": {
1414
"@tinacms/cli": "^1.9.0",
1515
"hugo": "^0.0.3",
16-
"hugo-extended": "^0.128.0",
16+
"hugo-extended": "^0.145.0",
1717
"tinacms": "^2.7.0"
1818
},
1919
"devDependencies": {

static/js/main.js

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,3 @@
1-
// Sticky navigation bar on scroll down
2-
var didScroll;
3-
var lastScrollTop = 0;
4-
var delta = 5;
5-
var navbarHeight = $("header").outerHeight();
6-
7-
$(window).scroll(function (event) {
8-
didScroll = true;
9-
});
10-
11-
setInterval(function () {
12-
if (didScroll) {
13-
hasScrolled();
14-
didScroll = false;
15-
}
16-
}, 250);
17-
18-
function hasScrolled() {
19-
var st = $(this).scrollTop();
20-
21-
// Make scroll more than delta
22-
if (Math.abs(lastScrollTop - st) <= delta) return;
23-
24-
// If scrolled down and past the navbar, add class .nav-up.
25-
if (st > lastScrollTop && st > navbarHeight) {
26-
// Scroll Down
27-
$("header").addClass("nav-up");
28-
} else {
29-
// Scroll Up
30-
if (st + $(window).height() < $(document).height()) {
31-
$("header").removeClass("nav-up");
32-
}
33-
}
34-
35-
lastScrollTop = st;
36-
}
37-
381
// facets
392
docReady(function () {
403
$(".facet-checkbox").change(function () {

themes/bigspring-light/layouts/_default/baseof.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
{{ else }}
2828
{{ partial "preloader.html" . }}
2929
{{ end }}
30+
<div>
31+
{{ block "pre-main" . }}{{ end }}
32+
</div>
3033
{{ partial "header.html" . }}
3134

3235
<main>

0 commit comments

Comments
 (0)