Skip to content

Commit

Permalink
feat: add cubism category and images
Browse files Browse the repository at this point in the history
  • Loading branch information
kyziq committed Jan 10, 2024
1 parent b370235 commit 076019d
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 22 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions src/data/categories.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { paintingsList } from './list/paintings-list.js';
import { landscapesList } from './list/landscapes-list.js';
import { portraitsList } from './list/portraits-list.js';
import { abstractsList } from './list/abstracts-list.js';
import { cubismList } from './list/cubism-list.js';

function getRandomItem(list) {
return list[Math.floor(Math.random() * list.length)];
Expand All @@ -11,6 +12,7 @@ const randomPainting = getRandomItem(paintingsList);
const randomLandscape = getRandomItem(landscapesList);
const randomPortrait = getRandomItem(portraitsList);
const randomAbstract = getRandomItem(abstractsList);
const randomCubism = getRandomItem(cubismList);

export const categories = [
{
Expand All @@ -33,4 +35,9 @@ export const categories = [
imageUrl: randomAbstract.img,
tooltip: 'Discover Abstracts',
},
{
name: 'Cubism',
imageUrl: randomCubism.img,
tooltip: 'Discover Cubism',
},
];
35 changes: 35 additions & 0 deletions src/data/list/cubism-list.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import FemmeAssise from '../../assets/images/cubism/PabloPicasso/FemmeAssise.jpg';
import LesDemoisellesdAvignon from '../../assets/images/cubism/PabloPicasso/LesDemoisellesdAvignon.jpg';
import { artists } from './artists-list';

export const cubismList = [
{
id: 5001,
name: 'Femme Assise',
img: FemmeAssise,
artist: 'Pablo Picasso',
date: '',
description: '',
location: '',
countryCode: '',
dimensions: '',
style: '',
artistInfo: artists['Pablo Picasso'] || {},
likes: 9,
},
{
id: 5002,
name: "Les Demoiselles d'Avignon",
img: LesDemoisellesdAvignon,
artist: 'Pablo Picasso',
date: '1907',
description:
"Les Demoiselles d'Avignon is a groundbreaking work by Pablo Picasso that marks a radical break from traditional composition and perspective. This painting is seen as a precursor to Cubism and a pivotal work in the development of modern art.",
location: 'Museum of Modern Art, New York City, USA',
countryCode: 'US',
dimensions: '243.9 cm x 233.7 cm',
style: 'Cubism',
artistInfo: artists['Pablo Picasso'] || {},
likes: 19,
},
];
3 changes: 3 additions & 0 deletions src/data/list/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@ export * from './landscapes-list';
export * from './portraits-list';
export * from './paintings-list';
export * from './artists-list';
export * from './cubism-list';

import { abstractsList } from './abstracts-list';
import { portraitsList } from './portraits-list';
import { paintingsList } from './paintings-list';
import { landscapesList } from './landscapes-list';
import { cubismList } from './cubism-list';

export const allLists = {
abstractsList,
portraitsList,
paintingsList,
landscapesList,
cubismList,
};
28 changes: 6 additions & 22 deletions src/data/list/paintings-list.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Meules from '../../assets/images/paintings/ClaudeMonet/Meules.jpg';
import LesDemoisellesdAvignon from '../../assets/images/paintings/PabloPicasso/LesDemoisellesdAvignon.jpg';
import GadisPicnic from '../../assets/images/paintings/MiriamOmar/GadisPicnic.png';
import GardenOfJoy from '../../assets/images/paintings/MiriamOmar/GardenOfJoy.png';
import LadyWithAFan from '../../assets/images/paintings/GustavKlimt/LadyWithAFan.jpg';
Expand Down Expand Up @@ -27,21 +26,6 @@ export const paintingsList = [
},
{
id: 3002,
name: "Les Demoiselles d'Avignon",
img: LesDemoisellesdAvignon,
artist: 'Pablo Picasso',
date: '1907',
description:
"Les Demoiselles d'Avignon is a groundbreaking work by Pablo Picasso that marks a radical break from traditional composition and perspective. This painting is seen as a precursor to Cubism and a pivotal work in the development of modern art.",
location: 'Museum of Modern Art, New York City, USA',
countryCode: 'US',
dimensions: '243.9 cm x 233.7 cm',
style: 'Cubism',
artistInfo: artists['Pablo Picasso'] || {},
likes: 19,
},
{
id: 3003,
name: 'Garden Of Joy',
img: GardenOfJoy,
artist: 'Mariam Omar',
Expand All @@ -56,7 +40,7 @@ export const paintingsList = [
likes: 8,
},
{
id: 3004,
id: 3003,
name: 'Gadis Picnic',
img: GadisPicnic,
artist: 'Mariam Omar',
Expand All @@ -71,7 +55,7 @@ export const paintingsList = [
likes: 11,
},
{
id: 3005,
id: 3004,
name: 'Lady with A Fan',
img: LadyWithAFan,
artist: 'Gustav Klimt',
Expand All @@ -86,7 +70,7 @@ export const paintingsList = [
likes: 18,
},
{
id: 3006,
id: 3005,
name: 'Nighthawks',
img: Nighthawks,
artist: 'Edward Hopper',
Expand All @@ -101,7 +85,7 @@ export const paintingsList = [
likes: 6,
},
{
id: 3007,
id: 3006,
name: 'Automat',
img: Automat,
artist: 'Edward Hopper',
Expand All @@ -116,7 +100,7 @@ export const paintingsList = [
likes: 2,
},
{
id: 3008,
id: 3007,
name: 'Morning Sun',
img: MorningSun,
artist: 'Edward Hopper',
Expand All @@ -131,7 +115,7 @@ export const paintingsList = [
likes: 1,
},
{
id: 3009,
id: 3008,
name: 'The Ghent Altarpiece',
img: TheGhentAltarpiece,
artist: 'Jan Van Eyck',
Expand Down

0 comments on commit 076019d

Please sign in to comment.