-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
253 lines (241 loc) · 14 KB
/
Copy pathindex.html
File metadata and controls
253 lines (241 loc) · 14 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
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
249
250
251
252
253
<!DOCTYPE html>
<html lang="nl" class="scroll-smooth">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vibecoding Wegwerpapplicaties</title>
<!-- Tailwind CSS CDN -->
<script src="https://cdn.tailwindcss.com"></script>
<style>
/* A simple style for the active nav link to complement Tailwind */
.nav-link-active {
background-color: #f1f5f9; /* Tailwind's slate-100 */
color: #ec4899; /* Tailwind's pink-500 */
font-weight: 600;
}
</style>
</head>
<body class="bg-slate-50 text-slate-800">
<div id="app" class="relative min-h-screen md:flex" v-cloak>
<!-- Mobile Menu Backdrop -->
<div @click="navOpen = false" v-show="navOpen" class="fixed inset-0 z-20 bg-black/30 md:hidden"></div>
<!-- Header -->
<header class="fixed top-0 left-0 right-0 z-30 flex items-center justify-between h-16 px-4 bg-white border-b border-slate-200 md:hidden">
<h1 class="text-xl font-bold text-slate-700">Vibecoding Apps</h1>
<button @click="navOpen = !navOpen" class="p-2 rounded-md hover:bg-slate-100">
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" /></svg>
</button>
</header>
<!-- Navigation Sidebar with Filters -->
<nav class="fixed top-0 left-0 z-30 h-full w-72 bg-white border-r border-slate-200 transform transition-transform md:relative md:w-80 md:translate-x-0" :class="navOpen ? 'translate-x-0' : '-translate-x-full'">
<div class="flex flex-col h-full">
<div class="px-6 py-4 border-b border-slate-200">
<h1 @click="goHome" class="text-xl font-bold text-slate-800 cursor-pointer hover:text-pink-600 transition-colors" v-text="pageTitle"></h1>
</div>
<!-- Filter Section -->
<div class="p-4 space-y-4 border-b border-slate-200">
<div>
<label for="niveau-filter" class="block text-sm font-medium text-slate-700">Onderwijsniveau</label>
<select id="niveau-filter" v-model="activeFilters.niveau" @change="applyFilters" class="block w-full p-2 mt-1 text-sm border-slate-300 rounded-md shadow-sm">
<option value="">Alle niveaus</option>
<option v-for="niveau in allNiveaus" :key="niveau" :value="niveau">{{ niveau }}</option>
</select>
</div>
<div>
<label for="vak-filter" class="block text-sm font-medium text-slate-700">Vak / Onderwerp</label>
<select id="vak-filter" v-model="activeFilters.vak" @change="applyFilters" class="block w-full p-2 mt-1 text-sm border-slate-300 rounded-md shadow-sm">
<option value="">Alle vakken</option>
<option v-for="vak in allVakken" :key="vak" :value="vak">{{ vak }}</option>
</select>
</div>
<button v-if="activeFilters.niveau || activeFilters.vak" @click="clearFilters" class="w-full px-4 py-2 text-sm font-semibold text-white bg-pink-600 rounded-md shadow-sm hover:bg-pink-700">
Reset Filters
</button>
</div>
<!-- Application List -->
<ul class="flex-1 p-4 overflow-y-auto">
<li v-for="app in filteredApps" :key="app.originalIndex">
<a :href="`?id=${app.originalIndex + 1}`" @click.prevent="selectApp(app.originalIndex)"
class="block px-4 py-2 text-sm rounded-md text-slate-600 hover:bg-slate-100"
:class="{ 'nav-link-active': currentApp && currentApp.title === app.title }">
{{ app.title.split('–')[0].trim() }}
</a>
</li>
<li v-if="filteredApps.length === 0" class="px-4 py-2 text-sm text-slate-500">
Geen apps gevonden voor deze selectie.
</li>
</ul>
</div>
</nav>
<!-- Main Content -->
<main class="w-full px-4 pt-20 pb-10 md:pt-6 md:px-8">
<!-- Landing Page View -->
<div v-if="!currentApp" class="max-w-4xl mx-auto">
<div class="p-8 bg-white border rounded-lg border-slate-200">
<h2 class="text-3xl font-bold tracking-tight text-slate-900 sm:text-4xl">Welkom bij de Vibecoding Voorbeelden</h2>
<div class="mt-6 space-y-4 text-slate-600">
<p>Deze pagina toont een verzameling van eenvoudige, educatieve webapplicaties, ook wel <strong>"wegwerpapplicaties"</strong> genoemd. Het idee is dat een leraar of docent deze kleine tools snel kan (laten) maken, vaak met een enkele, duidelijke prompt in een AI-tool zoals AI Studio.</p>
<p>Ze zijn bedoeld voor direct gebruik in de les, als oefening of als hulpmiddel, en kunnen na gebruik net zo makkelijk weer "weggegooid" of aangepast worden voor een nieuwe les. Dit maakt het een krachtige en laagdrempelige manier om technologie in het onderwijs in te zetten.</p>
<p>De voorbeelden hier zijn divers en bestrijken verschillende <strong>onderwijssectoren, vakken en doelgroepen</strong>. Gebruik de filteropties in de menubalk hiernaast om een selectie te maken die relevant is voor u.</p>
<p>Voor elke applicatie vindt u:</p>
<ul class="list-disc list-inside space-y-2">
<li>De <strong>functionaliteit</strong> en de <strong>opzet</strong> van de tool.</li>
<li>Een <strong>schermafbeelding</strong> en een link naar een werkende <strong>demo</strong> (indien beschikbaar).</li>
<li>De volledige <strong>prompt voor AI Studio</strong>. Deze is standaard verborgen om u uit te dagen eerst zelf na te denken over hoe u zo'n prompt zou formuleren. Klik op de titel om hem te onthullen.</li>
</ul>
</div>
</div>
</div>
<!-- App Detail View -->
<div v-else class="max-w-4xl mx-auto">
<h2 class="text-3xl font-bold tracking-tight text-slate-900 sm:text-4xl" v-text="currentApp.title"></h2>
<div class="mt-8">
<div class="flex flex-wrap gap-4 mb-4">
<button v-if="currentApp.image" @click="imageVisible = !imageVisible" class="px-4 py-2 text-sm font-semibold bg-white border rounded-md shadow-sm text-slate-700 border-slate-300 hover:bg-slate-50">
{{ imageVisible ? 'Verberg schermafbeelding' : 'Toon schermafbeelding' }}
</button>
<a v-if="currentApp.demo" :href="currentApp.demo" target="_blank" rel="noopener noreferrer" class="inline-block px-4 py-2 text-sm font-semibold bg-white border rounded-md shadow-sm text-slate-700 border-slate-300 hover:bg-slate-50">
🌐 Probeer de demo
</a>
</div>
<img v-if="currentApp.image" v-show="imageVisible" :src="currentApp.image" :alt="'Schermafbeelding voor ' + currentApp.title" class="w-full mt-4 border rounded-lg border-slate-200">
</div>
<div class="mt-10 space-y-6">
<div class="p-6 bg-white border rounded-lg border-slate-200">
<h3 class="text-2xl font-semibold text-pink-600">Functionaliteit</h3>
<p class="mt-4 text-slate-600" v-html="formatText(currentApp.functionality)"></p>
</div>
<div class="p-6 bg-white border rounded-lg border-slate-200">
<h3 class="text-2xl font-semibold text-pink-600">Opzet</h3>
<p class="mt-4 text-slate-600" v-html="formatText(currentApp.opzet)"></p>
</div>
<div class="p-6 bg-white border rounded-lg border-slate-200">
<h3 @click="promptVisible = !promptVisible" class="text-2xl font-semibold text-pink-600 cursor-pointer">Prompt (voor AI Studio)</h3>
<div v-show="promptVisible" class="p-4 mt-4 font-mono text-sm text-slate-700 bg-slate-100 rounded-md overflow-x-auto" v-html="formatText(currentApp.prompt)"></div>
</div>
</div>
</div>
</main>
</div>
<!-- Vue.js CDN -->
<script src="https://unpkg.com/vue@3"></script>
<script>
Vue.createApp({
data() {
return {
applications: [],
currentApp: null,
pageTitle: 'Vibecoding Apps',
navOpen: false,
imageVisible: false,
promptVisible: false,
allNiveaus: [],
allVakken: [],
activeFilters: {
niveau: '',
vak: ''
}
}
},
computed: {
filteredApps() {
let apps = this.applications.map((app, index) => ({...app, originalIndex: index}));
if (this.activeFilters.niveau) {
apps = apps.filter(app => app.onderwijsniveau.includes(this.activeFilters.niveau));
}
if (this.activeFilters.vak) {
apps = apps.filter(app => app.vak.includes(this.activeFilters.vak));
}
return apps;
}
},
methods: {
async initializeApp() {
try {
const response = await fetch('applications.json');
if (!response.ok) throw new Error('Netwerk response was niet ok.');
this.applications = await response.json();
this.pageTitle = `${this.applications.length} Vibecoding Wegwerpapplicaties`;
this.extractFilterOptions();
this.parseUrl();
} catch (error) {
console.error("Fout bij het ophalen van applicaties:", error);
this.pageTitle = "Fout bij laden";
}
},
extractFilterOptions() {
const niveaus = new Set();
const vakken = new Set();
this.applications.forEach(app => {
app.onderwijsniveau.forEach(n => niveaus.add(n));
app.vak.forEach(v => vakken.add(v));
});
this.allNiveaus = Array.from(niveaus).sort();
this.allVakken = Array.from(vakken).sort();
},
selectApp(index) {
if (index >= 0 && index < this.applications.length) {
this.currentApp = this.applications[index];
this.imageVisible = false;
this.promptVisible = false;
this.navOpen = false;
this.updateUrl({ id: index + 1 });
}
},
applyFilters() {
this.currentApp = null; // Reset to landing page
this.updateUrl({});
},
clearFilters() {
this.activeFilters.niveau = '';
this.activeFilters.vak = '';
this.currentApp = null; // Reset to landing page
this.updateUrl({});
},
goHome() {
this.clearFilters();
},
updateUrl(params) {
const url = new URL(window.location);
url.searchParams.delete('id');
url.searchParams.delete('niveau');
url.searchParams.delete('vak');
if (params && params.id) {
url.searchParams.set('id', params.id);
}
if (this.activeFilters.niveau) {
url.searchParams.set('niveau', this.activeFilters.niveau);
}
if (this.activeFilters.vak) {
url.searchParams.set('vak', this.activeFilters.vak);
}
history.pushState({}, '', url);
},
parseUrl() {
const params = new URLSearchParams(window.location.search);
this.activeFilters.niveau = params.get('niveau') || '';
this.activeFilters.vak = params.get('vak') || '';
const id = params.get('id');
if (id) {
const index = parseInt(id, 10) - 1;
if (index >= 0 && index < this.applications.length) {
this.currentApp = this.applications[index];
} else {
this.currentApp = null; // ID invalid, show landing
}
} else {
this.currentApp = null; // No ID, show landing
}
},
formatText(text) {
return text ? text.replace(/\n/g, '<br>') : '';
}
},
mounted() {
this.initializeApp();
window.addEventListener('popstate', this.parseUrl);
}
}).mount('#app');
</script>
</body>
</html>