-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
95 lines (89 loc) · 2.63 KB
/
index.html
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
{% extends "base.html" %}
{% block title %}Translator{% endblock %}
{% block head %}
{{ super() }}
<style>
.try{
background-color: rgba(48,48,48,0.7);
border: 2px solid rgb(80,80,80);
width: 400px;
height: 450px;
padding: 20px;
text-align: center;
}
.a{
margin: auto;
padding: 10px;
margin-top: 20px;
margin-left: 20px;
background: rgba(44,62,80,0.7);
border: none;
}
select{
background: transparent;
border:none;
font-size: 22px;
text-align: center;
width: 300px;
}
::placeholder{
color: white;
}
textarea{
background: transparent;
border:none;
font-size: 22px;
color: white;
text-align: left;
}
#select{
color:white;
}
#select option{
color:black;
}
.jumbotron{
height: 180px;
}
</style>
{% endblock %}
{% block content %}
<form action="/" method="POST">
<div class="container">
<center>
<div class="try">
<div class="a">
<select class="sel" name="sorc" id="select" required>
<option value="" disabled selected hidden>Enter Source language</option>
{% for i in languages %}
<option value={{i}} name={{i}} id="src">{{i}}</option>
{% endfor %}
</select>
</div>
<div class="a">
<select class="sel" name="dest" id="select" required>
<option value="" disabled selected hidden>Enter Destination language</option>
{% for i in languages %}
<option value={{i}} name={{i}} id="dest">{{i}}</option>
{% endfor %}
</select>
</div>
<div class="a">
<textarea name="text" rows="4" cols="27" placeholder="Enter text to be translated" onfocus="noplaceholder()" onfocusout="setplaceholder()" id="area" required id="text"></textarea>
</div>
<div class="a">
<button type="submit" name="button" class="btn btn-dark">Submit</button>
</div>
</div>
</center>
</div>
</form>
<script type="text/javascript">
function noplaceholder(){
document.getElementById('area').placeholder=' ';
}
function setplaceholder(){
document.getElementById('area').placeholder="Enter text to be translated";
}
</script>
{% endblock %}