added 2 new homepage layouts

This commit is contained in:
Nuno Coração
2022-10-11 23:40:31 +01:00
parent 9e3a07237c
commit cb156c0097
50 changed files with 249 additions and 284 deletions

View File

@@ -0,0 +1,26 @@
<div class="relative pt-16 pb-32">
<div aria-hidden="true" class="absolute inset-x-0 top-0 h-48 bg-gradient-to-b from-gray-100"></div>
<div class="relative">
<div class="lg:mx-auto lg:grid lg:max-w-7xl lg:grid-flow-col-dense lg:grid-cols-2 lg:gap-24 lg:px-8">
<div class="mx-auto max-w-xl px-4 sm:px-6 lg:mx-0 lg:max-w-none lg:py-16 lg:px-0">
<article class="max-w-full prose dark:prose-invert">
{{ with .Title }}
<header>
<h1>{{ . | emojify }}</h1>
</header>
{{ end }}
<section>{{ .Content | emojify }}</section>
</article>
</div>
<div class="mt-6 sm:mt-16 lg:mt-0">
<div class="-mr-48 pl-4 sm:pl-6 md:-mr-16 lg:relative lg:m-0 lg:h-full lg:px-0">
<img class="w-full rounded-xl shadow-xl lg:absolute lg:left-0 lg:h-full lg:w-auto lg:max-w-none"
src="{{ .Site.Params.homepage.homepageImage }}">
</div>
</div>
</div>
</div>
</div>
<section>
{{ partial "recent-articles.html" . }}
</section>

View File

@@ -4,10 +4,9 @@
<div class="mx-auto max-w-7xl p-0">
<div class="relative shadow-xl sm:overflow-hidden rounded-2xl">
<div class="absolute inset-0">
<img class="h-full w-full object-cover p-0 nozoom"
src="https://images.unsplash.com/photo-1521737852567-6949f3f9f2b5?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=2830&q=80&sat=-100"
alt="People working on laptops">
<div class="absolute inset-0 bg-gradient-to-r from-primary-800 to-secondary-700 mix-blend-multiply">
<img class="h-full w-full object-cover m-0 nozoom" src="{{ .Site.Params.homepage.homepageImage }}">
<div
class="absolute inset-0 bg-gradient-to-r from-primary-500 to-secondary-700 dark:from-primary-600 dark:to-secondary-800 mix-blend-multiply">
</div>
</div>
<div class="relative px-4 py-16 sm:px-6 sm:py-24 lg:py-32 lg:px-8 flex flex-col items-center">
@@ -19,24 +18,28 @@
alt="{{ $.Site.Author.name | default " Author" }}" src="{{ $authorImage.RelPermalink }}" />
{{ end }}
{{ end }}
<h1 class="text-4xl font-extrabold">
<h1 class="mb-2 text-4xl font-extrabold text-neutral-200">
{{ .Site.Author.name | default .Site.Title }}
</h1>
{{ with .Site.Author.headline }}
<h2 class="text-xl text-neutral-500 dark:text-neutral-400">
<h2 class="mt-0 mb-0 text-xl text-neutral-300">
{{ . | markdownify | emojify }}
</h2>
{{ end }}
<div class="mt-1 text-2xl">
{{ partialCached "author-links.html" . }}
<div class="mt-1 mb-10 text-2xl">
{{ with .Site.Author.links }}
<div class="flex flex-wrap">
{{ range $links := . }}
{{ range $name, $url := $links }}
<a class="px-1 hover:text-primary-400 text-primary-300" href="{{ $url }}" target="_blank"
aria-label="{{ $name | title }}" rel="me noopener noreferrer">{{ partial
"icon.html" $name }}</a>
{{ end }}
{{ end }}
</div>
{{ end }}
</div>
{{ with .Title }}
<header>
<h1>{{ . | emojify }}</h1>
</header>
{{ end }}
<section class="prose dark:prose-invert">{{ .Content | emojify }}</section>
<section class="prose text-neutral-200">{{ .Content | emojify }}</section>
</div>
</div>
</div>
@@ -44,49 +47,4 @@
</article>
<section>
{{ partial "recent-articles.html" . }}
</section>
<!--article class="max-w-full prose dark:prose-invert rounded-xl hero"
style="background-image:url(https://cdn.britannica.com/06/171306-050-C88DD752/Aurora-borealis-peninsula-Snaefellsnes-Iceland-March-2013.jpg)">
<div class="absolute inset-0 bg-gradient-to-r from-primary-800 to-secondary-700 mix-blend-multiply"></div>
<div class="absolute inset-0">
<img class="h-full w-full object-cover"
src="https://images.unsplash.com/photo-1521737852567-6949f3f9f2b5?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=2830&q=80&sat=-100"
alt="People working on laptops">
<div class="absolute inset-0 bg-gradient-to-r from-purple-800 to-indigo-700 mix-blend-multiply"></div>
</div>
<header class="flex flex-col items-center mb-3 p-32">
{{ with .Site.Author.image }}
{{ $authorImage := resources.Get . }}
{{ if $authorImage }}
{{ $authorImage := $authorImage.Fill "288x288" }}
<img class="mb-2 rounded-full h-36 w-36" width="144" height="144" alt="{{ $.Site.Author.name | default " Author"
}}" src="{{ $authorImage.RelPermalink }}" />
{{ end }}
{{ end }}
<h1 class="text-4xl font-extrabold">
{{ .Site.Author.name | default .Site.Title }}
</h1>
{{ with .Site.Author.headline }}
<h2 class="text-xl text-neutral-500 dark:text-neutral-400">
{{ . | markdownify | emojify }}
</h2>
{{ end }}
<div class="mt-1 text-2xl">
{{ partialCached "author-links.html" . }}
</div>
{{ with .Title }}
<header>
<h1>{{ . | emojify }}</h1>
</header>
{{ end }}
<section class="prose dark:prose-invert">{{ .Content | emojify }}</section>
</header>
</article>
<section>
{{ partial "recent-articles.html" . }}
</section-->
</section>