{{ partial "version-banner.html" . }} @@ -35,7 +36,8 @@ {{ partial "footer.html" . }} - {{ partial "scripts.html" . }} {{ partial "image-modal.html" . }} + {{ partial "scripts.html" . }} + {{ partial "image-modal.html" . }} \ No newline at end of file diff --git a/layouts/partials/feature-info.html b/layouts/partials/feature-info.html index 16023691..7cc6dea6 100644 --- a/layouts/partials/feature-info.html +++ b/layouts/partials/feature-info.html @@ -1,57 +1,47 @@ {{ $currentPage := .Page.Permalink }} -{{ $features := .Site.Data.features }} +{{ $features := .Site.Data.feature_data }} {{ if not $features }} -{{ $features = getJSON "features.json" }} +{{ $features = getJSON "feature_data.json" }} {{ end }} + +{{ $currentPage := .Page.Permalink }} + {{ if $features }} -{{ $groupedFeatures := dict }} {{ range $features }} -{{ $docUrl := .documentation | default "" }} +{{ $docUrl := .docs | default "" }} {{ $cleanDocUrl := (index (split $docUrl "#") 0) }} {{ $currentPagePath := path.Clean (urls.Parse $currentPage).Path }} {{ $cleanDocUrlPath := path.Clean (urls.Parse $cleanDocUrl).Path }} -{{ if eq $cleanDocUrlPath $currentPagePath }} -{{ $tier := index .entire_row "Subscription Tier" }} -{{ $feature := index .entire_row "Feature" }} -{{ $currentFeatures := index $groupedFeatures $tier | default "" }} -{{ $groupedFeatures = merge $groupedFeatures (dict $tier (printf "%s%s%s" $currentFeatures (cond (eq $currentFeatures -"") "" ", ") $feature)) }} +{{ if and (ne $docUrl "") (eq $cleanDocUrlPath $currentPagePath) }} +{{ $tiers := slice }} +{{ if .comparisonTiers.free }} +{{ $tiers = $tiers | append "Free" }} {{ end }} + +{{ if .comparisonTiers.teamDesigner }} +{{ $tiers = $tiers | append "Team Designer" }} {{ end }} -{{ if ne (len $groupedFeatures) 0 }} -{{ $maxTier := "" }} -{{ $maxLength := 0 }} -{{ range $tier, $features := $groupedFeatures }} -{{ $length := len (split $features ", ") }} -{{ if gt $length $maxLength }} -{{ $maxTier = $tier }} -{{ $maxLength = $length }} +{{ if .comparisonTiers.teamOperator }} +{{ $tiers = $tiers | append "Team Operator" }} {{ end }} + +{{ if .comparisonTiers.enterprise }} +{{ $tiers = $tiers | append "Enterprise" }} {{ end }} +{{ if len $tiers }}
-
+
Icon - Subscription: {{ $maxTier - }} -
- {{ if gt (len $groupedFeatures) 1 }} -
- Add-ons: - {{ $first := true }} - {{ range $tier, $features := $groupedFeatures }} - {{ if ne $tier $maxTier }} - {{ if not $first }}, {{ end }} - {{ $first = false }} - {{ $features }} [{{ $tier - }}] - {{ end }} - {{ end }} + Subscription: + {{ delimit $tiers ", " }} +
- {{ end }}
{{ end }} +{{ end }} +{{ end }} {{ end }} \ No newline at end of file