summaryrefslogtreecommitdiffstats
path: root/webapp/src/components/HomeModule.vue
blob: 8a6febf2557aa4a706f7c3c7068eb151f3c8a6b1 (plain) (blame)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<i18n>
{
  "en": {
    "basApplication": "BAS Webapplication",
    "welcome": "Welcome"
  },
  "de": {
    "basApplication": "BAS Webapplikation",
    "welcome": "Willkommen"
  }
}
</i18n>

<template>
  <v-container fill-height>
    <v-layout>
      <v-flex class="center">
        <img v-if="settings.dark" class="logo" src="@/assets/logo.svg"/>
        <img v-else class="logo" src="@/assets/logo-light.svg"/>
        <h1 v-if="settings.dark" class="main-label main-label-dark">{{ $t('basApplication') }}</h1>
        <h1 v-else class="main-label main-label-light">{{ $t('basApplication') }}</h1>
        <p v-if="settings.dark" class="description description-dark">Boot Auswahl Server</p>
        <p v-else class="description description-light">Boot Auswahl Server</p>

        <p v-if="settings.dark" class="description description-dark">{{ $t('welcome') }} {{ user.name }}</p>
        <p v-else class="description description-light">{{ $t('welcome') }} {{ user.name }}</p>
      </v-flex>
    </v-layout>
  </v-container>
</template>

<script>
import { mapState } from 'vuex'

export default {
  name: 'HomeModule',
  data () {
    return {
    }
  },
  computed: {
    ...mapState(['settings', 'user'])
  },
  methods: {
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.logo {
  width: auto;
  height: 280px;
}

.center {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 3%;
}

.main-label {
  font-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  font-font-weight: 600;
  line-height: 1.25;
  font-size: 3rem;
  margin: 1.8rem auto;
}

.main-label-dark {
  color: white;
}

.main-label-light {
  color: #2c3e50;
}

.description {
  max-width: 35rem;
  font-size: 1.6rem;
  line-height: 1.3;
}

.description-dark {
  color: #7b7b7b;
}

.description-light {
  color: #6a8bad;
}
</style>