This repository has been archived by the owner on Oct 13, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Yiliu/master/update mobile sidebar (#204)
* Update sidebar menu for Quicksilver styles Signed-off-by: Eric Poirier <eric.poirier@eclipse-foundation.org> * Create separate layout for the new sidebar Signed-off-by: Eric Poirier <eric.poirier@eclipse-foundation.org> * Add sidebar-block for third-parent page only Signed-off-by: Eric Poirier <eric.poirier@eclipse-foundation.org> * Update mobile sidebar based on Eric sidebar Signed-off-by: Yi Liu <yi.liu@eclipse-foundation.org> * Adjust mobile sidebar based on Eric sidebar block Signed-off-by: Yi Liu <yi.liu@eclipse-foundation.org> * one more fix of paddings Signed-off-by: Yi Liu <yi.liu@eclipse-foundation.org> * Add pre back Signed-off-by: Yi Liu <yi.liu@eclipse-foundation.org> * sync updates from Eric Signed-off-by: Yi Liu <yi.liu@eclipse-foundation.org> * add bottom spacing for children, use offset instead of empty div Signed-off-by: Yi Liu <yi.liu@eclipse-foundation.org> * remove not needed prev., use offset Signed-off-by: Yi Liu <yi.liu@eclipse-foundation.org> * sync if eq current page Signed-off-by: Yi Liu <yi.liu@eclipse-foundation.org> * use cond, and default instead of scratch Signed-off-by: Yi Liu <yi.liu@eclipse-foundation.org> * remove ^ in package, scratch check lower Signed-off-by: Yi Liu <yi.liu@eclipse-foundation.org> * remove home text, make margin-top-20 Signed-off-by: Yi Liu <yi.liu@eclipse-foundation.org> Co-authored-by: Eric Poirier <eric.poirier@eclipse-foundation.org> Co-authored-by: Christopher Guindon <chris.guindon@eclipse-foundation.org>
- Loading branch information
1 parent
9f09ca6
commit 4ad2aad
Showing
13 changed files
with
137 additions
and
51 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
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
2 changes: 1 addition & 1 deletion
2
exampleSite/content/third-parent/test-children/test-children-children-2/_index.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
2 changes: 1 addition & 1 deletion
2
exampleSite/content/third-parent/test-children/test-children-children/_index.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
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<!-- | ||
Copyright (c) 2018 Eclipse Foundation, Inc. | ||
This program and the accompanying materials are made available under the | ||
terms of the Eclipse Public License v. 2.0 which is available at | ||
http://www.eclipse.org/legal/epl-2.0. | ||
Contributors: | ||
Christopher Guindon <chris.guindon@eclipse-foundation.org> | ||
SPDX-License-Identifier: EPL-2.0 | ||
--> | ||
|
||
{{ if isset .Site.Menus "sidebar" }} | ||
{{ $currentPage := . }} | ||
{{ .Scratch.Set "currentSection" "home" }} | ||
{{ if $currentPage.Section }} | ||
{{ .Scratch.Set "currentSection" $currentPage.Section }} | ||
{{ end }} | ||
{{$currentSection := .Scratch.Get "currentSection" }} | ||
{{ range .Site.Menus.sidebar }} | ||
{{$parentItem := . }} | ||
{{ if and (.HasChildren) (eq $currentSection $parentItem.Identifier) }} | ||
<aside class="sidebar-block"> | ||
{{ range .Children }} | ||
{{ if .HasChildren }} | ||
<div class="row sidebar-block-item{{ if eq $currentPage.Title .Name }} active{{ end }}"> | ||
<a href="{{ .URL }}" {{ if eq $currentPage.Title .Name }}class="active"{{ end }}> | ||
<div class="col-xs-6">{{ .Pre }}</div> | ||
<div class="col-xs-18 sidebar-block-text">{{ .Name }}</div> | ||
</a> | ||
</div> | ||
<div class="row sidebar-block-sub-items margin-bottom-20"> | ||
{{ range .Children }} | ||
<div class="row sidebar-block-sub-item{{ if eq $currentPage.Title .Name }} active{{ end }}"> | ||
<a href="{{ .URL }}" {{ if eq $currentPage.Title .Name }}class="active"{{ end }}> | ||
<div class="col-xs-18 col-xs-offset-6 sidebar-block-text">{{ .Name }}</div> | ||
</a> | ||
</div> | ||
{{ end }} | ||
</div> | ||
{{ else if or (eq $parentItem.Identifier $currentSection) (eq .Parent $currentSection) }} | ||
<div class="row sidebar-block-item{{ if eq $currentPage.Title .Name }} active{{ end }}"> | ||
<a href="{{ .URL }}" {{ if eq $currentPage.Title .Name }}class="active"{{ end }}> | ||
<div class="col-xs-6">{{ .Pre }}</div> | ||
<div class="col-xs-18 sidebar-block-text">{{ .Name }}</div> | ||
</a> | ||
</div> | ||
{{ end }} | ||
{{ end }} | ||
</aside> | ||
{{ end }} | ||
{{ end }} | ||
{{ 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.