Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Commit

Permalink
move section above related resources
Browse files Browse the repository at this point in the history
  • Loading branch information
sean1588 committed Nov 10, 2023
1 parent f4a48c1 commit 3c45c9e
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions themes/default/layouts/partials/docs/table-of-contents.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
<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 style="cursor: pointer;" class="toggle-toc icon-heading-wrapper flex w-full flex-row mr-5">
<div class="icon icon-12-12 icon-on-this-page"></div>
<h2 class="no-anchor">On this page</h2>
<h2 class="no-anchor flex-grow">On this page</h2>
<div class="toggle-arrow-toc icon icon-16-16 keyboard-arrow-up-gray"></div>
</div>
<div class="icon icon-18-18 expand-more-18-18"></div>
</div>
</label>
<hr class="mr-5"/>
<label for="accordion-checkbox-table-of-contents" class="hide">
<div class="heading">
<div class="icon-heading-wrapper">
Expand All @@ -29,21 +31,6 @@ <h2 class="no-anchor">On this page</h2>
<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 }}
{{ if strings.Contains $.Page.Permalink "registry/packages/aws" }}
<div class="mt-6">
<div class="more-learnings">
Expand All @@ -70,6 +57,21 @@ <h2 class="no-anchor">On this page</h2>
</div>
</div>
{{ end }}
{{ 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>
Expand Down

0 comments on commit 3c45c9e

Please sign in to comment.