-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: [email protected] <[email protected]>
- Loading branch information
1 parent
35926e2
commit a3e6cbd
Showing
6 changed files
with
70 additions
and
76 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
@@ -1,49 +1,45 @@ | ||
{{ $allPages := (where .Pages "Section" "projects").ByWeight }} | ||
{{ $parent := .GetPage "projects" }} | ||
|
||
{{ $pages := slice }} | ||
{{ range $allPages }} | ||
{{ if eq .Parent $parent }}{{ $pages = $pages | append . }}{{ end }} | ||
{{ if eq .Parent $parent }}{{ $pages = $pages | append . }}{{ end }} | ||
{{ end }} | ||
|
||
{{ $main_projects := where $pages ".Params.level" "main" }} | ||
{{ $incubating_projects := where $pages ".Params.level" "incubating" }} | ||
{{ $tool_projects := where $pages ".Params.level" "tool" }} | ||
{{ $ecosystem_projects := where $pages ".Params.level" "ecosystem" }} | ||
|
||
{{ $title_list := slice "main_project" "incubating_project" "tool_projects" "ecosystem_projects" }} | ||
{{ $list := slice $main_projects $incubating_projects $tool_projects $ecosystem_projects }} | ||
|
||
<div class="ss-toc-list-card -hidden-mobile"> | ||
<svg class="icon -hidden-mobile" aria-hidden="true"> | ||
<use xlink:href="#icon-menu1"></use> | ||
</svg> | ||
<div class="ss-tooltip"> | ||
<svg class="icon -hidden-mobile" aria-hidden="true"> | ||
<use xlink:href="#icon-menu1"></use> | ||
</svg> | ||
<div class="ss-tooltip"> | ||
{{ range $idx, $val := $list }} | ||
{{ if ne (len $val) 0 }} | ||
<div class="toc-list"> | ||
<h4 class="title">{{ i18n (index $title_list $idx) }}</h4> | ||
<ul class="list"> | ||
{{ range $val }} | ||
<li class="item"> | ||
{{ $link := "" }} | ||
{{ if isset .Params "link" }} | ||
{{ if hasPrefix .Params.link "/" }} | ||
{{ $link = path.Join .RelPermalink .Params.link }} | ||
{{ else }} | ||
{{ $link = .Params.link }} | ||
{{ end }} | ||
{{ else }} | ||
{{ $link = path.Join .RelPermalink "/overview" }} | ||
{{ end }} | ||
<a href={{ $link }}> | ||
{{ .Title }} | ||
</a> | ||
</li> | ||
{{ end }} | ||
</ul> | ||
</div> | ||
{{ end }} | ||
{{ if ne (len $val) 0 }} | ||
<div class="toc-list"> | ||
<h4 class="title">{{ i18n (index $title_list $idx) }}</h4> | ||
<ul class="list"> | ||
{{ range $val }} | ||
<li class="item"> | ||
{{ $link := "" }} | ||
{{ if isset .Params "link" }} | ||
{{ if hasPrefix .Params.link "/" }} | ||
{{ $link = path.Join .RelPermalink .Params.link | safeURL }} | ||
{{ else }} | ||
{{ $link = printf "%s/" .Params.link | safeURL }} | ||
{{ end }} | ||
{{ else }} | ||
{{ $link = printf "%s/" (path.Join .RelPermalink "/overview/") | safeURL }} | ||
{{ end }} | ||
<a href={{ $link }}> | ||
{{ .Title }} | ||
</a> | ||
</li> | ||
{{ end }} | ||
</ul> | ||
</div> | ||
{{ end }} | ||
</div> | ||
</div> | ||
{{ end }} | ||
</div> | ||
</div> |
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 |
---|---|---|
@@ -1,17 +1,17 @@ | ||
|
||
{{ if or .PrevInSection .NextInSection }} | ||
<nav class="ss-pagination-next"> | ||
{{ with .PrevInSection -}} | ||
<a class="link-prev" href="{{ .RelPermalink }}"> | ||
<span class="text">{{ i18n "prev_article" }}: </span> | ||
<span class="text">{{ .Title }}</span> | ||
</a> | ||
{{- end }} | ||
{{ with .NextInSection -}} | ||
<a class="link-next" href="{{ .RelPermalink }}"> | ||
<span class="text">{{ i18n "next_article" }}: </span> | ||
<span class="text">{{ .Title }}</span> | ||
</a> | ||
{{- end }} | ||
</nav> | ||
<nav class="ss-pagination-next"> | ||
{{ with .PrevInSection -}} | ||
<a class="link-prev" href="{{ .Permalink }}"> | ||
<span class="text">{{ i18n "prev_article" }}: </span> | ||
<span class="text">{{ .Title }}</span> | ||
</a> | ||
{{- end }} | ||
{{ with .NextInSection -}} | ||
<a class="link-next" href="{{ .Permalink }}"> | ||
<span class="text">{{ i18n "next_article" }}: </span> | ||
<span class="text">{{ .Title }}</span> | ||
</a> | ||
{{- end }} | ||
</nav> | ||
{{ end }} |
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
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 |
---|---|---|
@@ -1,19 +1,17 @@ | ||
{{ $isProjectHome := eq (path.Dir .File.Dir) "projects" }} | ||
|
||
{{ if $isProjectHome }} | ||
{{ .Render "list" }} | ||
{{ .Render "list" }} | ||
{{ else }} | ||
{{ $link := "" }} | ||
{{ if isset .Params "link" }} | ||
{{ if hasPrefix .Params.link "/" }} | ||
{{ $link = path.Join .RelPermalink .Params.link }} | ||
{{ else }} | ||
{{ $link = .Params.link }} | ||
{{ end }} | ||
{{ else }} | ||
{{ $link = path.Join .RelPermalink "/overview" }} | ||
{{ end }} | ||
<head> | ||
<meta http-equiv="refresh" content="0; url={{$link}}" /> | ||
</head> | ||
{{ $link := "" }} | ||
{{ if isset .Params "link" }} | ||
{{ $link = .Params.link }} | ||
{{ if not (strings.HasSuffix $link "/") }} | ||
{{ $link = printf "%s/" $link }} | ||
{{ end }} | ||
{{ else }} | ||
{{ $link = printf "%s/overview/" .RelPermalink }} | ||
{{ end }} | ||
<head> | ||
<meta http-equiv="refresh" content="0; url={{$link}}" /> | ||
</head> | ||
{{ end }} |