To add a new artwork:
- take a picture of the art, and save two copies. A large one with a longest side of 960 pixels, and a smaller thumbnail with a longest side of 480 pixels. Save these in the img directory.
- update the google spreadsheet with the information for the new art piece.
- export the spreadsheet to the artworks.json file.
The html to display the artwork is generated by the file "showArtwork.php". This parses the file "artworks.json". This is a plain text file that serves as a database of all the art that you want displayed on the page.
To make this file easier for you to manage, we’ve set up a google spreadsheet here:
https://docs.google.com/spreadsheets/d/1TMWvCOYV-cpH6wL0TwLVPt64dCikgOXNIA3rQ6o55x0/edit#gid=0
you can add or remove art as you want to from here. The columns are mostly self explanatory, but here are descriptions
(column name: description: example)
- title: the title of the art work as you want it displayed: Poetic Artwork Title
- price: the price or ‘sold’ or something similar: $40000000
- size: size in inches of the canvas, width x height: 14x11
- medium: what’s the art made out of: oil
- imagename: the BASE-IMAGE-NAME of the files in the ing directory. more on this below: poetic-artwork-title
- landscape: is this a landscape? true or false: TRUE
- stilllife: is this a stilllife? true or false: FALSE
- winter: is this a winter scene? true or false: TRUE
- display: do you want this shown on the website? true or false: TRUE
once everything in the spreadsheet is to your liking, open up the file “artworks.json” in a text editor and delete everything. Then click on the “Export JSON” button on the google spreadsheet and select “Export JSON for this sheet”. The computer will compute for a few seconds and a window will pop up with the reformatted data. Select all of this (command-A), copy it (command-C), and paste it into artworks.json (command-V). Save artworks.json and the update is complete.
###NOTE ABOUT imagename: Each image that’s on the page needs two files: a normal image and a thumbnail. The normal images have their longest side at 960 pixels (i.e. they fit in a 960x960 square), and the thumbnails fit in a 480x480 square. So save two copies of the photo to the img folder: a large one called BASE-IMAGE-NAME.jpg and a smaller one called BASE-IMAGE-NAME_480.jpg. BASE-IMAGE-NAME should ideally have no whitespace.
####NOTE ABOUT building: from the root directory run 'grunt build'. This creates a 'dist' directory, which is to be uploaded to the webserver.