[+] Title and subtitle
This commit is contained in:
@@ -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,6 +27,26 @@ export interface ZoteroCreator
|
|||||||
lastName: string
|
lastName: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ZoteroData
|
||||||
|
{
|
||||||
|
key: string
|
||||||
|
itemType: string // 'document'
|
||||||
|
title: string
|
||||||
|
creators: ZoteroCreator[]
|
||||||
|
abstractNote?: string
|
||||||
|
publisher?: string
|
||||||
|
date?: string // 'Dec 9 2021'
|
||||||
|
language?: string // 'en'
|
||||||
|
shortTitle?: string
|
||||||
|
url?: string
|
||||||
|
accessDate?: string
|
||||||
|
archive?: string
|
||||||
|
archiveLocation?: string
|
||||||
|
libraryCatalog?: string
|
||||||
|
rights?: string
|
||||||
|
extra?: string
|
||||||
|
}
|
||||||
|
|
||||||
export interface ZoteroItem
|
export interface ZoteroItem
|
||||||
{
|
{
|
||||||
key: string
|
key: string
|
||||||
@@ -40,30 +62,17 @@ export interface ZoteroItem
|
|||||||
parsedDate: string // 2021-12-09
|
parsedDate: string // 2021-12-09
|
||||||
numChildren: 1
|
numChildren: 1
|
||||||
}
|
}
|
||||||
data: {
|
data: ZoteroData
|
||||||
key: string
|
|
||||||
itemType: string // 'document'
|
|
||||||
title: string
|
|
||||||
creators: ZoteroCreator[]
|
|
||||||
abstractNote?: string
|
|
||||||
publisher?: string
|
|
||||||
date?: string // 'Dec 9 2021'
|
|
||||||
language?: string // 'en'
|
|
||||||
shortTitle?: string
|
|
||||||
url?: string
|
|
||||||
accessDate?: string
|
|
||||||
archive?: string
|
|
||||||
archiveLocation?: string
|
|
||||||
libraryCatalog?: string
|
|
||||||
rights?: string
|
|
||||||
extra?: string
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@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>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user