diff --git a/portal/config.toml b/portal/config.toml index 51e5f5d622dd07fd26438512bf54be2936521a02..41537a6cefadbd1360b35f339efbaa1bf9999a0d 100644 --- a/portal/config.toml +++ b/portal/config.toml @@ -2,7 +2,7 @@ baseURL = "https://open-data.pages.km3net.de/openscienceportal" languageCode = "en-us" title = "KM3NeT Open Science Portal" -relativeURLs = true +# relativeURLs = true contentdir = "content" layoutdir = "layouts" publishdir = "public" @@ -11,3 +11,27 @@ DefaultContentLanguage = "en" metaDataFormat = "yaml" pygmentsUseClasses = true pygmentCodeFences = true + +[[menu.main]] + name = "Getting Started" + url = "/articles/getting-started" + weight = 1 +[[menu.main]] + name = "Science" + url = "/articles/science" + weight = 2 + +[[menu.main]] + name = "Data" + url = "/articles/data" + weight = 3 + +[[menu.main]] + name = "Software" + url = "/articles/software" + weight = 4 + +[[menu.main]] + name = "Experts Corner" + url = "/articles/experts" + weight = 5 diff --git a/portal/layouts/index.html b/portal/layouts/index.html index 4bc2097610500accdf3d5e32eef36e5d8d84299d..32a9cf1112f1950a7cbba789e76fcdf72548954b 100644 --- a/portal/layouts/index.html +++ b/portal/layouts/index.html @@ -1,65 +1,65 @@ {{ partial "head.html" . }} -<main> -<section> - <!-- this section is populated from content/_index.md --> - <header> - <h1>{{.Title}}</h1> - </header> +<!-- <main> --> +<!-- <section> --> +<!-- <\!-- this section is populated from content/_index.md -\-> --> +<!-- <header> --> +<!-- <h1>{{.Title}}</h1> --> +<!-- </header> --> - <article> - {{.Content}} - </article> +<!-- <article> --> +<!-- {{.Content}} --> +<!-- </article> --> - <footer> - <!-- Note that .Pages is the same as .Site.RegularPages on the homepage template. --> - {{ range first 10 .Pages }} - {{ .Render "summary"}} - {{ end }} - </footer> -</section> +<!-- <footer> --> +<!-- <\!-- Note that .Pages is the same as .Site.RegularPages on the homepage template. -\-> --> +<!-- {{ range first 10 .Pages }} --> +<!-- {{ .Render "summary"}} --> +<!-- {{ end }} --> +<!-- </footer> --> +<!-- </section> --> -<section> - <!-- this section is populated by pulling posts from the site --> - {{ range first 1 (where .Pages.ByPublishDate.Reverse "Section" "posts") }} - <article> - <header> - <h2>{{ .Title }}</h2> - <p><time datetime="{{.Date}}">{{ .Date.Format "Mon, Jan 2, 2006" }}</time></p> - </header> - {{ .Summary }} - <nav> - <ul> - <li><a href="{{ .RelPermalink }}">Read More »</a></li> - </ul> - </nav> - </article> - {{ end }} - <footer> - <a href="{{ "posts/" | absURL }}">All posts...</a> - </footer> -</section> +<!-- <section> --> +<!-- <\!-- this section is populated by pulling posts from the site -\-> --> +<!-- {{ range first 1 (where .Pages.ByPublishDate.Reverse "Section" "posts") }} --> +<!-- <article> --> +<!-- <header> --> +<!-- <h2>{{ .Title }}</h2> --> +<!-- <p><time datetime="{{.Date}}">{{ .Date.Format "Mon, Jan 2, 2006" }}</time></p> --> +<!-- </header> --> +<!-- {{ .Summary }} --> +<!-- <nav> --> +<!-- <ul> --> +<!-- <li><a href="{{ .RelPermalink }}">Read More »</a></li> --> +<!-- </ul> --> +<!-- </nav> --> +<!-- </article> --> +<!-- {{ end }} --> +<!-- <footer> --> +<!-- <a href="{{ "posts/" | absURL }}">All posts...</a> --> +<!-- </footer> --> +<!-- </section> --> -<section> - <!-- this section is populated by pulling articles from the site --> - {{ range first 1 (where .Pages.ByPublishDate.Reverse "Section" "articles") }} - <article> - <header> - <h2>{{ .Title }}</h2> - <p><time datetime="{{.Date}}">{{ .Date.Format "Mon, Jan 2, 2006" }}</time></p> - </header> - {{ .Summary }} - <nav> - <ul> - <li><a href="{{ .RelPermalink }}">Read More »</a></li> - </ul> - </nav> - </article> - {{ end }} - <footer> - <a href="{{ "articles/" | absURL }}">All articles...</a> - </footer> -</section> -</main> +<!-- <section> --> +<!-- <\!-- this section is populated by pulling articles from the site -\-> --> +<!-- {{ range first 1 (where .Pages.ByPublishDate.Reverse "Section" "articles") }} --> +<!-- <article> --> +<!-- <header> --> +<!-- <h2>{{ .Title }}</h2> --> +<!-- <p><time datetime="{{.Date}}">{{ .Date.Format "Mon, Jan 2, 2006" }}</time></p> --> +<!-- </header> --> +<!-- {{ .Summary }} --> +<!-- <nav> --> +<!-- <ul> --> +<!-- <li><a href="{{ .RelPermalink }}">Read More »</a></li> --> +<!-- </ul> --> +<!-- </nav> --> +<!-- </article> --> +<!-- {{ end }} --> +<!-- <footer> --> +<!-- <a href="{{ "articles/" | absURL }}">All articles...</a> --> +<!-- </footer> --> +<!-- </section> --> +<!-- </main> --> {{ partial "foot.html" .}} diff --git a/portal/layouts/partials/foot.html b/portal/layouts/partials/foot.html index 976ece19c1b97d143191c572179b06d2f24afd94..76dbbdfffa075bf4fb431237ef6274cebf780872 100644 --- a/portal/layouts/partials/foot.html +++ b/portal/layouts/partials/foot.html @@ -1,6 +1,7 @@ <footer> <ul> <li><a href="https://www.km3net.org">KM3NeT.org</a></li> + <li><a href="https://www.github.com/KM3NeT">GitHub Organization</a></li> </ul> </footer> diff --git a/portal/layouts/partials/head.html b/portal/layouts/partials/head.html index 32fe8be82f0f4a39e3d3ca52318601fa0a9da047..62079afe3e7e21ac35ede7c8ae1114e795fc5d34 100644 --- a/portal/layouts/partials/head.html +++ b/portal/layouts/partials/head.html @@ -9,34 +9,44 @@ <body class="bg-light"> <nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark"> - <a class="navbar-brand" href="#">KM3NeT Science Portal</a> + <a class="navbar-brand" href="/">KM3NeT Science Portal</a> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="navbarsExampleDefault"> + <ul class="navbar-nav mr-auto"> - <li class="nav-item active"> - <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Link</a> - </li> - <li class="nav-item"> - <a class="nav-link disabled" href="#">Disabled</a> - </li> - <li class="nav-item dropdown"> - <a class="nav-link dropdown-toggle" href="http://example.com" id="dropdown01" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a> - <div class="dropdown-menu" aria-labelledby="dropdown01"> - <a class="dropdown-item" href="#">Action</a> - <a class="dropdown-item" href="#">Another action</a> - <a class="dropdown-item" href="#">Something else here</a> - </div> - </li> + + {{ $currentPage := . }} + {{ range .Site.Menus.main }} + {{ if .HasChildren }} + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="http://example.com" id="dropdown01" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a> + <div class="dropdown-menu" aria-labelledby="dropdown01"> + <a class="dropdown-item" href="#">Action</a> + <a class="dropdown-item" href="#">Another action</a> + <a class="dropdown-item" href="#">Something else here</a> + </div> + </li> + {{ else }} + + <li class="nav-item active"> + <a class="nav-link" href="{{ .URL }}">{{ .Pre }} {{ .Name }}</a> + </li> + <!-- <li class="nav-item"> --> + <!-- <a class="nav-link disabled" href="#">Disabled</a> --> + <!-- </li> --> + {{ end }} + + {{ end }} + </ul> - <form class="form-inline my-2 my-lg-0"> - <input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search"> - <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button> - </form> + + <!-- <form class="form-inline my-2 my-lg-0"> --> + <!-- <input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search"> --> + <!-- <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button> --> + <!-- </form> --> + </div> </nav>