Commit 294d0f81 authored by timel's avatar timel

feat: small styles

parent e3920259
...@@ -35,17 +35,16 @@ body { ...@@ -35,17 +35,16 @@ body {
color-scheme: light dark; color-scheme: light dark;
color: rgba(255, 255, 255, 0.87); color: rgba(255, 255, 255, 0.87);
background: #0f131e; background: #0f131e;
// font: 87.5%/1.5em "Open Sans", sans-serif;
font-size: 14px; font-size: 14px;
display: flex; display: flex;
margin: 0; margin: 0;
// place-items: center;
min-width: 320px; min-width: 320px;
position: fixed; position: fixed;
top: 0; top: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
font-family: var(--theme-font);
} }
a { a {
...@@ -80,10 +79,6 @@ p { ...@@ -80,10 +79,6 @@ p {
} }
.container { .container {
// left: 50%;
// position: fixed;
// top: 50%;
// transform: translate(-50%, -50%);
margin: 0 auto; margin: 0 auto;
width: 100%; width: 100%;
max-width: 300px; max-width: 300px;
......
...@@ -33,6 +33,8 @@ ...@@ -33,6 +33,8 @@
.btns { .btns {
transition: 0.2s; transition: 0.2s;
opacity: 0; opacity: 0;
display: flex;
gap: 4px;
} }
&:hover { &:hover {
.hover, .hover,
...@@ -44,14 +46,15 @@ ...@@ -44,14 +46,15 @@
} }
.btn-add { .btn-add {
position: fixed; position: absolute;
bottom: 40px; bottom: 40px;
left: calc(300px / 2); // 暂时没想到太好的办法,只能先设为sider的一半 left: 50%;
transform: translate(-50%); transform: translate(-50%);
background-color: rgb(59, 0, 169); background: linear-gradient(rgba(89, 0, 255, 0.611), rgba(38, 0, 255, 0.611));
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.5); box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.5);
&:hover { &:hover {
background-color: rgb(78, 0, 223) !important; background-color: rgb(78, 0, 223) !important;
box-shadow: 0 0 20px 0 rgba(128, 0, 255, 0.5);
transform: translate(-50%) scale(1.3); transform: translate(-50%) scale(1.3);
} }
} }
...@@ -27,13 +27,13 @@ export const DeckSelect: React.FC<{ ...@@ -27,13 +27,13 @@ export const DeckSelect: React.FC<{
<Button <Button
icon={<DeleteOutlined />} icon={<DeleteOutlined />}
type="text" type="text"
shape="circle" size="small"
onClick={cancelBubble(() => onDelete(id))} onClick={cancelBubble(() => onDelete(id))}
/> />
<Button <Button
icon={<DownloadOutlined />} icon={<DownloadOutlined />}
type="text" type="text"
shape="circle" size="small"
onClick={cancelBubble(() => onDownload(id))} onClick={cancelBubble(() => onDownload(id))}
/> />
</div> </div>
......
...@@ -5,19 +5,20 @@ ...@@ -5,19 +5,20 @@
left: 0; left: 0;
top: var(--nav-height); top: var(--nav-height);
height: calc(100% - var(--nav-height)); height: calc(100% - var(--nav-height));
display: flex;
} }
.sider { .sider {
max-height: 100%; --sider-width: 300px;
min-height: 100%; width: var(--sider-width);
overflow-x: hidden; flex: 0 0 var(--sider-width);
overflow-y: overlay;
background: transparent !important; background: transparent !important;
position: relative; position: relative;
@include utils.scrollbar; .deck-select-container {
// 去掉menu max-height: 100%;
.menu { min-height: 100%;
// min-height: 100%; @include utils.scrollbar;
padding-bottom: 1rem;
} }
} }
......
...@@ -35,26 +35,28 @@ export const Component: React.FC = () => { ...@@ -35,26 +35,28 @@ export const Component: React.FC = () => {
return ( return (
<ConfigProvider theme={theme}> <ConfigProvider theme={theme}>
<Background /> <Background />
<Layout className={styles.layout} style={{ width: "100%" }}> <div className={styles.layout} style={{ width: "100%" }}>
<Sider width={300} className={styles.sider}> <div className={styles.sider}>
<DeckSelect <div className={styles["deck-select-container"]}>
decks={Array.from({ length: 17 }).map((_, i) => ({ <DeckSelect
name: `卡组 ${i}`, decks={Array.from({ length: 18 }).map((_, i) => ({
id: i, name: `卡组 ${i}`,
}))} id: i,
selected={4} }))}
onSelect={(id) => console.log(id)} selected={4}
onDelete={(id) => console.log(id)} onSelect={(id) => console.log(id)}
onDownload={(id) => console.log(id)} onDelete={(id) => console.log(id)}
onAdd={() => console.log("add")} onDownload={(id) => console.log(id)}
/> onAdd={() => console.log("add")}
/>
</div>
<CardDetail code={123} open={false} onClose={() => {}} /> <CardDetail code={123} open={false} onClose={() => {}} />
</Sider> </div>
<Content className={styles.content}> <Content className={styles.content}>
<Deck /> <Deck />
<CardSelect /> <CardSelect />
</Content> </Content>
</Layout> </div>
</ConfigProvider> </ConfigProvider>
); );
}; };
...@@ -72,6 +74,7 @@ const Deck: React.FC = () => { ...@@ -72,6 +74,7 @@ const Deck: React.FC = () => {
placeholder="我的卡组" placeholder="我的卡组"
bordered={false} bordered={false}
prefix={<EditOutlined />} prefix={<EditOutlined />}
style={{ width: 400 }}
/> />
<Space style={{ marginRight: 6 }}> <Space style={{ marginRight: 6 }}>
<Button type="text" size="small" icon={<DeleteOutlined />}> <Button type="text" size="small" icon={<DeleteOutlined />}>
...@@ -88,7 +91,7 @@ const Deck: React.FC = () => { ...@@ -88,7 +91,7 @@ const Deck: React.FC = () => {
<div className={styles["deck-zone"]}> <div className={styles["deck-zone"]}>
<div className={styles.main}> <div className={styles.main}>
<div className={styles["card-continer"]}> <div className={styles["card-continer"]}>
{Array.from({ length: 60 }).map((_, i) => ( {Array.from({ length: 42 }).map((_, i) => (
<div className={styles.card} key={i} /> <div className={styles.card} key={i} />
))} ))}
</div> </div>
......
.desc { .desc {
line-height: 1.6; line-height: 1.6;
font-size: 14px; font-size: 14px;
font-family: var(--theme-font);
max-height: calc(100% - 237px); max-height: calc(100% - 237px);
overflow-y: overlay; overflow-y: overlay;
&:hover { &:hover {
......
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