{"id":1007,"date":"2026-01-30T12:38:16","date_gmt":"2026-01-30T11:38:16","guid":{"rendered":"https:\/\/smlounge.de\/?page_id=1007"},"modified":"2026-05-13T15:50:41","modified_gmt":"2026-05-13T13:50:41","slug":"testseite","status":"publish","type":"page","link":"https:\/\/smlounge.de\/index.php\/testseite\/","title":{"rendered":"Testseite"},"content":{"rendered":"\n\n\n<!-- ========================================================\n     START: GEMEINSAMER DATENBLOCK\n     WO EINF\u00dcGEN:\n     - Auf der STARTSEITE als ERSTER Code-\/HTML-Block\n     - Auf der \"WER IST DA\"-SEITE ebenfalls als ERSTER Code-\/HTML-Block\n\n     WICHTIG:\n     - Dieser Block muss auf beiden Seiten IDENTISCH sein\n     - Sp\u00e4ter nur DIESEN Block \u00e4ndern\n     - Danach komplett kopieren und auf der anderen Seite ersetzen\n     ======================================================== -->\n<script>\nwindow.smrRosterSharedData = [\n  {\n    name: \"Lady Anna\",\n    url: \"https:\/\/smlounge.de\/index.php\/ladyanna\",\n    image: \"https:\/\/smlounge.de\/wp-content\/uploads\/2026\/01\/IMG_2543-scaled-2-e1769777486360.jpeg\",\n    mode: \"appointment\",\n    note: \"Nach Vereinbarung\"\n  },\n  {\n    name: \"Clara Secret\",\n    url: \"https:\/\/smlounge.de\/index.php\/clarasecret\",\n    image: \"https:\/\/smlounge.de\/wp-content\/uploads\/2026\/01\/WhatsApp-Image-2026-01-26-at-20.23.42-5-e1769778057878.jpeg\",\n    mode: \"appointment\",\n    note: \"Nach Vereinbarung\"\n  },\n {\n    name: \"Selina\",\n    url: \"https:\/\/smlounge.de\/index.php\/selina\",\n    image: \"https:\/\/smlounge.de\/wp-content\/uploads\/2026\/05\/image9-e1778677148548.jpg\",\n    mode: \"weekly\",\n    weekdays: [5],\n    note: \"Jeden Freitag\"\n  },\n  {\n    name: \"Natascha von Steinberg\",\n    url: \"https:\/\/smlounge.de\/index.php\/nataschavonsteinberg\",\n    image: \"https:\/\/smlounge.de\/wp-content\/uploads\/2026\/02\/IMG_4622-2.jpeg\",\n    mode: \"appointment\",\n    note: \"Nach Vereinbarung\"\n  },\n  {\n    name: \"Lady Wanda\",\n    url: \"https:\/\/smlounge.de\/index.php\/wanda\",\n    image: \"https:\/\/smlounge.de\/wp-content\/uploads\/2026\/01\/IMG_3012-sw-e1769777853301.jpeg\",\n    mode: \"weekly\",\n    weekdays: [2],\n    note: \"Jeden Dienstag\"\n  },\n {\n    name: \"Paula\",\n    url: \"https:\/\/smlounge.de\/index.php\/paula\",\n    image: \"https:\/\/smlounge.de\/wp-content\/uploads\/2026\/03\/8hbb89fcm9rmw0cx7w5t3pp708_resul.png\",\n    mode: \"weekly\",\n    weekdays: [2],\n    note: \"Jeden Dienstag\"\n  },\n{\n    name: \"Paula\",\n    url: \"https:\/\/smlounge.de\/index.php\/paula\",\n    image: \"https:\/\/smlounge.de\/wp-content\/uploads\/2026\/03\/8hbb89fcm9rmw0cx7w5t3pp708_resul.png\",\n    mode: \"weekly\",\n    weekdays: [4],\n    note: \"Jeden Donnerstag\"\n  },\n  {\n    name: \"Adelle Leonella\",\n    url: \"https:\/\/smlounge.de\/index.php\/adelleleonella\",\n    image: \"https:\/\/smlounge.de\/wp-content\/uploads\/2026\/02\/03-1-scaled-e1771095113261.jpg\",\n    mode: \"dates\",\n    dates: [\"2026-05-01\", \"2026-05-02\", \"2026-05-20\", \"2026-05-21\", \"2026-05-22\"]\n  },\n {\n    name: \"Harley Sadistic\",\n    url: \"https:\/\/smlounge.de\/index.php\/harley-sadistic\/\",\n    image: \"https:\/\/smlounge.de\/wp-content\/uploads\/2026\/05\/hero-e1777913701681.jpg\",\n    mode: \"dates\",\n    dates: [\"2026-06-15\", \"2026-06-16\", \"2026-06-17\"]\n  },\n  {\n    name: \"Vira Van Dyk\",\n    url: \"https:\/\/smlounge.de\/index.php\/viravandyk\",\n    image: \"https:\/\/smlounge.de\/wp-content\/uploads\/2026\/04\/WhatsApp-Image-2026-04-05-at-09.58.36.jpeg\",\n    mode: \"unknown\",\n    note: \"Unbekannt\"\n  },\n  {\n    name: \"Lady Salina\",\n    url: \"https:\/\/smlounge.de\/index.php\/LadySalina\",\n    image: \"https:\/\/smlounge.de\/wp-content\/uploads\/2026\/03\/IMG_4410_bw_bw-scaled-e1774513254582.jpg\",\n    mode: \"dates\",\n    dates: [\"2026-05-03\", \"2026-05-04\", \"2026-05-05\"]\n  },\n\n{\n    name: \"Victoria Violence\",\n    url: \"https:\/\/smlounge.de\/index.php\/victoria-violence\/\",\n    image: \"https:\/\/smlounge.de\/wp-content\/uploads\/2026\/04\/IMG_1959-sw.jpeg\",\n    mode: \"dates\",\n    dates: [\"2026-05-28\", \"2026-05-29\", \"2026-05-30\"]\n  },\n  \n  {\n    name: \"Meesteres Pia\",\n    url: \"https:\/\/smlounge.de\/index.php\/meesterespia\",\n    image: \"https:\/\/smlounge.de\/wp-content\/uploads\/2026\/01\/WhatsApp-Image-2026-01-26-at-20.23.42-3-1-e1769778462588.jpeg\",\n    mode: \"dates\",\n    dates: [\"2026-05-11\", \"2026-05-12\", \"2026-06-15\", \"2026-06-16\", \"2026-06-17\"]\n  },\n  {\n    name: \"Bizarrlady Elaine\",\n    url: \"https:\/\/smlounge.de\/index.php\/elaine\",\n    image: \"https:\/\/smlounge.de\/wp-content\/uploads\/2026\/04\/66FFEFD3-55AD-46AD-886D-1DB0AE3F49E3-sw.jpeg\",\n    mode: \"dates\",\n    dates: [\"2026-04-29\", \"2026-04-30\"]\n  },\n  {\n    name: \"Lady Markazi\",\n    url: \"https:\/\/smlounge.de\/index.php\/ladymarkazi\",\n    image: \"https:\/\/smlounge.de\/wp-content\/uploads\/2026\/01\/WhatsApp-Image-2026-01-26-at-20.27.08-1-e1769777241377.jpeg\",\n    mode: \"dates\",\n    dates: [\"2026-05-18\", \"2026-05-19\"]\n  },\n  {\n    name: \"Quesadila Coco\",\n    url: \"https:\/\/smlounge.de\/index.php\/quesadilacoco\",\n    image: \"https:\/\/smlounge.de\/wp-content\/uploads\/2026\/01\/IMG_4124-e1769777734506.jpeg\",\n    mode: \"dates\",\n    dates: [\"2026-05-18\", \"2026-05-19\"]\n  },\n  {\n    name: \"Lady Elisabeth\",\n    url: \"https:\/\/smlounge.de\/index.php\/ladyelisabeth\",\n    image: \"https:\/\/smlounge.de\/wp-content\/uploads\/2026\/03\/IMG_5251.jpg\",\n    mode: \"unknown\",\n    note: \"Unbekannt\"\n  },\n  {\n    name: \"Lana Hard\",\n    url: \"https:\/\/smlounge.de\/index.php\/lanahard\",\n    image: \"https:\/\/smlounge.de\/wp-content\/uploads\/2026\/01\/WhatsApp-Image-2026-01-26-at-20.23.42-4-1-e1769778103896.jpeg\",\n    mode: \"unknown\",\n    note: \"Unbekannt\"\n  }\n];\n<\/script>\n<!-- ========================================================\n     ENDE: GEMEINSAMER DATENBLOCK\n     ======================================================== -->\n\n\n\n<!-- ========================================================\n     START: STARTSEITE HTML\n     WO EINF\u00dcGEN:\n     - Nur auf der STARTSEITE\n     - Direkt UNTER dem gemeinsamen Datenblock\n\n     WICHTIG:\n     - Diesen Block sp\u00e4ter normalerweise nicht anfassen\n     ======================================================== -->\n<section class=\"smr-wrap\" id=\"smrHomeWeekBlock\">\n  <div class=\"smr-home\">\n    <div class=\"smr-home__frame\">\n      <div class=\"smr-home__head\">\n        <p class=\"smr-home__kicker\">Diese Woche<\/p>\n        <h2 class=\"smr-home__title\">Aktuell bei uns<\/h2>\n        <p class=\"smr-home__sub\">Diese Woche sind folgende Damen f\u00fcr Dich da:<\/p>\n      <\/div>\n\n      <div class=\"smr-home__list\" data-smr-home-list><\/div>\n    <\/div>\n  <\/div>\n<\/section>\n<!-- ========================================================\n     ENDE: STARTSEITE HTML\n     ======================================================== -->\n\n\n\n<!-- ========================================================\n     START: STARTSEITE RENDERER\n     WO EINF\u00dcGEN:\n     - Nur auf der STARTSEITE\n     - Direkt UNTER dem Startseiten-HTML\n\n     WICHTIG:\n     - Dieser Block liest die Daten aus:\n       window.smrRosterSharedData\n     - Diesen Block sp\u00e4ter normalerweise nicht anfassen\n     ======================================================== -->\n<script>\n(function () {\n  const root = document.getElementById('smrHomeWeekBlock');\n  if (!root) return;\n\n  const listEl = root.querySelector('[data-smr-home-list]');\n  if (!listEl) return;\n\n  const rosterData = Array.isArray(window.smrRosterSharedData) ? window.smrRosterSharedData : [];\n\n  function toISODateLocal(date) {\n    const y = date.getFullYear();\n    const m = String(date.getMonth() + 1).padStart(2, '0');\n    const d = String(date.getDate()).padStart(2, '0');\n    return `${y}-${m}-${d}`;\n  }\n\n  function getTodayDate() {\n    const now = new Date();\n    return new Date(now.getFullYear(), now.getMonth(), now.getDate());\n  }\n\n  function startOfWeekMonday(date) {\n    const d = new Date(date);\n    const day = d.getDay();\n    const diff = (day + 6) % 7;\n    d.setDate(d.getDate() - diff);\n    d.setHours(0, 0, 0, 0);\n    return d;\n  }\n\n  function endOfWeekSunday(date) {\n    const d = startOfWeekMonday(date);\n    d.setDate(d.getDate() + 6);\n    return d;\n  }\n\n  function getNextWeekdayDateKey(targetWeekday, today) {\n    const d = new Date(today);\n    const diff = (targetWeekday - d.getDay() + 7) % 7;\n    d.setDate(d.getDate() + diff);\n    return toISODateLocal(d);\n  }\n\n  function normalizeHomeEntry(entry, context) {\n    const todayKey = context.todayKey;\n    const weekEndKey = context.weekEndKey;\n    const todayDate = context.todayDate;\n\n    if (entry.mode === 'dates') {\n      const allDates = Array.isArray(entry.dates) ? entry.dates.slice().sort() : [];\n      const futureDates = allDates.filter(dateKey => dateKey >= todayKey);\n      const isToday = allDates.includes(todayKey);\n      const hasThisWeek = futureDates.some(dateKey => dateKey <= weekEndKey);\n      const nextDate = futureDates[0] || null;\n\n      if (isToday) {\n        return { ...entry, state: 'live', label: 'Heute da', nextDate };\n      }\n\n      if (hasThisWeek) {\n        return { ...entry, state: 'week', label: 'Diese Woche', nextDate };\n      }\n\n      return null;\n    }\n\n    if (entry.mode === 'weekly') {\n      const weekdays = Array.isArray(entry.weekdays) ? entry.weekdays.slice() : [];\n      const isToday = weekdays.includes(todayDate.getDay());\n\n      const nextOccurrenceKeys = weekdays\n        .map(day => getNextWeekdayDateKey(day, todayDate))\n        .sort();\n\n      const nextDate = nextOccurrenceKeys[0] || null;\n      const hasThisWeek = !!nextDate && nextDate <= weekEndKey;\n\n      if (isToday) {\n        return { ...entry, state: 'live', label: 'Heute da', nextDate };\n      }\n\n      if (hasThisWeek) {\n        return { ...entry, state: 'week', label: 'Diese Woche', nextDate };\n      }\n\n      return null;\n    }\n\n    if (entry.mode === 'multiple_weekly') {\n      const weekdays = Array.isArray(entry.weekdays) ? entry.weekdays.slice() : [];\n      const isToday = weekdays.includes(todayDate.getDay());\n\n      const nextOccurrenceKeys = weekdays\n        .map(day => getNextWeekdayDateKey(day, todayDate))\n        .sort();\n\n      const nextDate = nextOccurrenceKeys[0] || null;\n      const hasThisWeek = !!nextDate && nextDate <= weekEndKey;\n\n      if (isToday) {\n        return { ...entry, state: 'live', label: 'Heute da', nextDate };\n      }\n\n      if (hasThisWeek) {\n        return { ...entry, state: 'week', label: 'Diese Woche', nextDate };\n      }\n\n      return null;\n    }\n\n    if (entry.mode === 'appointment') {\n      return { ...entry, state: 'appointment', label: 'Nach Vereinbarung', nextDate: null };\n    }\n\n    return null;\n  }\n\n  function sortHomeEntries(a, b) {\n    const rank = { live: 0, week: 1, appointment: 2 };\n    const rankDiff = (rank[a.state] ?? 99) - (rank[b.state] ?? 99);\n    if (rankDiff !== 0) return rankDiff;\n\n    const dateA = a.nextDate || '9999-12-31';\n    const dateB = b.nextDate || '9999-12-31';\n    if (dateA !== dateB) return dateA.localeCompare(dateB);\n\n    return a.name.localeCompare(b.name, 'de');\n  }\n\n  function render() {\n    const todayDate = getTodayDate();\n    const context = {\n      todayDate,\n      todayKey: toISODateLocal(todayDate),\n      weekEndKey: toISODateLocal(endOfWeekSunday(todayDate))\n    };\n\n    const entries = rosterData\n      .map(entry => normalizeHomeEntry(entry, context))\n      .filter(Boolean)\n      .sort(sortHomeEntries);\n\n    if (!entries.length) {\n      listEl.innerHTML = '<div class=\"smr-empty\">Diese Woche sind aktuell keine festen Anwesenheiten eingetragen.<\/div>';\n      return;\n    }\n\n    listEl.innerHTML = entries.map(item => `\n      <a class=\"smr-home-card is-${item.state}\" href=\"${item.url}\" aria-label=\"Zur Gastdame ${item.name}\">\n        <div class=\"smr-home-card__avatar\" style=\"background-image:url('${item.image}');\"><\/div>\n        <div class=\"smr-home-card__body\">\n          <p class=\"smr-home-card__name\">${item.name}<\/p>\n        <\/div>\n        <div class=\"smr-home-card__meta\">\n          <span class=\"smr-home-card__badge\">${item.label}<\/span>\n        <\/div>\n      <\/a>\n    `).join('');\n  }\n\n  function scheduleMidnightRefresh() {\n    const now = new Date();\n    const next = new Date();\n    next.setHours(24, 0, 5, 0);\n    const timeout = next.getTime() - now.getTime();\n\n    window.setTimeout(() => {\n      render();\n      scheduleMidnightRefresh();\n    }, timeout);\n  }\n\n  render();\n  scheduleMidnightRefresh();\n})();\n<\/script>\n<!-- ========================================================\n     ENDE: STARTSEITE RENDERER\n     ======================================================== -->\n\n\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Diese Woche Aktuell bei uns Diese Woche sind folgende Damen f\u00fcr Dich da:<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1007","page","type-page","status-publish"],"_links":{"self":[{"href":"https:\/\/smlounge.de\/index.php\/wp-json\/wp\/v2\/pages\/1007","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/smlounge.de\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/smlounge.de\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/smlounge.de\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/smlounge.de\/index.php\/wp-json\/wp\/v2\/comments?post=1007"}],"version-history":[{"count":175,"href":"https:\/\/smlounge.de\/index.php\/wp-json\/wp\/v2\/pages\/1007\/revisions"}],"predecessor-version":[{"id":1962,"href":"https:\/\/smlounge.de\/index.php\/wp-json\/wp\/v2\/pages\/1007\/revisions\/1962"}],"wp:attachment":[{"href":"https:\/\/smlounge.de\/index.php\/wp-json\/wp\/v2\/media?parent=1007"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}