diff --git a/apps/web-main/src/assets/base.less b/apps/web-main/src/assets/base.less index c85449d..315a36a 100644 --- a/apps/web-main/src/assets/base.less +++ b/apps/web-main/src/assets/base.less @@ -4,7 +4,7 @@ html, body { position: relative; - background: var(--color-neutral-2); + background: var(--color-bg-1); // background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab); // background-size: 400% 400%; // animation: gradient 15s ease infinite; @@ -46,3 +46,13 @@ input { outline: none; border: 0; } + +.bs-shadow { + box-shadow: rgb(0 0 0 / 13%) 0px 2px 4px 0px, rgb(0 0 0 / 11%) 0px 1px 1px 0px; +} + +.bs-ellipsis { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} diff --git a/apps/web-main/src/components/Card/index.less b/apps/web-main/src/components/Card/index.less index aaf5726..2b62746 100644 --- a/apps/web-main/src/components/Card/index.less +++ b/apps/web-main/src/components/Card/index.less @@ -2,21 +2,50 @@ .arco-card-body { padding: 10px; } - .mask { - height: 164px; - background-color: rgba(0, 0, 0, 0.3); - overflow: hidden; + + &:hover { .cover { - height: 100%; - background-size: cover; + background-size: 105%; } } + + .cover { + transition: background-size 0.25s linear; + height: 164px; + background-position: center; + background-repeat: no-repeat; + background-size: 100%; + .mask { + transition: background-image 0.25s linear; + position: relative; + height: 100%; + background-image: linear-gradient( + to top, + rgba(0, 0, 0, 0.7), + rgba(0, 0, 0, 0.1), + rgba(255, 255, 255, 0) + ); + p { + margin: 0; + position: absolute; + bottom: 10px; + left: 10px; + right: 10px; + color: #fff; + font-size: 18px; + } + } + } + .bottom-des { display: flex; justify-content: space-between; + font-size: 13px; span { flex: 1; color: var(--color-text-3); + padding-right: 40px; + max-width: 160px; } a { cursor: pointer; diff --git a/apps/web-main/src/components/Card/index.tsx b/apps/web-main/src/components/Card/index.tsx index 77d4ae0..446092a 100644 --- a/apps/web-main/src/components/Card/index.tsx +++ b/apps/web-main/src/components/Card/index.tsx @@ -3,29 +3,36 @@ import { url } from "inspector"; import "./index.less"; const { Meta } = Card; -function BsCard() { +interface IProps { + imgUrl: string; + title: string; + desc: string; + action: string; + styles?: {}; +} + +function BsCard(props: IProps) { return ( -
+
+
+

{props.title}

+
} > - card description - Go + {props.desc} + {props.action} } /> diff --git a/apps/web-main/src/components/TimeScroll/index.less b/apps/web-main/src/components/TimeScroll/index.less new file mode 100644 index 0000000..0d209a4 --- /dev/null +++ b/apps/web-main/src/components/TimeScroll/index.less @@ -0,0 +1,62 @@ +.timescroll { + position: relative; + width: 20px; + height: 200px; + &:hover { + .caret { + display: block; + } + } + .caret { + display: none; + position: absolute; + right: 0; + color: var(--color-fill-4); + &.up { + top: 0; + } + &.down { + bottom: 0; + } + } + .orbit { + position: absolute; + left: 50%; + transform: translateX(-50%); + top: 24px; + bottom: 24px; + width: 4px; + background: var(--color-fill-2); + .cursor { + position: absolute; + width: 8px; + height: 8px; + border: 1px solid #333; + border-radius: 50%; + } + .node { + position: absolute; + width: 4px; + height: 4px; + border-radius: 50%; + &.bingo { + left: 50%; + transform: translateX(-50%); + background: var(--color-fill-4); + &::before { + position: absolute; + content: attr(data-year); + top: 50%; + transform: translateY(-50%); + right: 10px; + font-size: 12px; + color: var(--color-fill-4); + } + } + &.empty { + right: 10px; + background: var(--color-fill-3); + } + } + } +} diff --git a/apps/web-main/src/components/TimeScroll/index.tsx b/apps/web-main/src/components/TimeScroll/index.tsx new file mode 100644 index 0000000..5d9722b --- /dev/null +++ b/apps/web-main/src/components/TimeScroll/index.tsx @@ -0,0 +1,52 @@ +import { useState } from "react"; +import "./index.less"; + +function TimeScroll() { + const [cursor, setCursor] = useState({ + top: 0, + }); + const onMouseMove = (e: any) => { + const diffY = e.screenY - e.clientY; + console.log(e) + setCursor({ top: diffY }); + }; + return ( +
+ + + +
+ +
+
+
+
+
+ + + +
+ ); +} + +export default TimeScroll; diff --git a/apps/web-main/src/view/Course/index.less b/apps/web-main/src/view/Course/index.less index 8acb45b..c2e250b 100644 --- a/apps/web-main/src/view/Course/index.less +++ b/apps/web-main/src/view/Course/index.less @@ -1,3 +1,11 @@ .course { padding: 100px 0 40px 0; + .recommends { + display: grid; + grid-template-columns: 2fr 1fr 1fr; + grid-column-gap:20px; + } + .timeline{ + margin-top: 40px; + } } diff --git a/apps/web-main/src/view/Course/index.tsx b/apps/web-main/src/view/Course/index.tsx index dbcd007..d95a1ee 100644 --- a/apps/web-main/src/view/Course/index.tsx +++ b/apps/web-main/src/view/Course/index.tsx @@ -5,32 +5,58 @@ import { Select, Message } from "@arco-design/web-react"; const Option = Select.Option; const options = ["全部", "最新的"]; import BsCard from "../../components/Card"; +import TimeScroll from "../../components/TimeScroll"; export default function Index() { useMount(() => {}); return (
-
- +
+ + + +
+
+ +
-
); }