99 lines
3.1 KiB
HTML
99 lines
3.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>WikiFlow - Infinite Wikipedia</title>
|
|
<style>
|
|
body {
|
|
font-family: 'Arial', sans-serif;
|
|
background: linear-gradient(135deg, #1e3c72, #2a5298);
|
|
color: white;
|
|
text-align: center;
|
|
margin: 0;
|
|
padding: 0;
|
|
overflow-x: hidden;
|
|
}
|
|
#search-container {
|
|
padding: 20px;
|
|
background: rgba(255, 255, 255, 0.2);
|
|
backdrop-filter: blur(10px);
|
|
border-radius: 15px;
|
|
margin: 20px auto;
|
|
width: 60%;
|
|
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
|
|
}
|
|
#search {
|
|
padding: 10px;
|
|
width: 60%;
|
|
border: none;
|
|
border-radius: 25px;
|
|
outline: none;
|
|
font-size: 16px;
|
|
}
|
|
button {
|
|
background: linear-gradient(90deg, #ff7eb3, #ff758c);
|
|
border: none;
|
|
color: white;
|
|
padding: 10px 20px;
|
|
font-size: 16px;
|
|
border-radius: 25px;
|
|
cursor: pointer;
|
|
transition: 0.3s;
|
|
}
|
|
button:hover {
|
|
box-shadow: 0px 0px 10px rgba(255, 255, 255, 0.6);
|
|
}
|
|
#content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
margin-top: 20px;
|
|
}
|
|
iframe {
|
|
width: 90%;
|
|
height: 600px;
|
|
border-radius: 10px;
|
|
margin-bottom: 20px;
|
|
box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.5);
|
|
}
|
|
#loading-bar {
|
|
height: 5px;
|
|
background: linear-gradient(90deg, #ff7eb3, #ff758c);
|
|
width: 0;
|
|
transition: width 0.5s ease;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="loading-bar"></div>
|
|
<div id="search-container">
|
|
<input type="text" id="search" placeholder="Search Wikipedia">
|
|
<button onclick="searchArticle()">Search</button>
|
|
</div>
|
|
<div id="content"></div>
|
|
<script>
|
|
function searchArticle() {
|
|
document.getElementById('loading-bar').style.width = '80%';
|
|
let searchTerm = document.getElementById('search').value;
|
|
fetch('/search', {
|
|
method: 'POST',
|
|
headers: { 'Content-Type': 'application/json' },
|
|
body: JSON.stringify({ search_term: searchTerm })
|
|
})
|
|
.then(response => response.json())
|
|
.then(data => {
|
|
document.getElementById('content').innerHTML = '';
|
|
data.articles.forEach(article => loadIframe(article.url));
|
|
document.getElementById('loading-bar').style.width = '100%';
|
|
setTimeout(() => document.getElementById('loading-bar').style.width = '0%', 500);
|
|
});
|
|
}
|
|
function loadIframe(url) {
|
|
let iframe = document.createElement('iframe');
|
|
iframe.src = url;
|
|
document.getElementById('content').appendChild(iframe);
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|