Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified frontend/assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions frontend/components/layout/FeatureCard.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<template>
<v-card>
<v-img
<!-- <v-img
:src="imageSrc"
height="200px"
/>
/> -->
<v-card-title primary-title class="layout justify-center">
<div class="headline text-xs-center font-weight-bold mb-2">
{{ title }}
<!-- {{ title }} -->
</div>
</v-card-title>
<v-card-text class="subtitle-1 layout justify-center">
{{ text }}
<!-- {{ text }} -->
</v-card-text>
</v-card>
</template>
Expand Down
53 changes: 2 additions & 51 deletions frontend/components/layout/FeatureCards.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,61 +9,12 @@
<v-flex xs12 sm4 class="my-3">
<div class="text-xs-center">
<h2 class="headline">
{{ $t('home.featuresTitle') }}
<iframe width="745" height="1200" src="https://docs.google.com/document/d/e/2PACX-1vQxeNvN5RM4fib7kNLWMZOhK73xHK9j0hMbOxPikcnYP_rgqjxPXPq_zLQW9MtHMn9ptgJa3Fo1pTgG/pub?embedded=true"></iframe>
</h2>
</div>
</v-flex>
<v-flex xs12>
<v-container grid-list-xl>
<v-layout wrap align-center>
<v-flex
v-for="(item, index) in featureCards"
:key="index"
xs12
md4
>
<feature-card
:image-src="require(`~/assets/${item.imageSrc}`)"
:title="item.title"
:text="item.text"
/>
</v-flex>
</v-layout>
</v-container>
</v-flex>

</v-layout>
</v-container>
</template>

<script lang="ts">
import Vue from 'vue'
import FeatureCard from './FeatureCard.vue'

export default Vue.extend({
components: {
FeatureCard
},

data() {
return {
featureCards: [
{
imageSrc: 'feature3.png',
title: this.$t('home.featuresTitle1'),
text: this.$t('home.featuresText1')
},
{
imageSrc: 'feature2.png',
title: this.$t('home.featuresTitle2'),
text: this.$t('home.featuresText2')
},
{
imageSrc: 'feature1.png',
title: this.$t('home.featuresTitle3'),
text: this.$t('home.featuresText3')
}
]
}
}
})
</script>
40 changes: 1 addition & 39 deletions frontend/components/layout/LocaleMenu.vue
Original file line number Diff line number Diff line change
@@ -1,41 +1,3 @@
<template>
<v-menu
open-on-hover
offset-y
>
<template #activator="{ on }">
<v-btn
text
v-on="on"
>
{{ $i18n.locale }}
<v-icon>{{ mdiMenuDown }}</v-icon>
</v-btn>
</template>
<v-list
v-for="locale in $i18n.locales"
:key="locale.code"
>
<nuxt-link
class="v-list-item v-list-item--link"
:class="$vuetify.theme.dark ? 'theme--dark' : 'theme--light'"
:to="switchLocalePath(locale.code)"
>
{{ locale.name }}
</nuxt-link>
</v-list>
</v-menu>

</template>

<script lang="ts">
import Vue from 'vue'
import { mdiMenuDown } from '@mdi/js'

export default Vue.extend({
data() {
return {
mdiMenuDown
}
}
})
</script>
68 changes: 4 additions & 64 deletions frontend/components/layout/TheBottomBanner.vue
Original file line number Diff line number Diff line change
@@ -1,70 +1,11 @@
<template>
<section>
<v-parallax
:src="require(`~/assets/vbanner.jpg`)"
height="400"
dark
>
<v-container>
<v-layout
wrap
align-center
justify-center
class="white--text"
>
<v-flex
xs12
md7
>
<v-img
:src="require(`~/assets/ner_demo.png`)"
max-height="380"
contain
class="ma-5"
/>
</v-flex>
<v-flex
xs12
md5
>
<h1 class="mb-2 display-1 text-xs-center">
{{ $t('home.footerTitle') }}
</h1>
<div class="mt-4">
<v-menu open-on-hover offset-y>
<template #activator="{ on }">
<v-btn
class="blue lighten-2"
dark
large
v-on="on"
>
{{ $t('home.demoDropDown') }}
<v-icon>{{ mdiMenuDown }}</v-icon>
</v-btn>
</template>
<v-list>
<v-list-item
v-for="(item, index) in items"
:key="index"
@click="$router.push(localePath('/demo/' + item.link))"
>
<v-list-item-title>{{ item.title }}</v-list-item-title>
</v-list-item>
</v-list>
</v-menu>
</div>
</v-flex>
</v-layout>
</v-container>
</v-parallax>

</section>
</template>

<script lang="ts">
-<script lang="ts">
import Vue from 'vue'
import { mdiMenuDown } from '@mdi/js'

