|
| 1 | +{{- $cryptomatorBrand := dict "logo" "/img/logo.svg" "logoAspect" "aspect-1110/942" "brandColor" "text-primary" }} |
| 2 | +{{- $hubBrand := dict "logo" "/img/zero-knowledge-bot.svg" "logoAspect" "aspect-988/877" "brandColor" "text-hub" }} |
| 3 | +{{- $plans := slice |
| 4 | + (merge $cryptomatorBrand (dict "dataKey" "Cryptomator" "brand" "Cryptomator" "titleKey" "pricing_individual_title" "priceKey" "pricing_free" "priceDescriptionKey" "pricing_individual_price_description" "href" "/downloads/" "ctaKey" "pricing_individual_cta" "event" "pricing-compare-individual-cta")) |
| 5 | + (merge $hubBrand (dict "dataKey" "Community" "brand" "Cryptomator Hub" "titleKey" "pricing_hub_community_title" "priceKey" "pricing_free" "priceDescriptionKey" "pricing_hub_community_price_description" "href" "/hub/self-hosted/" "ctaKey" "pricing_hub_self_hosted_cta" "event" "pricing-compare-hub-community-self-hosted-cta")) |
| 6 | + (merge $hubBrand (dict "dataKey" "Standard" "brand" "Cryptomator Hub" "titleKey" "pricing_hub_standard_title" "priceDescriptionKey" "pricing_hub_standard_price_description")) |
| 7 | + (merge $hubBrand (dict "dataKey" "Enterprise" "brand" "Cryptomator Hub" "titleKey" "pricing_hub_enterprise_title" "priceKey" "pricing_hub_enterprise_price" "priceDescriptionKey" "pricing_hub_enterprise_price_description" "href" "/contact-sales/" "ctaKey" "pricing_hub_enterprise_cta" "event" "pricing-compare-hub-enterprise-cta")) |
| 8 | +}} |
| 9 | +<section aria-labelledby="pricing-comparison-title" class="py-12" x-data="{ first: 'Community', second: 'Standard' }"> |
| 10 | + <div class="mb-8 lg:text-center"> |
| 11 | + <h2 id="pricing-comparison-title" class="font-h2 mb-3 text-balance">{{ i18n "pricing_compare_title" . }}</h2> |
| 12 | + <p class="max-w-[56ch] text-base text-pretty text-gray-700 lg:mx-auto">{{ i18n "pricing_compare_subtitle" . }}</p> |
| 13 | + </div> |
| 14 | + <div class="@container"> |
| 15 | + <div class="@min-[72rem]:hidden" x-cloak> |
| 16 | + <p class="mb-4 text-base text-gray-700">{{ i18n "pricing_compare_choose" . }}</p> |
| 17 | + <div class="white-box"> |
| 18 | + <div class="sticky top-[var(--nav-height,48px)] z-10 grid grid-cols-2 rounded-t-sm border-b border-gray-200 bg-white @min-[40rem]:grid-cols-[2fr_1fr_1fr]"> |
| 19 | + <div class="@max-[40rem]:hidden self-end p-4 font-medium text-gray-700">{{ i18n "pricing_compare_features" . }}</div> |
| 20 | + {{- range $side := slice "first" "second" }} |
| 21 | + <div class="min-w-0 border-t-[3px] border-transparent px-2 py-3 {{ if eq $side "first" }}rounded-tl-sm @min-[40rem]:rounded-tl-none{{ else }}rounded-tr-sm{{ end }} @min-[40rem]:px-4" :class="{ 'border-hub bg-hub/10': {{ $side }} === 'Standard', 'border-transparent': {{ $side }} !== 'Standard' }"> |
| 22 | + {{- range $plans }} |
| 23 | + <div x-show="{{ $side }} === '{{ .dataKey }}'" class="mb-3 text-center"> |
| 24 | + <img src="{{ .logo }}" class="mx-auto mb-2 h-8 {{ .logoAspect }}" alt=""/> |
| 25 | + <p class="font-headline text-xs font-bold uppercase tracking-wide {{ .brandColor }}">{{ .brand }}</p> |
| 26 | + </div> |
| 27 | + {{- end }} |
| 28 | + <label for="compare-{{ $side }}" class="sr-only">{{ i18n (printf "pricing_compare_%s_plan" $side) $ }}</label> |
| 29 | + <div class="grid grid-cols-[1fr_--spacing(8)]"> |
| 30 | + <select id="compare-{{ $side }}" name="compare-{{ $side }}" x-model="{{ $side }}" class="input-box col-span-full row-start-1 min-h-12 w-full min-w-0 appearance-none bg-white bg-none pl-2 pr-7 text-base font-medium"> |
| 31 | + {{- range $plans }} |
| 32 | + <option value="{{ .dataKey }}" :disabled="{{ if eq $side "first" }}second{{ else }}first{{ end }} === '{{ .dataKey }}'">{{ i18n .titleKey $ }}</option> |
| 33 | + {{- end }} |
| 34 | + </select> |
| 35 | + <i class="fa-solid fa-chevron-down pointer-events-none col-start-2 row-start-1 place-self-center text-hub" aria-hidden="true"></i> |
| 36 | + </div> |
| 37 | + </div> |
| 38 | + {{- end }} |
| 39 | + </div> |
| 40 | + {{- range hugo.Data.pricing_comparison }} |
| 41 | + <section> |
| 42 | + <h3 class="border-b border-gray-200 bg-gray-100 px-4 py-3 font-headline text-base font-semibold text-hub">{{ i18n .SectionKey $ }}</h3> |
| 43 | + <dl> |
| 44 | + {{- range .Rows }} |
| 45 | + {{- $row := . }} |
| 46 | + <div class="grid grid-cols-2 border-b border-gray-200 last:border-b-0 @min-[40rem]:grid-cols-[2fr_1fr_1fr]"> |
| 47 | + <dt class="col-span-full px-4 pt-4 pb-2 font-medium @min-[40rem]:col-span-1 @min-[40rem]:py-4"> |
| 48 | + {{ i18n .LabelKey $ }} |
| 49 | + {{- with .TooltipKey }} |
| 50 | + <p class="mt-1 text-base font-normal text-gray-700 [&_a]:text-hub [&_a]:underline">{{ i18n . $ | safeHTML }}</p> |
| 51 | + {{- end }} |
| 52 | + </dt> |
| 53 | + {{- range $side := slice "first" "second" }} |
| 54 | + <dd class="flex min-w-0 items-center justify-center px-2 py-3 text-center text-base text-gray-700 tabular-nums @min-[40rem]:p-4" :class="{ 'bg-hub/5': {{ $side }} === 'Standard' }"> |
| 55 | + {{- range $plans }} |
| 56 | + <div x-show="{{ $side }} === '{{ .dataKey }}'"> |
| 57 | + <span class="sr-only">{{ .brand }} {{ i18n .titleKey $ }}: </span> |
| 58 | + {{ partial "pricing/comparison-value.html" (dict "row" $row "plan" . "page" $) }} |
| 59 | + </div> |
| 60 | + {{- end }} |
| 61 | + </dd> |
| 62 | + {{- end }} |
| 63 | + </div> |
| 64 | + {{- end }} |
| 65 | + </dl> |
| 66 | + </section> |
| 67 | + {{- end }} |
| 68 | + <div class="grid grid-cols-2 border-t border-gray-200 @min-[40rem]:grid-cols-[2fr_1fr_1fr]"> |
| 69 | + <div class="@max-[40rem]:hidden"></div> |
| 70 | + {{- range $side := slice "first" "second" }} |
| 71 | + <div class="min-w-0 p-3 text-center @min-[40rem]:p-4" :class="{ 'bg-hub/5': {{ $side }} === 'Standard' }"> |
| 72 | + {{- range $plans }} |
| 73 | + <div x-show="{{ $side }} === '{{ .dataKey }}'" class="flex h-full flex-col gap-3"> |
| 74 | + <h3 class="mx-auto w-fit rounded-full px-3 py-1 text-base font-medium {{ if eq .dataKey "Cryptomator" }}bg-primary/10 text-green-700{{ else }}bg-hub/10 text-hub{{ end }}">{{ i18n .titleKey $ }}</h3> |
| 75 | + <div class="grow"> |
| 76 | + {{ partial "pricing/comparison-price.html" (dict "plan" . "page" $) }} |
| 77 | + </div> |
| 78 | + {{ partial "pricing/comparison-action.html" (dict "plan" . "page" $) }} |
| 79 | + </div> |
| 80 | + {{- end }} |
| 81 | + </div> |
| 82 | + {{- end }} |
| 83 | + </div> |
| 84 | + </div> |
| 85 | + </div> |
| 86 | + {{/* Without Alpine, the full table stays available as a scrollable fallback. */}} |
| 87 | + <div class="-mx-4 -my-2 overflow-x-auto whitespace-nowrap @min-[72rem]:overflow-visible" :class="{ '@max-[72rem]:hidden': true }"> |
| 88 | + <div class="inline-block min-w-full px-4 py-2 align-middle"> |
| 89 | + <table class="white-box w-full min-w-[880px] border-separate border-spacing-0 text-sm @min-[72rem]:min-w-full" aria-labelledby="pricing-comparison-title"> |
| 90 | + <thead> |
| 91 | + <tr> |
| 92 | + <td class="compare-th w-[28%] px-5 py-3.5 text-left"><span class="sr-only">{{ i18n "pricing_compare_features" . }}</span></td> |
| 93 | + {{- range $plans }} |
| 94 | + <th scope="col" class="compare-th px-4 py-3.5 text-center{{ if eq .dataKey "Standard" }} bg-linear-to-b from-hub/10 to-hub/10 border-t-[3px] border-t-hub{{ end }}"> |
| 95 | + <img src="{{ .logo }}" class="mx-auto mb-2 h-8 {{ .logoAspect }}" alt=""/> |
| 96 | + <p class="mb-1 font-headline text-xs font-bold uppercase tracking-wide {{ .brandColor }}">{{ .brand }}</p> |
| 97 | + <p class="font-headline font-medium">{{ i18n .titleKey $ }}</p> |
| 98 | + </th> |
| 99 | + {{- end }} |
| 100 | + </tr> |
| 101 | + </thead> |
| 102 | + {{- range $sectionIndex, $section := hugo.Data.pricing_comparison }} |
| 103 | + <tbody aria-label="{{ i18n .SectionKey $ }}"> |
| 104 | + <tr> |
| 105 | + <td class="px-5 pb-1.5 pt-4"> |
| 106 | + <h3 class="text-xs font-bold uppercase tracking-wide text-gray-700">{{ i18n .SectionKey $ }}</h3> |
| 107 | + </td> |
| 108 | + {{- range $plans }} |
| 109 | + <td{{ if eq .dataKey "Standard" }} class="bg-hub/5"{{ end }}></td> |
| 110 | + {{- end }} |
| 111 | + </tr> |
| 112 | + {{- range $rowIndex, $row := .Rows }} |
| 113 | + <tr> |
| 114 | + <th scope="row" class="whitespace-normal border-t border-gray-200 px-5 py-3 text-left font-medium text-gray-700"> |
| 115 | + {{ i18n .LabelKey $ }} |
| 116 | + {{- with .TooltipKey }} |
| 117 | + {{- $tooltipId := printf "tooltip-compare-%d-%d" $sectionIndex $rowIndex }} |
| 118 | + <div class="has-tooltip"> |
| 119 | + <i class="fa-solid fa-info-circle text-gray-700" tabindex="0" role="img" aria-label="{{ i18n "more_information" $ }}" aria-describedby="{{ $tooltipId }}"></i> |
| 120 | + <div id="{{ $tooltipId }}" role="tooltip" class="tooltip tooltip-center w-64 whitespace-normal rounded-sm bg-white p-3 text-sm font-normal shadow-md [&_a]:text-hub [&_a]:underline">{{ i18n . $ | safeHTML }}</div> |
| 121 | + </div> |
| 122 | + {{- end }} |
| 123 | + </th> |
| 124 | + {{- range $plans }} |
| 125 | + <td class="border-t border-gray-200 px-4 py-3 text-center font-medium tabular-nums{{ if eq .dataKey "Standard" }} bg-hub/5{{ end }}"> |
| 126 | + {{ partial "pricing/comparison-value.html" (dict "row" $row "plan" . "page" $) }} |
| 127 | + </td> |
| 128 | + {{- end }} |
| 129 | + </tr> |
| 130 | + {{- end }} |
| 131 | + </tbody> |
| 132 | + {{- end }} |
| 133 | + <tfoot> |
| 134 | + <tr> |
| 135 | + <td class="border-t border-gray-200"></td> |
| 136 | + {{- range $plans }} |
| 137 | + <td class="border-t border-gray-200 px-4 pt-4 text-center align-top whitespace-normal{{ if eq .dataKey "Standard" }} bg-hub/5{{ end }}"> |
| 138 | + {{ partial "pricing/comparison-price.html" (dict "plan" . "page" $) }} |
| 139 | + </td> |
| 140 | + {{- end }} |
| 141 | + </tr> |
| 142 | + <tr> |
| 143 | + <td></td> |
| 144 | + {{- range $plans }} |
| 145 | + <td class="px-4 pb-4 pt-3 text-center align-top whitespace-normal{{ if eq .dataKey "Standard" }} bg-hub/5{{ end }}"> |
| 146 | + {{ partial "pricing/comparison-action.html" (dict "plan" . "page" $) }} |
| 147 | + </td> |
| 148 | + {{- end }} |
| 149 | + </tr> |
| 150 | + </tfoot> |
| 151 | + </table> |
| 152 | + </div> |
| 153 | + </div> |
| 154 | + </div> |
| 155 | +</section> |
0 commit comments