Skip to content

Commit 10cca8f

Browse files
committed
Update website
1 parent 86aa828 commit 10cca8f

37 files changed

Lines changed: 4638 additions & 927 deletions

vix-site/src/components/common/BaseButton.vue

Lines changed: 46 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -7,106 +7,94 @@
77
target="_blank"
88
rel="noreferrer"
99
>
10-
<span><slot /></span>
11-
<span v-if="arrow" class="btn-arrow" aria-hidden="true">→</span>
10+
<span class="btn__label"><slot /></span>
11+
<span v-if="arrow" class="btn__arrow" aria-hidden="true">→</span>
1212
</a>
13-
1413
<RouterLink v-else class="btn" :class="[`btn--${variant}`]" :to="href">
15-
<span><slot /></span>
16-
<span v-if="arrow" class="btn-arrow" aria-hidden="true">→</span>
14+
<span class="btn__label"><slot /></span>
15+
<span v-if="arrow" class="btn__arrow" aria-hidden="true">→</span>
1716
</RouterLink>
1817
</template>
1918

2019
<script setup>
2120
import { computed } from "vue";
2221
2322
const props = defineProps({
24-
href: {
25-
type: String,
26-
required: true,
27-
},
23+
href: { type: String, required: true },
2824
variant: {
2925
type: String,
3026
default: "primary",
31-
validator: (value) => ["primary", "secondary", "ghost"].includes(value),
32-
},
33-
external: {
34-
type: Boolean,
35-
default: false,
36-
},
37-
arrow: {
38-
type: Boolean,
39-
default: false,
27+
validator: (v) => ["primary", "secondary", "ghost"].includes(v),
4028
},
29+
external: { type: Boolean, default: false },
30+
arrow: { type: Boolean, default: false },
4131
});
4232
43-
const isExternalHref = computed(() => {
44-
return props.href.startsWith("http://") || props.href.startsWith("https://");
45-
});
33+
const isExternalHref = computed(
34+
() => props.href.startsWith("http://") || props.href.startsWith("https://"),
35+
);
4636
</script>
4737

4838
<style scoped>
4939
.btn {
5040
display: inline-flex;
5141
align-items: center;
52-
justify-content: center;
53-
gap: 0.55rem;
54-
min-height: 44px;
55-
padding: 0.72rem 1rem;
56-
border-radius: 999px;
57-
font-size: 0.9rem;
58-
font-weight: 750;
59-
line-height: 1;
42+
gap: 0.5rem;
43+
padding: 0.7rem 1.2rem;
44+
border-radius: var(--radius-md);
45+
font-size: 0.92rem;
46+
font-weight: 600;
47+
letter-spacing: -0.01em;
6048
text-decoration: none;
49+
border: 1px solid transparent;
6150
transition:
62-
transform var(--speed) var(--ease),
63-
border-color var(--speed) var(--ease),
6451
background var(--speed) var(--ease),
65-
color var(--speed) var(--ease);
66-
}
67-
68-
.btn:hover {
69-
transform: translateY(-1px);
52+
border-color var(--speed) var(--ease),
53+
color var(--speed) var(--ease),
54+
transform var(--speed) var(--ease),
55+
box-shadow var(--speed) var(--ease);
7056
}
7157
58+
/* Primary — solid green */
7259
.btn--primary {
73-
border: 1px solid rgba(34, 197, 94, 0.55);
74-
background: linear-gradient(180deg, #35d56d, #16a34a);
75-
color: #031108;
76-
box-shadow: 0 12px 36px rgba(34, 197, 94, 0.18);
60+
background: var(--green);
61+
color: #fff;
62+
box-shadow: var(--shadow-green);
7763
}
78-
7964
.btn--primary:hover {
80-
color: #031108;
81-
border-color: rgba(167, 243, 208, 0.85);
65+
background: var(--green-strong);
66+
color: #fff;
67+
transform: translateY(-1px);
8268
}
8369
70+
/* Secondary — outlined */
8471
.btn--secondary {
85-
border: 1px solid rgba(34, 197, 94, 0.22);
86-
background: rgba(34, 197, 94, 0.08);
87-
color: var(--green-soft);
72+
background: var(--bg-panel);
73+
border-color: var(--line-strong);
74+
color: var(--text);
8875
}
89-
9076
.btn--secondary:hover {
91-
border-color: rgba(34, 197, 94, 0.42);
92-
background: rgba(34, 197, 94, 0.12);
93-
color: #bbf7d0;
77+
border-color: var(--green-line);
78+
color: var(--green-strong);
79+
transform: translateY(-1px);
9480
}
9581
82+
/* Ghost — bare */
9683
.btn--ghost {
97-
border: 1px solid var(--line);
98-
background: rgba(255, 255, 255, 0.025);
84+
background: transparent;
85+
border-color: transparent;
9986
color: var(--text-soft);
10087
}
101-
10288
.btn--ghost:hover {
103-
border-color: rgba(148, 163, 184, 0.22);
104-
background: rgba(255, 255, 255, 0.045);
89+
background: var(--bg-sunken);
10590
color: var(--text);
10691
}
10792
108-
.btn-arrow {
109-
transform: translateY(-0.5px);
110-
opacity: 0.85;
93+
.btn__arrow {
94+
opacity: 0.75;
95+
transition: transform var(--speed) var(--ease);
96+
}
97+
.btn:hover .btn__arrow {
98+
transform: translateX(2px);
11199
}
112100
</style>

0 commit comments

Comments
 (0)