[+] Title and subtitle

This commit is contained in:
Hykilpikonna
2021-12-25 12:19:31 -05:00
parent 2b65e22369
commit d8106817d5
+25 -16
View File
@@ -1,12 +1,14 @@
<template> <template>
<div id="Publication"> <div id="Publication">
<div id="title">{{d.title}}</div>
<div id="subtitle">By {{d.creators.map(it => it.firstName + ' ' + it.lastName).join(' & ')}}{{date ? ', ' + date.year() : ''}}</div>
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import {Options, Vue} from 'vue-class-component'; import {Options, Vue} from 'vue-class-component';
import {Prop} from "vue-property-decorator"; import {Prop} from "vue-property-decorator";
import moment from "moment";
export interface ZoteroLink export interface ZoteroLink
{ {
@@ -25,22 +27,8 @@ export interface ZoteroCreator
lastName: string lastName: string
} }
export interface ZoteroItem export interface ZoteroData
{ {
key: string
version: number
library: {
type: string // 'user'
id: number
name: string
links: ZoteroLinks
}
meta: {
creatorSummary: string // Gui and Burton
parsedDate: string // 2021-12-09
numChildren: 1
}
data: {
key: string key: string
itemType: string // 'document' itemType: string // 'document'
title: string title: string
@@ -57,13 +45,34 @@ export interface ZoteroItem
libraryCatalog?: string libraryCatalog?: string
rights?: string rights?: string
extra?: string extra?: string
}
export interface ZoteroItem
{
key: string
version: number
library: {
type: string // 'user'
id: number
name: string
links: ZoteroLinks
} }
meta: {
creatorSummary: string // Gui and Burton
parsedDate: string // 2021-12-09
numChildren: 1
}
data: ZoteroData
} }
@Options({components: {}}) @Options({components: {}})
export default class ZoteroPublicationView extends Vue export default class ZoteroPublicationView extends Vue
{ {
@Prop({required: true}) item!: ZoteroItem @Prop({required: true}) item!: ZoteroItem
get d(): ZoteroData { return this.item.data }
get date(): moment.Moment { return moment(this.d.date) }
} }
</script> </script>