export default Vue.extend({
data() {
return {
Expand All @@ -73,9 +14,8 @@ export default Vue.extend({
{ title: this.$t('home.demoSent'), link: 'sentiment-analysis' },
{ title: this.$t('home.demoTranslation'), link: 'translation' },
{ title: this.$t('home.demoTextToSQL'), link: 'text-to-sql' }
],
mdiMenuDown
]
}
}
})
</script>
</script>
22 changes: 4 additions & 18 deletions frontend/components/layout/TheColorModeSwitcher.vue
Original file line number Diff line number Diff line change
@@ -1,28 +1,14 @@
<template>
<v-btn
icon
fab
@click="isDark=!isDark"
>
<v-icon v-if="isDark">
{{ mdiMoonWaxingCrescent }}
</v-icon>
<v-icon v-else>
{{ mdiWhiteBalanceSunny }}
</v-icon>
</v-btn>

</template>


<script lang="ts">
import Vue from 'vue'
import { mdiMoonWaxingCrescent, mdiWhiteBalanceSunny } from '@mdi/js'

export default Vue.extend({
data() {
return {
isDark: false,
mdiMoonWaxingCrescent,
mdiWhiteBalanceSunny
isDark: false
}
},

Expand All @@ -38,4 +24,4 @@ export default Vue.extend({
this.isDark = dark ? JSON.parse(dark) : false
}
})
</script>
</script>
4 changes: 2 additions & 2 deletions frontend/components/layout/TheFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
white--text
xs12
>
&copy; {{ new Date().getFullYear() }} doccano
<!-- &copy; {{ new Date().getFullYear() }} footer -->
</v-flex>
</v-layout>
</v-footer>
</template>
</template>
60 changes: 7 additions & 53 deletions frontend/components/layout/TheHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
v-if="!isAuthenticated"
class="ml-2 d-none d-sm-flex"
>
doccano
<!-- title text in titlebar goes here -->
</v-toolbar-title>
<v-btn
v-if="isAuthenticated && isIndividualProject"
Expand All @@ -24,7 +24,7 @@
style="text-transform:none"
>
<v-icon small class="mr-1">
{{ mdiHexagonMultiple }}
mdi-hexagon-multiple
</v-icon>
<span> {{ currentProject.name }}</span>
</v-btn>
Expand All @@ -39,30 +39,7 @@
>
{{ $t('header.projects') }}
</v-btn>
<v-menu
v-if="!isAuthenticated"
open-on-hover
offset-y
>
<template #activator="{ on }">
<v-btn
text
v-on="on"
>
{{ $t('home.demoDropDown') }}
<v-icon>{{ mdiMenuDown }}</v-icon>
</v-btn>
</template>
<v-list>
<v-list-item
v-for="(item, index) in items"
:key="index"
@click="$router.push('/demo/' + item.link)"
>
<v-list-item-title>{{ item.title }}</v-list-item-title>
</v-list-item>
</v-list>
</v-menu>

<v-btn
v-if="!isAuthenticated"
outlined
Expand All @@ -74,26 +51,16 @@
v-if="isAuthenticated"
offset-y
>
<template #activator="{ on }">
<template v-slot:activator="{ on }">
<v-btn on icon v-on="on">
<v-icon>{{ mdiDotsVertical }}</v-icon>
<v-icon>mdi-dots-vertical</v-icon>
</v-btn>
</template>
<v-list>
<v-subheader>{{ getUsername }}</v-subheader>
<v-list-item>
<v-list-item-content>
<v-switch
:input-value="isRTL"
:label="direction"
class="ms-1"
@change="toggleRTL"
/>
</v-list-item-content>
</v-list-item>
<v-list-item @click="signout">
<v-list-item-icon>
<v-icon>{{ mdiLogout }}</v-icon>
<v-icon>mdi-logout</v-icon>
</v-list-item-icon>
<v-list-item-content>
<v-list-item-title>
Expand All @@ -107,7 +74,6 @@
</template>

<script>
import { mdiLogout, mdiDotsVertical, mdiMenuDown, mdiHexagonMultiple } from '@mdi/js'
import { mapGetters, mapActions } from 'vuex'
import TheColorModeSwitcher from './TheColorModeSwitcher'
import LocaleMenu from './LocaleMenu'
Expand All @@ -124,35 +90,23 @@ export default {
{ title: this.$t('home.demoNER'), link: 'named-entity-recognition' },
{ title: this.$t('home.demoSent'), link: 'sentiment-analysis' },
{ title: this.$t('home.demoTranslation'), link: 'translation' },
{ title: 'Intent Detection and Slot Filling', link: 'intent-detection-and-slot-filling' },
{ title: this.$t('home.demoTextToSQL'), link: 'text-to-sql' },
{ title: 'Image Classification', link: 'image-classification' },
{ title: 'Speech to Text', link: 'speech-to-text' },
],
mdiLogout,
mdiDotsVertical,
mdiMenuDown,
mdiHexagonMultiple
]
}
},

computed: {
...mapGetters('auth', ['isAuthenticated', 'getUsername']),
...mapGetters('projects', ['currentProject']),
...mapGetters('config', ['isRTL']),

isIndividualProject() {
return this.$route.name && this.$route.name.startsWith('projects-id')
},

direction() {
return this.isRTL ? 'RTL' : 'LTR'
}
},

methods: {
...mapActions('auth', ['logout']),
...mapActions('config', ['toggleRTL']),
signout() {
this.logout()
this.$router.push(this.localePath('/'))
Expand Down
Loading