Skip to content

Commit 747b24e

Browse files
committed
Nasty hack to highlight the start page in the topbar navigation
1 parent 1c837e4 commit 747b24e

8 files changed

Lines changed: 37 additions & 24 deletions

File tree

_config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# ASCII-Font › http://patorjk.com/software/taag/#p=display&f=Slant&t=Phlow
22
#
3-
# _____ _ __ _____ __ __ _
3+
# _____ _ __ _____ __ __ _
44
# / ___/(_) /____ / ___/___ / /_/ /_(_)___ ____ ______
55
# \__ \/ / __/ _ \ \__ \/ _ \/ __/ __/ / __ \/ __ `/ ___/
6-
# ___/ / / /_/ __/ ___/ / __/ /_/ /_/ / / / / /_/ (__ )
7-
# /____/_/\__/\___/ /____/\___/\__/\__/_/_/ /_/\__, /____/
8-
# /____/
6+
# ___/ / / /_/ __/ ___/ / __/ /_/ /_/ / / / / /_/ (__ )
7+
# /____/_/\__/\___/ /____/\___/\__/\__/_/_/ /_/\__, /____/
8+
# /____/
99
#
1010
# Title of your website
1111
title: "Feeling Responsive"

_drafts/page_all_frontmatter.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,14 @@ meta_title: # SEO: Overwrites title in <head> if needed
4646
meta_description:
4747
permalink:
4848
tawkto: true # Enable tawk.to-Service › More › _config.yml
49+
callforaction:
50+
url:
51+
text:
52+
style: alert
53+
#
54+
# This is a nasty hack to make the navigation highlight
55+
# this page as active in the topbar navigation
56+
#
57+
startpage: false
4958
---
5059

_includes/_navigation.html

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
<div id="navigation" class="sticky">
32
<nav class="top-bar" role="navigation" data-topbar>
43
<ul class="title-area">
@@ -11,12 +10,12 @@ <h1 class="show-for-small-only"><a href="{{ site.url }}{{ site.baseurl }}" class
1110
<section class="top-bar-section">
1211
{% comment %}
1312

14-
____ _ __ __ _ __ _ __ _
15-
/ __ \(_)___ _/ /_ / /_ / | / /___ __ __(_)___ _____ _/ /_(_)___ ____
13+
____ _ __ __ _ __ _ __ _
14+
/ __ \(_)___ _/ /_ / /_ / | / /___ __ __(_)___ _____ _/ /_(_)___ ____
1615
/ /_/ / / __ `/ __ \/ __/ / |/ / __ `/ | / / / __ `/ __ `/ __/ / __ \/ __ \
1716
/ _, _/ / /_/ / / / / /_ / /| / /_/ /| |/ / / /_/ / /_/ / /_/ / /_/ / / / /
18-
/_/ |_/_/\__, /_/ /_/\__/ /_/ |_/\__,_/ |___/_/\__, /\__,_/\__/_/\____/_/ /_/
19-
/____/ /____/
17+
/_/ |_/_/\__, /_/ /_/\__/ /_/ |_/\__,_/ |___/_/\__, /\__,_/\__/_/\____/_/ /_/
18+
/____/ /____/
2019

2120
{% endcomment %}
2221
<ul class="right">
@@ -35,7 +34,7 @@ <h1 class="show-for-small-only"><a href="{{ site.url }}{{ site.baseurl }}" class
3534
{% comment %} If right side WITHOUT dropdown menu do {% endcomment %}
3635
{% if link.dropdown == nil %}
3736
<li class="divider"></li>
38-
<li{% if link.url == page.url %} class="active"{% endif %}><a href="{{ domain }}{{ site.baseurl }}{{ link.url }}"{% if link.url contains 'http' %} target="_blank"{% endif %}>{{ link.title | escape }}</a></li>
37+
<li{% if link.url == page.url %} class="active"{% elsif page.startpage == true and link.url == '/' %} class="active"{% endif %}><a href="{{ domain }}{{ site.baseurl }}{{ link.url }}"{% if link.url contains 'http' %} target="_blank"{% endif %}>{{ link.title | escape }}</a></li>
3938

4039
{% comment %} If right side WITH dropdown menu do {% endcomment %}
4140
{% else %}
@@ -56,7 +55,7 @@ <h1 class="show-for-small-only"><a href="{{ site.url }}{{ site.baseurl }}" class
5655
<li><a href="{{ domain }}{{ site.baseurl }}{{ dropdown_link.url }}"{% if dropdown_link.url contains 'http' %} target="_blank"{% endif %}>{{ dropdown_link.title | escape }}</a></li>
5756
{% endfor %}
5857
</ul>
59-
58+
6059
</li>
6160
{% endif %}
6261
{% endif %}
@@ -65,12 +64,12 @@ <h1 class="show-for-small-only"><a href="{{ site.url }}{{ site.baseurl }}" class
6564
</ul>
6665
{% comment %}
6766

