This repository has been archived by the owner on Jul 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 144
add new layoutz to registry #2977
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
f9aef1d
remove bottom margin
susanev 0c9dd97
stuff
susanev 1cbe177
progress
susanev 4c13867
fixes
susanev 3cd1df2
fix card styles
susanev 5dfefe7
more
susanev adfe355
update
susanev 710ad3d
add styles for featured packages
susanev a0949b7
add styles for package list nav
susanev a16a686
fixes
susanev 07a4e42
styles
susanev a3e936c
stylez
susanev 776d88f
add styles
susanev e33dee0
styles for package card accordion
susanev 0433df1
empty
susanev 6962d68
add registry data
susanev ccd4774
lol format json
susanev 6f3ac6f
stylez
susanev e222a13
add js
susanev de62a6a
remove data
susanev 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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,21 +1,19 @@ | ||
<!-- Based on https://gohugo.io/content-management/sections/#example-breadcrumb-navigation --> | ||
|
||
<!-- Don't show the breadcrumb on the main docs landing page. --> | ||
{{ if ne .RelPermalink "/docs/" }} | ||
<ol class="docs-breadcrumb"> | ||
{{ template "breadcrumbnav" (dict "p1" . "p2" .) }} | ||
</ol> | ||
{{ end }} | ||
<ol class="docs-breadcrumb"> | ||
{{ template "breadcrumbnav" (dict "p1" . "p2" .) }} | ||
</ol> | ||
|
||
{{ define "breadcrumbnav" }} | ||
<!-- Don't include the website home page in the breadcrumb. --> | ||
{{ if and .p1.Parent (ne .p1.Parent .p1.Site.Home) }} | ||
{{ template "breadcrumbnav" (dict "p1" .p1.Parent "p2" .p2) }} | ||
{{ end }} | ||
<!-- If the page is a redirect page, don't include it in the breadcrumb. --> | ||
{{ if not (isset .p1.Params "redirect_to") }} | ||
<li {{ if eq .p1 .p2 }}class="active"{{ end }}> | ||
<a data-track="breadcrumb" href="{{ .p1.RelPermalink }}">{{ .p1.LinkTitle }}</a> | ||
<a data-track="breadcrumb" href="{{ .p1.RelPermalink }}"> | ||
{{ .p1.LinkTitle }} | ||
</a> | ||
</li> | ||
{{ end }} | ||
{{ end }} |
117 changes: 67 additions & 50 deletions
117
themes/default/layouts/partials/docs/table-of-contents.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 |
---|---|---|
@@ -1,63 +1,80 @@ | ||
{{ with .File }} | ||
{{ if not $.Page.Params.no_on_this_page }} | ||
<div class="table-of-contents"> | ||
<div id="accordion-table-of-contents" class="accordion flex-1-col"> | ||
<div> | ||
<input type="checkbox" id="accordion-checkbox-table-of-contents" /> | ||
<label for="accordion-checkbox-table-of-contents" class="show"> | ||
<div class="heading"> | ||
<div class="icon-heading-wrapper"> | ||
<div class="icon icon-12-12 icon-on-this-page"></div> | ||
<h2 class="no-anchor">On this page</h2> | ||
</div> | ||
<div class="icon icon-18-18 expand-more-18-18"></div> | ||
</div> | ||
</label> | ||
<label for="accordion-checkbox-table-of-contents" class="hide"> | ||
<div class="heading"> | ||
<div class="icon-heading-wrapper"> | ||
<div class="icon icon-12-12 icon-on-this-page"></div> | ||
<h2 class="no-anchor">On this page</h2> | ||
</div> | ||
<div class="icon icon-18-18 expand-more-18-18"></div> | ||
{{ if not $.Page.Params.no_on_this_page }} | ||
<div class="table-of-contents"> | ||
{{ if strings.Contains $.Page.Permalink "registry/packages" }} | ||
{{ partial "registry/package/package-card.html" . }} | ||
{{ end }} | ||
<div id="accordion-table-of-contents" class="accordion"> | ||
<div> | ||
<input type="checkbox" id="accordion-checkbox-table-of-contents" /> | ||
<label for="accordion-checkbox-table-of-contents" class="show"> | ||
<div class="heading"> | ||
<div class="icon-heading-wrapper"> | ||
<div class="icon icon-12-12 icon-on-this-page"></div> | ||
<h2 class="no-anchor">On this page</h2> | ||
</div> | ||
</label> | ||
<div class="accordion-content flex"> | ||
<div class="content"> | ||
<ul class="table-of-contents-list"> | ||
{{/* This will be populated dynamically with all H2s and H3s on the page; see ts/misc.ts */}} | ||
</ul> | ||
<div class="icon icon-18-18 expand-more-18-18"></div> | ||
</div> | ||
</label> | ||
<label for="accordion-checkbox-table-of-contents" class="hide"> | ||
<div class="heading"> | ||
<div class="icon-heading-wrapper"> | ||
<div class="icon icon-12-12 icon-on-this-page"></div> | ||
<h2 class="no-anchor">On this page</h2> | ||
</div> | ||
<div class="icon icon-18-18 expand-more-18-18"></div> | ||
</div> | ||
</label> | ||
<div class="accordion-content flex"> | ||
<div class="content"> | ||
<ul class="table-of-contents-list"> | ||
{{/* This will be populated dynamically with all H2s and H3s on the page; see ts/misc.ts */}} | ||
</ul> | ||
{{ if strings.Contains $.Page.Permalink "registry/packages" }} | ||
{{ $path := (split .Page.Params.title_tag ".") }} | ||
{{- if eq (len $path) 3 -}} | ||
{{ $packageName := index $path 0 }} | ||
{{ $moduleName := index $path 1 }} | ||
{{ $resourceName := index $path 2 }} | ||
<div class="mt-6"> | ||
<pulumi-resource-links | ||
package-name="{{ $packageName }}" | ||
module-name="{{ $moduleName }}" | ||
resource-name="{{ $resourceName }}" | ||
></pulumi-resource-links> | ||
</div> | ||
{{ end }} | ||
{{ end }} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{{ end }} | ||
<ul class="p-0 list-none table-of-contents-feedback"> | ||
<!-- Only show "Edit this Page" for pages that are not generated. --> | ||
{{ $isCLICommand := hasPrefix .Path "docs/cli/commands" }} | ||
{{ $isAPIDoc := and (hasPrefix .Path "docs/reference/pkg/") (ne .Path "docs/reference/pkg/_index.md") }} | ||
{{ if not (or $isCLICommand $isAPIDoc $.Page.Params.no_edit_this_page) }} | ||
<li> | ||
<a | ||
data-track="edit-page" | ||
class="text-gray-600 hover:text-gray-700 text-xs" | ||
href="{{ $.Site.Params.contentRepositoryURL }}/edit/{{ $.Site.Params.contentRepositoryBaseBranch }}/{{ getenv "REPO_THEME_PATH" }}content/{{ .Path }}" | ||
target="_blank" | ||
> | ||
<i class="fas fa-edit mr-2" style="width: 14px"></i>Edit this Page | ||
</a> | ||
</li> | ||
{{ end }} | ||
</div> | ||
{{ end }} | ||
<ul class="p-0 list-none table-of-contents-feedback"> | ||
<!-- Only show "Edit this Page" for pages that are not generated. --> | ||
{{ $isCLICommand := hasPrefix .Path "docs/cli/commands" }} | ||
{{ $isAPIDoc := and (hasPrefix .Path "docs/reference/pkg/") (ne .Path "docs/reference/pkg/_index.md") }} | ||
{{ if not (or $isCLICommand $isAPIDoc $.Page.Params.no_edit_this_page) }} | ||
<li> | ||
<a | ||
data-track="request-change" | ||
data-track="edit-page" | ||
class="text-gray-600 hover:text-gray-700 text-xs" | ||
href="{{ $.Site.Params.contentRepositoryURL }}/issues/new?body=File: [{{ getenv "REPO_THEME_PATH" }}content/{{ .Path }}]({{ $.Page.Permalink }})" | ||
href="{{ $.Site.Params.contentRepositoryURL }}/edit/{{ $.Site.Params.contentRepositoryBaseBranch }}/{{ getenv "REPO_THEME_PATH" }}content/{{ .Path }}" | ||
target="_blank" | ||
> | ||
<i class="far fa-check-square mr-2" style="width: 14px"></i>Request a Change | ||
<i class="fas fa-edit mr-2" style="width: 14px"></i>Edit this Page | ||
</a> | ||
</li> | ||
</ul> | ||
{{ end }} <pulumi-top-button></pulumi-top-button> | ||
{{ end }} | ||
<li> | ||
<a | ||
data-track="request-change" | ||
class="text-gray-600 hover:text-gray-700 text-xs" | ||
href="{{ $.Site.Params.contentRepositoryURL }}/issues/new?body=File: [{{ getenv "REPO_THEME_PATH" }}content/{{ .Path }}]({{ $.Page.Permalink }})" | ||
target="_blank" | ||
> | ||
<i class="far fa-check-square mr-2" style="width: 14px"></i>Request a Change | ||
</a> | ||
</li> | ||
</ul> | ||
<pulumi-top-button></pulumi-top-button> |
3 changes: 3 additions & 0 deletions
3
themes/default/static/images/docs/icons/arrow-back-gray-14-14.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this link looks like it opens the code editor in github in the browser with the changes are against master by default in edit mode. the user will need to make their own branch and PR, so not sure if this may end up being confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sean1588 this new flow in github, when you select that commit button, it goes through a flow of creating a branch; or it should; happy to change this though, its just what was already in use
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mind doing a follow on pr though if its an issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh ok, never knew it did that when you select the commit button. that sounds good then! thanks!