diff options
author | crupest <crupest@outlook.com> | 2020-11-03 22:56:16 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-03 22:56:16 +0800 |
commit | f3503b399ff7b65f363beca313c8a0c336884bec (patch) | |
tree | 8bd10736c4cd51ff13b101b90e77d1d09ab4cdfa /FrontEnd/src/app/views/home | |
parent | 7acaffc977bc9ad3ba43c7808c1ea973a8144767 (diff) | |
parent | 82b366ea89342593ec1bcde3441c0f2f06eb4649 (diff) | |
download | timeline-f3503b399ff7b65f363beca313c8a0c336884bec.tar.gz timeline-f3503b399ff7b65f363beca313c8a0c336884bec.tar.bz2 timeline-f3503b399ff7b65f363beca313c8a0c336884bec.zip |
Merge pull request #162 from crupest/front
Add timeline title to front end.
Diffstat (limited to 'FrontEnd/src/app/views/home')
-rw-r--r-- | FrontEnd/src/app/views/home/TimelineBoard.tsx | 9 | ||||
-rw-r--r-- | FrontEnd/src/app/views/home/home.sass | 21 |
2 files changed, 18 insertions, 12 deletions
diff --git a/FrontEnd/src/app/views/home/TimelineBoard.tsx b/FrontEnd/src/app/views/home/TimelineBoard.tsx index a3d176e1..c2a7e5fe 100644 --- a/FrontEnd/src/app/views/home/TimelineBoard.tsx +++ b/FrontEnd/src/app/views/home/TimelineBoard.tsx @@ -48,20 +48,21 @@ const TimelineBoard: React.FC<TimelineBoardProps> = (props) => { ); } else { return timelines.map((timeline) => { - const { name } = timeline; + const { name, title } = timeline; const isPersonal = name.startsWith("@"); const url = isPersonal ? `/users/${timeline.owner.username}` : `/timelines/${name}`; return ( - <div key={name} className="timeline-board-item"> + <Link key={name} to={url} className="timeline-board-item"> {isPersonal ? ( <UserTimelineLogo className="icon" /> ) : ( <TimelineLogo className="icon" /> )} - <Link to={url}>{name}</Link> - </div> + {title} + <small className="ml-2 text-secondary">{name}</small> + </Link> ); }); } diff --git a/FrontEnd/src/app/views/home/home.sass b/FrontEnd/src/app/views/home/home.sass index 28a2e5f3..0c01019b 100644 --- a/FrontEnd/src/app/views/home/home.sass +++ b/FrontEnd/src/app/views/home/home.sass @@ -1,13 +1,18 @@ -.timeline-board-item
- font-size: 1.1em
- @extend .my-2
- .icon
- height: 1.3em
- @extend .mr-2
-
.timeline-board
@extend .cru-card
@extend .d-flex
@extend .flex-column
- @extend .p-3
+ @extend .py-3
min-height: 200px
+
+.timeline-board-item
+ font-size: 1.1em
+ @extend .px-3
+ @extend .py-2
+ transition: background 0.3s
+ .icon
+ height: 1.3em
+ color: black
+ @extend .mr-2
+ &:hover
+ background: $gray-300
|