-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
133 lines (116 loc) · 3.64 KB
/
index.html
File metadata and controls
133 lines (116 loc) · 3.64 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
<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Alet Kutusu</title>
<style>
:root {
color-scheme: light dark;
}
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 30px;
background-color: var(--bg);
color: var(--text);
transition: background 0.3s, color 0.3s;
}
h1 {
text-align: center;
font-size: 2.5rem;
margin-bottom: 30px;
}
nav {
display: flex;
flex-wrap: wrap;
gap: 12px;
justify-content: center;
margin-bottom: 30px;
}
nav button {
padding: 12px 18px;
background-color: var(--btn-bg);
color: var(--btn-text);
border: none;
border-radius: 6px;
cursor: pointer;
transition: background 0.3s, transform 0.2s;
font-size: 1rem;
}
nav button:hover {
background-color: var(--btn-hover);
transform: scale(1.05);
}
iframe {
width: 100%;
height: 80vh;
border: 1px solid var(--frame-border);
border-radius: 12px;
background: white;
}
.theme-toggle {
position: fixed;
top: 20px;
right: 20px;
}
/* Temalar */
:root[data-theme="light"] {
--bg: #f2f2f2;
--text: #111;
--btn-bg: #007bff;
--btn-text: #fff;
--btn-hover: #0056b3;
--frame-border: #bbb;
}
:root[data-theme="dark"] {
--bg: #121212;
--text: #e0e0e0;
--btn-bg: #333;
--btn-text: #fff;
--btn-hover: #555;
--frame-border: #444;
}
</style>
</head>
<body>
<h1>🧰 Alet Kutusu</h1>
<div class="theme-toggle">
<label>
<input type="checkbox" id="themeSwitch"> 🌙 Koyu Mod
</label>
</div>
<nav>
<button onclick="loadTool('GradientCreator.html')">Grident Oluşturucu</button>
<button onclick="loadTool('SquareDesign.html')">Kare Tasarımı</button>
<button onclick="loadTool('SpaceCleaner.html')">Boşluk Temizleyici</button>
<button onclick="loadTool('TextStats.html')">Metin İstatistikleri</button>
<button onclick="loadTool('MiniNotes.html')">Mini Not Defteri</button>
<button onclick="loadTool('TimeMonitor.html')">Monitör Saati</button>
<button onclick="loadTool('ColorPalette.html')">Renk Paleti</button>
<button onclick="loadTool('DateCounter.html')">Tarih Sayacı</button>
<button onclick="loadTool('PomodoroTimer/index.html')">Pomodoro</button>
<button onclick="loadTool('QRGenerator/index.html')">QR Kod Oluşturucu</button>
<button onclick="loadTool('QRScanner.html')">QR Kod Okuyucu</button>
<button onclick="loadTool('PatternGenerator.html')">Desen Oluşturucu</button>
</nav>
<iframe id="toolFrame" src=""></iframe>
<script>
function loadTool(file) {
document.getElementById('toolFrame').src = file;
}
const themeSwitch = document.getElementById('themeSwitch');
const root = document.documentElement;
const userPref = localStorage.getItem('theme');
const systemPref = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
const currentTheme = userPref || systemPref;
root.setAttribute('data-theme', currentTheme);
themeSwitch.checked = currentTheme === 'dark';
themeSwitch.addEventListener('change', () => {
const newTheme = themeSwitch.checked ? 'dark' : 'light';
root.setAttribute('data-theme', newTheme);
localStorage.setItem('theme', newTheme);
});
</script>
</body>
</html>