Spaces:
Running
Running
Jimin Huang
commited on
Commit
·
b72d93e
1
Parent(s):
ffd0317
Change settings
Browse files- src/components/HeaderOpen.vue +75 -107
src/components/HeaderOpen.vue
CHANGED
|
@@ -1,42 +1,33 @@
|
|
| 1 |
<template>
|
| 2 |
<header class="arena-header">
|
| 3 |
-
<div class="
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
</div>
|
| 18 |
|
| 19 |
-
<nav class="menu-section" aria-label="Primary">
|
| 20 |
-
<span
|
| 21 |
-
class="menu-item"
|
| 22 |
-
:class="{ active: isActive('/live') }"
|
| 23 |
-
@click="navigateTo('/live')"
|
| 24 |
-
>Live Arena</span>
|
| 25 |
-
|
| 26 |
-
<span
|
| 27 |
-
class="menu-item"
|
| 28 |
-
:class="{ active: isActive('/leaderboard') }"
|
| 29 |
-
@click="navigateTo('/leaderboard')"
|
| 30 |
-
>Leaderboard</span>
|
| 31 |
-
|
| 32 |
-
<span
|
| 33 |
-
class="menu-item"
|
| 34 |
-
:class="{ active: isActive('/add-asset') }"
|
| 35 |
-
@click="navigateTo('/add-asset')"
|
| 36 |
-
>Agent Arena</span>
|
| 37 |
-
</nav>
|
| 38 |
-
|
| 39 |
-
<!-- AMA gradient hairline -->
|
| 40 |
<div class="ama-gradient-rule" />
|
| 41 |
</header>
|
| 42 |
</template>
|
|
@@ -44,16 +35,6 @@
|
|
| 44 |
<script>
|
| 45 |
export default {
|
| 46 |
name: 'ArenaHeader',
|
| 47 |
-
data() {
|
| 48 |
-
return {
|
| 49 |
-
hostingLogos: [
|
| 50 |
-
{ name: 'DeepKin', src: new URL('../assets/images/companies_images/deepkin_logo.png', import.meta.url).href },
|
| 51 |
-
{ name: 'The Fin AI',src: new URL('../assets/images/companies_images/logofinai.png', import.meta.url).href },
|
| 52 |
-
{ name: 'NaCTeM', src: new URL('../assets/images/companies_images/nactemlogo.png', import.meta.url).href },
|
| 53 |
-
{ name: 'PAAL AI', src: new URL('../assets/images/companies_images/paalai_logo.png', import.meta.url).href },
|
| 54 |
-
]
|
| 55 |
-
}
|
| 56 |
-
},
|
| 57 |
methods: {
|
| 58 |
navigateTo(path) { this.$router.push(path) },
|
| 59 |
isActive(path) { return this.$route?.path?.startsWith(path) }
|
|
@@ -61,94 +42,81 @@ export default {
|
|
| 61 |
}
|
| 62 |
</script>
|
| 63 |
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
:
|
| 67 |
-
/*
|
| 68 |
-
--ama-start: 0, 0, 185; /* rgb(0,0,185) */
|
| 69 |
-
--ama-end: 240, 0, 15; /* rgb(240,0,15) */
|
| 70 |
-
/* Podium palette (for future reuse) */
|
| 71 |
-
--gold: #D4AF37;
|
| 72 |
-
--silver: #C0C0C0;
|
| 73 |
-
--bronze: #CD7F32;
|
| 74 |
}
|
| 75 |
-
</style>
|
| 76 |
|
| 77 |
-
|
| 78 |
-
<style scoped>
|
| 79 |
-
.arena-header {
|
| 80 |
position: sticky; top: 0; z-index: 50;
|
| 81 |
-
|
| 82 |
-
gap: 1rem;
|
| 83 |
-
padding: 18px 16px 16px;
|
| 84 |
-
background: linear-gradient(135deg, #fbfcff 0%, #ffffff 100%);
|
| 85 |
border-bottom: 1px solid #e5e7eb;
|
| 86 |
-
backdrop-filter: blur(
|
| 87 |
}
|
| 88 |
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
}
|
| 93 |
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
transition: transform .18s ease;
|
| 102 |
-
}
|
| 103 |
-
.logo-image:hover { transform: translateY(-1px) scale(1.03); }
|
| 104 |
-
|
| 105 |
-
.arena-title {
|
| 106 |
-
font-size: 22px; font-weight: 900; letter-spacing: -0.01em;
|
| 107 |
-
/* AMA gradient text */
|
| 108 |
background-image: linear-gradient(90deg, rgb(var(--ama-start)), rgb(var(--ama-end)));
|
| 109 |
-
-webkit-background-clip: text;
|
| 110 |
-
|
|
|
|
| 111 |
}
|
| 112 |
|
| 113 |
-
|
| 114 |
-
|
|
|
|
| 115 |
}
|
| 116 |
-
|
| 117 |
-
.menu-item {
|
| 118 |
cursor: pointer; position: relative;
|
| 119 |
-
font-size:
|
| 120 |
padding-bottom: 4px; transition: color .2s ease;
|
| 121 |
}
|
| 122 |
-
.menu-item:hover
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
.menu-item.active {
|
| 126 |
background-image: linear-gradient(90deg, rgb(var(--ama-start)), rgb(var(--ama-end)));
|
| 127 |
-
|
| 128 |
}
|
| 129 |
-
.menu-item::after
|
| 130 |
-
|
| 131 |
-
height: 2px; width: 0%;
|
| 132 |
background-image: linear-gradient(90deg, rgb(var(--ama-start)), rgb(var(--ama-end)));
|
| 133 |
-
|
| 134 |
}
|
| 135 |
-
.menu-item
|
| 136 |
-
.menu-item.active::after { width: 100%; }
|
| 137 |
|
| 138 |
-
|
| 139 |
-
|
|
|
|
| 140 |
background-image: linear-gradient(
|
| 141 |
90deg,
|
| 142 |
-
rgba(var(--ama-start),
|
| 143 |
rgb(var(--ama-start)),
|
| 144 |
rgb(var(--ama-end)),
|
| 145 |
-
rgba(var(--ama-end),
|
| 146 |
);
|
| 147 |
}
|
| 148 |
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
.
|
| 152 |
-
.menu
|
|
|
|
| 153 |
}
|
| 154 |
</style>
|
|
|
|
| 1 |
<template>
|
| 2 |
<header class="arena-header">
|
| 3 |
+
<div class="bar">
|
| 4 |
+
<!-- Title (left) -->
|
| 5 |
+
<button class="arena-title" aria-label="Asset Market Arena" @click="navigateTo('/')">
|
| 6 |
+
Asset Market Arena
|
| 7 |
+
</button>
|
| 8 |
+
|
| 9 |
+
<!-- Tabs (right) -->
|
| 10 |
+
<nav class="menu" aria-label="Primary">
|
| 11 |
+
<span
|
| 12 |
+
class="menu-item"
|
| 13 |
+
:class="{ active: isActive('/live') }"
|
| 14 |
+
@click="navigateTo('/live')"
|
| 15 |
+
>Live Arena</span>
|
| 16 |
+
|
| 17 |
+
<span
|
| 18 |
+
class="menu-item"
|
| 19 |
+
:class="{ active: isActive('/leaderboard') }"
|
| 20 |
+
@click="navigateTo('/leaderboard')"
|
| 21 |
+
>Leaderboard</span>
|
| 22 |
+
|
| 23 |
+
<span
|
| 24 |
+
class="menu-item"
|
| 25 |
+
:class="{ active: isActive('/add-asset') }"
|
| 26 |
+
@click="navigateTo('/add-asset')"
|
| 27 |
+
>Agent Arena</span>
|
| 28 |
+
</nav>
|
| 29 |
</div>
|
| 30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
<div class="ama-gradient-rule" />
|
| 32 |
</header>
|
| 33 |
</template>
|
|
|
|
| 35 |
<script>
|
| 36 |
export default {
|
| 37 |
name: 'ArenaHeader',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
methods: {
|
| 39 |
navigateTo(path) { this.$router.push(path) },
|
| 40 |
isActive(path) { return this.$route?.path?.startsWith(path) }
|
|
|
|
| 42 |
}
|
| 43 |
</script>
|
| 44 |
|
| 45 |
+
<style scoped>
|
| 46 |
+
:root{
|
| 47 |
+
--ama-start: 0,0,185; /* rgb(0,0,185) */
|
| 48 |
+
--ama-end: 240,0,15; /* rgb(240,0,15) */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
}
|
|
|
|
| 50 |
|
| 51 |
+
.arena-header{
|
|
|
|
|
|
|
| 52 |
position: sticky; top: 0; z-index: 50;
|
| 53 |
+
background: linear-gradient(135deg,#fbfcff 0%,#ffffff 100%);
|
|
|
|
|
|
|
|
|
|
| 54 |
border-bottom: 1px solid #e5e7eb;
|
| 55 |
+
backdrop-filter: blur(8px);
|
| 56 |
}
|
| 57 |
|
| 58 |
+
/* row */
|
| 59 |
+
.bar{
|
| 60 |
+
max-width: 1200px;
|
| 61 |
+
margin: 0 auto;
|
| 62 |
+
padding: 14px 16px 10px;
|
| 63 |
+
display: flex;
|
| 64 |
+
align-items: center;
|
| 65 |
+
justify-content: space-between;
|
| 66 |
+
gap: 16px;
|
| 67 |
}
|
| 68 |
|
| 69 |
+
/* title (left) */
|
| 70 |
+
.arena-title{
|
| 71 |
+
all: unset;
|
| 72 |
+
cursor: pointer;
|
| 73 |
+
font-size: 24px;
|
| 74 |
+
font-weight: 900;
|
| 75 |
+
letter-spacing: -0.01em;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
background-image: linear-gradient(90deg, rgb(var(--ama-start)), rgb(var(--ama-end)));
|
| 77 |
+
-webkit-background-clip: text;
|
| 78 |
+
background-clip: text;
|
| 79 |
+
color: transparent;
|
| 80 |
}
|
| 81 |
|
| 82 |
+
/* tabs (right) */
|
| 83 |
+
.menu{
|
| 84 |
+
display: flex; gap: 28px; align-items: center; flex-wrap: wrap;
|
| 85 |
}
|
| 86 |
+
.menu-item{
|
|
|
|
| 87 |
cursor: pointer; position: relative;
|
| 88 |
+
font-size: 20px; font-weight: 700; color: #1f2937;
|
| 89 |
padding-bottom: 4px; transition: color .2s ease;
|
| 90 |
}
|
| 91 |
+
.menu-item:hover{ color: rgb(var(--ama-end)); }
|
| 92 |
+
.menu-item::after{
|
| 93 |
+
content:''; position:absolute; left:0; bottom:0; height:2px; width:0%;
|
|
|
|
| 94 |
background-image: linear-gradient(90deg, rgb(var(--ama-start)), rgb(var(--ama-end)));
|
| 95 |
+
transition: width .25s ease;
|
| 96 |
}
|
| 97 |
+
.menu-item:hover::after{ width:100%; }
|
| 98 |
+
.menu-item.active{
|
|
|
|
| 99 |
background-image: linear-gradient(90deg, rgb(var(--ama-start)), rgb(var(--ama-end)));
|
| 100 |
+
-webkit-background-clip:text; background-clip:text; color:transparent;
|
| 101 |
}
|
| 102 |
+
.menu-item.active::after{ width:100%; }
|
|
|
|
| 103 |
|
| 104 |
+
/* bottom hairline */
|
| 105 |
+
.ama-gradient-rule{
|
| 106 |
+
width:100%; height:3px; border-radius:2px;
|
| 107 |
background-image: linear-gradient(
|
| 108 |
90deg,
|
| 109 |
+
rgba(var(--ama-start),0),
|
| 110 |
rgb(var(--ama-start)),
|
| 111 |
rgb(var(--ama-end)),
|
| 112 |
+
rgba(var(--ama-end),0)
|
| 113 |
);
|
| 114 |
}
|
| 115 |
|
| 116 |
+
/* responsive: stack */
|
| 117 |
+
@media (max-width: 720px){
|
| 118 |
+
.bar{ flex-direction: column; align-items: stretch; }
|
| 119 |
+
.menu{ justify-content: center; gap: 18px; }
|
| 120 |
+
.arena-title{ text-align: center; }
|
| 121 |
}
|
| 122 |
</style>
|