-
Notifications
You must be signed in to change notification settings - Fork 0
/
user.vue.html
53 lines (49 loc) · 1.5 KB
/
user.vue.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<meta http-equiv="cache-control" content="no-cache" />
<script src="//cdn.jsdelivr.net/npm/vue@2"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.21/lodash.min.js"></script>
<div id="app" width="100%">
<div v-if="loaded">
<p><small> This list was autogenerated from <a href="https://www.mtmt.hu/">MTMT</a> on {{date}}. Generate your <a href="https://github.com/ferdinandyb/mtmt-publist">own</a>. </small></p>
<ol>
<li v-for="a in orderedArticles">
<span v-for="w in _.orderBy(a.Authors,'Index')">
<b v-if="w.IsUser == true">{{w.FamilyName}}, {{w.GivenName[0]}}., </b>
<span v-else>{{w.FamilyName}}, {{w.GivenName[0]}}., </span>
</span>
<i><a v-bind:href="a.Doi">{{a.Title}}</a>, </i>
{{a.Journal}}
({{a.Year}})
</li>
</ol>
</div>
<div v-else>
Generating up-to-date paperlist from MTMT, please wait.
</div>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
articles : [],
date: "",
loaded: false
},
methods: {
},
computed: {
orderedArticles: function () {
return _.orderBy(this.articles, 'Year', 'desc')
}
},
mounted(){
fetch ("/mtmt-publist/user?mtid=10028021").then(res => res.json()).then(
json => {
this.articles = json.Papers
var date = new Date(json.Time * 1000);
this.date = date.toLocaleString();
this.loaded = true
}
)
}
})
</script>