RWTHHeader.vue 1.66 KB
Newer Older
Marcel Nellesen's avatar
Marcel Nellesen committed
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
<template>    
  <header id="header">
    <nav id="nav-global" class="navbar rwth-black navbar-dark navbar-expand-md">
      <div class="app-header-container">
        <div id="DeltaSiteLogo">
          <a id="ctl00_onetidProjectPropertyTitleGraphic" title="Team Site" class="ms-siteicon-a" href="/">
            <img id="ctl00_onetidHeadbnnr2" class="ms-siteicon-img" name="onetidHeadbnnr0" :src="rwthImage" alt="RWTH Aachen University" data-themekey="#">
          </a>
        </div>      
      </div>                        
      <div id="DeltaCoScInESiteLogo">
        <a id="ctl00_SPSimpleSiteLink1" title="Team Site" class="ms-siteicon-a coscineSiteIcon" href="/">
          <img id="ctl00_SiteLogoImage1" class="ms-siteicon-img" name="onetidHeadbnnr0" :src="coscineImageBlack" alt="Coscine" data-themekey="#">
        </a>
        <span class="coscineSiteIconLabel">CoScInE</span>        
      </div>
      <ul id="nav-langsearch" class="navbar-nav ml-auto">
        <li id="langToggle" class="next-lang" tabindex="0" aria-label="toggle language">
          <a class="nav-link lang" href="#" id="Lang" v-on:click="changeLocale()">
            <span id="langBox" class="language-box">{{ $t('otherLocale') }}</span>
          </a>
        </li>
      </ul>
    </nav>
  </header>
</template>

<script lang="ts">
import Vue from 'vue';

export default Vue.extend({
  name: 'rwthHeader',
  props: {
      rwthImage: String,
      coscineImageBlack: String,
  },
  methods: {
    changeLocale() {
      if (this.$root.$i18n.locale === 'en') {
        this.$root.$i18n.locale = 'de';
      } else {
        this.$root.$i18n.locale = 'en';
      }
    },
  },
});
</script>

<style scoped></style>