Skip to content

Commit e640cb6

Browse files
author
Vivek Vishal
authored
Merge pull request #395 from vishalvivekm/partial-update
Partial update
2 parents bacdc7d + 65045dc commit e640cb6

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

layouts/docs/list.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ <h1>{{ .Title }}</h1>
1111
{{ with .Params.plan }}
1212
{{ partial "plan-info.html" (dict "plan" .) }}
1313
{{ end }}
14+
{{- partial "feature-info.html" . -}}
1415
{{ .Content }}
1516
{{ partial "section-index.html" . -}}
1617

layouts/docs/single.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{{ define "main" }}
2+
{{ partial "feature-info.html" . }}
23
{{ .Render "content" }}
34
{{ end }}

layouts/partials/feature-info.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{{ $currentPage := .Page.Permalink }}
2+
{{ $features := .Site.Data.features }}
3+
4+
{{ if not $features }}
5+
{{ $features = getJSON "features.json" }}
6+
{{ end }}
7+
8+
{{ if $features }}
9+
{{ range $features }}
10+
{{ $docUrl := .documentation | default "" }}
11+
{{ $cleanDocUrl := (index (split $docUrl "#") 0) }} <!-- Remove the # fragment if it exists -->
12+
{{ if eq $cleanDocUrl $currentPage }}
13+
<div class="matterinfo">
14+
<h4 class="matterheader">Who can use this feature</h4>
15+
{{ $subscription_tier := index .entire_row "Subscription Tier" }}
16+
<div class="plan-support all-plans {{ lower $subscription_tier }}-plan">
17+
<img src="/images/subscription.svg" alt="Icon" class="support-icon adaptive-icon">
18+
Supported on <span class="tier">{{ $subscription_tier }}</span> Plan
19+
</div>
20+
</div>
21+
{{ break }}
22+
{{ end }}
23+
{{ end }}
24+
{{ end }}
25+

0 commit comments

Comments
 (0)