-
Notifications
You must be signed in to change notification settings - Fork 45.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
78 changed files
with
39,456 additions
and
0 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
...ntification_ml/circularnet-docs/themes/hugo-theme-techdoc/archetypes/default.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
title: "{{ replace .TranslationBaseName "-" " " | title }}" | ||
date: {{ .Date }} | ||
lastmod: {{ .Date }} | ||
publishdate: {{ .Date }} | ||
description: "" | ||
weight: 10 | ||
--- | ||
|
||
Lorem Ipsum. |
110 changes: 110 additions & 0 deletions
110
...l/projects/waste_identification_ml/circularnet-docs/themes/hugo-theme-techdoc/gulpfile.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
'use strict'; | ||
|
||
const gulp = require('gulp'); | ||
const $ = require('gulp-load-plugins')(); | ||
|
||
require('es6-promise').polyfill(); | ||
|
||
const webpack = require('webpack'); | ||
const webpackStream = require('webpack-stream'); | ||
const webpackConfig = require('./webpack.config'); | ||
|
||
const src_paths = { | ||
sass: ['src/scss/*.scss'], | ||
script: ['src/js/*.js'], | ||
}; | ||
|
||
const dest_paths = { | ||
style: 'static/css/', | ||
script: 'static/js/', | ||
}; | ||
|
||
/** | ||
* Lint Sass files. | ||
* @returns {!Stream} Gulp stream. | ||
*/ | ||
function lint_sass() { | ||
return gulp.src(src_paths.sass) | ||
.pipe($.plumber({ | ||
errorHandler: function(err) { | ||
console.log(err.messageFormatted); | ||
this.emit('end'); | ||
} | ||
})) | ||
.pipe($.stylelint({ | ||
config: { | ||
extends: [ | ||
'stylelint-config-recommended', | ||
'stylelint-scss', | ||
'stylelint-config-recommended-scss' | ||
], | ||
rules: { | ||
'block-no-empty': null, | ||
'no-descending-specificity': null | ||
} | ||
}, | ||
reporters: [{ | ||
formatter: 'string', | ||
console: true | ||
}] | ||
})); | ||
} | ||
|
||
/** | ||
* Compile Sass files to CSS, autoprefix, and minify. | ||
* @returns {!Stream} Gulp stream. | ||
*/ | ||
function style_sass() { | ||
return gulp.src(src_paths.sass) | ||
.pipe($.plumber({ | ||
errorHandler: function(err) { | ||
console.log(err.messageFormatted); | ||
this.emit('end'); | ||
} | ||
})) | ||
.pipe($.sass({outputStyle: 'expanded'}).on('error', $.sass.logError)) | ||
.pipe($.autoprefixer({cascade: false})) | ||
.pipe(gulp.dest(dest_paths.style)) | ||
.pipe($.cssnano()) | ||
.pipe($.rename({suffix: '.min'})) | ||
.pipe(gulp.dest(dest_paths.style)); | ||
} | ||
|
||
/** | ||
* Lint JavaScript files with ESLint. | ||
* @returns {!Stream} Gulp stream. | ||
*/ | ||
function lint_eslint() { | ||
return gulp.src(src_paths.script) | ||
.pipe($.eslint.format()) | ||
.pipe($.eslint.failAfterError()); | ||
} | ||
|
||
/** | ||
* Bundle JavaScript files using Webpack. | ||
* @returns {!Stream} Gulp stream. | ||
*/ | ||
function script() { | ||
return webpackStream(webpackConfig, webpack) | ||
.on('error', | ||
function(e) { | ||
this.emit('end'); | ||
}) | ||
.pipe(gulp.dest('dist')); | ||
} | ||
|
||
/** | ||
* Watch files for changes and run appropriate tasks. | ||
* @param {function()} done - Callback function. | ||
*/ | ||
function watch_files(done) { | ||
gulp.watch(src_paths.sass).on('change', gulp.series(lint_sass, style_sass)); | ||
gulp.watch(src_paths.script).on('change', gulp.series(lint_eslint, script)); | ||
} | ||
|
||
exports.lint = gulp.parallel(lint_sass, lint_eslint); | ||
exports.style = style_sass; | ||
exports.script = script; | ||
exports.watch = watch_files; | ||
exports.default = gulp.series( | ||
gulp.parallel(lint_sass, lint_eslint), gulp.parallel(style_sass, script)); |
Binary file added
BIN
+14.2 KB
...n_ml/circularnet-docs/themes/hugo-theme-techdoc/images/screenshot-edit-link.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+30.6 KB
...n_ml/circularnet-docs/themes/hugo-theme-techdoc/images/screenshot-open-menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.39 MB
..._ml/circularnet-docs/themes/hugo-theme-techdoc/images/screenshot-slide-menu.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+26.4 KB
...ml/circularnet-docs/themes/hugo-theme-techdoc/images/screenshot-theme-color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+187 KB
...ntification_ml/circularnet-docs/themes/hugo-theme-techdoc/images/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+159 KB
...aste_identification_ml/circularnet-docs/themes/hugo-theme-techdoc/images/tn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...jects/waste_identification_ml/circularnet-docs/themes/hugo-theme-techdoc/layouts/404.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{{- define "main" -}} | ||
<h1>404 Not Found</h1> | ||
{{- end -}} |
27 changes: 27 additions & 0 deletions
27
...identification_ml/circularnet-docs/themes/hugo-theme-techdoc/layouts/_default/baseof.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!DOCTYPE html> | ||
{{ with .Site.LanguageCode }}<html lang="{{ . }}">{{ else }}<html>{{ end }} | ||
<head> | ||
{{- partial "head.html" . -}} | ||
{{- partial "custom-head.html" . -}} | ||
</head> | ||
<body> | ||
{{- partial "prepend-body.html" . -}} | ||
<div class="container"> | ||
{{- partial "notification.html" . -}} | ||
{{- partial "site-header.html" . -}} | ||
{{- partial "global-menu.html" . -}} | ||
<div class="content-container"> | ||
<main> | ||
{{- block "main" . -}}{{- end -}} | ||
<footer> | ||
{{- partial "content-footer.html" . -}} | ||
{{- partial "powered.html" . -}} | ||
</footer> | ||
</main> | ||
|
||
{{- partial "sidebar.html" . -}} | ||
</div> | ||
{{- partial "footer.html" . -}} | ||
</div> | ||
</body> | ||
</html> |
6 changes: 6 additions & 0 deletions
6
...e_identification_ml/circularnet-docs/themes/hugo-theme-techdoc/layouts/_default/list.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{{- define "main" -}} | ||
<h1>{{ .Title }}</h1> | ||
{{- .Content -}} | ||
{{- partial "edit-meta.html" . -}} | ||
{{- partial "pagination.html" . -}} | ||
{{- end -}} |
7 changes: 7 additions & 0 deletions
7
...identification_ml/circularnet-docs/themes/hugo-theme-techdoc/layouts/_default/single.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{{- define "main" -}} | ||
<h1>{{ .Title }}</h1> | ||
{{- partial "table-of-contents.html" . -}} | ||
{{- .Content -}} | ||
{{- partial "edit-meta.html" . -}} | ||
{{- partial "pagination.html" . -}} | ||
{{- end -}} |
4 changes: 4 additions & 0 deletions
4
...s/waste_identification_ml/circularnet-docs/themes/hugo-theme-techdoc/layouts/blog/li.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<li> | ||
<a href="{{ .Permalink }}">{{ .Title }}</a> | ||
<div class="meta">{{ .Date.Format "Mon, Jan 2, 2006" }}</div> | ||
</li> |
8 changes: 8 additions & 0 deletions
8
...waste_identification_ml/circularnet-docs/themes/hugo-theme-techdoc/layouts/blog/list.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{{- define "main" -}} | ||
<h1>{{ .Title }}</h1> | ||
{{- .Content -}} | ||
{{ range (.Paginate ( first 50 .Data.Pages )).Pages }} | ||
{{ .Render "summary"}} | ||
{{ end }} | ||
{{ template "_internal/pagination.html" . }} | ||
{{- end -}} |
4 changes: 4 additions & 0 deletions
4
...ste_identification_ml/circularnet-docs/themes/hugo-theme-techdoc/layouts/blog/single.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{{- define "main" -}} | ||
<h1>{{ .Title }}</h1> | ||
{{- .Content -}} | ||
{{- end -}} |
5 changes: 5 additions & 0 deletions
5
...te_identification_ml/circularnet-docs/themes/hugo-theme-techdoc/layouts/blog/summary.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<article> | ||
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2> | ||
<time>{{ .Date.Format "Mon, Jan 2, 2006" }}</time> | ||
{{ .Summary }} | ||
</article> |
15 changes: 15 additions & 0 deletions
15
...cts/waste_identification_ml/circularnet-docs/themes/hugo-theme-techdoc/layouts/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{{ define "main" }} | ||
{{- if .Site.Home.Content -}} | ||
{{- .Site.Home.Content -}} | ||
{{- partial "pagination.html" . -}} | ||
{{- partial "edit-meta.html" . -}} | ||
{{- else -}} | ||
<h1>Customize your own home page</h1> | ||
<p>The site is working. Don't forget to customize this homepage with your own. You typically have 2 choices :</p> | ||
<ol> | ||
<li>Create an _index.md document in <b>content</b> folder and fill it with Markdown content</li> | ||
<li>Create an <b>index.html</b> file in the <b>static</b> folder and fill the file with HTML content</li> | ||
<li>Configure your server to automatically redirect home page to one your documentation page</li> | ||
</ol> | ||
{{- end -}} | ||
{{- end -}} |
Empty file.
6 changes: 6 additions & 0 deletions
6
...tification_ml/circularnet-docs/themes/hugo-theme-techdoc/layouts/partials/custom-css.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<style> | ||
:root { | ||
{{- with .Site.Params.custom_font_color }}--custom-font-color: {{ . | safeCSS }};{{ end -}} | ||
{{- with .Site.Params.custom_background_color }}--custom-background-color: {{ . | safeCSS }};{{ end -}} | ||
} | ||
</style> |
Empty file.
5 changes: 5 additions & 0 deletions
5
...ntification_ml/circularnet-docs/themes/hugo-theme-techdoc/layouts/partials/edit-meta.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<div class="edit-meta"> | ||
{{- partial "last-updated.html" . -}} | ||
<br> | ||
{{- partial "edit-page.html" . -}} | ||
</div> |
3 changes: 3 additions & 0 deletions
3
...ntification_ml/circularnet-docs/themes/hugo-theme-techdoc/layouts/partials/edit-page.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{{- if and .Site.Params.github_doc_repository .File -}} | ||
<a href="{{ .Site.Params.github_doc_repository }}/edit/{{ .Site.Params.github_doc_repository_branch | default "master" }}/{{ .Site.Params.github_doc_repository_path }}{{ .File.Path }}" class="edit-page"><i class="fas fa-pen-square"></i> Edit on GitHub</a> | ||
{{- end -}} |
11 changes: 11 additions & 0 deletions
11
...identification_ml/circularnet-docs/themes/hugo-theme-techdoc/layouts/partials/footer.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<a href="#" id="backtothetop-fixed" class="backtothetop" | ||
data-backtothetop-duration="600" | ||
data-backtothetop-easing="easeOutQuart" | ||
data-backtothetop-fixed-fadeIn="1000" | ||
data-backtothetop-fixed-fadeOut="1000" | ||
data-backtothetop-fixed-bottom="10" | ||
data-backtothetop-fixed-right="20"> | ||
<span class="fa-layers fa-fw"> | ||
<i class="fas fa-circle"></i> | ||
<i class="fas fa-arrow-circle-up"></i> | ||
</span></a> |
35 changes: 35 additions & 0 deletions
35
...ification_ml/circularnet-docs/themes/hugo-theme-techdoc/layouts/partials/global-menu.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{{ $currentPage := . }} | ||
{{- if .Site.Menus.main -}} | ||
<div class="global-menu"> | ||
<nav> | ||
<ul> | ||
{{- range .Site.Menus.main.ByWeight -}} | ||
{{ if .HasChildren -}} | ||
<li{{ with .Identifier }} id="{{ . }}"{{ end }} class="parent{{ if $currentPage.HasMenuCurrent "main" . }} active{{ end }} {{ with .Params.class }}{{ . }}{{ end }}">{{template "menu-item" dict "item" .}} | ||
<ul class="sub-menu"> | ||
{{ range .Children -}} | ||
<li{{ with .Identifier }} id="{{ . }}"{{ end }} class="child{{ if $currentPage.HasMenuCurrent "main" . }} active{{ end }} {{ with .Params.class }}{{ . }}{{ end }}">{{template "menu-item" dict "item" .}}</li> | ||
{{ end -}} | ||
</ul> | ||
</li> | ||
{{- else }} | ||
<li{{ with .Identifier }} id="{{ . }}"{{ end }}{{ if $currentPage.HasMenuCurrent "main" . }} class="active {{with .Params.class}}{{ . }}{{ end }}"{{ else }} class="{{ with .Params.class }}{{ . }}{{ end }}"{{ end }}>{{template "menu-item" dict "item" .}}</li> | ||
{{- end -}} | ||
{{- end -}} | ||
</ul> | ||
</nav> | ||
</div> | ||
{{- end }} | ||
|
||
{{define "menu-item"}} | ||
{{- with .item -}} | ||
<a href="{{ .URL }}"> | ||
{{- with .Pre -}}{{- . -}}{{- end -}} | ||
{{- .Name -}} | ||
{{- with .Post -}}{{- . -}}{{- end -}} | ||
{{- if .HasChildren -}} | ||
<i class="fas fa-angle-right"></i> | ||
{{- end -}} | ||
</a> | ||
{{- end -}} | ||
{{- end -}} |
30 changes: 30 additions & 0 deletions
30
...e_identification_ml/circularnet-docs/themes/hugo-theme-techdoc/layouts/partials/head.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> | ||
{{- if eq .Title "" }} | ||
<title>{{ .Site.Title }}</title> | ||
{{- else }} | ||
<title>{{ .Title }} - {{ .Site.Title }}</title> | ||
{{- end }} | ||
{{- if ne .Description "" }} | ||
<meta name="description" content="{{ .Description }}"> | ||
{{- else if isset .Site.Params "description" }} | ||
<meta name="description" content="{{ .Site.Params.description }}"> | ||
{{- end }} | ||
{{ hugo.Generator }} | ||
<link href="{{ .Site.BaseURL }}/index.xml" rel="alternate" type="application/rss+xml"> | ||
<link rel="canonical" href="{{ .Permalink }}"> | ||
<link rel="stylesheet" href="{{"css/theme.min.css" | absURL}}"> | ||
{{ partial "meta/chroma.html" . -}} | ||
<script defer src="{{ .Site.BaseURL }}/js/fontawesome6/all.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/jquery.easing.min.js" integrity="sha256-H3cjtrm/ztDeuhCN9I4yh4iN2Ybx/y1RM7rMmAesA0k=" crossorigin="anonymous"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/clipboard.min.js" integrity="sha256-4XodgW4TwIJuDtf+v6vDJ39FVxI0veC/kSCCmnFp7ck=" crossorigin="anonymous"></script> | ||
<script src="{{ "js/bundle.js" | absURL }}"></script> | ||
{{- partial "meta/google-analytics-async.html" . -}} | ||
{{- partial "meta/tag-manager.html" . -}} | ||
{{- partial "meta/google-site-verification.html" . -}} | ||
{{- partial "custom-css.html" . -}} | ||
{{- template "_internal/opengraph.html" . -}} | ||
{{- template "_internal/twitter_cards.html" . -}} | ||
{{- template "_internal/schema.html" . -}} |
7 changes: 7 additions & 0 deletions
7
...fication_ml/circularnet-docs/themes/hugo-theme-techdoc/layouts/partials/last-updated.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{{ if ne ( .Lastmod.Format "2006-01-02" ) "0001-01-01" }} | ||
Last updated on {{ .Lastmod.Format ( $.Site.Params.dateformat | default "2 Jan 2006") }} | ||
{{ end }} | ||
{{ if ne ( .PublishDate.Format "2006-01-02" ) "0001-01-01" }} | ||
<br> | ||
Published on {{ .PublishDate.Format ( $.Site.Params.dateformat | default "2 Jan 2006") -}} | ||
{{ end }} |
58 changes: 58 additions & 0 deletions
58
...cation_ml/circularnet-docs/themes/hugo-theme-techdoc/layouts/partials/menu/open-menu.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{{$currentNode := .}} | ||
<nav class="open-menu"> | ||
<ul> | ||
<li class="{{ if .IsHome }}active{{ end }}"><a href="{{ .Site.BaseURL }}">Home</a></li> | ||
{{- if eq .Site.Params.ordersectionsby "title" -}} | ||
{{- range .Site.Home.Sections.ByTitle -}} | ||
{{template "open-menu" dict "sect" . "currentnode" $currentNode}} | ||
{{- end -}} | ||
{{- else -}} | ||
{{- range .Site.Home.Sections.ByWeight -}} | ||
{{template "open-menu" dict "sect" . "currentnode" $currentNode}} | ||
{{- end -}} | ||
{{- end}} | ||
</ul> | ||
</nav> | ||
|
||
{{define "open-menu"}} | ||
{{- $currentNode := .currentnode -}} | ||
{{ with .sect }} | ||
{{ if .IsSection }} | ||
{{ if in .Site.Params.menu_exclusion .Section }} | ||
{{- else -}} | ||
{{- safeHTML .Params.head -}} | ||
{{- $numberOfPages := (add (len .Pages) (len .Sections)) -}} | ||
<li class="{{ if .IsAncestor $currentNode }}parent{{ end }}{{ if and .File $currentNode.File }}{{ if eq .File.UniqueID $currentNode.File.UniqueID }} active{{ end }}{{ end }}{{ if .Params.alwaysopen }} parent{{ end }}"><a href="{{ .Permalink }}">{{ safeHTML .Params.Pre }}{{ .Title }}{{ safeHTML .Params.Post }}</a> | ||
{{ if ne $numberOfPages 0 }} | ||
<ul class="sub-menu"> | ||
{{- .Scratch.Set "pages" .Pages -}} | ||
{{- if .Sections -}} | ||
{{- .Scratch.Set "pages" (.Pages | union .Sections) -}} | ||
{{- end -}} | ||
{{- $pages := (.Scratch.Get "pages") -}} | ||
{{- if eq .Site.Params.ordersectionsby "title" -}} | ||
{{- range $pages.ByTitle -}} | ||
{{- if and .Params.hidden (not $.showhidden) -}} | ||
{{- else -}} | ||
{{template "open-menu" dict "sect" . "currentnode" $currentNode}} | ||
{{- end -}} | ||
{{- end -}} | ||
{{- else -}} | ||
{{- range $pages.ByWeight -}} | ||
{{- if and .Params.hidden (not $.showhidden) -}} | ||
{{- else -}} | ||
{{template "open-menu" dict "sect" . "currentnode" $currentNode}} | ||
{{- end -}} | ||
{{- end -}} | ||
{{- end}} | ||
</ul> | ||
{{end}} | ||
</li> | ||
{{- end -}} | ||
{{- else -}} | ||
{{- if not .Params.Hidden -}} | ||
<li class="{{ if and .File $currentNode.File }}{{ if eq .File.UniqueID $currentNode.File.UniqueID }}active{{ end }}{{ end }}"><a href="{{ .Permalink }}">{{ safeHTML .Params.Pre }}{{ .Title }}{{ safeHTML .Params.Post }}</a></li> | ||
{{- end -}} | ||
{{ end -}} | ||
{{ end -}} | ||
{{ end }} |
Oops, something went wrong.