Vargock
Added better CSS visuals
efb595a
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Text Summarizer</title>
<style>
/* Reset some defaults */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: #f5f7fa;
color: #333;
display: flex;
flex-direction: column;
align-items: center;
padding: 40px 20px;
}
h1 {
color: #5c3c92;
margin-bottom: 30px;
font-size: 2.5rem;
text-align: center;
}
form {
width: 100%;
max-width: 800px;
display: flex;
flex-direction: column;
}
textarea {
width: 100%;
min-height: 200px;
padding: 15px;
border: 1px solid #ccc;
border-radius: 10px;
font-size: 1rem;
resize: vertical;
transition: border 0.3s;
}
textarea:focus {
border-color: #5c3c92;
outline: none;
}
input[type="submit"] {
margin-top: 20px;
padding: 15px 25px;
font-size: 1.1rem;
background: linear-gradient(90deg, #5c3c92, #8f5de8);
color: white;
border: none;
border-radius: 10px;
cursor: pointer;
transition: background 0.3s, transform 0.2s;
}
input[type="submit"]:hover {
background: linear-gradient(90deg, #8f5de8, #5c3c92);
transform: scale(1.05);
}
.summary {
width: 100%;
max-width: 800px;
background: white;
border-radius: 10px;
padding: 25px;
margin-top: 30px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.summary h3 {
margin-bottom: 15px;
color: #5c3c92;
}
.summary p {
line-height: 1.6;
font-size: 1.1rem;
}
</style>
</head>
<body>
<h1>Text Summarizer</h1>
<form method="POST">
<textarea name="text" placeholder="Paste your text here">{{ text }}</textarea>
<input type="submit" value="Summarize">
</form>
{% if summary %}
<div class="summary">
<h3>Summary:</h3>
<p>{{ summary }}</p>
</div>
{% endif %}
</body>
</html>