-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add music video list page * chore: lint
- Loading branch information
1 parent
351bbb2
commit 80f6359
Showing
18 changed files
with
153 additions
and
6 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import React from "react"; | ||
|
||
import { MusicCover, MusicList } from "./components"; | ||
export default function Page() { | ||
return ( | ||
<div className="h-screen w-full prose flex flex-col justify-center items-center font-serif"> | ||
<h1>Music</h1> | ||
<div className="flex flex-col w-full h-full justify-center items-center gap-4 mt-4"> | ||
<MusicCover /> | ||
<MusicList /> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export default function MusicCover() { | ||
return ( | ||
<div className="flex flex-col justify-center items-center gap-2"> | ||
<div className="rounded-md w-72 h-72 drop-shadow-md border bg-gradient-to-br from-gray-100 via-pink-50 to-red-700 p-4"> | ||
<span className="text-4xl font-semibold text-black/90">David Dong's Videolist</span> | ||
</div> | ||
<div className="text-2xl font-semibold text-black/90">David Dong's Videolist</div> | ||
<h2 className="text-[#d60017] text-xl font-normal">David Dong</h2> | ||
<div className="text-[13px] text-black/50">FingerStyle Guitar</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { MusicPlayIcon } from "@/components/ui/icons"; | ||
import { Music } from "@/config/project"; | ||
|
||
function MusicItem({ imageUrl, url, name, author }) { | ||
const backgroundImageUrl = `/music/${imageUrl}.jpg`; | ||
return ( | ||
<div className="group flex justify-center items-center hover:bg-zinc-100 hover:rounded-md p-2"> | ||
<div | ||
style={{ backgroundImage: `url(${backgroundImageUrl})` }} | ||
className="relative rounded-md drop-shadow-sm border min-w-56 h-36 bg-cover bg-center flex justify-center items-center" | ||
> | ||
<div className="absolute inset-0 bg-black opacity-0 group-hover:opacity-50 transition-opacity rounded-md"></div> | ||
<MusicPlayIcon | ||
className="w-10 h-10 hidden group-hover:block z-10 cursor-pointer" | ||
onClick={() => { | ||
window.location.href = url; | ||
}} | ||
/> | ||
</div> | ||
<div className="flex flex-col justify-center ml-2 w-full"> | ||
<div className="text-black/80 text-md font-normal">{name}</div> | ||
<div className="text-black/50 text-sm font-normal">{author}</div> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default function MusicList() { | ||
return ( | ||
<div className="flex flex-col p-1 space-y-2"> | ||
{Music.map((song) => ( | ||
<MusicItem | ||
key={song.name} | ||
imageUrl={song.imageUrl} | ||
url={song.url} | ||
name={song.name} | ||
author={song.author} | ||
/> | ||
))} | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import MusicCover from "./MusicCover"; | ||
import MusicList from "./MusicList"; | ||
|
||
export { MusicCover, MusicList }; |