Skip to content

Commit

Permalink
Unified main nav: only one "nav" partial exists for all the pages.
Browse files Browse the repository at this point in the history
  • Loading branch information
antongit committed Jan 22, 2025
1 parent 2e2e6cc commit dd29573
Show file tree
Hide file tree
Showing 26 changed files with 66 additions and 369 deletions.
31 changes: 2 additions & 29 deletions assets/css/fonts.css
Original file line number Diff line number Diff line change
Expand Up @@ -99,20 +99,7 @@
url('../fonts/opensans/open-sans-v34-latin-300.svg#OpenSans') format('svg'); /* Legacy iOS */
}

/* open-sans-regular - latin */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: url('../fonts/opensans/open-sans-v34-latin-regular.eot'); /* IE9 Compat Modes */
src: local(''),
url('../fonts/opensans/open-sans-v34-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/opensans/open-sans-v34-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
url('../fonts/opensans/open-sans-v34-latin-regular.woff') format('woff'), /* Modern Browsers */
url('../fonts/opensans/open-sans-v34-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
url('../fonts/opensans/open-sans-v34-latin-regular.svg#OpenSans') format('svg'); /* Legacy iOS */
}


/* open-sans-600 - latin */
@font-face {
font-family: 'Open Sans';
Expand All @@ -126,21 +113,7 @@
url('../fonts/opensans/open-sans-v34-latin-600.ttf') format('truetype'), /* Safari, Android, iOS */
url('../fonts/opensans/open-sans-v34-latin-600.svg#OpenSans') format('svg'); /* Legacy iOS */
}

/* open-sans-700 - latin */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: url('../fonts/opensans/open-sans-v34-latin-700.eot'); /* IE9 Compat Modes */
src: local(''),
url('../fonts/opensans/open-sans-v34-latin-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/opensans/open-sans-v34-latin-700.woff2') format('woff2'), /* Super Modern Browsers */
url('../fonts/opensans/open-sans-v34-latin-700.woff') format('woff'), /* Modern Browsers */
url('../fonts/opensans/open-sans-v34-latin-700.ttf') format('truetype'), /* Safari, Android, iOS */
url('../fonts/opensans/open-sans-v34-latin-700.svg#OpenSans') format('svg'); /* Legacy iOS */
}


/* open-sans-800 - latin */
@font-face {
font-family: 'Open Sans';
Expand Down
1 change: 1 addition & 0 deletions assets/scss/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
{
color: #ffa800 !important;
background-color: transparent;
pointer-events: none;
}
}

Expand Down
1 change: 0 additions & 1 deletion assets/scss/main.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
@import '../css/fonts-header';
@import '../css/fonts';
@import '_default.scss';
@import '_default.scss';
@import '_hero.scss';
@import '_features.scss';
@import '_newsletterForm.scss';
Expand Down
38 changes: 24 additions & 14 deletions config.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
baseURL = "https://vvvv.org/"
languageCode = "en-us"
paginate = 20
paginatePath = "page"
pagination.pagerSize = 20
pagination.path = "page"
summaryLength = 20
title = "vvvv - visual live-programming for .NET"
relativeURLs = "true"
Expand Down Expand Up @@ -63,18 +63,28 @@ blog = '/blog/:sections[1]/:slug'

# Navigation
[params.navigation]
brand = "vvvv.org"

[params.navigation.links]
features = "features"
blog = "blog"
download = "download"
showcase = "showcase"
Learn = "learn"
community = "community"
licensing = "licensing"
support = "support"
contact = "contact"
home = "vvvv.org"

[params.menu]
[[params.menu.main]]
name = 'features'
[[params.menu.main]]
name = 'blog'
[[params.menu.main]]
name = 'showcase'
[[params.menu.main]]
name = 'learn'
[[params.menu.main]]
name = 'community'
url = 'https://forum.vvvv.org'
[[params.menu.main]]
name = 'licensing'
[[params.menu.main]]
name = 'support'
[[params.menu.main]]
name = 'download'
style = 'download'


# Hero section
[params.Hero]
Expand Down
2 changes: 1 addition & 1 deletion content/ForumHeader/_index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: forumHeader
title: community
type: forumHeader
layout: "forumHeader"
description: Header
Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</head>
<body>
<div class="main">
{{ partial "nav-blog" . }}
{{ partial "nav" . }}

{{ block "main" . }}{{ end }}

Expand Down
2 changes: 1 addition & 1 deletion layouts/community/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</head>
<body>
<div class="main">
{{ partial "nav-community" . }}
{{ partial "nav" . }}

{{ partial "community" .}}

Expand Down
3 changes: 2 additions & 1 deletion layouts/download/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
</head>
<body>
<div class="main">
{{ partial "nav-download" . }}
{{ partial "nav" . }}

{{ partial "download" .}}

{{ partial "PreviewDownloads" . }}

{{ partial "videoBlocker" . }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/features/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</head>
<body data-spy="scroll" data-target="#feature-page-pills" data-offset="450">
<div class="main">
{{ partial "nav-features" . }}
{{ partial "nav" . }}

{{ partial "features-page" .}}

Expand Down
3 changes: 0 additions & 3 deletions layouts/forumHeader/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,5 @@
{{ partial "socialBanner" $sections }}
</div>
{{ "<!-- END COPY -->" | safeHTML }}
<div class="content">
test
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion layouts/learn/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</head>
<body>
<div class="main">
{{ partial "nav-learn" . }}
{{ partial "nav" . }}

{{ partial "learn" .}}

Expand Down
2 changes: 1 addition & 1 deletion layouts/legal/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</head>
<body>
<div class="main">
{{ partial "nav-legal" . }}
{{ partial "nav" . }}

{{ partial "legal" .}}

Expand Down
2 changes: 1 addition & 1 deletion layouts/licensing/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</head>
<body>
<div class="main">
{{ partial "nav-licensing" . }}
{{ partial "nav" . }}

{{ partial "licensing" .}}

Expand Down
32 changes: 0 additions & 32 deletions layouts/partials/nav-blog.html

This file was deleted.

32 changes: 0 additions & 32 deletions layouts/partials/nav-community.html

This file was deleted.

32 changes: 0 additions & 32 deletions layouts/partials/nav-download.html

This file was deleted.

32 changes: 0 additions & 32 deletions layouts/partials/nav-features.html

This file was deleted.

23 changes: 23 additions & 0 deletions layouts/partials/nav-item.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{{ $ctx := .ctx }}
{{ $selected := .selected}}
{{ $name := index $ctx "name" }}
{{ $url := index $ctx "name" | absLangURL }}
{{ $selectedStyle := "" }}
{{ $style := "" }}

{{ with index $ctx "style"}}
{{ $style = . }}
{{ end }}

{{ if eq (lower $selected) (lower $name)}}
{{ $selectedStyle = "selected"}}
{{ end }}


{{ with index $ctx "url"}}
{{ $url = . }}
{{ end }}

<li class="{{ $style }}">
<a href="{{ $url }}" {{ if $selectedStyle }} class="selected" {{ end }}>{{ $name }}</a>
</li>
32 changes: 0 additions & 32 deletions layouts/partials/nav-learn.html

This file was deleted.

Loading

0 comments on commit dd29573

Please sign in to comment.