{"id":3852,"date":"2026-07-04T04:31:57","date_gmt":"2026-07-04T04:31:57","guid":{"rendered":"https:\/\/withifi.muhubonurture.nl\/?page_id=3852"},"modified":"2026-08-05T04:02:57","modified_gmt":"2026-08-05T04:02:57","slug":"wie-oefent-er-vandaag","status":"publish","type":"page","link":"https:\/\/withifi.muhubonurture.nl\/?page_id=3852","title":{"rendered":"Wie oefent er vandaag?"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"3852\" class=\"elementor elementor-3852\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-a41dad1 e-con-full e-flex e-con e-parent\" data-id=\"a41dad1\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-885dcc7 elementor-widget elementor-widget-html\" data-id=\"885dcc7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<section id=\"ifi-profile-page\" class=\"ifi-page\">\n<style>\n#ifi-profile-page{\n  min-height:100vh;\n  padding:6rem 6vw;\n  font-family:'Nunito', Arial, sans-serif;\n  color:#3B2A22;\n  background:\n    radial-gradient(circle at 18% 18%, rgba(255,255,255,.80) 0%, transparent 30%),\n    radial-gradient(circle at 82% 22%, rgba(211,244,255,.55) 0%, transparent 34%),\n    radial-gradient(circle at 42% 82%, rgba(221,255,238,.45) 0%, transparent 38%),\n    linear-gradient(135deg,#F4FBFF 0%,#EAF7F1 45%,#F8FFF9 100%);\n}\n\n#ifi-profile-page *{\n  box-sizing:border-box;\n}\n\n#ifi-profile-page .ifi-wrap{\n  max-width:1150px;\n  margin:0 auto;\n}\n\n#ifi-profile-page .hero-card,\n#ifi-profile-page .profile-card,\n#ifi-profile-page .info-card{\n  background:rgba(255,255,255,.72);\n  backdrop-filter:blur(18px);\n  -webkit-backdrop-filter:blur(18px);\n  border-radius:38px;\n  border:1px solid rgba(255,255,255,.95);\n  box-shadow:0 18px 42px rgba(90,120,110,.10);\n}\n\n#ifi-profile-page .hero-card{\n  padding:55px;\n  text-align:center;\n  margin-bottom:35px;\n}\n\n#ifi-profile-page .hero-label{\n  display:inline-block;\n  padding:12px 22px;\n  border-radius:999px;\n  background:white;\n  color:#7A513F;\n  font-weight:900;\n  margin-bottom:18px;\n}\n\n#ifi-profile-page h1{\n  margin:0;\n  font-size:clamp(40px,5vw,70px);\n  line-height:1.05;\n  color:#3B2A22;\n}\n\n#ifi-profile-page .hero-card p{\n  max-width:760px;\n  margin:22px auto 0;\n  font-size:22px;\n  line-height:1.7;\n  color:#6F5648;\n  font-weight:700;\n}\n\n#ifi-profile-page .profile-card{\n  padding:45px;\n}\n\n#ifi-profile-page .question{\n  margin-bottom:42px;\n}\n\n#ifi-profile-page .question h2{\n  margin:0 0 16px;\n  font-size:28px;\n  color:#3B2A22;\n}\n\n#ifi-profile-page input{\n  width:100%;\n  padding:18px 22px;\n  border:none;\n  border-radius:22px;\n  font-size:20px;\n  background:white;\n  color:#3B2A22;\n  box-shadow:0 8px 22px rgba(0,0,0,.06);\n}\n\n#ifi-profile-page input::placeholder{\n  color:#8A7A72;\n}\n\n#ifi-profile-page .options{\n  display:grid;\n  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));\n  gap:15px;\n}\n\n#ifi-profile-page .option{\n  border:none;\n  padding:18px;\n  border-radius:24px;\n  cursor:pointer;\n  font-size:18px;\n  font-weight:900;\n  color:#3B2A22 !important;\n  transition:.25s;\n}\n\n#ifi-profile-page .option:hover{\n  transform:translateY(-4px);\n}\n\n#ifi-profile-page .option.selected{\n  background:#9FCFBE !important;\n  color:#244338 !important;\n  outline:3px solid #6FAF95;\n}\n\n#ifi-profile-page .gender-boy{\n  background:#EAF3FF;\n}\n\n#ifi-profile-page .gender-girl{\n  background:#FCEBFA;\n}\n\n#ifi-profile-page .age{\n  background:#FFF4E3;\n}\n\n#ifi-profile-page .group{\n  background:#EAF7F1;\n}\n\n#ifi-profile-page .style{\n  background:#F3ECFF;\n}\n\n#ifi-profile-page .actions{\n  margin-top:50px;\n  display:flex;\n  justify-content:center;\n  gap:18px;\n  flex-wrap:wrap;\n}\n\n#ifi-profile-page .btn{\n  border:none;\n  border-radius:999px;\n  padding:18px 34px;\n  cursor:pointer;\n  font-size:20px;\n  font-weight:900;\n  color:#3B2A22 !important;\n}\n\n#ifi-profile-page .btn-save{\n  background:#9FCFBE;\n}\n\n#ifi-profile-page .btn-clear{\n  background:white;\n}\n\n#ifi-profile-page .message{\n  display:none;\n  margin-top:35px;\n  padding:20px;\n  border-radius:22px;\n  text-align:center;\n  font-weight:900;\n  color:#3B2A22;\n}\n\n#ifi-profile-page .info-card{\n  margin-top:30px;\n  padding:35px;\n}\n\n#ifi-profile-page .info-card h2{\n  margin-top:0;\n}\n\n#ifi-profile-page .info-card p{\n  margin-bottom:0;\n  font-size:18px;\n  line-height:1.7;\n  color:#6F5648;\n}\n\n@media(max-width:800px){\n  #ifi-profile-page{\n    padding:35px 20px;\n  }\n\n  #ifi-profile-page .hero-card,\n  #ifi-profile-page .profile-card,\n  #ifi-profile-page .info-card{\n    padding:28px;\n  }\n}\n\n#ifi-profile-page [hidden]{display:none!important}\n#ifi-profile-page .ifi-parent-grid{\n  display:grid;\n  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));\n  gap:24px;\n}\n#ifi-profile-page .ifi-parent-form{\n  display:grid;\n  grid-template-columns:repeat(2,minmax(0,1fr));\n  gap:18px;\n}\n#ifi-profile-page .ifi-parent-form .question{margin:0}\n#ifi-profile-page .ifi-parent-form .full-width{grid-column:1\/-1}\n#ifi-profile-page .ifi-parent-form label{\n  display:block;\n  font-size:18px;\n  font-weight:900;\n  margin:0 0 9px;\n}\n#ifi-profile-page .ifi-parent-form input{\n  width:100%;\n  padding:17px 19px;\n  border-radius:20px;\n  border:2px solid #E2EDE7;\n  background:rgba(255,255,255,.9);\n  color:#3B2A22;\n  font:inherit;\n}\n#ifi-profile-page .ifi-parent-form input:focus{\n  outline:none;\n  border-color:#A9D8C0;\n  box-shadow:0 0 0 4px rgba(169,216,192,.22);\n}\n#ifi-profile-page .ifi-parent-switch{\n  margin-top:18px;\n  text-align:center;\n  color:#7A6455;\n}\n#ifi-profile-page .ifi-link-button,\n#ifi-profile-page .ifi-card-action{\n  border:0;\n  background:transparent;\n  color:#507966;\n  font:inherit;\n  font-weight:900;\n  cursor:pointer;\n  text-decoration:underline;\n  text-underline-offset:4px;\n}\n#ifi-profile-page .ifi-parent-toolbar{\n  display:flex;\n  align-items:center;\n  justify-content:space-between;\n  gap:16px;\n  flex-wrap:wrap;\n  margin-bottom:25px;\n}\n#ifi-profile-page .ifi-child-card{\n  display:flex;\n  flex-direction:column;\n  gap:16px;\n  min-height:310px;\n  padding:28px;\n  background:rgba(255,255,255,.78);\n  border:1px solid rgba(255,255,255,.96);\n  border-radius:34px;\n  box-shadow:0 18px 42px rgba(90,120,110,.10);\n}\n#ifi-profile-page .ifi-child-card h2{margin:0}\n#ifi-profile-page .ifi-child-meta{\n  color:#7A6455;\n  font-size:18px;\n  line-height:1.6;\n}\n#ifi-profile-page .ifi-child-progress{\n  display:grid;\n  grid-template-columns:repeat(2,minmax(0,1fr));\n  gap:10px;\n}\n#ifi-profile-page .ifi-child-stat{\n  padding:13px;\n  border-radius:18px;\n  background:#F4FBF7;\n  color:#5E4C42;\n}\n#ifi-profile-page .ifi-child-stat strong{\n  display:block;\n  color:#3B2A22;\n  font-size:21px;\n}\n#ifi-profile-page .ifi-child-actions{\n  display:flex;\n  gap:13px;\n  flex-wrap:wrap;\n  margin-top:auto;\n}\n#ifi-profile-page .ifi-empty{\n  padding:32px;\n  text-align:center;\n  border-radius:28px;\n  background:rgba(255,255,255,.7);\n  color:#7A6455;\n}\n#ifi-profile-page .ifi-archived{margin-top:34px}\n#ifi-profile-page .ifi-auth-message{margin-top:18px}\n@media (max-width:700px){\n  #ifi-profile-page .ifi-parent-form{grid-template-columns:1fr}\n  #ifi-profile-page .ifi-parent-form .full-width{grid-column:auto}\n}\n\n<\/style>\n\n<div class=\"ifi-wrap\">\n  <div id=\"ifi-parent-auth\" hidden>\n    <div class=\"hero-card\">\n      <div class=\"hero-label\">\ud83c\udf3f With Ifi voor ouders<\/div>\n      <h1 id=\"ifi-auth-title\">Ouderaccount aanmaken<\/h1>\n      <p>Beheer de leeromgeving van je kinderen rustig vanaf \u00e9\u00e9n plek.<\/p>\n    <\/div>\n\n    <div class=\"profile-card\" id=\"ifi-register-panel\">\n      <div class=\"ifi-parent-form\">\n        <div class=\"question\">\n          <label for=\"parentName\">Naam ouder<\/label>\n          <input type=\"text\" id=\"parentName\" autocomplete=\"name\">\n        <\/div>\n        <div class=\"question\">\n          <label for=\"parentEmail\">E-mailadres<\/label>\n          <input type=\"email\" id=\"parentEmail\" autocomplete=\"email\">\n        <\/div>\n        <div class=\"question\">\n          <label for=\"parentPassword\">Wachtwoord<\/label>\n          <input type=\"password\" id=\"parentPassword\" autocomplete=\"new-password\">\n        <\/div>\n        <div class=\"question\">\n          <label for=\"parentPasswordConfirm\">Bevestig wachtwoord<\/label>\n          <input type=\"password\" id=\"parentPasswordConfirm\" autocomplete=\"new-password\">\n        <\/div>\n      <\/div>\n      <div class=\"actions\">\n        <button type=\"button\" class=\"btn btn-save\" id=\"registerParentBtn\">Ouderaccount aanmaken<\/button>\n      <\/div>\n      <p class=\"ifi-parent-switch\">Heb je al een account? <button type=\"button\" class=\"ifi-link-button\" data-auth-view=\"login\">Inloggen<\/button><\/p>\n    <\/div>\n\n    <div class=\"profile-card\" id=\"ifi-login-panel\" hidden>\n      <div class=\"ifi-parent-form\">\n        <div class=\"question\">\n          <label for=\"loginEmail\">E-mailadres<\/label>\n          <input type=\"email\" id=\"loginEmail\" autocomplete=\"email\">\n        <\/div>\n        <div class=\"question\">\n          <label for=\"loginPassword\">Wachtwoord<\/label>\n          <input type=\"password\" id=\"loginPassword\" autocomplete=\"current-password\">\n        <\/div>\n      <\/div>\n      <div class=\"actions\">\n        <button type=\"button\" class=\"btn btn-save\" id=\"loginParentBtn\">Inloggen<\/button>\n      <\/div>\n    <\/div>\n    <div class=\"message ifi-auth-message\" id=\"ifiAuthMessage\"><\/div>\n  <\/div>\n\n  <div id=\"ifi-parent-children\" hidden>\n    <div class=\"hero-card\">\n      <div class=\"hero-label\">\ud83c\udf3f With Ifi<\/div>\n      <h1>Wie gaat vandaag oefenen?<\/h1>\n      <p id=\"ifi-parent-welcome\"><\/p>\n    <\/div>\n    <div class=\"ifi-parent-toolbar\">\n      <button type=\"button\" class=\"btn btn-save\" id=\"addChildBtn\">+ Nieuw kind toevoegen<\/button>\n      <button type=\"button\" class=\"ifi-link-button\" id=\"logoutParentBtn\">Uitloggen<\/button>\n    <\/div>\n    <div class=\"ifi-parent-grid\" id=\"ifi-children-grid\"><\/div>\n    <div class=\"ifi-archived\" id=\"ifi-archived-section\" hidden>\n      <h2>Gearchiveerde kinderen<\/h2>\n      <div class=\"ifi-parent-grid\" id=\"ifi-archived-grid\"><\/div>\n    <\/div>\n  <\/div>\n\n  <div id=\"ifi-child-editor\" hidden>\n\n\n  <div class=\"hero-card\">\n    <div class=\"hero-label\">\ud83c\udf3f With Ifi<\/div>\n    <h1>Wie oefent er vandaag?<\/h1>\n    <p>\n      Vertel Ifi iets over jezelf.\n      Dan kan de leeromgeving zich aanpassen aan wie jij bent en hoe jij het fijnst leert.\n    <\/p>\n  <\/div>\n\n  <div class=\"profile-card\">\n\n    <div class=\"question\">\n      <h2>\ud83d\udc4b Hoe heet je?<\/h2>\n      <input type=\"text\" id=\"childName\" placeholder=\"Typ hier je naam\">\n    <\/div>\n\n    <div class=\"question\">\n      <h2>\ud83e\uddd2 Ben je een jongen of een meisje?<\/h2>\n\n      <div class=\"options\" data-field=\"gender\">\n        <button type=\"button\" class=\"option gender-boy\" data-value=\"jongen\">\ud83d\udc66 Jongen<\/button>\n        <button type=\"button\" class=\"option gender-girl\" data-value=\"meisje\">\ud83d\udc67 Meisje<\/button>\n      <\/div>\n    <\/div>\n\n    <div class=\"question\">\n      <h2>\ud83c\udf31 Hoe oud ben je?<\/h2>\n\n      <div class=\"options\" data-field=\"age\">\n        <button type=\"button\" class=\"option age\" data-value=\"5\">5 jaar<\/button>\n        <button type=\"button\" class=\"option age\" data-value=\"6\">6 jaar<\/button>\n        <button type=\"button\" class=\"option age\" data-value=\"7\">7 jaar<\/button>\n        <button type=\"button\" class=\"option age\" data-value=\"8\">8 jaar<\/button>\n        <button type=\"button\" class=\"option age\" data-value=\"9\">9 jaar<\/button>\n        <button type=\"button\" class=\"option age\" data-value=\"10\">10 jaar<\/button>\n        <button type=\"button\" class=\"option age\" data-value=\"11\">11 jaar<\/button>\n        <button type=\"button\" class=\"option age\" data-value=\"12\">12 jaar<\/button>\n        <button type=\"button\" class=\"option age\" data-value=\"13\">13 jaar<\/button>\n        <button type=\"button\" class=\"option age\" data-value=\"14+\">14+ jaar<\/button>\n      <\/div>\n    <\/div>\n\n    <div class=\"question\">\n      <h2>\ud83d\udcda In welke groep zit je?<\/h2>\n\n      <div class=\"options\" data-field=\"group\">\n        <button type=\"button\" class=\"option group\" data-value=\"groep 1\">Groep 1<\/button>\n        <button type=\"button\" class=\"option group\" data-value=\"groep 2\">Groep 2<\/button>\n        <button type=\"button\" class=\"option group\" data-value=\"groep 3\">Groep 3<\/button>\n        <button type=\"button\" class=\"option group\" data-value=\"groep 4\">Groep 4<\/button>\n        <button type=\"button\" class=\"option group\" data-value=\"groep 5\">Groep 5<\/button>\n        <button type=\"button\" class=\"option group\" data-value=\"groep 6\">Groep 6<\/button>\n        <button type=\"button\" class=\"option group\" data-value=\"groep 7\">Groep 7<\/button>\n        <button type=\"button\" class=\"option group\" data-value=\"groep 8\">Groep 8<\/button>\n        <button type=\"button\" class=\"option group\" data-value=\"anders\">Anders<\/button>\n      <\/div>\n    <\/div>\n\n    <div class=\"question\">\n      <h2>\u2728 Hoe leer jij het liefst?<\/h2>\n\n      <div class=\"options\" data-field=\"learningStyle\">\n        <button type=\"button\" class=\"option style\" data-value=\"rustig\">\ud83c\udf3f Rustig<\/button>\n        <button type=\"button\" class=\"option style\" data-value=\"plaatjes\">\ud83e\udde9 Met plaatjes<\/button>\n        <button type=\"button\" class=\"option style\" data-value=\"uitleg\">\ud83d\udcac Extra uitleg<\/button>\n        <button type=\"button\" class=\"option style\" data-value=\"uitdaging\">\u2b50 Uitdaging<\/button>\n      <\/div>\n    <\/div>\n\n    <div class=\"actions\">\n      <button type=\"button\" class=\"btn btn-save\" id=\"saveIfiBtn\">\ud83c\udf3f Opslaan en starten<\/button>\n      <button type=\"button\" class=\"btn btn-clear\" id=\"clearIfiBtn\">\u21bb Opnieuw invullen<\/button>\n      <button type=\"button\" class=\"btn btn-clear\" id=\"backToChildrenBtn\">Terug naar kinderen<\/button>\n    <\/div>\n\n    <div class=\"message\" id=\"ifiMessage\"><\/div>\n\n  <\/div>\n\n  <div class=\"info-card\">\n    <h2>\ud83c\udf38 Kleine reminder<\/h2>\n    <p>\n      Ieder kind heeft een eigen profiel. Assessment en voortgang blijven altijd bij hetzelfde kind.\n    <\/p>\n  <\/div>\n\n<\/div>\n<\/div>\n\n<script>\n(function(){\n  const DASHBOARD_URL = \"https:\/\/withifi.muhubonurture.nl\/?page_id=3892\";\n  const ASSESSMENT_URL = \"https:\/\/withifi.muhubonurture.nl\/?page_id=3956\";\n  const ifiData = {gender:\"\", age:\"\", group:\"\", learningStyle:[]};\n  let editingProfileId = \"\";\n\n  function apiReady(){\n    return window.WithIfi &&\n      window.WithIfi.ParentAccount &&\n      window.WithIfi.ParentManager &&\n      typeof window.WithIfi.selectChild === \"function\";\n  }\n\n  function showOnly(id){\n    [\"ifi-parent-auth\",\"ifi-parent-children\",\"ifi-child-editor\"].forEach(function(viewId){\n      const view = document.getElementById(viewId);\n      if(view) view.hidden = viewId !== id;\n    });\n  }\n\n  function showMessage(targetId, text, color){\n    const message = document.getElementById(targetId);\n    if(!message) return;\n    message.style.display = text ? \"block\" : \"none\";\n    message.style.background = color || \"#EAF7F1\";\n    message.style.color = \"#3B2A22\";\n    message.textContent = text || \"\";\n  }\n\n  function showAuth(mode){\n    const account = WithIfi.ParentAccount.get();\n    mode = mode || (account ? \"login\" : \"register\");\n    showOnly(\"ifi-parent-auth\");\n    document.getElementById(\"ifi-register-panel\").hidden = mode !== \"register\";\n    document.getElementById(\"ifi-login-panel\").hidden = mode !== \"login\";\n    document.getElementById(\"ifi-auth-title\").textContent =\n      mode === \"login\" ? \"Ouderaccount inloggen\" : \"Ouderaccount aanmaken\";\n    if(account){\n      document.getElementById(\"loginEmail\").value = account.email || \"\";\n    }\n    showMessage(\"ifiAuthMessage\", \"\");\n  }\n\n  function formatDate(value){\n    if(!value) return \"Nog geen activiteit\";\n    const date = new Date(value);\n    if(Number.isNaN(date.getTime())) return \"Nog geen activiteit\";\n    return date.toLocaleDateString(\"nl-NL\", {day:\"numeric\",month:\"long\",year:\"numeric\"});\n  }\n\n  function escapeHtml(value){\n    return String(value == null ? \"\" : value)\n      .replace(\/&\/g,\"&amp;\")\n      .replace(\/<\/g,\"&lt;\")\n      .replace(\/>\/g,\"&gt;\")\n      .replace(\/\"\/g,\"&quot;\")\n      .replace(\/'\/g,\"&#039;\");\n  }\n\n  function childCard(profile, archived){\n    const summary = WithIfi.ParentManager.getChildSummary(profile.id);\n    const card = document.createElement(\"article\");\n    card.className = \"ifi-child-card\";\n    card.dataset.profileId = profile.id;\n    card.innerHTML =\n      \"<h2>\" + escapeHtml(summary.name) + \"<\/h2>\" +\n      \"<div class=\\\"ifi-child-meta\\\">\" +\n        (summary.age ? escapeHtml(summary.age) + \" jaar \u00b7 \" : \"\") +\n        escapeHtml(summary.group || \"Groep nog niet gekozen\") +\n        \"<br>Laatste activiteit: \" + escapeHtml(formatDate(summary.lastActivity)) +\n      \"<\/div>\" +\n      \"<div class=\\\"ifi-child-progress\\\">\" +\n        \"<div class=\\\"ifi-child-stat\\\"><strong>\" + summary.completedExercises + \"<\/strong>oefeningen<\/div>\" +\n        \"<div class=\\\"ifi-child-stat\\\"><strong>\" + summary.percentage + \"%<\/strong>resultaat<\/div>\" +\n        \"<div class=\\\"ifi-child-stat\\\"><strong>\" + summary.answeredQuestions + \"<\/strong>vragen<\/div>\" +\n        \"<div class=\\\"ifi-child-stat\\\"><strong>Groep \" + summary.currentLevel + \"<\/strong>niveau<\/div>\" +\n      \"<\/div>\" +\n      \"<div class=\\\"ifi-child-actions\\\">\" +\n        (archived\n          ? \"<button type=\\\"button\\\" class=\\\"btn btn-save\\\" data-child-action=\\\"restore\\\">Herstellen<\/button>\"\n          : \"<button type=\\\"button\\\" class=\\\"btn btn-save\\\" data-child-action=\\\"continue\\\">Verder oefenen<\/button>\" +\n            \"<button type=\\\"button\\\" class=\\\"ifi-card-action\\\" data-child-action=\\\"edit\\\">Wijzigen<\/button>\" +\n            \"<button type=\\\"button\\\" class=\\\"ifi-card-action\\\" data-child-action=\\\"archive\\\">Archiveren<\/button>\") +\n        \"<button type=\\\"button\\\" class=\\\"ifi-card-action\\\" data-child-action=\\\"remove\\\">Verwijderen<\/button>\" +\n      \"<\/div>\";\n    return card;\n  }\n\n  function renderChildren(){\n    if(!WithIfi.ParentAccount.isAuthenticated()){\n      showAuth();\n      return;\n    }\n    showOnly(\"ifi-parent-children\");\n    const account = WithIfi.ParentAccount.get();\n    document.getElementById(\"ifi-parent-welcome\").textContent =\n      \"Welkom \" + (account.name || \"\") + \". Kies een kind om verder te oefenen.\";\n    const allChildren = WithIfi.ParentManager.listChildren(true);\n    const activeGrid = document.getElementById(\"ifi-children-grid\");\n    const archivedGrid = document.getElementById(\"ifi-archived-grid\");\n    activeGrid.innerHTML = \"\";\n    archivedGrid.innerHTML = \"\";\n    const active = allChildren.filter(function(child){return !child.archivedAt;});\n    const archived = allChildren.filter(function(child){return Boolean(child.archivedAt);});\n    if(active.length === 0){\n      activeGrid.innerHTML = \"<div class=\\\"ifi-empty\\\">Voeg rustig het eerste kind toe om te beginnen.<\/div>\";\n    }else{\n      active.forEach(function(child){activeGrid.appendChild(childCard(child,false));});\n    }\n    archived.forEach(function(child){archivedGrid.appendChild(childCard(child,true));});\n    document.getElementById(\"ifi-archived-section\").hidden = archived.length === 0;\n  }\n\n  function selectValue(field, value){\n    const values = Array.isArray(value) ? value : [value];\n    document.querySelectorAll('#ifi-child-editor .options[data-field=\"' + field + '\"] .option').forEach(function(button){\n      button.classList.toggle(\"selected\", values.includes(button.getAttribute(\"data-value\")));\n    });\n  }\n\n  function resetEditor(){\n    editingProfileId = \"\";\n    ifiData.gender = \"\";\n    ifiData.age = \"\";\n    ifiData.group = \"\";\n    ifiData.learningStyle = [];\n    document.getElementById(\"childName\").value = \"\";\n    document.querySelectorAll(\"#ifi-child-editor .option\").forEach(function(button){\n      button.classList.remove(\"selected\");\n    });\n    showMessage(\"ifiMessage\", \"\");\n  }\n\n  function openEditor(profileId){\n    resetEditor();\n    if(profileId){\n      const profile = WithIfi.ParentManager.listChildren(true).find(function(child){\n        return child.id === profileId;\n      });\n      if(!profile) return;\n      editingProfileId = profile.id;\n      document.getElementById(\"childName\").value = profile.name || \"\";\n      ifiData.gender = profile.gender || \"\";\n      ifiData.age = profile.age || \"\";\n      ifiData.group = profile.group || \"\";\n      ifiData.learningStyle = Array.isArray(profile.learningStyle)\n        ? profile.learningStyle.slice()\n        : (profile.learningStyle ? [profile.learningStyle] : []);\n      selectValue(\"gender\", ifiData.gender);\n      selectValue(\"age\", ifiData.age);\n      selectValue(\"group\", ifiData.group);\n      selectValue(\"learningStyle\", ifiData.learningStyle);\n    }\n    showOnly(\"ifi-child-editor\");\n    document.getElementById(\"saveIfiBtn\").textContent =\n      editingProfileId ? \"\ud83c\udf3f Wijzigingen opslaan\" : \"\ud83c\udf3f Opslaan en starten\";\n  }\n\n  function handleOptionClick(button){\n    const group = button.closest(\".options\");\n    const field = group.getAttribute(\"data-field\");\n    const value = button.getAttribute(\"data-value\");\n    if(field === \"learningStyle\"){\n      button.classList.toggle(\"selected\");\n      if(button.classList.contains(\"selected\") && !ifiData.learningStyle.includes(value)){\n        ifiData.learningStyle.push(value);\n      }else if(!button.classList.contains(\"selected\")){\n        ifiData.learningStyle = ifiData.learningStyle.filter(function(item){return item !== value;});\n      }\n      return;\n    }\n    group.querySelectorAll(\".option\").forEach(function(item){item.classList.remove(\"selected\");});\n    button.classList.add(\"selected\");\n    ifiData[field] = value;\n  }\n\n  function saveChild(){\n    const name = document.getElementById(\"childName\").value.trim();\n    if(!name || !ifiData.gender || !ifiData.age || !ifiData.group || ifiData.learningStyle.length === 0){\n      showMessage(\"ifiMessage\",\"Vul eerst rustig alle vragen in \ud83c\udf3f\",\"#FFF4E3\");\n      return;\n    }\n    const changes = {\n      name:name,\n      gender:ifiData.gender,\n      age:ifiData.age,\n      group:ifiData.group,\n      learningStyle:ifiData.learningStyle.slice()\n    };\n    const profile = editingProfileId\n      ? WithIfi.ParentManager.updateChild(editingProfileId,changes)\n      : WithIfi.ParentManager.addChild(changes);\n    if(!profile){\n      showMessage(\"ifiMessage\",\"Het profiel kon niet worden opgeslagen.\",\"#FFF4E3\");\n      return;\n    }\n    WithIfi.selectChild(profile.id);\n    showMessage(\"ifiMessage\",\"Welkom \" + name + \" \ud83c\udf38 Je profiel is opgeslagen.\",\"#EAF7F1\");\n    window.setTimeout(function(){\n      window.location.href = profile.fullAssessment ? DASHBOARD_URL : ASSESSMENT_URL;\n    },700);\n  }\n\n  async function registerParent(){\n    const password = document.getElementById(\"parentPassword\").value;\n    const confirmation = document.getElementById(\"parentPasswordConfirm\").value;\n    if(password.length < 8){\n      showMessage(\"ifiAuthMessage\",\"Kies een wachtwoord van minimaal 8 tekens.\",\"#FFF4E3\");\n      return;\n    }\n    if(password !== confirmation){\n      showMessage(\"ifiAuthMessage\",\"De wachtwoorden zijn niet hetzelfde.\",\"#FFF4E3\");\n      return;\n    }\n    try{\n      await WithIfi.ParentAccount.register({\n        name:document.getElementById(\"parentName\").value,\n        email:document.getElementById(\"parentEmail\").value,\n        password:password\n      });\n      document.getElementById(\"parentPassword\").value = \"\";\n      document.getElementById(\"parentPasswordConfirm\").value = \"\";\n      renderChildren();\n    }catch(error){\n      showMessage(\"ifiAuthMessage\",error.message || \"Het account kon niet worden aangemaakt.\",\"#FFF4E3\");\n    }\n  }\n\n  async function loginParent(){\n    try{\n      const loggedIn = await WithIfi.ParentAccount.login(\n        document.getElementById(\"loginEmail\").value,\n        document.getElementById(\"loginPassword\").value\n      );\n      document.getElementById(\"loginPassword\").value = \"\";\n      if(!loggedIn){\n        showMessage(\"ifiAuthMessage\",\"E-mailadres of wachtwoord klopt niet.\",\"#FFF4E3\");\n        return;\n      }\n      renderChildren();\n    }catch(error){\n      showMessage(\"ifiAuthMessage\",error.message || \"Inloggen is niet gelukt.\",\"#FFF4E3\");\n    }\n  }\n\n  function handleChildAction(button){\n    const card = button.closest(\"[data-profile-id]\");\n    const profileId = card ? card.dataset.profileId : \"\";\n    const action = button.dataset.childAction;\n    if(action === \"continue\"){\n      const profile = WithIfi.selectChild(profileId);\n      if(profile) window.location.href = profile.fullAssessment ? DASHBOARD_URL : ASSESSMENT_URL;\n    }else if(action === \"edit\"){\n      openEditor(profileId);\n    }else if(action === \"archive\"){\n      WithIfi.ParentManager.archiveChild(profileId);\n      renderChildren();\n    }else if(action === \"restore\"){\n      WithIfi.ParentManager.restoreChild(profileId);\n      renderChildren();\n    }else if(action === \"remove\"){\n      if(window.confirm(\"Weet je zeker dat je dit kindprofiel en alle bijbehorende voortgang wilt verwijderen?\")){\n        WithIfi.ParentManager.removeChild(profileId);\n        renderChildren();\n      }\n    }\n  }\n\n  document.addEventListener(\"click\",function(event){\n    const authView = event.target.closest(\"[data-auth-view]\");\n    if(authView){showAuth(authView.dataset.authView);return;}\n    if(event.target.closest(\"#registerParentBtn\")){registerParent();return;}\n    if(event.target.closest(\"#loginParentBtn\")){loginParent();return;}\n    if(event.target.closest(\"#logoutParentBtn\")){\n      WithIfi.ParentAccount.logout();\n      showAuth(\"login\");\n      return;\n    }\n    if(event.target.closest(\"#addChildBtn\")){openEditor(\"\");return;}\n    if(event.target.closest(\"#backToChildrenBtn\")){renderChildren();return;}\n    const childAction = event.target.closest(\"[data-child-action]\");\n    if(childAction){handleChildAction(childAction);return;}\n    const option = event.target.closest(\"#ifi-child-editor .option\");\n    if(option){event.preventDefault();handleOptionClick(option);return;}\n    if(event.target.closest(\"#saveIfiBtn\")){event.preventDefault();saveChild();return;}\n    if(event.target.closest(\"#clearIfiBtn\")){event.preventDefault();resetEditor();}\n  });\n\n  function init(){\n    if(!apiReady()){\n      window.setTimeout(init,100);\n      return;\n    }\n    if(WithIfi.ParentAccount.isAuthenticated()){\n      renderChildren();\n    }else{\n      showAuth();\n    }\n  }\n\n  if(document.readyState === \"loading\"){\n    document.addEventListener(\"DOMContentLoaded\",init);\n  }else{\n    init();\n  }\n})();\n<\/script>\n<\/section>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>\ud83c\udf3f With Ifi voor ouders Ouderaccount aanmaken Beheer de leeromgeving van je kinderen rustig vanaf \u00e9\u00e9n plek. Naam ouder E-mailadres Wachtwoord Bevestig wachtwoord Ouderaccount aanmaken Heb je al een account? Inloggen E-mailadres Wachtwoord Inloggen \ud83c\udf3f With Ifi Wie gaat vandaag oefenen? + Nieuw kind toevoegen Uitloggen Gearchiveerde kinderen \ud83c\udf3f With Ifi Wie oefent er vandaag? [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-3852","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/withifi.muhubonurture.nl\/index.php?rest_route=\/wp\/v2\/pages\/3852","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/withifi.muhubonurture.nl\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/withifi.muhubonurture.nl\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/withifi.muhubonurture.nl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/withifi.muhubonurture.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3852"}],"version-history":[{"count":43,"href":"https:\/\/withifi.muhubonurture.nl\/index.php?rest_route=\/wp\/v2\/pages\/3852\/revisions"}],"predecessor-version":[{"id":4194,"href":"https:\/\/withifi.muhubonurture.nl\/index.php?rest_route=\/wp\/v2\/pages\/3852\/revisions\/4194"}],"wp:attachment":[{"href":"https:\/\/withifi.muhubonurture.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3852"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}