-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdecide.html
More file actions
208 lines (184 loc) · 3.9 KB
/
Copy pathdecide.html
File metadata and controls
208 lines (184 loc) · 3.9 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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<!DOCTYPE html>
<html>
<style>
* {
box-sizing: border-box;
}
body {
font-size: 1.25rem;
font-family: sans-serif;
line-height: 150%;
}
section {
color: #fff;
text-align: center;
}
div {
height: 100%;
}
article {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 100%;
padding: 20px;
}
h1 {
font-size: 2.05rem;
margin: 0 0 0.75rem 0;
color: black;
}
a {
color: black;
font-size: 2.75rem;
text-align: center;
text-decoration: none;
}
.btn-right {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 100%;
padding: 20px;
}
/* Pattern styles */
.container {
display: table;
width: 100%;
}
.left-half {
background: url('./tree.jpg');
position: absolute;
top: 0;
left: 0px;
width: 50%;
}
.right-half {
background: url('./seed.jpg');
position: absolute;
top: 0;
right: 0px;
width: 50%;
}
ul {
font-size: 30px;
font-style: none;
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
}
li {
float: left;
}
li a {
font: Arial;
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 1.05rem;
}
li a:hover {
background-color: #ddd;
}
label {
display: block;
}
.btn {
padding: 8px;
background-color: black;
color: #fff;
font-size: 1.05rem;
text-align: center;
}
.input {
padding: 5px;
text-align: left;
background-color: white;
/* margin-top: 60px;
margin-right: 1px;
margin-bottom: 0px;
margin-left: 10px;*/
font-size: 100%;
font-style: normal;
width: 486px;
height: 35px;
border-right: 1000;
border-right-width: 100px;
border-right-style: initial;
border-right-color: initial;
padding-top: 7px;
}
.input-wrapper {
position: relative;
display: inline-block;
}
.ribbon {
position:absolute;
top:0;
right:0;
}
</style>
<head>
<link rel="icon" href="logo2.png">
</head>
<section class="container">
<div class="left-half">
<ul>
<li><a href="feed.html">Share Your Story</a></li>
<li><a class="active" href="arabic.html">العربية</a></li>
<li><a href="farsi.html">فارسی</a></li>
</ul>
<article>
<h1>Get Information About A Specific Country</h1>
<div class="input-wrapper">
<input class="input" type="text" id="input" onchange="redirect()">
</div>
<button class="btn" onclick="redirect()">Search</button>
</article>
</div>
<div class="right-half">
<a href="index.html">
<img src="./logo22.png" class="ribbon"/>
</a>
<article>
<a href="./questionaire.html">Explore Countries</a>
</article>
<!-- <button class="btn-right" onclick="questionaire()">Explore Countries</button> -->
</div>
</section>
<!-- </body> -->
<script>
function questionaire() {
window.location = "./questionaire.html";
}
function redirect() {
var countries = ['us', 'usa', 'united states', 'united states of america', 'america', 'canada', 'australia', 'au', 'oz' ]
var search = document.getElementById('input').value
console.log(search)
var searchLower = search.toLowerCase()
var us = ['us', 'usa', 'united states', 'united states of america', 'america']
var au = ['au', 'oz', 'australia', 'the land down under']
var canda = ['canada', 'ca']
if (us.includes(searchLower)) {
window.location = "./usa.html";
}
else if (au.includes(searchLower)) {
window.location = "./au.html";
}
else if (canda.includes(searchLower)) {
window.location = "./canada.html";
}
else if (countries.includes(searchLower)){
window.location = 'https://www.google.com/search?source=hp&ei=gJlAWv-LGaeU0gLAkZjwAw&q='+search+'&oq='+search+'&gs_l=psy-ab.3..0l3j0i131k1j0l3j0i131k1l2j0i3k1.748.1282.0.1495.7.6.0.0.0.0.99.468.5.6.0....0...1c.1.64.psy-ab..1.5.467.0...80.rbvwlaej2Cg';
return true
} else{
alert('That country has not been added to our list yet, stay tuned!');
}
}
</script>
</html>