ChBysk commited on
Commit
9b5ae14
·
verified ·
1 Parent(s): bb58f49

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +57 -19
index.html CHANGED
@@ -1,19 +1,57 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>News Portal - Article</title>
7
+ <style>
8
+ body { font-family: 'Segoe UI', sans-serif; line-height: 1.6; margin: 0; background: #f4f4f4; color: #333; }
9
+ .container { max-width: 800px; margin: 40px auto; background: #fff; padding: 40px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
10
+ header { border-bottom: 2px solid #eee; margin-bottom: 20px; padding-bottom: 10px; }
11
+ h1 { margin: 0; color: #222; }
12
+
13
+ /* Navigation Styles */
14
+ .nav-buttons { display: flex; justify-content: space-between; margin-top: 40px; padding-top: 20px; border-top: 2px solid #eee; }
15
+ .btn { padding: 12px 24px; background: #007bff; color: white; text-decoration: none; border-radius: 5px; font-weight: bold; transition: 0.3s; border: none; cursor: pointer; }
16
+ .btn:hover { background: #0056b3; }
17
+ .btn:disabled { background: #ccc; cursor: not-allowed; }
18
+ </style>
19
+ </head>
20
+ <body>
21
+
22
+ <div class="container">
23
+ <header>
24
+ <small>News Article</small>
25
+ <h1>Article Title Here</h1>
26
+ </header>
27
+
28
+ <div class="nav-buttons">
29
+ <button id="prevBtn" class="btn" onclick="navigate(-1)">← Previous</button>
30
+ <button id="nextBtn" class="btn" onclick="navigate(1)">Next →</button>
31
+ </div>
32
+ </div>
33
+
34
+ <script>
35
+ // Configuration
36
+ const totalArticles = 20;
37
+
38
+ // Get current article number from filename (e.g., "1.html" -> 1)
39
+ const currentPath = window.location.pathname;
40
+ const filename = currentPath.substring(currentPath.lastIndexOf('/') + 1);
41
+ const currentNum = parseInt(filename.split('.')[0]) || 1;
42
+
43
+ // Handle button visibility
44
+ if (currentNum <= 1) document.getElementById('prevBtn').disabled = true;
45
+ if (currentNum >= totalArticles) document.getElementById('nextBtn').disabled = true;
46
+
47
+ function navigate(direction) {
48
+ const targetNum = currentNum + direction;
49
+ if (targetNum >= 1 && targetNum <= totalArticles) {
50
+ // Adjust the path below if your files are in a different folder
51
+ window.location.href = targetNum + ".html";
52
+ }
53
+ }
54
+ </script>
55
+
56
+ </body>
57
+ </html>