Skip to content

Commit a0eb52d

Browse files
authored
feat(search): update mobile search animation (#43)
1 parent d728ce2 commit a0eb52d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/components/Navigation/index.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<div class="w-full items-center justify-between">
66
<div class="w-full flex basis-auto items-center">
77
<div
8-
class="transition-all duration-300 w-full sm:w-auto mr-auto sm:mr-4 sm:transform-none sm:block"
9-
:class="{ '-translate-x-3/2 hidden': isSearchOpen }"
8+
class="transition-all duration-300 mr-auto sm:mr-4 sm:transform-none sm:block overflow-hidden"
9+
:class="{ 'w-0 sm:w-full': isSearchOpen, 'w-full': !isSearchOpen }"
1010
>
1111
<div class="relative flex-grow w-full h-11.5 mb-0.5">
1212
<div class="z-10 absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none">
@@ -35,8 +35,8 @@
3535
</div>
3636
</div>
3737
<div
38-
class="flex flex-row ml-0 md:ml-auto items-center mt-0 text-slate-50 gap-7 md:gap-8"
39-
:class="[!isSearchOpen ? 'hidden sm:flex' : '']"
38+
class="transition-all duration-300 flex flex-1 flex-row ml-0 md:ml-auto items-center mt-0 text-slate-50 gap-7 md:gap-8"
39+
:class="[!isSearchOpen ? 'w-0 overflow-hidden sm:flex' : 'w-full']"
4040
>
4141
<div class="relative inline-block lg:hidden text-white">
4242
<div class="flex items-center">

src/components/Sidebar/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<a
1212
v-if="(isHover && !isPin) || isPin"
1313
:class="{ 'opacity-0': !isHover && !isPin }"
14-
class="transition-opacity duration-300 flex opacity-1 p-6 block"
14+
class="transition-opacity duration-300 opacity-1 p-6 block"
1515
href="#index"
1616
>
1717
<img

0 commit comments

Comments
 (0)