-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcreateType.html
More file actions
147 lines (130 loc) · 3.7 KB
/
createType.html
File metadata and controls
147 lines (130 loc) · 3.7 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<script src="./js/vue.min.js"></script>
<script src="./js/jquery-3.2.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="./css/reset.css">
<link rel="stylesheet" type="text/css" href="./css/bootstrap.min.css">
</head>
<style type="text/css">
body {
background: #ffffff;
}
.xiaoshuo {
cursor: pointer;
}
.first {
margin-top: 50px;
text-align: center;
}
.first .singleChoice {
width: 220px;
height: 44px;
line-height: 44px;
background: #31AEFF;
border-radius: 200px;
margin: 0 auto;
margin-top: 20px;
font-family: Bio Sans;
font-size: 16px;
text-align: center;
color: #FFFFFF;
}
.second {
margin-top: 30px;
width: 100%;
height: 12px;
background: #F6F6F6;
}
.third {
margin-top: 50px;
text-align: center;
}
.third .multipleChoice {
width: 220px;
height: 44px;
line-height: 44px;
background: #31AEFF;
border-radius: 200px;
margin: 0 auto;
margin-top: 20px;
font-family: Bio Sans;
font-size: 16px;
text-align: center;
color: #FFFFFF;
}
.xiaoshuo {
cursor: pointer;
}
[v-cloak] {
display: none;
}
</style>
<body>
<div id="app" v-cloak>
<div class="first xiaoshuo" @click="clickItem('singleChoice')">
<img src="./images/singleChoice.png" />
<p class="singleChoice">{{curLangule['key']}}</p>
</div>
<div class="second">
</div>
<div class="third xiaoshuo" @click="clickItem('multipleChoice')">
<img src="./images/multipleChoice.png" />
<p class="multipleChoice">{{curLangule['key1']}}</p>
</div>
<div style="height:30px"></div>
</div>
</body>
<script>
var app = new Vue({
el: '#app',
data: {
zh: {
title: '创建投票',
key: '单选',
key1: '多选'
},
en: {
title: 'Create a voting',
key: 'Single Choice',
key1: 'Multiple Choice'
},
curLangule: {},
toastText: "",
toastShow: false,
},
methods: {
clickItem(voteType) {
location.href = "./createVote.html?voteType=" + voteType;
},
getLanugle: function() {
this.curLangule = this.en;
this.curLanguleKey = 'en';
var JsSrc = (navigator.language || navigator.browserLanguage).toLowerCase();
if (JsSrc.indexOf('zh') >= 0) {
// 假如浏览器语言是中文
this.curLanguleKey = 'zh';
this.curLangule = this.zh;
} else if (JsSrc.indexOf('en') >= 0) {
this.curLangule = this.en;
this.curLanguleKey = 'en';
} else {
// 假如浏览器语言是其它语言
this.curLangule = this.en;
this.curLanguleKey = 'en';
}
}
},
created: function() {
},
mounted() {
this.getLanugle();
document.title = this.curLangule["title"];
}
});
</script>
</html>