[U] Update artwork loading
This commit is contained in:
+7
-9
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user