Commit 50013936 authored by Kenzo-Hugo Hillion's avatar Kenzo-Hugo Hillion
Browse files

add textarea to go directly to gene card from home page

parent b13594ad
Pipeline #32095 passed with stages
in 3 minutes and 12 seconds
......@@ -9,7 +9,12 @@
:value="true"
type="warning"
>
<v-layout align-center>
Gene "{{ geneId }}" not found in the database.
<v-spacer/>
<router-link to="/">redirect to home page</router-link>
<v-icon small class="ml-1">fa-home</v-icon>
</v-layout>
</v-alert>
<v-card v-else>
......
......@@ -13,6 +13,28 @@
<v-card class="blue-grey lighten-5">
<v-card-text>
<v-container class="pa-0 text-xs-justify">
<v-layout>
<v-flex md10>
<v-text-field
label="Enter gene ID to visit page"
solo
class="my-1 mx-2"
flat
v-model="geneId"
v-on:keyup.enter.native="goToGeneDetail"
></v-text-field>
</v-flex>
<v-flex md1 class="ml-3">
<v-btn
:to="/gene-detail/ + geneIdLower"
small fab
:disabled="disableGo"
class="light-green lighten-2"
>
Go
</v-btn>
</v-flex>
</v-layout>
<p>
<b>MetageneDB</b> supports metagenomic gene catalogs by easing their use and providing an intuitive interface to browse and visualize their content.</br>
</p>
......@@ -23,7 +45,6 @@
</v-card>
</v-flex>
<v-flex md5 class="ml-4">
<!-- <v-container fluid> -->
<v-layout wrap justify-space-between>
<v-flex
v-for="item in menu"
......@@ -40,7 +61,6 @@
</v-btn>
</v-flex>
</v-layout>
<!-- </v-container> -->
</v-flex>
</v-layout>
</v-container>
......
......@@ -4,6 +4,11 @@ export default {
components: {
logos: Logos,
},
data() {
return {
geneId: '',
}
},
computed: {
menu() {
return [
......@@ -14,5 +19,21 @@ export default {
{ title: 'Contact us', icon: 'fas fa-address-book'}
];
},
disableGo() {
if (this.geneId) {
return false;
}
return true;
},
geneIdLower() {
return this.geneId.toLowerCase();
}
},
methods: {
goToGeneDetail() {
this.$router.push({
path: `/gene-detail/${this.geneIdLower}`
})
}
}
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment