+
@@ -407,8 +415,11 @@ const props = withDefaults(defineProps<{
isClientArea?: boolean
// Dynamic height for hero effect
height?: number
+ // Collapse progress for hero layout
+ collapseProgress?: number
}>(), {
- height: 100
+ height: 100,
+ collapseProgress: 1
})
defineEmits([
@@ -493,10 +504,37 @@ const getTokenIcon = (type: string) => {
return icons[type] || 'lucide:tag'
}
+const isHeroLayout = computed(() => props.isHomePage && !props.isClientArea)
+const topRowHeight = 100
+
+const rowStyle = computed(() => {
+ if (isHeroLayout.value) {
+ return { height: `${topRowHeight}px` }
+ }
+ return { height: `${props.height}px` }
+})
+
+const glassStyle = computed(() => {
+ if (isHeroLayout.value) {
+ return { height: `${topRowHeight}px` }
+ }
+ return { height: '100%' }
+})
+
+const centerStyle = computed(() => {
+ if (!isHeroLayout.value) return {}
+ const heroHeight = props.height || topRowHeight
+ const minTop = 0
+ const maxTop = Math.max(120, Math.round(heroHeight * 0.42))
+ const progress = Math.min(1, Math.max(0, props.collapseProgress || 0))
+ const top = Math.round(maxTop - (maxTop - minTop) * progress)
+ return { marginTop: `${top}px` }
+})
+
// Header background classes
const headerClasses = computed(() => {
- if (props.isHomePage) {
- return 'bg-transparent backdrop-blur-xl'
+ if (props.isHomePage && !props.isCollapsed) {
+ return 'bg-transparent'
}
if (props.isCollapsed) {
return 'bg-transparent backdrop-blur-xl'
diff --git a/app/layouts/topnav.vue b/app/layouts/topnav.vue
index 910637d..d4ed51b 100644
--- a/app/layouts/topnav.vue
+++ b/app/layouts/topnav.vue
@@ -9,6 +9,7 @@