adds dark mode
This commit is contained in:
@ -7,16 +7,16 @@
|
||||
<li class="group flex md:flex-row flex-col md:gap-4 gap-2 md:items-center">
|
||||
<div class="flex-1 min-w-0 flex gap-2 items-center h-full">
|
||||
<a class="wompum-container h-full aspect-7/2 md:aspect-auto" href="{{ $page.RelPermalink }}">{{ partial "article-wompum.html" $page }}</a>
|
||||
<time class="text-gray-800 font-iosevka w-12 flex-shrink-0" datetime="{{ $page.Date.Format "2006-01-02" }}">
|
||||
<time class="text-gray-800 dark:text-sand-500 font-iosevka w-12 flex-shrink-0" datetime="{{ $page.Date.Format "2006-01-02" }}">
|
||||
<p>{{ $page.Date.Format "Jan" }}</p>
|
||||
<p>{{ $page.Date.Format "02" }}</p>
|
||||
<p>{{ $page.Date.Format "2006" }}</p>
|
||||
</time>
|
||||
</div>
|
||||
<div class="flex flex-col gap-2 md:w-3/5 flex-shrink-0 md:py-8">
|
||||
<a class="article-title article-title--list text-2xl font-bold text-gray-900 group-hover:text-pine-900 underline underline-offset-5 decoration-sand-500 hover:decoration-pine-900" href="{{ $page.RelPermalink }}">{{ partial "article-title" $page }}</a>
|
||||
<a class="article-title article-title--list" href="{{ $page.RelPermalink }}">{{ partial "article-title" $page }}</a>
|
||||
{{ if $page.Params.location }}
|
||||
<p class="text-gray-800 italic">{{ $page.Params.location }}</p>
|
||||
<p class="light:text-gray-800 dark:text-sand-100 italic">{{ $page.Params.location }}</p>
|
||||
{{ end }}
|
||||
<p class="max-w-prose">{{ $page.Params.summary }}</p>
|
||||
{{ partial "topics.html" $page }}
|
||||
|
@ -1,4 +1,4 @@
|
||||
<footer class="bg-sand-500 text-amber-900 mt-16">
|
||||
<footer class="bg-sand-500 text-amber-900 mt-16 dark:bg-gray-800 dark:text-sand-500">
|
||||
<div class="wompum-container wompum-container--no-gap h-1">
|
||||
<div class="wompum-grid" data-text="{{ .Site.Title }}" data-columns="7" data-rows="1">
|
||||
</div>
|
||||
|
@ -5,13 +5,30 @@
|
||||
<a href="/">{{ .Site.Title }}</a>
|
||||
</h1>
|
||||
<nav class="font-iosevka">
|
||||
<ul class="flex gap-4">
|
||||
<ul class="flex flex-col flex-wrap relative sm:flex-row sm:gap-4 justify-center pr-8 sm:pr-0">
|
||||
<li>
|
||||
<a href="/">Home</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/about">About</a>
|
||||
</li>
|
||||
<li class="sm:relative absolute -right-1 top-1/2 sm:right-[unset] sm:top-[unset] transform -translate-y-1/2 sm:transform-none sm:translate-y-0">
|
||||
<button id="darkmode-toggle" onclick="toggleDarkMode()" aria-label="Toggle dark mode"
|
||||
class="flex group p-1 relative -mt-1 cursor-pointer hover:bg-gray-950 hover:text-gray-100 dark:hover:bg-sand-100 dark:hover:text-gray-900 rounded-full">
|
||||
<!-- Lightbulb SVG icon -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 dark:inline hidden" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
d="M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z">
|
||||
</path>
|
||||
</svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 dark:hidden" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
d="M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z">
|
||||
</path>
|
||||
</svg>
|
||||
<p class="tooltip transition-opacity duration-500 absolute mr-5 -bottom-5 right-0 w-sm text-sm text-right hidden group-hover:block opacity-0 group-hover:opacity-100 group-hover:text-gray-600 dark:group-hover:text-gray-400">Turn on <span id="darkmode-label"></span> Mode</p>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<div class="mb-8">
|
||||
<label class="block mb-2">Enter text to generate a grid:</label>
|
||||
<input type="text"
|
||||
class="w-full p-2 border rounded font-iosevka bg-sand-100"
|
||||
class="w-full p-2 border rounded font-iosevka bg-sand-100 dark:bg-gray-800"
|
||||
placeholder="Type something..."
|
||||
value="{{ .Site.Title}}"
|
||||
oninput="updateWompumDemoGrid(this.value)">
|
||||
|
Reference in New Issue
Block a user