diff --git a/annif/static/css/style.css b/annif/static/css/style.css index a2b2df37f..0a97471d6 100644 --- a/annif/static/css/style.css +++ b/annif/static/css/style.css @@ -31,6 +31,11 @@ h1 { font-size: 2rem; } border-radius: 0px; padding: 2px 7px; } +#annif-version { + float: right; + margin-top: 0.5rem; + font-size: 1rem; +} label, #suggestions { border-top: 1px solid #343260; margin-bottom: 0.5rem; diff --git a/annif/templates/home.html b/annif/templates/home.html index 1e732366d..879c9ed7d 100644 --- a/annif/templates/home.html +++ b/annif/templates/home.html @@ -51,6 +51,7 @@

<% problem.title %>

+ Annif v<% annif_version %>
@@ -233,6 +234,7 @@

Suggested subjects

\ el: '#app', data: { text: '', + annif_version: '', project: '', limit: 10, projects: [], @@ -243,6 +245,7 @@

Suggested subjects

\ mounted: function() { // TBD: we can add a button to reload the list of projects later this.loadProjects(); + this.loadVersion(); }, methods: { clearResults: function() { @@ -282,6 +285,13 @@

Suggested subjects

\ } }); }, + loadVersion: function() { + var this_ = this; + axios.get('/v1') + .then(res => { + this_.annif_version = res.data.version; + }) + }, suggest: function(event) { this.problems = []; if (this.text.trim() === '') {