-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnews.html
More file actions
182 lines (164 loc) · 5.07 KB
/
news.html
File metadata and controls
182 lines (164 loc) · 5.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<!DOCTYPE html>
<html lang="en">
<head>
<link href="https://fonts.googleapis.com/css2?family=Poppins&display=swap" rel="stylesheet">
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Games - News</title>
<link rel="icon" type="image/x-icon" href="Images/fc.png">
<link rel="stylesheet" href="styles.css" />
<style>
body {
background-image: linear-gradient(#cce7f3, #e0f0f8);
color: #2e4057;
margin: 0;
padding: 0;
display: flex;
font-family: 'Poppins', sans-serif;
transition: background-color 0.5s ease, color 0.5s ease; /* Smooth transition for theme change */
}
body.dark-mode {
background-image: linear-gradient(#2c3e50, #34495e); /* Darker background */
color: #ecf0f1; /* Lighter text */
}
.sidebar {
width: 220px;
background-color: #a8d0e6;
padding: 20px;
position: fixed;
top: 0;
left: 0;
height: 100vh;
overflow-y: auto;
box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
transition: background-color 0.5s ease, color 0.5s ease; /* Smooth transition for theme change */
}
.sidebar.dark-mode {
background-color: #2c3e50; /* Darker sidebar */
color: #ecf0f1;
}
.sidebar h2 {
font-size: 20px;
margin-bottom: 10px;
color: #2e4057;
transition: color 0.5s ease; /* Smooth transition for theme change */
}
.sidebar.dark-mode h2{
color: #ecf0f1;
}
.sidebar a {
color: #497f9f;
text-decoration: none;
display: block;
padding: 8px 0;
transition: color 0.3s;
}
.sidebar a:hover {
color: #2e4057;
}
.sidebar.dark-mode a {
color: #95a5a6;
}
.sidebar.dark-mode a:hover {
color: #ecf0f1;
}
.main-content {
margin-left: 240px;
padding: 40px 20px;
flex-grow: 1;
text-align: center;
transition: color 0.5s ease; /* Smooth transition for theme change */
}
.main-content.dark-mode{
color: #ecf0f1;
}
.mode-toggle {
position: fixed; /* Changed to fixed */
bottom: 20px; /* Added bottom positioning */
right: 20px; /* Added right positioning */
background: none;
border: none;
font-size: 24px;
cursor: pointer;
color: #2e4057;
transition: color 0.5s ease;
width: 40px; /* Make it square */
height: 40px;
border-radius: 50%; /* Make it a circle */
display: flex;
align-items: center;
justify-content: center;
}
.mode-toggle:hover {
transform: scale(1.1);
}
.mode-toggle.dark-mode {
color: #ecf0f1;
}
.light-mode {
background: #f0f8ff;
color: #2e4057;
}
.light-mode .sidebar {
background-color: #d0ecf6;
color: #2e4057;
}
.light-mode .sidebar a {
color: #497f9f;
}
.light-mode .sidebar a:hover {
color: #2e4057;
}
</style>
</head>
<body>
<div class="sidebar">
<h2>Navigation</h2>
<a href="index.html">Home</a>
<a href="ec.html">EaglerCraft</a>
<a href="geng.html">General Games</a>
<a href="hfgam.html">Helpful Games</a>
<a href="about.html">About</a>
<a href="news.html">Site News</a>
<a href="SitesIntegration/SR.html">X: Sites Integration</a>
</div>
<div class="main-content">
<button class="mode-toggle" id="themeToggle" aria-label="Toggle theme">🌙</button>
<h1>News hub</h1>
<div class="game-list">
<div class="left-aligned">
<h2>Main News</h2>
<h3>Just to say, this isint a changelog.
This is whats been happening inside of the website,
just so you can imagine what I do to keep this site live. <b>News:</b>
Dont you just love one line of CSS code making everything dyfunctional?
<i><u>More news is coming soon</u></i>
</h3>
</div>
</div>
</div>
<script>
const toggleButton = document.getElementById('themeToggle');
const body = document.body;
const sidebar = document.querySelector('.sidebar');
const mainContent = document.querySelector('.main-content');
const savedTheme = localStorage.getItem('theme');
if (savedTheme === 'dark') {
body.classList.add('dark-mode');
sidebar.classList.add('dark-mode');
mainContent.classList.add('dark-mode');
toggleButton.classList.add('dark-mode');
toggleButton.textContent = '🌞';
}
toggleButton.addEventListener('click', () => {
body.classList.toggle('dark-mode');
sidebar.classList.toggle('dark-mode');
mainContent.classList.toggle('dark-mode');
toggleButton.classList.toggle('dark-mode');
const isDarkMode = body.classList.contains('dark-mode');
localStorage.setItem('theme', isDarkMode ? 'dark' : 'light');
toggleButton.textContent = isDarkMode ? '🌞' : '🌙';
});
</script>
</body>
</html>