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 {
body {
--theme-font: "Electrolize", sans-serif;
--nav-height: 56px;
--header-height: 56px;
}
......@@ -3,8 +3,8 @@
.layout {
position: fixed;
left: 0;
top: var(--nav-height);
height: calc(100% - var(--nav-height));
top: var(--header-height);
height: calc(100% - var(--header-height));
display: flex;
}
......@@ -41,11 +41,11 @@
.container {
height: calc(100% - 20px);
border: 1px solid rgba(255, 255, 255, 0.2);
border: 1px solid rgba(255, 255, 255, 0.05);
display: flex;
flex-direction: column;
& > *: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 {
height: 44px;
......@@ -60,7 +60,7 @@
.main,
.extra,
.side {
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
padding: 0.75rem;
}
.main {
......@@ -75,15 +75,22 @@
grid-template-columns: repeat(10, 1fr);
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 {
border-left: none;
border-radius: 0 var(--border-radius) var(--border-radius) 0;
}
.card {
width: 100%;
background-color: rgb(32, 36, 71);
background-color: rgba(255, 255, 255, 0.1);
aspect-ratio: var(--card-ratio);
}
......
......@@ -25,10 +25,7 @@ const theme: ThemeConfig = {
export const Component: React.FC = () => {
return (
<ConfigProvider theme={theme}>
<Background
style={{ backgroundImage: "initial" }}
innerStyle={{ background: "rgba(72, 0, 255, 0.6)" }}
/>
<Background style={{ backgroundImage: "initial" }} />
<div className={styles.layout} style={{ width: "100%" }}>
<div className={styles.sider}>
<div className={styles["deck-select-container"]}>
......
.navbar {
width: 100%;
height: var(--nav-height);
height: var(--header-height);
display: flex;
flex-wrap: wrap;
align-items: center;
......@@ -10,14 +10,14 @@
.logo {
width: 60px;
filter: brightness(1.5);
transform: translateY(-1px);
transform: translateY(1px);
}
a {
color: white;
font-family: sans-serif;
text-decoration: none;
font-size: 0.825rem;
line-height: var(--nav-height);
line-height: var(--header-height);
transition: 0.3s;
&:hover {
box-shadow: 0px 2px 0 0 white inset;
......
.main {
position: fixed;
top: var(--nav-height);
height: calc(100% - var(--nav-height));
top: var(--header-height);
height: calc(100% - var(--header-height));
width: 100%;
display: flex;
justify-content: center;
......@@ -25,21 +25,16 @@
.prefix {
height: 40px;
line-height: 40px;
border: 1px solid #424242;
padding: 0 1rem;
border-radius: 6px;
border-right: none;
border-top-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) {
border-top-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 @@
grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(2, 1fr); /* 自动调整行高 */
width: 800px;
height: 500px;
height: 530px;
gap: 16px;
.mode {
height: 100%;
background: hsla(0, 0%, 100%, 0.05);
background: hsla(0, 0%, 100%, 0.1);
backdrop-filter: blur(10px);
padding: 32px;
border-radius: 12px;
transition: 0.2s;
cursor: pointer;
&: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);
filter: brightness(1.1);
filter: brightness(1.2) saturate(1.2);
}
.icon {
&::before {
content: "";
width: 100%;
height: 100%;
position: absolute;
background: linear-gradient(#514f5780, #2a283277);
}
background: linear-gradient(#514f5780, #2a283277);
overflow: hidden;
position: relative;
--length: 48px;
......@@ -83,9 +72,7 @@
font-size: 20px;
color: white;
transition: 0.2s;
}
&:hover .icon {
filter: brightness(1.3);
filter: brightness(1.5);
}
.title {
margin-top: 24px;
......
......@@ -28,6 +28,7 @@ export const Component: React.FC = () => {
<Space size={16}>
<CustomSelect
title="服务器"
showSearch
defaultValue="lucy"
style={{ width: 200 }}
options={[
......@@ -109,26 +110,32 @@ function getSSOUser(searchParams: URLSearchParams): User {
const CustomSelect: React.FC<
React.ComponentProps<typeof Select> & { title: string }
> = ({ title, className, ...rest }) => {
return (
<ConfigProvider
theme={{
components: {
Select: {
colorBgElevated: "#00132Dff",
controlItemBgActive: "#00286055",
},
> = ({ title, className, dropdownStyle, ...rest }) => (
<ConfigProvider
theme={{
components: {
Select: {
colorBgElevated: "hsla(0, 0%, 100%, 0.05)",
controlItemBgActive: "#79797955",
colorBorder: "transparent",
colorBgContainer: "hsla(0, 0%, 100%, 0.05)",
colorPrimaryHover: "#3400d1",
lineWidth: 0,
},
}}
>
<div className={styles["custom-select"]}>
<span className={styles.prefix}>{title}</span>
<Select
className={classNames(styles.select, className)}
size="large"
{...rest}
/>
</div>
</ConfigProvider>
);
};
},
}}
>
<div className={styles["custom-select"]}>
<span className={styles.prefix}>{title}</span>
<Select
className={classNames(styles.select, className)}
size="large"
dropdownStyle={{
backdropFilter: "blur(20px)",
...dropdownStyle,
}}
{...rest}
/>
</div>
</ConfigProvider>
);
......@@ -17,6 +17,6 @@
.inner {
width: 90vw;
height: 50vh;
background: rgba(72, 0, 255, 0.8);
filter: blur(582px);
background: rgba(72, 0, 255, 1);
filter: blur(502px);
}
body {
background: #0f131e;
position: relative;
margin: 0;
padding: 0;
border: 0;
}
body * {
font-size: 1em;
}
.wrapper {
position: relative;
text-align: center;
}
.wrapper > * {
z-index: 20;
height: calc(100% - var(--header-height));
}
.main {
......@@ -28,58 +13,61 @@ body * {
.neos-pic {
max-width: 100%;
max-height: 100%;
// z-index: 1;
filter: drop-shadow(0 0 2rem #ffffff2a) drop-shadow(0 0 0.1rem #373737c6);
filter: drop-shadow(0 0 50px #ffffff7d) drop-shadow(0 10px 0.5rem #3d0a71ce);
}
.neos-logo {
filter: brightness(2) drop-shadow(0 0 0.75rem #ffffffb8)
drop-shadow(0 0 0.1rem #373737c6);
filter: drop-shadow(0 0 2rem #ffffffbc);
position: absolute;
bottom: 10%;
width: 70%;
top: 50%;
width: 100%;
height: fit-content;
left: 50%;
left: 52%;
transform: translateX(-50%);
}
}
.start-btn {
color: white;
font-family: sans-serif;
text-decoration: none;
appearance: none;
cursor: pointer;
width: 200px;
position: relative;
display: inline-flex;
-webkit-box-align: center;
display: flex;
align-items: center;
-webkit-box-pack: 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;
margin: 0px;
padding: 0px 24px;
border-width: initial;
border-style: none;
border-color: initial;
border-image: initial;
background: linear-gradient(
92.88deg,
rgb(69, 94, 181) 9.16%,
rgb(86, 67, 204) 43.89%,
rgb(103, 63, 215) 64.72%
);
transition: 0.15s;
padding: 12px 40px;
border: 3px solid hsla(0, 0%, 100%, 0.3);
border-radius: 8px;
background-clip: padding-box;
background-color: hsla(0, 0%, 100%, 0.9);
color: #0d0d0d;
font-size: 14px;
font-weight: 500;
letter-spacing: 0.2px;
transition: 0.2s;
top: 50px;
&:hover {
filter: brightness(1.2);
box-shadow: 0px 7px 25px 0 #6041d2a8;
background-color: hsla(0, 0%, 100%, 1.1);
}
&::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 = () => {
alt="neos"
/>
</main>
<LoginBtn logined={Boolean(user)} />
<div style={{ display: "flex", justifyContent: "center" }}>
<LoginBtn logined={Boolean(user)} />
</div>
</div>
</>
);
......@@ -56,7 +58,7 @@ const LoginBtn: React.FC<{ logined: boolean }> = ({ logined }) => {
className={styles["start-btn"]}
onClick={logined ? goToMatch : loginViaSSO}
>
{logined ? <span>开始游戏</span> : <span>登录游戏</span>}
<span>{logined ? "开始游戏" : "登录游戏"}</span>
<RightOutlined />
</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