Spaces:
Sleeping
Sleeping
Sync from GitHub via hub-sync
Browse files- src/app/globals.css +37 -0
- src/app/page.tsx +1 -1
- src/components/hf-auth-button.tsx +2 -2
src/app/globals.css
CHANGED
|
@@ -111,3 +111,40 @@ body {
|
|
| 111 |
.animate-fade-in-up {
|
| 112 |
animation: fadeInUp 0.55s ease-out forwards;
|
| 113 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 111 |
.animate-fade-in-up {
|
| 112 |
animation: fadeInUp 0.55s ease-out forwards;
|
| 113 |
}
|
| 114 |
+
|
| 115 |
+
/* Late entry — used for elements that should arrive after the hero stack
|
| 116 |
+
has settled, so they read as a quiet afterthought rather than another
|
| 117 |
+
simultaneous CTA. `both` fill mode keeps the element invisible during
|
| 118 |
+
the delay so it doesn't briefly flash with the parent's animation. */
|
| 119 |
+
@keyframes fadeIn {
|
| 120 |
+
from {
|
| 121 |
+
opacity: 0;
|
| 122 |
+
transform: translateY(6px);
|
| 123 |
+
}
|
| 124 |
+
to {
|
| 125 |
+
opacity: 1;
|
| 126 |
+
transform: translateY(0);
|
| 127 |
+
}
|
| 128 |
+
}
|
| 129 |
+
|
| 130 |
+
.animate-fade-in-late {
|
| 131 |
+
animation: fadeIn 0.45s ease-out 0.55s both;
|
| 132 |
+
}
|
| 133 |
+
|
| 134 |
+
/* Pop animation for dropdowns — anchors at top-right and scales up
|
| 135 |
+
slightly while fading in. Short enough (140ms) to feel snappy. */
|
| 136 |
+
@keyframes menuPop {
|
| 137 |
+
from {
|
| 138 |
+
opacity: 0;
|
| 139 |
+
transform: translateY(-2px) scale(0.97);
|
| 140 |
+
}
|
| 141 |
+
to {
|
| 142 |
+
opacity: 1;
|
| 143 |
+
transform: translateY(0) scale(1);
|
| 144 |
+
}
|
| 145 |
+
}
|
| 146 |
+
|
| 147 |
+
.animate-menu-pop {
|
| 148 |
+
animation: menuPop 0.14s ease-out forwards;
|
| 149 |
+
transform-origin: top right;
|
| 150 |
+
}
|
src/app/page.tsx
CHANGED
|
@@ -283,7 +283,7 @@ function HomeInner() {
|
|
| 283 |
</button>
|
| 284 |
</form>
|
| 285 |
|
| 286 |
-
<div className="mt-3">
|
| 287 |
<HfAuthButton variant="ghost" />
|
| 288 |
</div>
|
| 289 |
|
|
|
|
| 283 |
</button>
|
| 284 |
</form>
|
| 285 |
|
| 286 |
+
<div className="mt-3 animate-fade-in-late">
|
| 287 |
<HfAuthButton variant="ghost" />
|
| 288 |
</div>
|
| 289 |
|
src/components/hf-auth-button.tsx
CHANGED
|
@@ -74,7 +74,7 @@ export default function HfAuthButton({ variant = "badge" }: HfAuthButtonProps) {
|
|
| 74 |
onClick={signIn}
|
| 75 |
title="Sign in with Hugging Face to access your private datasets"
|
| 76 |
aria-label="Sign in with Hugging Face to access your private datasets"
|
| 77 |
-
className="cursor-pointer inline-flex items-center h-6 rounded-md transition-
|
| 78 |
>
|
| 79 |
{/* eslint-disable-next-line @next/next/no-img-element */}
|
| 80 |
<img
|
|
@@ -154,7 +154,7 @@ function SignedInMenu({
|
|
| 154 |
{open && (
|
| 155 |
<div
|
| 156 |
role="menu"
|
| 157 |
-
className="absolute right-0 top-full mt-1.5 min-w-[10rem] panel-raised bg-[var(--surface-1)]/98 backdrop-blur shadow-xl p-1 z-50 text-[11px]"
|
| 158 |
>
|
| 159 |
<button
|
| 160 |
role="menuitem"
|
|
|
|
| 74 |
onClick={signIn}
|
| 75 |
title="Sign in with Hugging Face to access your private datasets"
|
| 76 |
aria-label="Sign in with Hugging Face to access your private datasets"
|
| 77 |
+
className="cursor-pointer inline-flex items-center h-6 rounded-md transition-all duration-150 hover:opacity-90 motion-safe:hover:-translate-y-px focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-cyan-400/60"
|
| 78 |
>
|
| 79 |
{/* eslint-disable-next-line @next/next/no-img-element */}
|
| 80 |
<img
|
|
|
|
| 154 |
{open && (
|
| 155 |
<div
|
| 156 |
role="menu"
|
| 157 |
+
className="absolute right-0 top-full mt-1.5 min-w-[10rem] panel-raised bg-[var(--surface-1)]/98 backdrop-blur shadow-xl p-1 z-50 text-[11px] animate-menu-pop"
|
| 158 |
>
|
| 159 |
<button
|
| 160 |
role="menuitem"
|