Commit 9eec35cc authored by timel's avatar timel

feat: styles

parent 59374992
Pipeline #22891 failed with stages
in 11 minutes and 9 seconds
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -108,5 +108,5 @@ nav { ...@@ -108,5 +108,5 @@ nav {
body { body {
--theme-font: "Electrolize", sans-serif; --theme-font: "Electrolize", sans-serif;
--nav-height: 56px; --header-height: 56px;
} }
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
.layout { .layout {
position: fixed; position: fixed;
left: 0; left: 0;
top: var(--nav-height); top: var(--header-height);
height: calc(100% - var(--nav-height)); height: calc(100% - var(--header-height));
display: flex; display: flex;
} }
...@@ -41,11 +41,11 @@ ...@@ -41,11 +41,11 @@
.container { .container {
height: calc(100% - 20px); height: calc(100% - 20px);
border: 1px solid rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.05);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
& > *:not(:last-of-type) { & > *:not(:last-of-type) {
border-bottom: 1px solid rgba(255, 255, 255, 0.2); border-bottom: 1px solid rgba(255, 255, 255, 0.1);
} }
.title { .title {
height: 44px; height: 44px;
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
.main, .main,
.extra, .extra,
.side { .side {
border-bottom: 1px solid rgba(255, 255, 255, 0.2); border-bottom: 1px solid rgba(255, 255, 255, 0.1);
padding: 0.75rem; padding: 0.75rem;
} }
.main { .main {
...@@ -75,15 +75,22 @@ ...@@ -75,15 +75,22 @@
grid-template-columns: repeat(10, 1fr); grid-template-columns: repeat(10, 1fr);
gap: 5px; gap: 5px;
} }
// --border-radius: 10px;
background-color: hsla(0, 0%, 100%, 0.05);
}
.deck .container {
border-radius: var(--border-radius) 0 0 var(--border-radius);
} }
.select .container { .select .container {
border-left: none; border-left: none;
border-radius: 0 var(--border-radius) var(--border-radius) 0;
} }
.card { .card {
width: 100%; width: 100%;
background-color: rgb(32, 36, 71); background-color: rgba(255, 255, 255, 0.1);
aspect-ratio: var(--card-ratio); aspect-ratio: var(--card-ratio);
} }
......
...@@ -25,10 +25,7 @@ const theme: ThemeConfig = { ...@@ -25,10 +25,7 @@ const theme: ThemeConfig = {
export const Component: React.FC = () => { export const Component: React.FC = () => {
return ( return (
<ConfigProvider theme={theme}> <ConfigProvider theme={theme}>
<Background <Background style={{ backgroundImage: "initial" }} />
style={{ backgroundImage: "initial" }}
innerStyle={{ background: "rgba(72, 0, 255, 0.6)" }}
/>
<div className={styles.layout} style={{ width: "100%" }}> <div className={styles.layout} style={{ width: "100%" }}>
<div className={styles.sider}> <div className={styles.sider}>
<div className={styles["deck-select-container"]}> <div className={styles["deck-select-container"]}>
......
.navbar { .navbar {
width: 100%; width: 100%;
height: var(--nav-height); height: var(--header-height);
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
align-items: center; align-items: center;
...@@ -10,14 +10,14 @@ ...@@ -10,14 +10,14 @@
.logo { .logo {
width: 60px; width: 60px;
filter: brightness(1.5); filter: brightness(1.5);
transform: translateY(-1px); transform: translateY(1px);
} }
a { a {
color: white; color: white;
font-family: sans-serif; font-family: sans-serif;
text-decoration: none; text-decoration: none;
font-size: 0.825rem; font-size: 0.825rem;
line-height: var(--nav-height); line-height: var(--header-height);
transition: 0.3s; transition: 0.3s;
&:hover { &:hover {
box-shadow: 0px 2px 0 0 white inset; box-shadow: 0px 2px 0 0 white inset;
......
.main { .main {
position: fixed; position: fixed;
top: var(--nav-height); top: var(--header-height);
height: calc(100% - var(--nav-height)); height: calc(100% - var(--header-height));
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: center; justify-content: center;
...@@ -25,21 +25,16 @@ ...@@ -25,21 +25,16 @@
.prefix { .prefix {
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
border: 1px solid #424242;
padding: 0 1rem; padding: 0 1rem;
border-radius: 6px; border-radius: 6px;
border-right: none; border-right: none;
border-top-right-radius: 0; border-top-right-radius: 0;
border-bottom-right-radius: 0; border-bottom-right-radius: 0;
background-color: rgba(255, 255, 255, 0.04); background-color: hsla(0, 0%, 100%, 0.1);
} }
.select :global(.ant-select-selector) { .select :global(.ant-select-selector) {
border-top-left-radius: 0; border-top-left-radius: 0;
border-bottom-left-radius: 0; border-bottom-left-radius: 0;
background: none;
}
:global(.ant-select-open .ant-select-selector) {
background: rgba(0, 0, 0, 0.3);
} }
} }
...@@ -48,29 +43,23 @@ ...@@ -48,29 +43,23 @@
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(2, 1fr); /* 自动调整行高 */ grid-template-rows: repeat(2, 1fr); /* 自动调整行高 */
width: 800px; width: 800px;
height: 500px; height: 530px;
gap: 16px; gap: 16px;
.mode { .mode {
height: 100%; height: 100%;
background: hsla(0, 0%, 100%, 0.05); background: hsla(0, 0%, 100%, 0.1);
backdrop-filter: blur(10px); backdrop-filter: blur(10px);
padding: 32px; padding: 32px;
border-radius: 12px; border-radius: 12px;
transition: 0.2s; transition: 0.2s;
cursor: pointer; cursor: pointer;
&:hover { &:hover {
box-shadow: 0 0 0 4px rgb(56, 27, 143); box-shadow: 0 0 0 4px #3400d1;
background: hsla(0, 0%, 100%, 0.07); background: hsla(0, 0%, 100%, 0.07);
filter: brightness(1.1); filter: brightness(1.2) saturate(1.2);
} }
.icon { .icon {
&::before { background: linear-gradient(#514f5780, #2a283277);
content: "";
width: 100%;
height: 100%;
position: absolute;
background: linear-gradient(#514f5780, #2a283277);
}
overflow: hidden; overflow: hidden;
position: relative; position: relative;
--length: 48px; --length: 48px;
...@@ -83,9 +72,7 @@ ...@@ -83,9 +72,7 @@
font-size: 20px; font-size: 20px;
color: white; color: white;
transition: 0.2s; transition: 0.2s;
} filter: brightness(1.5);
&:hover .icon {
filter: brightness(1.3);
} }
.title { .title {
margin-top: 24px; margin-top: 24px;
......
...@@ -28,6 +28,7 @@ export const Component: React.FC = () => { ...@@ -28,6 +28,7 @@ export const Component: React.FC = () => {
<Space size={16}> <Space size={16}>
<CustomSelect <CustomSelect
title="服务器" title="服务器"
showSearch
defaultValue="lucy" defaultValue="lucy"
style={{ width: 200 }} style={{ width: 200 }}
options={[ options={[
...@@ -109,26 +110,32 @@ function getSSOUser(searchParams: URLSearchParams): User { ...@@ -109,26 +110,32 @@ function getSSOUser(searchParams: URLSearchParams): User {
const CustomSelect: React.FC< const CustomSelect: React.FC<
React.ComponentProps<typeof Select> & { title: string } React.ComponentProps<typeof Select> & { title: string }
> = ({ title, className, ...rest }) => { > = ({ title, className, dropdownStyle, ...rest }) => (
return ( <ConfigProvider
<ConfigProvider theme={{
theme={{ components: {
components: { Select: {
Select: { colorBgElevated: "hsla(0, 0%, 100%, 0.05)",
colorBgElevated: "#00132Dff", controlItemBgActive: "#79797955",
controlItemBgActive: "#00286055", colorBorder: "transparent",
}, colorBgContainer: "hsla(0, 0%, 100%, 0.05)",
colorPrimaryHover: "#3400d1",
lineWidth: 0,
}, },
}} },
> }}
<div className={styles["custom-select"]}> >
<span className={styles.prefix}>{title}</span> <div className={styles["custom-select"]}>
<Select <span className={styles.prefix}>{title}</span>
className={classNames(styles.select, className)} <Select
size="large" className={classNames(styles.select, className)}
{...rest} size="large"
/> dropdownStyle={{
</div> backdropFilter: "blur(20px)",
</ConfigProvider> ...dropdownStyle,
); }}
}; {...rest}
/>
</div>
</ConfigProvider>
);
...@@ -17,6 +17,6 @@ ...@@ -17,6 +17,6 @@
.inner { .inner {
width: 90vw; width: 90vw;
height: 50vh; height: 50vh;
background: rgba(72, 0, 255, 0.8); background: rgba(72, 0, 255, 1);
filter: blur(582px); filter: blur(502px);
} }
body {
background: #0f131e;
position: relative;
margin: 0;
padding: 0;
border: 0;
}
body * {
font-size: 1em;
}
.wrapper { .wrapper {
position: relative; position: relative;
text-align: center; text-align: center;
} height: calc(100% - var(--header-height));
.wrapper > * {
z-index: 20;
} }
.main { .main {
...@@ -28,58 +13,61 @@ body * { ...@@ -28,58 +13,61 @@ body * {
.neos-pic { .neos-pic {
max-width: 100%; max-width: 100%;
max-height: 100%; max-height: 100%;
// z-index: 1; filter: drop-shadow(0 0 50px #ffffff7d) drop-shadow(0 10px 0.5rem #3d0a71ce);
filter: drop-shadow(0 0 2rem #ffffff2a) drop-shadow(0 0 0.1rem #373737c6);
} }
.neos-logo { .neos-logo {
filter: brightness(2) drop-shadow(0 0 0.75rem #ffffffb8) filter: drop-shadow(0 0 2rem #ffffffbc);
drop-shadow(0 0 0.1rem #373737c6);
position: absolute; position: absolute;
bottom: 10%; top: 50%;
width: 70%; width: 100%;
height: fit-content; height: fit-content;
left: 50%; left: 52%;
transform: translateX(-50%); transform: translateX(-50%);
} }
} }
.start-btn { .start-btn {
color: white; width: 200px;
font-family: sans-serif;
text-decoration: none;
appearance: none;
cursor: pointer;
position: relative; position: relative;
display: inline-flex; display: flex;
-webkit-box-align: center;
align-items: center; align-items: center;
-webkit-box-pack: center;
justify-content: center; justify-content: center;
white-space-collapse: collapse;
text-wrap: nowrap;
user-select: none;
max-width: 100%;
flex-shrink: 0;
height: 48px;
border-radius: 9999px;
text-shadow: rgba(0, 0, 0, 0.25) 0px 3px 8px;
gap: 4px; gap: 4px;
margin: 0px; padding: 12px 40px;
padding: 0px 24px; border: 3px solid hsla(0, 0%, 100%, 0.3);
border-width: initial; border-radius: 8px;
border-style: none; background-clip: padding-box;
border-color: initial; background-color: hsla(0, 0%, 100%, 0.9);
border-image: initial; color: #0d0d0d;
background: linear-gradient( font-size: 14px;
92.88deg, font-weight: 500;
rgb(69, 94, 181) 9.16%, letter-spacing: 0.2px;
rgb(86, 67, 204) 43.89%, transition: 0.2s;
rgb(103, 63, 215) 64.72% top: 50px;
);
transition: 0.15s;
&:hover { &:hover {
filter: brightness(1.2); background-color: hsla(0, 0%, 100%, 1.1);
box-shadow: 0px 7px 25px 0 #6041d2a8; }
&::before {
position: absolute;
z-index: -1;
top: 5px;
right: 5px;
bottom: 0;
left: 5px;
border-radius: 6px;
background: conic-gradient(
from 147.14deg at 50% 50%,
#0294fe -55.68deg,
#ff2136 113.23deg,
#9b4dff 195deg,
#0294fe 304.32deg,
#ff2136 473.23deg
);
content: "";
filter: blur(20px);
opacity: 0.6;
} }
} }
......
...@@ -35,7 +35,9 @@ export const Component: React.FC = () => { ...@@ -35,7 +35,9 @@ export const Component: React.FC = () => {
alt="neos" alt="neos"
/> />
</main> </main>
<LoginBtn logined={Boolean(user)} /> <div style={{ display: "flex", justifyContent: "center" }}>
<LoginBtn logined={Boolean(user)} />
</div>
</div> </div>
</> </>
); );
...@@ -56,7 +58,7 @@ const LoginBtn: React.FC<{ logined: boolean }> = ({ logined }) => { ...@@ -56,7 +58,7 @@ const LoginBtn: React.FC<{ logined: boolean }> = ({ logined }) => {
className={styles["start-btn"]} className={styles["start-btn"]}
onClick={logined ? goToMatch : loginViaSSO} onClick={logined ? goToMatch : loginViaSSO}
> >
{logined ? <span>开始游戏</span> : <span>登录游戏</span>} <span>{logined ? "开始游戏" : "登录游戏"}</span>
<RightOutlined /> <RightOutlined />
</span> </span>
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment