hugoWebsite/layouts/index.html

192 lines
12 KiB
HTML

{{ define "main" }}
<main>
<div class="bg-gray-200 dark:bg-gray-900">
<div class="max-w-screen-xl px-4 py-8 mx-auto">
<div class="grid items-center gap-8 mb-8 sm:mb-0 lg:gap-12 lg:grid-cols-12">
<div class="col-span-6 px-4 text-center sm:mb-6 lg:text-left lg:mb-0">
<h1 class="mb-2 text-4xl font-extrabold leading-none tracking-tight text-gray-900 md:text-5xl xl:text-6xl dark:text-white">
{{ .Site.Title }}
</h1>
<h2 class="pb-2 text-3xl font-light text-gray-800 dark:text-gray-300 md:text-4xl">
{{ T "moto" }}
</h2>
<p class="max-w-xl mx-auto mb-6 font-normal text-gray-900 lg:mx-0 xl:mb-2 md:text-lg xl:text-xl dark:text-gray-50">
{{ T "index_description" }}
</p>
</div>
<div class="col-span-6">
{{ $hero := resources.GetMatch "images/pages/tailbliss-rocket-indigo.png" }}
{{ $thumb := ($hero.Fill "400x400 webp q90") }}
{{ $large := ($hero.Fill "576x576 webp q90") }}
<img srcset="
{{- with $thumb.RelPermalink -}}{{.}} 400w{{- end -}}
{{- with $large.RelPermalink -}}, {{.}} 576w{{- end -}}" src="{{ $hero.RelPermalink }}" width="100%" height="" alt="TailBliss Hero" class="w-full max-w-xl mx-auto rounded-lg" />
</div>
</div>
</div>
</div>
<!-- More main page content here... -->
<!-- Our mission section -->
<div class="relative my-4">
<div class="lg:mx-auto lg:grid lg:max-w-7xl lg:grid-cols-2 lg:items-start lg:gap-24 lg:px-8">
<div class="relative max-w-md px-4 mx-auto sm:max-w-3xl sm:px-6 lg:px-0">
<div class="md:pt-12 sm:pt-6 lg:pt-20">
<h2 class="text-3xl font-bold tracking-tight text-gray-900 dark:text-gray-50 sm:text-4xl">
{{ T "index_about" }}
</h2>
<div class="mt-6 text-gray-900 dark:text-white">
<div class="mt-6 space-y-6 text-gray-900 dark:text-white">
<p class="text-lg text-gray-900 dark:text-white">
{{ T "index_about_text" }}
</p>
<form action="./about">
<button type="submit" class="block w-full px-5 py-3 text-base font-medium text-white bg-gray-900 border border-transparent rounded-md shadow hover:bg-black focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-primary-500 sm:px-10">
{{ T "index_about"}}
</button>
</form>
</div>
</div>
</div>
</div>
<div class="relative max-w-md px-4 mx-auto sm:max-w-3xl sm:px-6 lg:px-0">
<div class="md:pt-12 sm:pt-6 lg:pt-20">
<h2 class="text-3xl font-bold tracking-tight text-gray-900 dark:text-gray-50 sm:text-4xl">
{{ T "index_member" }}
</h2>
<div class="mt-6 text-gray-900 dark:text-white">
<div class="mt-6 space-y-6 text-gray-900 dark:text-white">
<p class="text-lg text-gray-900 dark:text-white">
{{ T "index_member_text" }}
</p>
<form action="./become-a-member">
<button type="submit" class="block w-full px-5 py-3 text-base font-medium text-white bg-gray-900 border border-transparent rounded-md shadow hover:bg-black focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-primary-500 sm:px-10">
{{ T "index_member"}}
</button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Blog section -->
<div class="relative px-1 pt-8 pb-4 bg-transparent lg:px-8 lg:pt-12 lg:mb-4 md:mt-12">
<div class="absolute inset-0">
<div class="bg-gray-200 dark:bg-gray-900/50 h-1/3 sm:h-2/3"></div>
</div>
<div class="relative px-2 mx-auto max-w-7xl">
<div class="text-center">
<h2 class="text-3xl font-black tracking-tight text-primary-500 dark:text-primary-300 sm:text-4xl">
{{ T "block_header" }}
</h2>
<p class="max-w-2xl mx-auto mt-3 text-xl text-gray-500 dark:text-gray-300 sm:mt-4">
{{ T "block_description" }}
</p>
</div>
<div class="mx-auto text-gray-900 max-w-7xl dark:text-gray-50 md:px-1.5">
<div class="px-4 text-gray-900 dark:text-white not-prose dark:text-zinc-200">
<div class="grid gap-4 mx-auto mt-12 mb-4 lg:max-w-none md:grid-cols-3">
{{ range (.Paginator 3).Pages }}
<div class="flex flex-col overflow-hidden rounded-lg shadow-lg bg-gray-50 dark:bg-gray-900">
<a href="{{.Permalink}}">
{{ with .Params.featured_image }}
{{ with resources.Get . }}
{{ $postimage := (.Resize "500x webp q90").RelPermalink }}
<img src="{{ $postimage }}" class="object-fill overflow-hidden rounded-t-lg" width="100%" height="" loading="lazy" alt="{{ .Title }}" />
{{ end }}
{{ end }}
</a>
<div class="p-6">
<div class="flex-1">
<a href="{{.Permalink}}" class="block mt-2 text-2xl font-black text-gray-900 dark:text-gray-200 hover:text-primary-600 dark:hover:text-primary-500 hover:underline">
{{ .Title }}
</a>
<p class="mt-3 text-base text-gray-900 dark:text-gray-300">
{{ .Params.summary }}
</p>
</div>
<div class="flex pt-6 font-medium text-primary-600 dark:text-primary-100 text-md">
<span class="pr-2 font-black">Tags:</span>
{{ range $elem_index, $elem_val := (.GetTerms "tags") }}
{{- if gt $elem_index 0 }}, {{ end -}}
<a href="{{ .Permalink }}" class="inline-flex items-center rounded-md bg-gray-300 hover:bg-primary-200 hover:text-black px-2.5 py-0.5 text-sm font-medium text-gray-900 ">{{ .LinkTitle }}</a>
{{- end -}}
</div>
<div class="flex items-center mt-6">
<div class="flex-shrink-0">
<span class="sr-only">{{ .Params.author }}</span>
{{ with .Params.authorimage }}
{{ with resources.Get . }}
{{ $authorimage := (.Resize "400x webp").RelPermalink }}
<img class="w-10 h-10 rounded-full" src="{{ $authorimage }}" alt="">
{{ end }}
{{ end }}
</div>
<div class="pt-1 ml-3">
<p class="text-sm font-medium text-gray-900 dark:text-white">
{{ .Params.author }}
</p>
<div class="flex space-x-1 text-sm text-gray-500 dark:text-white">
<time datetime="2020-02-12">{{.Date.Format "2006-01-02"}}</time>
<span aria-hidden="true">&middot;</span>
<span>{{ math.Round (div (countwords .Content) 220.0) }}
min read</span>
</div>
</div>
</div>
</div>
</div>
{{ end }}
</div>
</div>
</div>
</div>
</div>
{{ if not .Site.Params.Disable_stay_uptodate}}
<!-- CTA section -->
<div class="relative pb-16 mt-6">
<div class="max-w-md mx-auto px-7 sm:max-w-3xl lg:max-w-7xl">
<div class="relative px-6 py-10 overflow-hidden shadow-xl bg-primary-500 rounded-2xl sm:px-12 sm:py-20">
<div aria-hidden="true" class="absolute inset-0 -mt-72 sm:-mt-32 md:mt-0">
<svg class="absolute inset-0 w-full h-full" preserveAspectRatio="xMidYMid slice" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 1463 360" loading="lazy">
<path class="text-primary-600 text-opacity-40" fill="currentColor" d="M-82.673 72l1761.849 472.086-134.327 501.315-1761.85-472.086z" />
<path class="text-primary-600 text-opacity-40" fill="currentColor" d="M-217.088 544.086L1544.761 72l134.327 501.316-1761.849 472.086z" />
</svg>
</div>
<div class="relative">
<div class="sm:text-center">
<h2 class="text-3xl font-bold tracking-tight text-white sm:text-4xl">
{{ T "email_header" }}
</h2>
<p class="max-w-2xl mx-auto mt-6 text-lg text-primary-100">
{{ T "email_description" }}
</p>
</div>
<form action="{{ .Site.Params.P5.Action }}" class="mt-12 sm:mx-auto sm:flex sm:max-w-lg">
<div class="flex-1 min-w-0">
<label for="cta-email" class="sr-only">{{ .Site.Params.P5.Label }}</label>
<input id="cta-email" type="email" class="block w-full px-5 py-3 text-base text-gray-900 placeholder-gray-500 border border-transparent rounded-md shadow-sm focus:border-transparent focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-primary-500" placeholder="{{ .Site.Params.P5.Placeholder }}">
</div>
<div class="mt-4 sm:mt-0 sm:ml-3">
<button type="submit" class="block w-full px-5 py-3 text-base font-medium text-white bg-gray-900 border border-transparent rounded-md shadow hover:bg-black focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-primary-500 sm:px-10">
{{ T "email_button" }}
</button>
</div>
</form>
</div>
</div>
</div>
</div>
{{ end }}
</main>
{{ end }}