chg: [menu] initial menu migration

pull/56/head
Christophe Vandeplas 2022-01-09 21:29:14 +01:00
parent a1ace1a0b7
commit 6f1ad93779
6 changed files with 225 additions and 264 deletions

View File

@ -1,9 +0,0 @@
<!-- CTA -->
<section id="cta" class="wrapper style3">
<div class="container">
<header>
<h2>Want to test and evaluate MISP?</h2>
<a href="{{ site.baseurl }}/download" class="button">Download</a>
</header>
</div>
</section>

View File

@ -71,280 +71,70 @@ disablePathToLower = "True"
parent = "menu.features"
post = 1
[[menu.main]]
name = "Header variations"
identifier = "section.headervariations"
url = ""
name = "Download"
identifier = "menu.download"
url = "/download/"
weight = 2
parent = "menu.features"
post = 2
[[menu.main]]
name = "Accordions"
url = ""
weight = 1
parent = "section.shortcodes"
[[menu.main]]
name = "Alerts"
url = ""
weight = 2
parent = "section.shortcodes"
[[menu.main]]
name = "Buttons"
url = ""
name = "Data Models"
identifier = "menu.datamodels"
url = "/img/misp-standard.png"
weight = 3
parent = "section.shortcodes"
[[menu.main]]
name = "Content Boxes"
url = ""
name = "Data Models"
url = "/datamodels/"
identifier = "section.dm"
weight = 1
parent = "menu.datamodels"
post = 1
[[menu.main]]
name = "MISP core format"
url = "/datamodels/#misp-core-format"
weight = 2
parent = "menu.datamodels"
post = 1
[[menu.main]]
name = "MISP taxonomies"
url = "/datamodels/#misp-taxonomies"
weight = 3
parent = "menu.datamodels"
post = 1
[[menu.main]]
name = "MISP Galaxy"
url = "/datamodels/#misp-galaxy"
weight = 4
parent = "section.shortcodes"
parent = "menu.datamodels"
post = 1
[[menu.main]]
name = "Horizontal Blocks"
url = ""
name = "MISP Objects"
url = "/datamodels/#misp-objects"
weight = 5
parent = "section.shortcodes"
parent = "menu.datamodels"
post = 1
[[menu.main]]
name = "Pagination"
url = ""
name = "Default feeds"
url = "/feeds/"
weight = 6
parent = "section.shortcodes"
[[menu.main]]
name = "Tabs"
url = ""
weight = 7
parent = "section.shortcodes"
[[menu.main]]
name = "Typography"
url = ""
weight = 8
parent = "section.shortcodes"
[[menu.main]]
name = "Default Sticky Header"
url = ""
weight = 1
parent = "section.headervariations"
[[menu.main]]
name = "No Sticky Header"
url = ""
weight = 2
parent = "section.headervariations"
[[menu.main]]
name = "Light Header"
url = ""
weight = 3
parent = "section.headervariations"
[[menu.main]]
name = "Portfolio"
identifier = "menu.portfolio"
url = "/img/template-homepage.png"
weight = 3
[[menu.main]]
name = "Portfolio"
identifier = "section.portfolio"
url = ""
weight = 1
parent = "menu.portfolio"
parent = "menu.datamodels"
post = 1
[[menu.main]]
name = "2 Columns"
url = ""
weight = 1
parent = "section.portfolio"
[[menu.main]]
name = "2 Columns With Negative Space"
url = ""
weight = 2
parent = "section.portfolio"
[[menu.main]]
name = "3 Columns"
url = ""
weight = 3
parent = "section.portfolio"
[[menu.main]]
name = "3 Columns With Negative Space"
url = ""
weight = 4
parent = "section.portfolio"
[[menu.main]]
name = "4 Columns"
url = ""
weight = 5
parent = "section.portfolio"
[[menu.main]]
name = "4 Columns With Negative Space"
url = ""
weight = 6
parent = "section.portfolio"
[[menu.main]]
name = "Portfolio - detail"
url = ""
weight = 7
parent = "section.portfolio"
[[menu.main]]
name = "Portfolio - detail 2"
url = ""
weight = 8
parent = "section.portfolio"
[[menu.main]]
name = "About"
identifier = "section.about"
url = ""
weight = 2
parent = "menu.portfolio"
post = 2
[[menu.main]]
name = "About Us"
url = ""
weight = 1
parent = "section.about"
[[menu.main]]
name = "Our Team"
url = ""
weight = 2
parent = "section.about"
[[menu.main]]
name = "Marketing"
identifier = "section.marketing"
url = ""
weight = 3
parent = "menu.portfolio"
post = 2
[[menu.main]]
name = "Packages"
url = ""
weight = 1
parent = "section.marketing"
[[menu.main]]
name = "All Pages"
identifier = "menu.allpages"
url = ""
weight = 4
[[menu.main]]
name = "Home"
identifier = "section.ap-home"
url = ""
weight = 1
parent = "menu.allpages"
post = 1
[[menu.main]]
name = "About"
identifier = "section.ap-about"
url = ""
weight = 2
parent = "menu.allpages"
post = 1
[[menu.main]]
name = "Marketing"
identifier = "section.ap-marketing"
url = ""
weight = 3
parent = "menu.allpages"
post = 1
[[menu.main]]
name = "Portfolio"
identifier = "section.ap-portfolio"
url = ""
weight = 1
parent = "menu.allpages"
post = 2
[[menu.main]]
name = "User Pages"
identifier = "section.ap-userpages"
url = ""
weight = 2
parent = "menu.allpages"
post = 2
[[menu.main]]
name = "Shop"
identifier = "section.ap-shop"
url = ""
weight = 1
parent = "menu.allpages"
post = 3
[[menu.main]]
name = "Shop - Order Process"
identifier = "section.ap-shoporderprocess"
url = ""
weight = 2
parent = "menu.allpages"
post = 3
[[menu.main]]
name = "Contact"
identifier = "section.ap-contact"
url = ""
weight = 1
parent = "menu.allpages"
post = 4
[[menu.main]]
name = "Pages"
identifier = "section.ap-pages"
url = ""
weight = 2
parent = "menu.allpages"
post = 4
[[menu.main]]
name = "Blog"
identifier = "section.ap-blog"
url = "/blog/"
weight = 3
parent = "menu.allpages"
post = 4
[[menu.main]]
name = "Blog Listing Big"
url = "/blog/"
weight = 1
parent = "section.ap-blog"
[[menu.main]]
name = "Blog"
name = "News"
identifier = "menu.blog"
url = "/blog/"
weight = 5
[[menu.main]]
name = "FAQ"
identifier = "menu.faq"
url = "/faq/"
weight = 6
[[menu.main]]
identifier = "contact"
name = "Contact"
@ -357,7 +147,7 @@ disablePathToLower = "True"
[[menu.topbar]]
weight = 1
name = "Book"
url = "https://www.circl.lu/doc/misp/"
url = "/documentation"
pre = "<i class='fas fa-2x fa-book'></i>"
[[menu.topbar]]
@ -446,7 +236,7 @@ disablePathToLower = "True"
enableRecaptchaInContactForm = false
googleRecaptchaKey = "site_key_for_google_recaptcha"
about_us = '<img class="img-responsive" src="/img/cef-white.png"><br/><a href="https://www.misp-standard.org/"><img class="img-responsive" src="/img/misp-standard.png"></a>'
about_us = '<img class="img-responsive" src="/img/cef-white.png"><br/><a href="https://www.misp-standard.org/"><img class="img-responsive" src="/img/misp-standard-dark.png"></a>'
copyright = "© MISP project. Software released under approved open source licenses and content released as CC BY-SA 3.0."
# Format dates with Go's time formatting
@ -457,7 +247,7 @@ disablePathToLower = "True"
logo = "img/logo.png"
logo_small = "img/logo-small.png"
contact_url = "/contact"
contact_url = "/support"
address = """
"""

