generated from rayriffy/next-tailwind-ui
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
152 additions
and
5 deletions.
There are no files selected for viewing
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
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 @@ | ||
export type Difficulty = 'easy' | 'normal' | 'hard' | 'expert' | 'master' |
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,19 @@ | ||
import { MusicCategory } from './MusicCategory' | ||
|
||
export interface Music { | ||
id: number | ||
seq: number | ||
releaseConditionId: number | ||
categories: MusicCategory[] | ||
title: string | ||
lyricist: string | ||
composer: string | ||
arranger: string | ||
dancerCount: number | ||
selfDancerPosition: number | ||
assetbundleName: string | ||
liveTalkBackgroundAssetbundleName: string | ||
publishedAt: number | ||
liveStageId: number | ||
fillerSec: number | ||
} |
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 @@ | ||
export type MusicCategory = 'mv' | 'image' | 'mv_2d' | 'original' |
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,10 @@ | ||
import { Difficulty } from './Difficulty' | ||
|
||
export interface MusicDifficulty { | ||
id: number | ||
musicId: number | ||
musicDifficulty: Difficulty | ||
playLevel: number | ||
releaseConditionId: number | ||
noteCount: number | ||
} |
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,8 @@ | ||
import { Tag } from './Tag' | ||
|
||
export interface MusicTag { | ||
id: number | ||
musicId: number | ||
musicTag: Tag | ||
seq: number | ||
} |
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,17 @@ | ||
export interface MusicVocal { | ||
id: number | ||
musicId: number | ||
musicVocalType: string | ||
seq: number | ||
releaseConditionId: number | ||
caption: string | ||
characters: { | ||
id: number | ||
musicId: number | ||
musicVocalId: number | ||
characterType: string | ||
characterId: number | ||
seq: number | ||
}[] | ||
assetbundleName: string | ||
} |
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,9 @@ | ||
export type Tag = | ||
| 'all' | ||
| 'vocaloid' | ||
| 'light_music_club' | ||
| 'idol' | ||
| 'school_refusal' | ||
| 'theme_park' | ||
| 'street' | ||
| 'other' |
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,11 +1,51 @@ | ||
import { NextPage } from 'next' | ||
import { GetStaticProps, NextPage } from 'next' | ||
import Image from 'next/image' | ||
|
||
import { Music } from '../@types/Music' | ||
|
||
interface Props { | ||
musics: Music[] | ||
} | ||
|
||
const Page: NextPage<Props> = props => { | ||
const { musics } = props | ||
|
||
// console.log(musics) | ||
|
||
const Page: NextPage = props => { | ||
return ( | ||
<div> | ||
<div className="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8"> | ||
<h1 className="font-bold text-2xl">Hello</h1> | ||
<div className="grid grid-cols-4 gap-4"> | ||
{musics.map(music => ( | ||
<div | ||
className="relative rounded-md overflow-hidden" | ||
key={`music-${music.id}`} | ||
> | ||
{/* <div className="absolute top-0 bottom-0 left-0 right-0 bg-black-overlay backdrop-blur"></div> */} | ||
<Image | ||
src={`https://sekai-res.dnaroma.eu/file/sekai-assets/music/jacket/${music.assetbundleName}_rip/${music.assetbundleName}.webp`} | ||
width={740} | ||
height={740} | ||
/> | ||
</div> | ||
))} | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export const getStaticProps: GetStaticProps<Props> = async context => { | ||
const { default: axios } = await import('axios') | ||
|
||
const res = await axios.get<Music[]>( | ||
'https://raw.githubusercontent.com/Sekai-World/sekai-master-db-diff/master/musics.json' | ||
) | ||
|
||
return { | ||
props: { | ||
musics: res.data, | ||
}, | ||
} | ||
} | ||
|
||
export default Page |
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
f3bbdbe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: