Skip to content

Commit

Permalink
Merge pull request #339 from AstarNetwork/website-refresh
Browse files Browse the repository at this point in the history
Website refresh 2024
  • Loading branch information
impelcrypto committed Mar 5, 2024
2 parents e887582 + a14dfa7 commit af6ded0
Show file tree
Hide file tree
Showing 220 changed files with 10,598 additions and 13,896 deletions.
66 changes: 43 additions & 23 deletions assets/css/tailwind.css
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Noto+Sans+JP:wght@900&family=Roboto+Mono:wght@300&family=Roboto:wght@300;400;500;700;900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&family=Roboto:wght@400;500;700;900&family=Noto+Sans+JP:wght@900&display=swap");

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
html,
body {
html,body{
@apply overflow-x-hidden;
}
/* html {
@apply scroll-smooth;
} */
body {
@apply leading-relaxed text-base;
@apply leading-relaxed;
}
h1,
h2,
h3,
h4,
h5 {
@apply text-slate-950 font-semibold;
}
a {
@apply text-blue hover:text-blue/80 transition;
}
::selection{
@apply bg-blue text-white;
}
}

Expand All @@ -29,9 +38,8 @@
);
}
.title {
@apply font-extrabold text-3xl sm:text-4xl lg:text-5xl leading-tight;
@apply font-semibold text-3xl sm:text-4xl lg:text-5xl leading-tight tracking-tight;
}
.title span,
.gradient-text span {
background: linear-gradient(
90deg,
Expand All @@ -45,7 +53,7 @@
-webkit-text-fill-color: transparent;
}
.title-zkevm {
@apply font-extrabold text-3xl sm:text-4xl lg:text-5xl leading-tight;
@apply font-bold text-3xl sm:text-4xl lg:text-5xl leading-tight;
span {
background: linear-gradient(
90deg,
Expand Down Expand Up @@ -99,18 +107,22 @@

/* Ecosystem */
.tab {
@apply text-space-blue hover:text-space-blue-lighter cursor-pointer;
@apply text-slate-500 hover:text-blue cursor-pointer text-left px-2 lg:px-4 py-2 lg:py-2.5 rounded hover:bg-blue/5 transition text-xs sm:text-sm lg:text-base block;
}
.tab.current {
@apply text-space-gray cursor-default outline-0;
@apply text-white bg-blue cursor-default outline-0;
}
.tab-panel {
@apply grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-x-8 gap-y-16 max-w-7xl mx-auto px-4 sm:px-6;
@apply grid grid-cols-2 md:grid-cols-3 xl:grid-cols-4 gap-2 lg:gap-4;
}

/* Article */
.entry-content {
@apply prose prose-invert lg:prose-xl mx-auto prose-a:text-space-cyan hover:prose-a:text-space-cyan-lighter prose-headings:text-white bg-space-gray-dark prose-headings:font-bold prose-blockquote:py-3 prose-blockquote:pl-7 prose-blockquote:pr-5 prose-blockquote:text-tiny lg:prose-blockquote:text-base prose-blockquote:bg-white/5 prose-strong:font-medium prose-em:text-white prose-img:mx-auto;
@apply prose lg:prose-lg mx-auto prose-a:text-blue hover:prose-a:text-blue prose-headings:text-slate-950 prose-headings:font-bold prose-blockquote:py-3 prose-blockquote:pl-7 prose-blockquote:pr-5 prose-blockquote:bg-slate-50 prose-strong:font-medium prose-em:text-slate-950 prose-img:mx-auto;
}
.entry-content h2:first-child,
.entry-content p:first-child{
@apply mt-0;
}
.entry-content p code {
font-size: 0.85em;
Expand All @@ -124,7 +136,7 @@
}
.entry-content ul li::marker,
.entry-content ol li::marker {
@apply text-white;
@apply text-slate-500;
}
.entry-content h1 {
font-size: 1.8em;
Expand All @@ -143,15 +155,23 @@
}
.entry-content h2 a,
.entry-content h3 a {
@apply text-white no-underline hover:text-white;
@apply text-slate-950 no-underline hover:text-slate-950;
}
}

.sub-page-header::before {
@apply w-full h-full absolute content-[""] z-[0] bottom-0;
background: linear-gradient(
180deg,
rgba(8, 16, 41, 0) 30%,
rgba(8, 16, 41, 100) 100%
);

.container-lg{
@apply mx-auto max-w-screen-2xl px-4 sm:px-6 lg:px-8;
}

.container-md{
@apply mx-auto max-w-screen-xl px-4 sm:px-6 lg:px-8;
}

.container-sm{
@apply mx-auto max-w-screen-lg px-4 sm:px-6 lg:px-8;
}

.container-xs{
@apply mx-auto max-w-screen-md px-4 sm:px-6 lg:px-8;
}
247 changes: 130 additions & 117 deletions components/Button.vue
Original file line number Diff line number Diff line change
@@ -1,138 +1,151 @@
<template>
<NuxtLink v-if="href !== ''" :class="classes" :to="href">
<span><slot>Button</slot></span>
<NuxtLink
v-if="href !== ''"
:class="button({ size: size, color: color })"
:to="href"
:target="href.includes('https') ? '_blank' : '_self'"
>
<span :class="innerButton({ size: size })">
<slot>Button</slot>
<span :class="circle({ size: size, color: color })">
<span :class="innerCircle({ size: size, color: color })">
<ArrowRightIcon :class="arrow({ size: size, color: color })" />
</span>
</span>
</span>
</NuxtLink>
<button v-else :class="classes" type="button">
<span><slot>Button</slot></span>

<button v-else :class="button({ size: size, color: color })" type="button">
<span :class="innerButton({ size: size })">
<slot>Button</slot>
<span :class="circle({ size: size, color: color })">
<span :class="innerCircle({ size: size, color: color })">
<ArrowRightIcon :class="arrow({ size: size, color: color })" />
</span>
</span>
</span>
</button>
</template>

<script setup lang="ts">
import { computed } from "vue";
import { tv } from "tailwind-variants";
import { ArrowRightIcon } from "@heroicons/vue/24/outline";
const props = defineProps({
href: {
type: String,
default: "",
},
color: {
type: String,
default: "primary",
},
variant: {
type: String,
default: "contained",
type: String as () => "blue" | "whiteBlue" | "whiteGray" | "outlinedGray",
default: "blue",
},
size: {
type: String,
type: String as () => "sm" | "md" | "lg",
default: "md",
},
});
const classes = computed(() => ({
btn: true,
primary: props.color === "primary",
secondary: props.color === "secondary",
[`${props.size || "md"}`]: true,
contained: props.variant === "contained",
outlined: props.variant === "outlined",
}));
const button = tv({
base: "transition-all inline-flex items-center justify-center relative rounded-full group overflow-hidden before:absolute before:h-0 before:w-0 before:rounded-full before:duration-300 before:ease-out hover:before:h-64 hover:before:w-64",
variants: {
color: {
blue: "text-white hover:text-white bg-gradient-to-r from-[#0047FF] to-[#00D1FF] before:bg-blue before:mix-blend-screen before:opacity-30",
whiteBlue:
"bg-white text-blue hover:text-blue border border-blue before:bg-blue before:opacity-10",
whiteGray:
"bg-white text-slate-950 hover:text-slate-950 before:bg-slate-200",
outlinedGray:
"border border-slate-500 text-slate-700 hover:text-slate-700 before:bg-slate-50",
},
size: {
sm: "pl-5 pr-3 py-3 text-sm",
md: "pl-7 pr-4 py-4",
lg: "",
},
},
defaultVariants: {
size: "md",
color: "blue",
},
});
const innerButton = tv({
base: "relative z-10 inline-flex items-center justify-center",
variants: {
size: {
sm: "gap-2",
md: "gap-3",
lg: "",
},
},
defaultVariants: {
size: "md",
},
});
const circle = tv({
base: "rounded-full flex items-center justify-center",
variants: {
color: {
blue: "bg-white/40",
whiteBlue: "bg-blue/30",
whiteGray: "bg-slate-700/25",
outlinedGray: "bg-slate-500/25",
},
size: {
sm: "w-5 h-5",
md: "w-6 h-6",
lg: "",
},
},
defaultVariants: {
size: "md",
color: "blue",
},
});
const innerCircle = tv({
base: "rounded-full w-2 h-2 flex items-center justify-center transition-all",
variants: {
color: {
blue: "bg-white",
whiteBlue: "bg-blue",
whiteGray: "bg-slate-700",
outlinedGray: "bg-slate-500",
},
size: {
sm: "group-hover:w-5 group-hover:h-5",
md: "group-hover:w-6 group-hover:h-6",
lg: "",
},
},
defaultVariants: {
size: "md",
color: "blue",
},
});
const arrow = tv({
base: "w-0 h-0 transition-all",
variants: {
color: {
blue: "text-blue",
whiteBlue: "text-white",
whiteGray: "text-white",
outlinedGray: "text-white",
},
size: {
sm: "group-hover:w-3 group-hover:h-3",
md: "group-hover:w-4 group-hover:h-4",
lg: "",
},
},
defaultVariants: {
size: "md",
color: "blue",
},
});
</script>

<style lang="postcss" scoped>
.btn {
@apply shadow font-medium transition-all inline-block hover:cursor-pointer;
}
.btn span {
@apply flex items-center justify-center;
}
.btn.sm {
@apply text-sm px-3 py-1;
}
.btn.md {
@apply px-4 py-2;
}
.btn.lg {
@apply text-lg px-10 py-3;
}
.btn.xl {
@apply text-lg sm:text-xl px-6 py-4 sm:px-8 sm:py-5;
}
.btn.xxl {
@apply text-xl px-14 py-5 sm:text-2xl sm:px-20 sm:py-6;
}
.btn.contained.primary {
@apply text-white rounded-xl;
background: linear-gradient(
120deg,
#e6007a -5.88%,
#703ac2 15.42%,
#0070eb 40.77%,
#0297fb 72.21%,
#0ae2ff 95.53%
);
}
.btn.contained.primary:hover {
background: linear-gradient(
120deg,
#ff1994 -5.88%,
#8e4fee 15.42%,
#3091f9 40.77%,
#3db1ff 72.21%,
#3fe9ff 95.53%
);
}
.btn.outlined.primary {
border-radius: 0.625rem;
position: relative;
background: linear-gradient(
120deg,
#ffebf6 -5.88%,
#ebdeff 15.42%,
#d3e8ff 40.77%,
#bee5ff 72.21%,
#bef7ff 95.53%
);
}
.btn.outlined.primary:hover {
background: linear-gradient(120deg, white 08%, white 100%);
}
.btn.outlined.primary::after {
@apply rounded-xl;
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: -1;
margin: -2px;
background-image: linear-gradient(
120deg,
#e6007a -5.88%,
#703ac2 15.42%,
#0070eb 40.77%,
#0297fb 72.21%,
#0ae2ff 95.53%
);
}
.btn.outlined.primary span {
background: linear-gradient(
90deg,
#e6007a -5.88%,
#703ac2 15.42%,
#0070eb 40.77%,
#0297fb 72.21%,
#0ae2ff 95.53%
);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
@apply text-space-sky;
}
.btn.contained.secondary {
@apply border-2 border-white rounded-xl text-space-gray-dark bg-white bg-opacity-80 hover:bg-opacity-100;
}
.btn.outlined.secondary {
@apply border border-white rounded-xl bg-white/20 hover:bg-white/60 hover:text-space-gray-dark;
}
</style>
<style lang="postcss" scoped></style>

0 comments on commit af6ded0

Please sign in to comment.