mirror of
https://github.com/avinal/avinal.github.io.git
synced 2026-07-04 07:40:09 +05:30
added hugo website
Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com> rh-pre-commit.version: 2.2.0 rh-pre-commit.check-secrets: ENABLED
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }}
|
||||
<a href="#{{ .Anchor | safeURL }}">#</a>
|
||||
</h{{ .Level }}>
|
||||
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ or site.Language.LanguageCode site.Language.Lang }}"
|
||||
dir="{{ or site.Language.LanguageDirection `ltr` }}">
|
||||
|
||||
<head>
|
||||
{{ partial "head.html" . }}
|
||||
</head>
|
||||
|
||||
<body class="bg-neutral-800">
|
||||
<main class="container mx-auto">
|
||||
{{ block "main" . }}{{ end }}
|
||||
<footer>
|
||||
{{ partial "footer.html" . }}
|
||||
</footer>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,7 @@
|
||||
{{ define "main" }}
|
||||
{{ .Content }}
|
||||
{{ range site.RegularPages }}
|
||||
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
|
||||
{{ .Summary }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
@@ -0,0 +1,82 @@
|
||||
{{ define "main" }}
|
||||
<div
|
||||
class="prose prose-invert mx-auto lg:prose-lg prose-a:decoration-cyan-500 hover:prose-a:decoration-pink-500 text-white">
|
||||
<div class="md:-mx-8 lg:-mx-16 px-8 py-1">
|
||||
<h1 class="text-5xl font-bold mb-6 mt-12 text-center">{{ .Title }}</h1>
|
||||
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</div>
|
||||
<section class="text-gray-100">
|
||||
<div class="max-w-6xl p-6 mx-auto space-y-6 sm:space-y-12 mb-16">
|
||||
{{ range first 1 .Pages }}
|
||||
<div
|
||||
class="block max-x-sm gap-3 mx-auto sm:max-w-full group hover:no-underline focus:no-underline lg:grid lg:grid-cols-12 bg-neutral-900">
|
||||
<a class="lg:col-span-7" href="{{ .RelPermalink }}">
|
||||
<img class="object-cover w-full h-64 rounded sm:h-96 lg:col-span-7" src="{{ .Params.Image | absURL }}"
|
||||
alt="{{ .LinkTitle }}">
|
||||
</a>
|
||||
<div class="p-6 space-y-2 lg:col-span-5">
|
||||
<a href="{{ .RelPermalink }}">
|
||||
<h3 class="text-2xl font-semibold sm:text-4xl group-hover:underline group-focus:underline">{{ .LinkTitle }}
|
||||
</h3>
|
||||
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
|
||||
{{ $dateHuman := .Date | time.Format ":date_long" }}
|
||||
<time datetime="{{ $dateMachine }}" class="text-gray-400">{{ $dateHuman }}</time>
|
||||
{{ if gt .ReadingTime 1 }}
|
||||
{{ .Scratch.Set "timeUnit" "mins" }}
|
||||
{{ else }}
|
||||
{{ .Scratch.Set "timeUnit" "min" }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.showReadingTime }}
|
||||
<span class="text-gray-400"> | ~{{.ReadingTime}} {{ .Scratch.Get "timeUnit" }}</span>
|
||||
{{ end }}
|
||||
<p> {{ .Summary | truncate 250 }}</p>
|
||||
</a>
|
||||
<a href="" target="_blank">
|
||||
<span class="flex flex-wrap py-6 space-x-2">
|
||||
<a class="px-3 py-1 m-1 rounded-sm hover:underline bg-pink-400 text-gray-900 font-bold" href="/posts/category/{{ .Params.Category }}">
|
||||
{{ .Params.Category }}</a>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="grid justify-center grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
|
||||
{{ range after 1 .Pages }}
|
||||
<div class="max-w-sm mx-auto group hover:no-underline focus:no-underline bg-neutral-900">
|
||||
<a href="{{ .RelPermalink }}">
|
||||
<img class="object-cover w-full h-44 rounded" src="{{ .Params.Image | absURL }}" alt="{{ .LinkTitle }}">
|
||||
</a>
|
||||
<div class="p-6 space-y-2">
|
||||
<a href="{{ .RelPermalink }}">
|
||||
<h3 class="text-2xl font-semibold group-hover:underline group-focus:underline">{{ .LinkTitle }}</h3>
|
||||
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
|
||||
{{ $dateHuman := .Date | time.Format ":date_long" }}
|
||||
<time datetime="{{ $dateMachine }}" class="text-gray-400">{{ $dateHuman }}</time>
|
||||
{{ if gt .ReadingTime 1 }}
|
||||
{{ .Scratch.Set "timeUnit" "mins" }}
|
||||
{{ else }}
|
||||
{{ .Scratch.Set "timeUnit" "min" }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.showReadingTime }}
|
||||
<span class="text-gray-400"> | ~{{.ReadingTime}} {{ .Scratch.Get "timeUnit" }}</span>
|
||||
{{ end }}
|
||||
<p> {{ .Summary | truncate 150 }}</p>
|
||||
|
||||
</a>
|
||||
<a href="" target="_blank">
|
||||
<span class="flex flex-wrap py-6 space-x-2">
|
||||
<a class="px-3 py-1 m-1 rounded-sm hover:underline bg-pink-400 text-gray-900 font-bold" href="/posts/category/{{ .Params.Category }}">
|
||||
{{ .Params.Category }}</a>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,32 @@
|
||||
{{ define "main" }}
|
||||
<div class="min-h-screen flex flex-col justify-center relative overflow-hidden">
|
||||
<div class="relative w-full bg-neutral md:max-w-3xl md:mx-auto lg:max-w-4xl lg:pb-28">
|
||||
|
||||
<div class="prose prose-invert mx-auto lg:prose-lg prose-a:decoration-cyan-500 hover:prose-a:decoration-pink-500">
|
||||
<div class="bg-neutral-900 md:-mx-8 lg:-mx-16 px-8 py-1">
|
||||
|
||||
{{ partial "header.html" . }}
|
||||
|
||||
<article>
|
||||
{{ if cond (ne .Params.toc nil) .Params.toc .Site.Params.toc }}
|
||||
{{ if ne .TableOfContents "<nav id=\"TableOfContents\"></nav>" }}
|
||||
<details class="open:bg-neutral-800 open:border open:rounded open:border-cyan-700 ">
|
||||
<summary>
|
||||
<b>In this post, we'll take a look at:</b>
|
||||
</summary>
|
||||
<div class="toc {{ if .Site.Params.numberedSubtitles }}numbered-subtitles{{ end }} ">{{ .TableOfContents }}
|
||||
</div>
|
||||
</details>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ .Content }}
|
||||
</article>
|
||||
|
||||
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ partial "comments.html" . (dict "taxonomy" "tags" "page" .) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user