-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat: Add Version selector dropdown #16746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
e05d76e
Add Version selector dropdown
Ajay-singh1 c86540e
Fix Responsiveness
Ajay-singh1 62f09d8
More maintainable code
Ajay-singh1 16de37f
Address Craig`s Suggestion
Ajay-singh1 ff2ed79
Merge branch 'istio:master' into archive-docs
Ajay-singh1 c7a634f
More cleaner UI
Ajay-singh1 4755127
Stop generating drop-down in archive docs
Ajay-singh1 2897ac7
Fix : Mobile View
Ajay-singh1 1df22ba
More Styling
Ajay-singh1 414caf8
Fix: Mobile
Ajay-singh1 9870756
Update Rendering Logic
Ajay-singh1 161ca23
Add boolean logic from data/args.yml
Ajay-singh1 88585b9
Remove accidental package.json file
Ajay-singh1 3598a0c
Update Makefile
Ajay-singh1 6621976
Update version-selector.html
Ajay-singh1 a15c017
Update version-selector.html
Ajay-singh1 a144854
Update layouts/partials/version-selector.html
Ajay-singh1 ddc6791
Update layouts/partials/version-selector.html
Ajay-singh1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,40 @@ | ||
{{ $versions := site.Data.versions }} | ||
{{ $mainVerStr := $versions.main }} | ||
{{ $preliminaryVerStr := $versions.preliminary }} | ||
{{ $mainVerParts := split $mainVerStr "." }} | ||
{{ $major := index $mainVerParts 0 | int }} | ||
{{ $minor := index $mainVerParts 1 | int }} | ||
{{ $versionCount := 5 }} | ||
|
||
<!-- Preliminary version --> | ||
{{ $preUrl := printf "https://preliminary.istio.io/v%s/docs" $preliminaryVerStr }} | ||
craigbox marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<li class="main-navigation-links-dropdown-item"> | ||
<a href="{{ $preUrl }}" | ||
class="main-navigation-links-link"> | ||
Preliminary | ||
</a> | ||
</li> | ||
|
||
<!-- Main version --> | ||
{{ $mainUrl := printf "https://istio.io/v%s/docs" $mainVerStr }} | ||
<li class="main-navigation-links-dropdown-item"> | ||
<a href="{{ $mainUrl }}" | ||
class="main-navigation-links-link"> | ||
<strong>v{{ $mainVerStr }} (Current)</strong> | ||
</a> | ||
</li> | ||
|
||
<!-- Previous versions --> | ||
{{ range $i := seq 1 (sub $versionCount 1) }} | ||
{{ $currentMinor := sub $minor $i }} | ||
{{ if ge $currentMinor 0 }} | ||
{{ $ver := printf "v%d.%d" $major $currentMinor }} | ||
{{ $url := printf "https://istio.io/%s/docs" $ver }} | ||
<li class="main-navigation-links-dropdown-item"> | ||
<a href="{{ $url }}" | ||
class="main-navigation-links-link"> | ||
{{ $ver }} | ||
</a> | ||
</li> | ||
{{ end }} | ||
{{ end }} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.