Update index.html
Browse files- index.html +101 -19
index.html
CHANGED
|
@@ -1,19 +1,101 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Crawler Test - Infinite Loop</title>
|
| 7 |
+
<style>
|
| 8 |
+
body {
|
| 9 |
+
font-family: Arial, sans-serif;
|
| 10 |
+
margin: 0;
|
| 11 |
+
padding: 20px;
|
| 12 |
+
background: #f0f0f0;
|
| 13 |
+
}
|
| 14 |
+
.page {
|
| 15 |
+
max-width: 800px;
|
| 16 |
+
margin: 0 auto;
|
| 17 |
+
background: white;
|
| 18 |
+
padding: 20px;
|
| 19 |
+
border-radius: 8px;
|
| 20 |
+
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
| 21 |
+
}
|
| 22 |
+
.navigation {
|
| 23 |
+
margin-top: 20px;
|
| 24 |
+
padding: 10px;
|
| 25 |
+
background: #f8f8f8;
|
| 26 |
+
border-radius: 4px;
|
| 27 |
+
}
|
| 28 |
+
a {
|
| 29 |
+
color: #0066cc;
|
| 30 |
+
text-decoration: none;
|
| 31 |
+
padding: 5px 10px;
|
| 32 |
+
margin-right: 10px;
|
| 33 |
+
border: 1px solid #0066cc;
|
| 34 |
+
border-radius: 4px;
|
| 35 |
+
display: inline-block;
|
| 36 |
+
}
|
| 37 |
+
a:hover {
|
| 38 |
+
background: #0066cc;
|
| 39 |
+
color: white;
|
| 40 |
+
}
|
| 41 |
+
</style>
|
| 42 |
+
</head>
|
| 43 |
+
<body>
|
| 44 |
+
<div id="content"></div>
|
| 45 |
+
|
| 46 |
+
<script>
|
| 47 |
+
// Define page contents
|
| 48 |
+
const pages = {
|
| 49 |
+
'home': {
|
| 50 |
+
title: 'Home Page',
|
| 51 |
+
content: '<p>Welcome to the crawler test page.</p>',
|
| 52 |
+
links: [
|
| 53 |
+
{ text: 'Go to Loop 1', href: '?page=loop1' },
|
| 54 |
+
]
|
| 55 |
+
},
|
| 56 |
+
'loop1': {
|
| 57 |
+
title: 'Loop Page 1',
|
| 58 |
+
content: '<p>This is loop page 1.</p>',
|
| 59 |
+
links: [
|
| 60 |
+
{ text: 'Back to Home', href: '?page=home' },
|
| 61 |
+
{ text: 'Go to Loop 2', href: '?page=loop2' },
|
| 62 |
+
]
|
| 63 |
+
},
|
| 64 |
+
'loop2': {
|
| 65 |
+
title: 'Loop Page 2',
|
| 66 |
+
content: `
|
| 67 |
+
<p>This is loop page 2 with some dummy text.</p>
|
| 68 |
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
| 69 |
+
Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
|
| 70 |
+
<p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
|
| 71 |
+
nisi ut aliquip ex ea commodo consequat.</p>
|
| 72 |
+
`,
|
| 73 |
+
links: [
|
| 74 |
+
{ text: 'Back to Loop 1', href: '?page=loop1' },
|
| 75 |
+
{ text: 'Back to Home', href: '?page=home' },
|
| 76 |
+
]
|
| 77 |
+
}
|
| 78 |
+
};
|
| 79 |
+
|
| 80 |
+
// Get current page from URL params
|
| 81 |
+
const urlParams = new URLSearchParams(window.location.search);
|
| 82 |
+
const currentPage = urlParams.get('page') || 'home';
|
| 83 |
+
|
| 84 |
+
// Render page content
|
| 85 |
+
const content = document.getElementById('content');
|
| 86 |
+
const page = pages[currentPage] || pages['home'];
|
| 87 |
+
|
| 88 |
+
content.innerHTML = `
|
| 89 |
+
<div class="page">
|
| 90 |
+
<h1>${page.title}</h1>
|
| 91 |
+
${page.content}
|
| 92 |
+
<div class="navigation">
|
| 93 |
+
${page.links.map(link =>
|
| 94 |
+
`<a href="${link.href}">${link.text}</a>`
|
| 95 |
+
).join('')}
|
| 96 |
+
</div>
|
| 97 |
+
</div>
|
| 98 |
+
`;
|
| 99 |
+
</script>
|
| 100 |
+
</body>
|
| 101 |
+
</html>
|