-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
199 lines (187 loc) · 8.9 KB
/
index.html
File metadata and controls
199 lines (187 loc) · 8.9 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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<!doctype html>
<html lang="en">
<head>
<script src="assets/js/gtag.js"></script>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Docker Training — Practice Quizzes for DCA Certification</title>
<meta name="description" content="Free practice quizzes for the Docker DCA certification. Train by topic: orchestration, networking, security, storage, and more." />
<meta property="og:title" content="Docker Training — Practice Quizzes for DCA Certification" />
<meta property="og:description" content="Free practice quizzes for the Docker DCA certification. Train by topic: orchestration, networking, security, storage, and more." />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://efficience-it.github.io/" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="Docker Training — Practice Quizzes for DCA Certification" />
<meta name="twitter:description" content="Free practice quizzes for the Docker DCA certification." />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
<script src="https://cdn.tailwindcss.com/3.4.16"></script>
<script>
tailwind.config = {
darkMode: 'class',
theme: {
extend: {
fontFamily: {
sans: ['Inter', 'system-ui', '-apple-system', 'sans-serif'],
},
},
},
}
</script>
<style type="text/tailwindcss">
html, body {
height: 100%;
}
body {
display: flex;
flex-direction: column;
min-height: 100vh;
}
@layer components {
.btn-primary {
@apply bg-indigo-600 text-white py-2.5 px-7 rounded-lg hover:bg-indigo-700 transition duration-200 inline-block text-center font-medium text-sm;
}
.card {
@apply text-center bg-white border border-gray-200 rounded-xl p-6 hover:border-indigo-300 transition duration-200 dark:bg-gray-800 dark:border-gray-700 dark:hover:border-indigo-500 dark:text-gray-200;
}
.header {
@apply bg-white border-b border-gray-200 p-8 text-center dark:bg-gray-900 dark:border-gray-700;
}
.footer {
@apply border-t border-gray-100 p-6 text-center mt-auto dark:border-gray-700;
}
}
</style>
</head>
<body class="bg-stone-50 dark:bg-gray-900 px-2 sm:px-4 font-sans dark:text-gray-200">
<main class="flex-1 flex flex-col">
<header class="header">
<div class="flex items-center justify-between max-w-3xl mx-auto">
<span></span>
<div class="text-center">
<h1 class="text-3xl font-semibold tracking-tight text-gray-900 dark:text-white">Training</h1>
<p class="mt-2 text-base text-gray-500 dark:text-gray-400">Select a category to start training</p>
</div>
<button id="dark-mode-toggle" class="text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition" aria-label="Toggle dark mode">
<svg id="icon-sun" class="w-5 h-5 hidden" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M12 3v1m0 16v1m8.66-13.66l-.71.71M4.05 19.95l-.71.71M21 12h-1M4 12H3m16.66 7.66l-.71-.71M4.05 4.05l-.71-.71M16 12a4 4 0 11-8 0 4 4 0 018 0z"/></svg>
<svg id="icon-moon" class="w-5 h-5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M21 12.79A9 9 0 1111.21 3a7 7 0 009.79 9.79z"/></svg>
</button>
</div>
</header>
<div class="max-w-3xl mx-auto w-full mt-10 mb-8 px-4">
<div class="text-center mb-10">
<a href="quizz_docker.html" class="btn-primary">General Training</a>
</div>
<p class="text-xs uppercase tracking-wide text-gray-400 mb-4 text-center">By topic</p>
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4">
<a href="quizz_docker.html?topic=orchestration" class="card">
Orchestration
</a>
<a href="quizz_docker.html?topic=image_creation_management_registry" class="card">
Image Management
</a>
<a href="quizz_docker.html?topic=installation_and_configuration" class="card">
Installation and Configuration
</a>
<a href="quizz_docker.html?topic=networking" class="card">
Networking
</a>
<a href="quizz_docker.html?topic=security" class="card">
Security
</a>
<a href="quizz_docker.html?topic=storage_and_volumes" class="card">
Storage and Volumes
</a>
</div>
</div>
<div id="quiz-history" class="max-w-3xl mx-auto w-full mb-8 px-4 hidden">
<p class="text-xs uppercase tracking-wide text-gray-400 mb-4 text-center">Recent activity</p>
<div class="bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl overflow-hidden">
<div id="quiz-history-list"></div>
<div class="px-4 py-3 text-center border-t border-gray-100 dark:border-gray-700">
<button id="clear-history" class="text-xs text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 cursor-pointer">Clear history</button>
</div>
</div>
</div>
<script>
(function () {
function renderHistory() {
let history = [];
try {
history = JSON.parse(localStorage.getItem("quizHistory")) || [];
} catch (e) {
history = [];
}
const container = document.getElementById("quiz-history");
const list = document.getElementById("quiz-history-list");
if (!history.length) {
container.classList.add("hidden");
return;
}
container.classList.remove("hidden");
list.innerHTML = history
.slice()
.reverse()
.map(function (entry, i) {
const d = new Date(entry.date);
const dateStr = d.toLocaleDateString("en-US", { month: "short", day: "numeric" });
const border = i < history.length - 1 ? "border-b border-gray-100 dark:border-gray-700" : "";
return (
'<div class="flex items-center justify-between px-4 py-3 ' + border + '">' +
'<span class="text-gray-400 text-sm w-20">' + dateStr + "</span>" +
'<span class="text-gray-700 dark:text-gray-300 font-medium text-sm flex-1">' + entry.category + "</span>" +
'<span class="text-sm text-gray-600 dark:text-gray-400">' + entry.score + "/" + entry.total + "</span>" +
"</div>"
);
})
.join("");
}
renderHistory();
document.getElementById("clear-history").addEventListener("click", function () {
localStorage.removeItem("quizHistory");
renderHistory();
});
})();
</script>
</main>
<script>
(function () {
const toggle = document.getElementById("dark-mode-toggle");
const iconSun = document.getElementById("icon-sun");
const iconMoon = document.getElementById("icon-moon");
function applyTheme(dark) {
document.documentElement.classList.toggle("dark", dark);
iconSun.classList.toggle("hidden", !dark);
iconMoon.classList.toggle("hidden", dark);
}
const stored = localStorage.getItem("theme");
const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
applyTheme(stored === "dark" || (!stored && prefersDark));
toggle.addEventListener("click", function () {
const isDark = document.documentElement.classList.toggle("dark");
localStorage.setItem("theme", isDark ? "dark" : "light");
iconSun.classList.toggle("hidden", !isDark);
iconMoon.classList.toggle("hidden", isDark);
});
})();
</script>
<footer class="footer">
<p class="text-gray-500 dark:text-gray-400 text-sm">
Help improve the questionnaires:
<a
href="https://github.com/efficience-it/efficience-it.github.io"
class="text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300 underline"
>This Website</a
>
·
<a
href="https://github.com/efficience-it/docker-practice"
class="text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300 underline"
>Docker® Questions</a
>
</p>
<p class="text-[10px] text-gray-300 mt-2">Docker® and the Docker® logo are trademarks or registered trademarks of Docker, Inc. in the United States and/or other countries.</p>
</footer>
</body>
</html>