-
Notifications
You must be signed in to change notification settings - Fork 11
/
App.vue
169 lines (162 loc) · 6.7 KB
/
App.vue
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<template>
<div id="app">
<Modal></Modal>
<nav class="navbar navbar-default navbar-fixed-top navbar-inner">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-navbar-collapse" aria-expanded="false">
<span class="sr-only">{{ $t("action.toggleNavbar") }}</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<router-link class="navbar-brand" to="/">{{ $t("info.title") }}</router-link>
</div>
<div class="collapse navbar-collapse" id="bs-navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="https://www.youtube.com/channel/UCa9Y57gfeY0Zro_noHRVrnw?sub_confirm=1" target="_blank"><img src="resources/youtube_pink3.png" height="18" style="vertical-align:middle"/> {{$t("info.yt_channel")}}</a></li>
<li><a href="https://twitter.com/himemoriluna" target="_blank"><img src="resources/twitter_pink.png" height="18" style="vertical-align:middle"/> {{$t("info.twitter")}}</a></li>
<li><a href="https://discord.gg/bXJ5fgm" target="_blank"><img src="resources/discord_pink.png" height="18" style="vertical-align:middle"/> {{$t("info.discord")}}</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{$t("info.lang")}} <country-flag :country=changeFlag size='small'/> {{$t("lang." + currentLang)}} <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="javascript:;" @click="chlang('en-US')"><country-flag country="us" size='small'/> {{$t("lang.en-US")}}</a></li>
<li><a href="javascript:;" @click="chlang('zh-TW')"><country-flag country="tw" size='small'/> {{$t("lang.zh-TW")}}</a></li>
<li><a href="javascript:;" @click="chlang('ja-JP')"><country-flag country="jp" size='small'/> {{$t("lang.ja-JP")}}</a></li>
<li><a href="javascript:;" @click="chlang('ms-MY')"><country-flag country="my" size='small'/> {{$t("lang.ms-MY")}}</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<div class="container-fluid main-content">
<router-view></router-view>
</div>
<footer class="footer">
<div class="container-fluid footer-content">
<div class="pull-right">
<div class="text-right"><a href="https://github.com/monoai/luna-button" target="_blank">{{$t("info.toGithub")}} <img src="https://img.shields.io/github/stars/monoai/luna-button.svg?style=social"/></a></div>
<div class="text-right">{{$t("info.notOfficial")}}</div>
</div>
<div>{{$t("info.tlHelpers")}}</div>
<!--<div><p>Me testing out something</p></div>-->
<div><a href="https://twitter.com/monoAI_" target="_blank" @click="linkClick"><span style="color: #000000">mono</span><span style="color: #FF0000">AI</span></a> 2020. <span style="color: rgba(0, 0, 0, 0.5)">Credits to zyzsdy for his <a href="https://aquaminato.moe/" target="_blank">Aqua Button.</a></span></div>
</div>
</footer>
</div>
</template>
<style lang="scss">
@import "../node_modules/bootstrap/dist/css/bootstrap.css";
@import url('https://fonts.googleapis.com/css2?family=Mina&family=Open+Sans:wght@600&family=PT+Sans&family=Source+Sans+Pro&family=M+PLUS+Rounded+1c:wght@700&display=swap');
body{
padding-top: 70px;
background-image: url('/resources/body_bg.png');
font-family: 'Open Sans', sans-serif;
}
.navbar-brand {
font-family: 'M PLUS Rounded 1c', sans-serif;
}
.nav.navbar-nav li a, .navbar-default .navbar-brand{
color: white;
text-shadow: -1px 1px 0 #000,
1px 1px 0 #000,
1px -1px 0 #000,
-1px -1px 0 #000;
}
.navbar-default .navbar-brand:hover{
color: #f2a8cd;
}
.navbar-default .navbar-brand:focus{
color: #c8b1e5;
}
.nav.navbar-nav li a:hover{
color: #f2a8cd;
}
.nav.navbar-nav li a:active,
.nav.navbar-nav li a:focus,
.nav.navbar-nav.navbar-right li a:focus{
color: #c8b1e5;
}
.nav a:hover{
border-bottom: 2px solid #998ede;
}
.navbar {
min-height: 55px;
}
.navbar-inner{
background-size: contain;
background-image: url('/resources/navbar_bg.png');
background-repeat: repeat-x;
border-bottom: 3px solid #998ede;
}
.main-content{
min-height: 100vh;
}
.footer {
width: 100%;
height: auto;
background-color: #fecfdf;
border-top: 3px solid #fdb3d8;
}
.footer-content {
padding-top: 10px;
color: #666;
}
.text-right{
text-align: right;
}
</style>
<script>
import Vue from 'vue'
import Component from 'vue-class-component'
import Modal from './components/modal.vue'
import CountryFlag from 'vue-country-flag'
//import fetchpost from './util/fetchpost'
@Component({
components:{
Modal,
CountryFlag
}
})
class App extends Vue {
get currentLang(){
return this.$i18n.locale;
}
get changeFlag(){
if(this.currentLang == 'en-US') {
return 'us';
} else if (this.currentLang == 'ja-JP'){
return 'jp';
} else if (this.currentLang == 'zh-TW'){
return 'tw';
} else if (this.currentLang == 'ms-MY'){
return 'my';
} else {
return 'ph';
}
}
created(){
//eslint-disable-next-line
console.log("Nanora!");
this.$i18n.locale = localStorage.getItem("lang") || this.$i18n.locale;
}
chlang(v){
this.$i18n.locale = v;
localStorage.setItem("lang", v);
}
linkClick(){
// NOTE: Consider using Vuex instead of an event bus.
this.$gConst.globalbus.$emit('play', {
src: "voices/GR_OniiChan.mp3",
})
//eslint-disable-next-line
console.log("Thank you too ルーナ姫 for being an inspiration. I would've not done this without your smile and joy inspiring me every stream!");
//eslint-disable-next-line
console.log("ルーナちゃんありがちゅ!");
}
}
export default App;
</script>