169
layouts/partials/nav.html Normal file
View File

@ -0,0 +1,169 @@
<header class="navbar-affixed-top" data-spy="affix" data-offset-top="62">
<div class="navbar navbar-default yamm" role="navigation" id="navbar">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand home" href="{{ "/" | relURL }}">
{{ if default false .Site.Params.disabled_logo }}
<h4>{{ .Site.Params.logo_text }}</h4>
{{ else }}
<img src="{{ .Site.Params.logo | relURL }}" alt="{{ .Title }} logo" class="hidden-xs hidden-sm" />
<img src="{{ .Site.Params.logo_small | relURL }}" alt="{{ .Title }} logo" class="visible-xs visible-sm" />
{{ end }}
<span class="sr-only">{{ .Title }} - {{ i18n "navHome" }}</span>
</a>
<div class="navbar-buttons">
<button type="button" class="navbar-toggle btn-template-main" data-toggle="collapse" data-target="#navigation">
<span class="sr-only">{{ i18n "navToggle" }}</span>
<i class="fas fa-align-justify"></i>
</button>
</div>
</div>
<!--/.navbar-header -->
<div class="navbar-collapse collapse" id="navigation">
<ul class="nav navbar-nav navbar-right">
{{ $current := . }}
{{ range .Site.Menus.main.ByWeight }}
{{ $topLevel := replace .URL "/" "" }}
{{ $active := "" }}
{{ if eq $current.RelPermalink .URL }}
{{ $active = "active" }}
{{ end }}
{{ if eq $current.Type $topLevel }}
{{ $active = "active" }}
{{ end }}
{{ if and (or (eq $current.RelPermalink .URL) (eq "term" $current.Kind)) (in (slice "page" "term") $current.Kind) }}
{{ range (split .URL "/") }}
{{ if eq "blog" . }}
{{ $active = "active" }}
{{ end }}
{{ end }}
{{ end }}
{{ if .HasChildren }}
<!-- Check if the first child marks a menu section identifier -->
{{ $hasSections := (hasPrefix (index .Children 0).Identifier "section.") }}
<li class="dropdown{{ if $hasSections }} use-yamm yamm-fw{{end}} {{ $active }}">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{ .Name }} <span class="caret"></span></a>
{{ if $hasSections }}
<ul class="dropdown-menu">
<li>
<div class="yamm-content">
<div class="row">
{{ if ne .URL "" }}
<div class="col-sm-6">
<img src="{{ .URL }}" class="img-responsive hidden-xs"/>
</div>
{{ end }}
<div class="col-sm-3">
<ul>
{{ range .Children.ByWeight }}
{{ $column := printf "%s" .Post }}
{{ if eq $column "1" }}
<li><a href="{{ .URL}}">{{ .Name }}</a></li>
{{ if .HasChildren }}
<ul>
{{ range .Children.ByWeight }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{- end }}
</ul>
{{ end }}
{{ end }}
{{ end }}
</ul>
</div>
<div class="col-sm-3">
<ul>
{{ range .Children.ByWeight }}
{{ $column := printf "%s" .Post }}
{{ if eq $column "2" }}
<li><a href="{{ .URL}}">{{ .Name }}</a></li>
{{ if .HasChildren }}
<ul>
{{ range .Children.ByWeight }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}
</ul>
{{ end }}
{{ end }}
{{ end }}
</ul>
</div>
{{ if eq .URL "" }}
<div class="col-sm-3">
<ul>
{{ range .Children }}
{{ $column := printf "%s" .Post }}
{{ if eq $column "3" }}
<li><a href="{{ .URL}}">{{ .Name }}</a></li>
{{ if .HasChildren }}
<ul>
{{ range .Children.ByWeight }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}
</ul>
{{ end }}
{{ end }}
{{ end }}
</ul>
</div>
<div class="col-sm-3">
<ul>
{{ range .Children }}
{{ $column := printf "%s" .Post }}
{{ if eq $column "4" }}
<li><a href="{{ .URL}}">{{ .Name }}</a></li>
{{ if .HasChildren }}
<ul>
{{ range .Children.ByWeight }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}
</ul>
{{ end }}
{{ end }}
{{ end }}
</ul>
</div>
{{ end }}
</div>
</div>
</li>
</ul>
{{ else }}
<ul class="dropdown-menu">
{{ range .Children.ByWeight }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}
</ul>
{{ end }}
</li>
{{ else }}
<li class="dropdown {{ $active }}">
<a href="{{ .URL }}">{{ .Name }}</a>
</li>
{{ end }}
{{ end }}
</ul>
</div>
<!--/.nav-collapse -->
<div class="collapse clearfix" id="search">
<form class="navbar-form" role="search">
<div class="input-group">
<input type="text" class="form-control" placeholder="Search">
<span class="input-group-btn">
<button type="submit" class="btn btn-template-main"><i class="fas fa-search"></i></button>
</span>
</div>
</form>
</div>
<!--/.nav-collapse -->
</div>
</div>
</header>
<!-- *** NAVBAR END ***-->

View File

@ -27,6 +27,17 @@
}
.navbar ul.dropdown-menu li a {
color: #333333;
font-size: 14px;
}
.navbar .yamm-content h5 {
border-bottom: none;
}
.dropdown-menu {
opacity: 95%;
}
/* all img in blog posts are responsive */
#blog-post img {
display: block;

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 15 KiB