mirror of
https://github.com/avinal/box-box.git
synced 2026-01-11 14:08:32 +05:30
feat: put some colors in the world
Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
<section>
|
||||
<div class="max-w-6xl mx-auto space-y-4 sm:space-y-5">
|
||||
{{ range first 1 .Pages }}
|
||||
|
||||
{{- $color := (index (shuffle (slice "cyan" "teal" "pink" "rose" "fuchsia" "purple" "violet" "indigo" "emerald" "yellow" "amber" "red")) 0) }}
|
||||
{{- $classes := (printf "flex items-center justify-center border border-black text-center hover:text-black hover:bg-%s-400 text-white bg-black capitalize hover:font-bold" $color ) }}
|
||||
<div
|
||||
class="block max-x-sm gap-4 mx-auto sm:max-w-full group hover:no-underline focus:no-underline lg:grid lg:grid-cols-12 ring-1 ring-black"
|
||||
>
|
||||
@@ -41,7 +44,7 @@
|
||||
|
||||
<!-- <span class=""> -->
|
||||
<a
|
||||
class="flex justify-center border border-black text-center text-white bg-black hover:text-black hover:bg-white hover:font-bold capitalize"
|
||||
class="{{ $classes }}"
|
||||
href="/posts/category/{{ .Params.Category }}"
|
||||
>
|
||||
{{ .Params.Category }}</a
|
||||
@@ -54,6 +57,8 @@
|
||||
class="grid justify-center grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3"
|
||||
>
|
||||
{{ range after 1 .Pages }}
|
||||
{{- $color := (index (shuffle (slice "cyan" "teal" "pink" "rose" "fuchsia" "purple" "violet" "indigo" "emerald" "yellow" "amber" "red")) 0) }}
|
||||
{{- $classes := (printf "flex items-center justify-center border border-black text-center hover:text-black hover:bg-%s-400 text-white bg-black capitalize hover:font-bold" $color ) }}
|
||||
<div
|
||||
class="max-w-sm mx-auto group hover:no-underline focus:no-underline ring-1 ring-black "
|
||||
>
|
||||
@@ -90,7 +95,7 @@
|
||||
</a>
|
||||
<!-- <span class="flex colums-auto flex-col justify-between"> -->
|
||||
<a
|
||||
class="flex items-center justify-center border border-black text-center hover:text-black hover:bg-white text-white bg-black capitalize hover:font-bold"
|
||||
class="{{ $classes }}"
|
||||
href="/posts/category/{{ .Params.Category }}"
|
||||
>
|
||||
{{ .Params.Category }}</a
|
||||
|
||||
@@ -22,11 +22,17 @@
|
||||
class="hidden font-mono md:block md:col-span-1 mt-6 cursor-default [writing-mode:vertical-rl]"
|
||||
>
|
||||
<!-- <h2 class="font-light uppercase md:text-2xl">The Secondary header goes here</h2> -->
|
||||
<div class=" font-medium">
|
||||
<div class=" font-medium space-y-2">
|
||||
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
|
||||
{{ $dateHuman := .Date | time.Format ":date_long" }}
|
||||
<time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
|
||||
<span>| {{ .WordCount }} words</span>
|
||||
<time
|
||||
datetime="{{ $dateMachine }}"
|
||||
class="border border-black py-2 px-1 hover:bg-cyan-400"
|
||||
>{{ $dateHuman }}</time
|
||||
>
|
||||
<span class="border border-black py-2 px-1 hover:bg-teal-400"
|
||||
>{{ .WordCount }} words</span
|
||||
>
|
||||
|
||||
{{ if gt .ReadingTime 1 }}
|
||||
{{ .Scratch.Set "timeUnit" "mins" }}
|
||||
@@ -35,17 +41,25 @@
|
||||
{{ end }}
|
||||
|
||||
|
||||
<span class="border border-black"
|
||||
>| ~{{ .ReadingTime }} {{ .Scratch.Get "timeUnit" }}</span
|
||||
>
|
||||
<span class="border border-black py-2 px-1 hover:bg-pink-400"
|
||||
>~{{ .ReadingTime }}
|
||||
{{ .Scratch.Get "timeUnit" }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="prose prose-neutral lg:prose-lg md:col-span-11 md:mx-auto">
|
||||
<div
|
||||
class="prose prose-neutral lg:prose-lg md:col-span-11 col-span-12 md:mx-auto"
|
||||
>
|
||||
<div
|
||||
class="invisible absolute inset-y-0 border-l-2 border-dashed border-black md:visible md:-ml-6"
|
||||
></div>
|
||||
|
||||
<img
|
||||
class="object-cover w-full h-60 sm:h-96 grayscale hover:grayscale-0"
|
||||
src="{{ .Params.Image | absURL }}"
|
||||
alt="{{ .Title }}"
|
||||
/>
|
||||
{{ .Content }}
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user