-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
248 lines (216 loc) · 7.08 KB
/
index.html
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
183
184
185
186
187
188
189
190
191
192
193
194
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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>true_lock Projects</title>
<link rel="stylesheet" href="styles.css">
<style>
/* Base styles */
:root {
--bg-color: #f5f5f5;
--text-color: #333;
--card-bg: #fff;
--card-shadow: rgba(0, 0, 0, 0.1);
--link-color: #007BFF;
--flag-text-color: #FFD700; /* Gold color for better visibility */
}
[data-theme="dark"] {
--bg-color: #121212;
--text-color: #f5f5f5;
--card-bg: #1e1e1e;
--card-shadow: rgba(255, 255, 255, 0.1);
--link-color: #80b3ff;
--flag-text-color: #FFD700; /* Gold color for better visibility */
}
body {
margin: 0;
font-family: 'Arial', sans-serif;
background-color: var(--bg-color);
color: var(--text-color);
transition: all 0.3s ease;
}
header {
display: flex; /* Use flexbox for layout */
align-items: center; /* Center items vertically */
justify-content: center; /* Center all items horizontally */
padding: 2rem;
background-color: var(--card-bg);
box-shadow: 0px 4px 8px var(--card-shadow);
margin-bottom: 2rem;
}
.header-content {
flex-grow: 1; /* Allow this section to take up remaining space */
text-align: center; /* Center the title */
}
header h1 {
margin-left: 20px; /* Space between flag and title */
font-size: 2.5rem;
}
header p {
font-size: 1.2rem;
color: var(--link-color);
}
.flag-section {
display: flex;
align-items: center;
width: auto; /* Adjust width to fit content */
background-color: var(--card-bg);
padding: 27px; /* Increased padding for a larger field */
border-radius: 10px;
box-shadow: 0px 4px 6px var(--card-shadow);
}
.flag-section img {
width: 95px; /* Flag size */
height: auto;
margin-right: 10px;
}
.flag-section div {
color: var(--flag-text-color); /* Change text color for better visibility */
}
#projects {
max-width: 800px;
margin: 0 auto;
padding: 1rem;
}
#repo-container {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 1.5rem;
}
.repo {
background-color: var(--card-bg);
padding: 1rem;
border-radius: 10px;
box-shadow: 0px 4px 6px var(--card-shadow);
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.repo:hover {
transform: translateY(-5px);
box-shadow: 0px 6px 12px var(--card-shadow);
}
.repo h3 {
margin: 0;
font-size: 1.5rem;
}
.repo a {
color: var(--link-color);
text-decoration: none;
}
.repo p {
margin-top: 0.5rem;
font-size: 1rem;
}
.dark-mode-toggle {
position: fixed;
top: 1rem;
right: 1rem;
background-color: var(--card-bg);
border: none;
color: var(--text-color);
font-size: 1rem;
padding: 0.5rem 1rem;
border-radius: 5px;
cursor: pointer;
box-shadow: 0px 4px 6px var(--card-shadow);
transition: background-color 0.3s ease, color 0.3s ease;
}
.dark-mode-toggle:hover {
background-color :var(--link-color);
color :var(--bg-color);
}
footer {
text-align:center;
padding-top :20px;
margin-top :20px;
border-top :1px solid var(--card-shadow);
font-size :14px;
}
.favourites {
margin-bottom :30px;
text-align:center;
}
.favourites h2 {
font-size :2rem;
}
/* Responsive adjustments */
@media (max-width :600px) {
header h1 { font-size :2rem; }
header p { font-size :1rem; }
.repo h3 { font-size :1.2rem; }
}
</style>
</head>
<body data-theme="dark"> <!-- Set default theme to dark -->
<button class="dark-mode-toggle" onclick="toggleDarkMode()">Toggle Dark Mode</button>
<header>
<div class="flag-section">
<a href="https://truelockmc.github.io/flaggy/" target="_blank"> <!-- Make the flag clickable -->
<img src="https://raw.githubusercontent.com/truelockmc/truelockmc.github.io/refs/heads/main/flaggy/pictures/pictures/de.svg" alt="Germany Flag">
<div>
<h2>Flaggy</h2><br>
<span style="color:#FFD700;">Flagtrainer</span> <!-- Change the color of Flagtrainer -->
</div>
</a>
</div>
<div class="header-content">
<h1>Welcome to my website 😊</h1>
</div>
</header>
<section class="favourites">
<h2>Favourites ⭐</h2>
<p>My Best Projects</p>
<div id="favourite-repos">
<div class="repo">
<h3><a href="https://github.com/truelockmc/PC-Optimus" target="_blank">PCOptimus</a></h3>
<p>A multi-use Python tool for Windows that offers features to clean, debloat, update, repair or get info about your PC.</p>
</div>
<div class="repo">
<h3><a href="https://github.com/truelockmc/python-ransomware" target="_blank">Python Ransomware</a></h3>
<p>A simple ransomware written in Python that also bypasses Microsoft Defender.</p>
</div>
<!-- Neue Repositories hinzufügen -->
<div class="repo">
<h3><a href="https://github.com/truelockmc/shutdown_timer" target="_blank">Shutdown Timer</a></h3>
<p>A little tool that offers ways to perform a timed shutdown on your PC.<br> Useful for when you're listening to a podcast to fall asleep and your computer shouldn't run all night.</p>
</div>
</div>
</section>
<section id="projects">
<h2>My GitHub Repositories</h2>
<div id="repo-container"></div>
</section>
<footer>
<p>View the source code on <a href="https://github.com/truelockmc/truelockmc.github.io/blob/main/index.html" target="_blank">GitHub</a>.</p>
</footer>
<script>
// Dark mode toggle function
function toggleDarkMode() {
const currentTheme = document.documentElement.getAttribute('data-theme');
const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
document.documentElement.setAttribute('data-theme', newTheme);
localStorage.setItem('theme', newTheme);
}
// Apply saved theme on load
document.addEventListener('DOMContentLoaded', () => {
const savedTheme = localStorage.getItem('theme') || 'dark'; // Default to dark mode
document.documentElement.setAttribute('data-theme', savedTheme);
});
// Fetch repos from GitHub
fetch('https://api.github.com/users/truelockmc/repos')
.then(response => response.json())
.then(data => {
const repoContainer = document.getElementById('repo-container');
data.forEach(repo => {
const repoDiv = document.createElement('div');
repoDiv.classList.add('repo');
repoDiv.innerHTML = `
<h3><a href="${repo.html_url}" target="_blank">${repo.name}</a></h3>
<p>${repo.description || 'No description available'}</p>
`;
repoContainer.appendChild(repoDiv);
});
});
</script>
</body>
</html>