68-
__ ______ _ __ _ __ _
69-
/ / ___ / __/ /_ / | / /___ __ __(_)___ _____ _/ /_(_)___ ____
67+
__ ______ _ __ _ __ _
68+
/ / ___ / __/ /_ / | / /___ __ __(_)___ _____ _/ /_(_)___ ____
7069
/ / / _ \/ /_/ __/ / |/ / __ `/ | / / / __ `/ __ `/ __/ / __ \/ __ \
7170
/ /___/ __/ __/ /_ / /| / /_/ /| |/ / / /_/ / /_/ / /_/ / /_/ / / / /
72-
/_____/\___/_/ \__/ /_/ |_/\__,_/ |___/_/\__, /\__,_/\__/_/\____/_/ /_/
73-
/____/
71+
/_____/\___/_/ \__/ /_/ |_/\__,_/ |___/_/\__, /\__,_/\__/_/\____/_/ /_/
72+
/____/
7473

7574
{% endcomment %}
7675
<ul class="left">
@@ -89,7 +88,7 @@ <h1 class="show-for-small-only"><a href="{{ site.url }}{{ site.baseurl }}" class
8988

9089
{% comment %} If left side WITHOUT dropdown menu do {% endcomment %}
9190
{% if link.dropdown == nil %}
92-
<li{% if link.url == page.url %} class="active"{% endif %}><a href="{{ domain }}{{ site.baseurl }}{{ link.url }}"{% if link.url contains 'http' %} target="_blank"{% endif %}>{{ link.title | escape }}</a></li>
91+
<li{% if link.url == page.url %} class="active"{% elsif page.startpage == true and link.url == '/' %} class="active"{% endif %}><a href="{{ domain }}{{ site.baseurl }}{{ link.url }}"{% if link.url contains 'http' %} target="_blank"{% endif %}>{{ link.title | escape }}</a></li>
9392
<li class="divider"></li>
9493

9594
{% comment %} If left side WITH dropdown menu do {% endcomment %}
@@ -110,7 +109,7 @@ <h1 class="show-for-small-only"><a href="{{ site.url }}{{ site.baseurl }}" class
110109
<li><a href="{{ domain }}{{ site.baseurl }}{{ dropdown_link.url }}"{% if dropdown_link.url contains 'http' %} target="_blank"{% endif %}>{{ dropdown_link.title | escape }}</a></li>
111110
{% endfor %}
112111
</ul>
113-
112+
114113
</li>
115114
<li class="divider"></li>
116115
{% endif %}

_layouts/default.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@
66
<head>
77
{% include _head.html %}
88
</head>
9-
<body id="top-of-page" class="{{ layout.format }}">
9+
<body id="top-of-page" class="{{ page.format }}">
1010
{% unless page.skip_boilerplate %}
1111
{% include _navigation.html %}
1212
{% endunless %}
1313

1414
{% include _masthead.html %}
15-
1615
{{ content }}
1716

1817
{% unless page.skip_boilerplate %}

_layouts/frontpage.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
layout: default
3-
format: blog-index
3+
format: frontpage
44
---
55
<div id="header-home">
66
<div class="row">

_sass/_06_typography.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ blockquote {
235235
position: relative;
236236
border: none;
237237
margin: 0 30px 30px 30px;
238-
color: #4b4b4d
238+
color: $grey-11;
239239
}
240240

241241
blockquote p {font-style: italic; color: $grey-10; }
@@ -247,7 +247,7 @@ blockquote {
247247
position:absolute;
248248
left:-25px;
249249
top: auto;
250-
color:#4b4b4d
250+
color: $grey-11;
251251
}
252252
blockquote:after {
253253
display:block;
@@ -257,13 +257,13 @@ blockquote {
257257
position:absolute;
258258
right:-10px;
259259
bottom: 20px;
260-
color:#4b4b4d;
260+
color: $grey-11;
261261
}
262262
blockquote cite:before {
263263
content:"\2014 \0020"
264264
}
265265
blockquote cite a,blockquote cite a:visited {
266-
color: #555
266+
color: $grey-10;
267267
}
268268
cite {
269269
padding-top: 5px;

pages/pages-root-folder/404.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ layout: page
33
title: "Oops! Nothing here..."
44
subheadline: "HTTP 404"
55
teaser: "Maybe the webpage was moved or deleted; or did you maybe mistype the link?"
6+
sitemap: false
67
permalink: "/404.html"
78
---
89
## No problem!

pages/pages-root-folder/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ callforaction:
3737
text: Inform me about new updates and features ›
3838
style: alert
3939
permalink: /index.html
40+
#
41+
# This is a nasty hack to make the navigation highlight
42+
# this page as active in the topbar navigation
43+
#
44+
startpage: true
4045
---
4146

4247
<div id="videoModal" class="reveal-modal large" data-reveal="">

0 commit comments

Comments
 (0)