Skip to content

Commit

Permalink
💄 header transitions
Browse files Browse the repository at this point in the history
canstand committed Sep 3, 2023
1 parent d40e5ed commit f37afc1
Showing 3 changed files with 11 additions and 6 deletions.
13 changes: 9 additions & 4 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
@@ -5,8 +5,9 @@
>
<div class="fixed z-10 flex h-screen w-48 lg:hidden" :class="open ? '' : 'hidden'" x-ref="dialog" aria-modal="true">
<div
class="bg-black fixed inset-0 bg-opacity-25"
class="fixed inset-0 bg-gray-950/25"
:class="open ? '' : 'hidden'"
x-show="open"
x-transition:enter="transition-opacity ease-linear duration-300"
x-transition:enter-start="opacity-0"
x-transition:enter-end="opacity-100"
@@ -20,6 +21,7 @@
<div
class="fixed inset-0 flex h-full w-full max-w-xxs flex-col overflow-y-auto bg-neutral-50 pb-12 shadow-xl dark:bg-neutral-800"
:class="open ? '' : 'hidden'"
x-show="open"
x-transition:enter="transition ease-in-out duration-300"
x-transition:enter-start="-translate-x-full"
x-transition:enter-end="translate-x-0"
@@ -95,14 +97,17 @@
</button>
<div class="mx-2 h-12 flex-grow">
<div class="relative h-full w-full">
<div class="absolute max-w-full" :class="up ? 'hidden' : ''" x-transition.duration.500ms>
<span class="overflow-hidden text-ellipsis whitespace-nowrap font-semibold">{{ .Site.Title }}</span>
<div class="absolute max-w-full" :class="up ? 'hidden' : ''" x-show="!up" x-transition.duration.750ms>
<span class="overflow-hidden text-ellipsis whitespace-nowrap font-semibold tracking-wider"
>{{ .Site.Title }}</span
>
</div>
<template x-if="true">
<div
class="absolute left-0 right-0 top-0 max-w-full"
:class="up ? '' : 'hidden'"
x-transition.duration.500ms
x-show="up"
x-transition.duration.750ms
>
<span class="overflow-hidden text-ellipsis whitespace-nowrap">{{ .Title | emojify }}</span>
</div>
2 changes: 1 addition & 1 deletion package.hugo.json
Original file line number Diff line number Diff line change
@@ -42,5 +42,5 @@
"scripts": {
"prettier": "npx prettier --write ."
},
"version": "0.6.1"
"version": "0.6.2"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -41,5 +41,5 @@
"scripts": {
"prettier": "npx prettier --write ."
},
"version": "0.6.1"
"version": "0.6.2"
}

0 comments on commit f37afc1

Please sign in to comment.