-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.html
143 lines (133 loc) · 3.79 KB
/
home.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
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
<!DOCTYPE html>
<html>
<head>
<title>Text Analyzer</title>
{% if dlength %}
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Wordlength', 'Frequency'],
{% for x, y in dlength %}
[{{x}}, {{y}}]{% if not loop.last %},{% endif %}
{% endfor %}
]);
var options = {
title: 'Frequency of Wordlengths',
hAxis: {title: 'Wordlength', titleTextStyle: {color: 'blue'}},
vAxis: {title: 'Frequency', titleTextStyle: {color: 'blue'}}
};
var chart = new google.visualization.ColumnChart(document.getElementById('chart1'));
chart.draw(data, options);
}
</script>
{% endif %}
<style>
#appname {
font-family:"Arial";
line-height: 31px;
font-size: 60px;
position: relative;
top: 60px;
left: 20px;
}
#rectangle1 {
background: #4333ff;
border-radius: 40px;
width: 1230px;
height: 158px;
position: relative;
left: 30px;
}
#submit {
position: relative;
top: 35px;
left: 40px;
height: 50px;
width: 1000px;
}
.btn {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ededed), color-stop(1, #dfdfdf) );
background:-moz-linear-gradient( center top, #ededed 5%, #dfdfdf 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed', endColorstr='#dfdfdf');
background-color:#ededed;
-moz-border-radius:29px;
-webkit-border-radius:29px;
border-radius:29px;
border:1px solid #dcdcdc;
display:inline-block;
color:#777777;
font-family:arial;
font-size:15px;
font-weight:bold;
padding:6px 30px;
text-shadow:1px 2px 9px #ffffff;
}
#file {
font-size: 15px;
font: "Arial";
display:inline-block;
}
#rectangle2 {
background: #ffd72a;
width: 1230px;
height: 1150px;
position: relative;
top: 45px;
left: 30px;
}
table {
border-collapse: collapse;
}
td, th {
padding: 20px;
border-bottom: 1px solid black;
border-right: 1px solid black;
}
</style>
</head>
<body>
<div id="rectangle1">
<h1 id="appname"> Text Analyzer! </h1>
</div>
<div id="submit">
<form method="POST" enctype="multipart/form-data" action="/" id="submitForm">
<input type="file" name="fname" id="file" required/>
<input type="submit" value="Analyze!" class="btn">
</form>
</div>
<div id="rectangle2">
<table>
<tr>
<td>Total Number of Words</td>
<td>{{totalwords}}</td>
</tr>
<tr>
<td>Number of Unique Words</td>
<td>{{uniquewords}}</td>
</tr>
<tr>
<td>Most Frequent Words</td>
<td>{{mostf}}</td>
</td>
<tr>
<td>Least Frequent Words</td>
<td>{{leastf}}</td>
</tr>
<tr>
<td>Generated "Realistic" Text</td>
<td>{{generate}}</td>
</tr>
<tr>
<td>Palindromes</td>
<td>{{palindrome}}</td>
<tr>
<td>Length Frequency Graph</td>
<td id="chart1" style="width: 900px; height: 500px;"></td>
</tr>
</table>
</div>
</body>
</html>