[U] Update artwork loading

This commit is contained in:
Hykilpikonna
2019-12-25 16:04:15 -05:00
parent 7f34891b2b
commit ec2fc2174a
+7 -9
View File
@@ -93,16 +93,14 @@ export default class App extends Vue
// Set title // Set title
document.title = config.title.text; document.title = config.title.text;
// Parse artworks // Parse artwork types
config.artworks.forEach((a: any) => config.types.forEach((type: any) =>
{ {
// Check null case // Parse artworks
if (a.date == null) Error('Error: No date specified.'); type.posts.forEach((a: any) =>
if (a.title == null) a.title = config.artwork.default_title; {
if (a.format == null) a.format = config.artwork.default_format; this.artworks.push(new Artwork(type, a));
})
// Add it
this.artworks.push(new Artwork(a.date, a.title, a.format, a.description));
}); });
// Sort by date // Sort by date