feat: artist illustrations
BIN
assets/artists/Beethoven/Beethoven.jpg
Normal file
|
After Width: | Height: | Size: 981 KiB |
BIN
assets/artists/Beethoven/illustration.png
Normal file
|
After Width: | Height: | Size: 2.9 MiB |
BIN
assets/artists/Christian Petzold/illustration.png
Normal file
|
After Width: | Height: | Size: 361 KiB |
BIN
assets/artists/Erik Satie/Satie-erik-4ff9d0bde1749.jpg
Normal file
|
After Width: | Height: | Size: 549 KiB |
BIN
assets/artists/Erik Satie/illustration.png
Normal file
|
After Width: | Height: | Size: 558 KiB |
BIN
assets/artists/Franz Liszt/Franz_Liszt_1858.jpg
Normal file
|
After Width: | Height: | Size: 297 KiB |
BIN
assets/artists/Franz Liszt/illustration.png
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 2.2 MiB |
BIN
assets/artists/Franz Xaver Gruber/illustration.png
Normal file
|
After Width: | Height: | Size: 4.2 MiB |
BIN
assets/artists/Gerardo Matos Rodríguez/MRodriguez.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
assets/artists/Gerardo Matos Rodríguez/illustration.png
Normal file
|
After Width: | Height: | Size: 77 KiB |
BIN
assets/artists/Johann Pachelbel/illustration.png
Normal file
|
After Width: | Height: | Size: 2.3 MiB |
|
After Width: | Height: | Size: 384 KiB |
BIN
assets/artists/Johann Sebastian Bach/Johann_Sebastian_Bach.jpg
Normal file
|
After Width: | Height: | Size: 130 KiB |
BIN
assets/artists/Johann Sebastian Bach/illustration.png
Normal file
|
After Width: | Height: | Size: 376 KiB |
BIN
assets/artists/Joseph Haydn/800px-Joseph_Haydn.jpg
Normal file
|
After Width: | Height: | Size: 152 KiB |
BIN
assets/artists/Joseph Haydn/illustration.png
Normal file
|
After Width: | Height: | Size: 1012 KiB |
BIN
assets/artists/Ludwig Van Beethoven/illustration.png
Normal file
|
After Width: | Height: | Size: 2.9 MiB |
BIN
assets/artists/Misc Children/illustration.png
Normal file
|
After Width: | Height: | Size: 392 KiB |
BIN
assets/artists/Misc Christmas/illustration.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 13 KiB |
BIN
assets/artists/Misc Traditional/illustration.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
assets/artists/Misc Tunes/illustration.png
Normal file
|
After Width: | Height: | Size: 147 KiB |
|
After Width: | Height: | Size: 147 KiB |
BIN
assets/artists/Test/illustration.png
Normal file
|
After Width: | Height: | Size: 111 KiB |
BIN
assets/artists/William Gillock/Gillock_William_2.jpg
Normal file
|
After Width: | Height: | Size: 719 KiB |
BIN
assets/artists/William Gillock/illustration.png
Normal file
|
After Width: | Height: | Size: 1.7 MiB |
13
front/API.ts
@@ -296,17 +296,20 @@ export default class API {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrive a song's midi partition
|
||||
* @param songId the id to find the song
|
||||
*/
|
||||
public static getArtistIllustration(artistId: number): string {
|
||||
return `${baseAPIUrl}/artist/${artistId}/illustration`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrive a song's midi partition
|
||||
* @param songId the id to find the song
|
||||
*/
|
||||
public static getGenreIllustration(genreId: number): string {
|
||||
return `${baseAPIUrl}/genre/${genreId}/illustration`;
|
||||
/*
|
||||
return API.fetch({
|
||||
route: `/genre/${genreId}/illustration`,
|
||||
raw: true,
|
||||
});*/
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,26 +1,24 @@
|
||||
import React from "react";
|
||||
import Card, { CardBorderRadius } from './Card';
|
||||
import { VStack, Text, Image } from 'native-base';
|
||||
import Card, { CardBorderRadius } from "./Card";
|
||||
import { VStack, Text, Image } from "native-base";
|
||||
import API from "../API";
|
||||
|
||||
type ArtistCardProps = {
|
||||
image: string;
|
||||
name: string;
|
||||
id: number;
|
||||
onPress: () => void;
|
||||
}
|
||||
};
|
||||
|
||||
const ArtistCard = (props: ArtistCardProps) => {
|
||||
const { image, name, id } = props;
|
||||
|
||||
return (
|
||||
<Card
|
||||
shadow={3}
|
||||
onPress={props.onPress}
|
||||
>
|
||||
<Card shadow={3} onPress={props.onPress}>
|
||||
<VStack m={1.5} space={3}>
|
||||
<Image
|
||||
style={{ zIndex: 0, aspectRatio: 1, borderRadius: CardBorderRadius }}
|
||||
source={{ uri: image }}
|
||||
source={{ uri: API.getArtistIllustration(id) }}
|
||||
alt={name}
|
||||
/>
|
||||
<VStack>
|
||||
@@ -31,13 +29,13 @@ const ArtistCard = (props: ArtistCardProps) => {
|
||||
</VStack>
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
ArtistCard.defaultProps = {
|
||||
image: 'https://picsum.photos/200',
|
||||
name: 'Artist',
|
||||
image: "https://picsum.photos/200",
|
||||
name: "Artist",
|
||||
id: 0,
|
||||
onPress: () => { }
|
||||
}
|
||||
onPress: () => { },
|
||||
};
|
||||
|
||||
export default ArtistCard;
|
||||
export default ArtistCard;
|
||||
|
||||