Spaces:
Sleeping
Sleeping
Update templates/result.html
Browse files- templates/result.html +38 -298
templates/result.html
CHANGED
|
@@ -3,306 +3,46 @@
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>
|
| 7 |
-
<
|
| 8 |
-
:root {
|
| 9 |
-
--navy-blue: #1a237e;
|
| 10 |
-
--light-navy: #283593;
|
| 11 |
-
--accent-blue: #3949ab;
|
| 12 |
-
--light-bg: #f5f7ff;
|
| 13 |
-
--card-bg: #ffffff;
|
| 14 |
-
--text-dark: #212121;
|
| 15 |
-
--text-light: #757575;
|
| 16 |
-
--border-color: #e0e0e0;
|
| 17 |
-
}
|
| 18 |
-
|
| 19 |
-
* {
|
| 20 |
-
margin: 0;
|
| 21 |
-
padding: 0;
|
| 22 |
-
box-sizing: border-box;
|
| 23 |
-
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
| 24 |
-
}
|
| 25 |
-
|
| 26 |
-
body {
|
| 27 |
-
background-color: var(--light-bg);
|
| 28 |
-
color: var(--text-dark);
|
| 29 |
-
line-height: 1.6;
|
| 30 |
-
padding: 20px;
|
| 31 |
-
}
|
| 32 |
-
|
| 33 |
-
.container {
|
| 34 |
-
max-width: 1200px;
|
| 35 |
-
margin: 0 auto;
|
| 36 |
-
}
|
| 37 |
-
|
| 38 |
-
header {
|
| 39 |
-
text-align: center;
|
| 40 |
-
margin-bottom: 40px;
|
| 41 |
-
padding: 20px 0;
|
| 42 |
-
border-bottom: 1px solid var(--border-color);
|
| 43 |
-
}
|
| 44 |
-
|
| 45 |
-
h1 {
|
| 46 |
-
color: var(--navy-blue);
|
| 47 |
-
font-size: 2.5rem;
|
| 48 |
-
margin-bottom: 10px;
|
| 49 |
-
}
|
| 50 |
-
|
| 51 |
-
.subtitle {
|
| 52 |
-
color: var(--text-light);
|
| 53 |
-
font-size: 1.1rem;
|
| 54 |
-
}
|
| 55 |
-
|
| 56 |
-
.stats-bar {
|
| 57 |
-
display: flex;
|
| 58 |
-
justify-content: space-between;
|
| 59 |
-
background-color: var(--navy-blue);
|
| 60 |
-
color: white;
|
| 61 |
-
padding: 15px 20px;
|
| 62 |
-
border-radius: 8px;
|
| 63 |
-
margin-bottom: 30px;
|
| 64 |
-
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
| 65 |
-
}
|
| 66 |
-
|
| 67 |
-
.stats-item {
|
| 68 |
-
text-align: center;
|
| 69 |
-
}
|
| 70 |
-
|
| 71 |
-
.stats-value {
|
| 72 |
-
font-size: 1.8rem;
|
| 73 |
-
font-weight: bold;
|
| 74 |
-
}
|
| 75 |
-
|
| 76 |
-
.stats-label {
|
| 77 |
-
font-size: 0.9rem;
|
| 78 |
-
opacity: 0.8;
|
| 79 |
-
}
|
| 80 |
-
|
| 81 |
-
.results-container {
|
| 82 |
-
display: grid;
|
| 83 |
-
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
| 84 |
-
gap: 20px;
|
| 85 |
-
margin-bottom: 40px;
|
| 86 |
-
}
|
| 87 |
-
|
| 88 |
-
.result-card {
|
| 89 |
-
background-color: var(--card-bg);
|
| 90 |
-
border-radius: 10px;
|
| 91 |
-
padding: 20px;
|
| 92 |
-
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
|
| 93 |
-
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
| 94 |
-
border-left: 4px solid var(--accent-blue);
|
| 95 |
-
}
|
| 96 |
-
|
| 97 |
-
.result-card:hover {
|
| 98 |
-
transform: translateY(-5px);
|
| 99 |
-
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
|
| 100 |
-
}
|
| 101 |
-
|
| 102 |
-
.card-header {
|
| 103 |
-
display: flex;
|
| 104 |
-
justify-content: space-between;
|
| 105 |
-
align-items: center;
|
| 106 |
-
margin-bottom: 15px;
|
| 107 |
-
}
|
| 108 |
-
|
| 109 |
-
.card-index {
|
| 110 |
-
background-color: var(--light-navy);
|
| 111 |
-
color: white;
|
| 112 |
-
width: 30px;
|
| 113 |
-
height: 30px;
|
| 114 |
-
border-radius: 50%;
|
| 115 |
-
display: flex;
|
| 116 |
-
align-items: center;
|
| 117 |
-
justify-content: center;
|
| 118 |
-
font-weight: bold;
|
| 119 |
-
}
|
| 120 |
-
|
| 121 |
-
.card-title {
|
| 122 |
-
font-size: 1.2rem;
|
| 123 |
-
color: var(--navy-blue);
|
| 124 |
-
margin-bottom: 10px;
|
| 125 |
-
line-height: 1.4;
|
| 126 |
-
}
|
| 127 |
-
|
| 128 |
-
.card-meta {
|
| 129 |
-
display: flex;
|
| 130 |
-
justify-content: space-between;
|
| 131 |
-
font-size: 0.85rem;
|
| 132 |
-
color: var(--text-light);
|
| 133 |
-
margin-top: 15px;
|
| 134 |
-
padding-top: 10px;
|
| 135 |
-
border-top: 1px solid var(--border-color);
|
| 136 |
-
}
|
| 137 |
-
|
| 138 |
-
.actions {
|
| 139 |
-
display: flex;
|
| 140 |
-
justify-content: center;
|
| 141 |
-
gap: 15px;
|
| 142 |
-
margin-top: 30px;
|
| 143 |
-
}
|
| 144 |
-
|
| 145 |
-
.btn {
|
| 146 |
-
padding: 12px 25px;
|
| 147 |
-
border: none;
|
| 148 |
-
border-radius: 6px;
|
| 149 |
-
font-weight: 600;
|
| 150 |
-
cursor: pointer;
|
| 151 |
-
transition: all 0.3s ease;
|
| 152 |
-
}
|
| 153 |
-
|
| 154 |
-
.btn-primary {
|
| 155 |
-
background-color: var(--navy-blue);
|
| 156 |
-
color: white;
|
| 157 |
-
}
|
| 158 |
-
|
| 159 |
-
.btn-primary:hover {
|
| 160 |
-
background-color: var(--light-navy);
|
| 161 |
-
}
|
| 162 |
-
|
| 163 |
-
.btn-secondary {
|
| 164 |
-
background-color: transparent;
|
| 165 |
-
color: var(--navy-blue);
|
| 166 |
-
border: 1px solid var(--navy-blue);
|
| 167 |
-
}
|
| 168 |
-
|
| 169 |
-
.btn-secondary:hover {
|
| 170 |
-
background-color: rgba(26, 35, 126, 0.1);
|
| 171 |
-
}
|
| 172 |
-
|
| 173 |
-
footer {
|
| 174 |
-
text-align: center;
|
| 175 |
-
margin-top: 50px;
|
| 176 |
-
padding: 20px 0;
|
| 177 |
-
color: var(--text-light);
|
| 178 |
-
font-size: 0.9rem;
|
| 179 |
-
border-top: 1px solid var(--border-color);
|
| 180 |
-
}
|
| 181 |
-
|
| 182 |
-
@media (max-width: 768px) {
|
| 183 |
-
.results-container {
|
| 184 |
-
grid-template-columns: 1fr;
|
| 185 |
-
}
|
| 186 |
-
|
| 187 |
-
.stats-bar {
|
| 188 |
-
flex-direction: column;
|
| 189 |
-
gap: 15px;
|
| 190 |
-
}
|
| 191 |
-
}
|
| 192 |
-
</style>
|
| 193 |
</head>
|
| 194 |
-
<body>
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
</div>
|
| 224 |
-
|
| 225 |
-
<footer>
|
| 226 |
-
<p>Web Scraping Tool © 2023 | All rights reserved</p>
|
| 227 |
-
</footer>
|
| 228 |
</div>
|
| 229 |
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
"10 Tips for Improving Your Website's SEO Performance",
|
| 237 |
-
"The Impact of Climate Change on Global Agriculture",
|
| 238 |
-
"Machine Learning Algorithms Every Developer Should Know",
|
| 239 |
-
"Cybersecurity Best Practices for Small Businesses",
|
| 240 |
-
"The Rise of Remote Work: Challenges and Opportunities",
|
| 241 |
-
"Sustainable Energy Solutions for Urban Environments",
|
| 242 |
-
"Data Visualization Techniques for Better Business Insights",
|
| 243 |
-
"The Psychology of User Experience Design",
|
| 244 |
-
"Cloud Computing: Benefits and Implementation Strategies",
|
| 245 |
-
"Digital Marketing Trends That Will Dominate 2024",
|
| 246 |
-
"The Ethics of AI: Balancing Innovation and Responsibility",
|
| 247 |
-
"Mobile App Development: Native vs Hybrid Approaches",
|
| 248 |
-
"Internet of Things: Connecting Our World Smarter",
|
| 249 |
-
"The Evolution of Programming Languages",
|
| 250 |
-
"Big Data Analytics: Transforming Business Intelligence",
|
| 251 |
-
"Virtual Reality and Its Applications Beyond Gaming",
|
| 252 |
-
"The Importance of Digital Literacy in Modern Education",
|
| 253 |
-
"5G Technology: What It Means for Connectivity",
|
| 254 |
-
"Automation in Manufacturing: Industry 4.0 Revolution",
|
| 255 |
-
"The Role of Chatbots in Customer Service",
|
| 256 |
-
"Privacy Concerns in the Age of Social Media"
|
| 257 |
-
];
|
| 258 |
-
|
| 259 |
-
// Function to render the results
|
| 260 |
-
function renderResults() {
|
| 261 |
-
const container = document.getElementById('results-container');
|
| 262 |
-
container.innerHTML = '';
|
| 263 |
-
|
| 264 |
-
scrapedTitles.forEach((title, index) => {
|
| 265 |
-
const card = document.createElement('div');
|
| 266 |
-
card.className = 'result-card';
|
| 267 |
-
|
| 268 |
-
// Generate a random word count for demonstration
|
| 269 |
-
const wordCount = Math.floor(Math.random() * 200) + 50;
|
| 270 |
-
|
| 271 |
-
// Generate a random date for demonstration
|
| 272 |
-
const randomDate = new Date();
|
| 273 |
-
randomDate.setDate(randomDate.getDate() - Math.floor(Math.random() * 30));
|
| 274 |
-
|
| 275 |
-
card.innerHTML = `
|
| 276 |
-
<div class="card-header">
|
| 277 |
-
<div class="card-index">${index + 1}</div>
|
| 278 |
-
</div>
|
| 279 |
-
<div class="card-title">${title}</div>
|
| 280 |
-
<div class="card-meta">
|
| 281 |
-
<span>${wordCount} words</span>
|
| 282 |
-
<span>${randomDate.toLocaleDateString()}</span>
|
| 283 |
-
</div>
|
| 284 |
-
`;
|
| 285 |
-
|
| 286 |
-
container.appendChild(card);
|
| 287 |
-
});
|
| 288 |
-
|
| 289 |
-
// Update the total results count
|
| 290 |
-
document.getElementById('total-results').textContent = scrapedTitles.length;
|
| 291 |
-
}
|
| 292 |
-
|
| 293 |
-
// Initialize the page
|
| 294 |
-
document.addEventListener('DOMContentLoaded', function() {
|
| 295 |
-
renderResults();
|
| 296 |
-
|
| 297 |
-
// Add event listeners for buttons
|
| 298 |
-
document.getElementById('export-btn').addEventListener('click', function() {
|
| 299 |
-
alert('Export functionality would be implemented here!');
|
| 300 |
-
});
|
| 301 |
-
|
| 302 |
-
document.getElementById('new-scrape-btn').addEventListener('click', function() {
|
| 303 |
-
alert('New scraping job functionality would be implemented here!');
|
| 304 |
-
});
|
| 305 |
-
});
|
| 306 |
-
</script>
|
| 307 |
</body>
|
| 308 |
-
</html>
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Scraped Results</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
</head>
|
| 9 |
+
<body class="bg-gradient-to-br from-gray-900 via-gray-800 to-gray-900 min-h-screen flex items-center justify-center font-[Poppins] text-white relative">
|
| 10 |
+
|
| 11 |
+
<!-- Glassy Card -->
|
| 12 |
+
<div class="w-full max-w-3xl bg-gray-800/70 backdrop-blur-md rounded-2xl shadow-2xl p-8 border border-gray-700">
|
| 13 |
+
|
| 14 |
+
<!-- Header -->
|
| 15 |
+
<h1 class="text-center text-3xl font-bold text-cyan-400 mb-6 tracking-wide">
|
| 16 |
+
Scraped Titles
|
| 17 |
+
</h1>
|
| 18 |
+
|
| 19 |
+
<!-- List -->
|
| 20 |
+
{% if titles %}
|
| 21 |
+
<ul class="space-y-3 text-lg text-gray-300">
|
| 22 |
+
{% for title in titles %}
|
| 23 |
+
<li class="bg-gray-900/70 px-4 py-3 rounded-lg border border-gray-700 hover:border-cyan-400 transition-all duration-300">
|
| 24 |
+
{{ title }}
|
| 25 |
+
</li>
|
| 26 |
+
{% endfor %}
|
| 27 |
+
</ul>
|
| 28 |
+
{% else %}
|
| 29 |
+
<p class="text-center text-gray-400 text-lg mt-4">No titles found.</p>
|
| 30 |
+
{% endif %}
|
| 31 |
+
|
| 32 |
+
<!-- Button -->
|
| 33 |
+
<div class="text-center mt-8">
|
| 34 |
+
<a href="{{ url_for('home') }}"
|
| 35 |
+
class="inline-block py-3 px-8 bg-cyan-500 hover:bg-cyan-600 text-white font-semibold rounded-lg shadow-lg transition-all duration-300 ease-in-out">
|
| 36 |
+
← Back to Home
|
| 37 |
+
</a>
|
| 38 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
</div>
|
| 40 |
|
| 41 |
+
<!-- Background animation -->
|
| 42 |
+
<div class="absolute top-0 left-0 w-full h-full -z-10">
|
| 43 |
+
<div class="absolute w-72 h-72 bg-cyan-500/30 rounded-full blur-3xl top-20 left-10 animate-pulse"></div>
|
| 44 |
+
<div class="absolute w-96 h-96 bg-blue-600/20 rounded-full blur-3xl bottom-10 right-10 animate-ping"></div>
|
| 45 |
+
</div>
|
| 46 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
</body>
|
| 48 |
+
</html>
|