{"id":708,"date":"2025-01-30T16:35:52","date_gmt":"2025-01-30T15:35:52","guid":{"rendered":"https:\/\/0z9yaubqfkn.preview.infomaniak.website\/?page_id=708"},"modified":"2025-02-01T12:57:34","modified_gmt":"2025-02-01T11:57:34","slug":"petition-display","status":"publish","type":"page","link":"https:\/\/genderapartheid.no\/no\/petition-display\/","title":{"rendered":"Petition Display"},"content":{"rendered":"\n<div style=\"height:55px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h1 class=\"wp-block-heading alignfull\" style=\"padding-right:15%;padding-left:15%;font-size:clamp(2.2rem, 2.2rem + ((1vw - 0.2rem) * 2.824), 4rem);\">End Gender Apartheid! Petition<\/h1>\n\n\n\n<div class=\"wp-block-group alignfull is-layout-flow wp-block-group-is-layout-flow\">\n    <div id=\"signature-container\">\n        <div id=\"signature-header\">\n            <span class=\"signed-by\">Signed by:<\/span>\n            <span id=\"signature-count\"><span id=\"signature-number\">0<\/span> Signatures<\/span>\n        <\/div>\n        <ul id=\"signature-list\"><\/ul>\n    <\/div>\n\n    <script src=\"https:\/\/cdn.jsdelivr.net\/npm\/canvas-confetti@1.6.0\"><\/script>\n\n    <style>\n    \/* Remove bullet points from the signature list *\/\n    #signature-list {\n        list-style-type: none;\n        padding: 0;\n        margin: 0;\n    }\n\n    \/* Signature header (contains \"Signed by:\" and count) *\/\n    #signature-header {\n        display: flex;\n        justify-content: space-between; \/* Aligns left and right *\/\n        align-items: center; \/* Vertically aligns *\/\n        padding: 10px 15%;\n    }\n\n    \/* \"Signed by:\" styling *\/\n    .signed-by {\n        font-size: 2em; \/* Large text *\/\n        font-weight: normal;\n    }\n\n    \/* Signature count styling *\/\n    #signature-count {\n        font-size: 1.5em;\n        text-align: right;\n    }\n\n    #signature-number {\n        font-size: 2.5em;\n        font-weight: bold;\n    }\n\n    \/* Styling for the first signature *\/\n    #signature-list li:first-child {\n        background-color: #ff0046;\n        color: white;\n        padding: 30px 15%;\n        width: 100%;\n        box-sizing: border-box;\n        display: flex;\n        flex-direction: column;\n        align-items: flex-start;\n    }\n\n    \/* Name inside the pink box *\/\n    .signature-name {\n        font-size: 2em;\n        font-weight: bold;\n    }\n\n    \/* Message inside the pink box *\/\n    .signature-message {\n        font-size: 1em;\n        font-weight: normal;\n        margin-top: 5px;\n    }\n\n    \/* Styling for other signatures *\/\n    #signature-list li {\n        font-size: 1em;\n        padding: 8px 15%;\n    }\n\n    \/* Pink color for names with emails *\/\n    .email-signature {\n        color: #ff0046;\n    }\n\n    \/* Animation for new name appearing *\/\n    @keyframes fadeIn {\n        from {\n            opacity: 0;\n            transform: translateY(-10px);\n        }\n        to {\n            opacity: 1;\n            transform: translateY(0);\n        }\n    }\n\n    \/* Animation for old top name moving down *\/\n    .move-down {\n        animation: moveDown 0.5s ease-in forwards;\n    }\n\n    @keyframes moveDown {\n        from {\n            opacity: 1;\n            transform: translateY(0);\n        }\n        to {\n            opacity: 0;\n            transform: translateY(10px);\n        }\n    }\n    <\/style>\n\n    <script>\n    let lastSignatures = [];\n\n    \/\/ Function to fetch and update petition signatures\n    function updateSignatures() {\n        fetch('https:\/\/genderapartheid.no\/wp-admin\/admin-ajax.php?action=get_signatures')\n        .then(response => response.json())\n        .then(data => {\n            let list = document.getElementById(\"signature-list\");\n\n            \/\/ Get the current first signature name\n            let firstEntry = list.querySelector(\"li:first-child\");\n            let currentFirstName = firstEntry ? firstEntry.dataset.name : null;\n            let newFirstName = data.signatures.length > 0 ? data.signatures[0].name : null;\n\n            \/\/ Always update the signature count\n            document.getElementById(\"signature-number\").innerText = data.count;\n\n            \/\/ If the first signature has changed, update it and trigger confetti\n            if (newFirstName && newFirstName !== currentFirstName) {\n                console.log(\"New signature detected! Updating top entry and launching confetti...\");\n\n                \/\/ Update the list with the new names\n                refreshSignatures(data.signatures);\n\n                \/\/ Launch confetti after a short delay\n                setTimeout(() => launchConfetti(), 500);\n            }\n        });\n    }\n\n    \/\/ Function to refresh the entire signature list\n    function refreshSignatures(signatures) {\n        let list = document.getElementById(\"signature-list\");\n        list.innerHTML = \"\"; \/\/ Clear the list before updating\n\n        signatures.forEach((sig, index) => {\n            let li = document.createElement(\"li\");\n            li.dataset.name = sig.name; \/\/ Store name to track changes\n\n            \/\/ First signature styling\n            if (index === 0) {\n                li.style.backgroundColor = \"#ff0046\"; \/\/ Pink background\n                li.style.color = \"white\";\n                li.style.padding = \"30px 15%\";\n                li.style.width = \"100%\";\n                li.style.boxSizing = \"border-box\";\n                li.style.display = \"flex\";\n                li.style.flexDirection = \"column\";\n                li.style.alignItems = \"flex-start\";\n                li.style.animation = \"fadeIn 0.5s ease-out\"; \/\/ Smooth fade-in\n\n                li.innerHTML = `\n                    <div class=\"signature-name\">${sig.name}<\/div>\n                    <div class=\"signature-message\">${sig.message}<\/div>\n                `;\n            } else {\n                \/\/ If there's an email, apply the pink color to the name\n                if (sig.email) {\n                    li.innerHTML = `\n                        <strong class=\"email-signature\">${sig.name}<\/strong>\n                        : ${sig.message}\n                    `;\n                } else {\n                    li.innerHTML = `\n                        <strong>${sig.name}<\/strong>\n                        : ${sig.message}\n                    `;\n                }\n            }\n\n            list.appendChild(li);\n        });\n    }\n\n    \/\/ Function to handle form submission\n    function handleFormSubmission(event) {\n        setTimeout(() => {\n            updateSignatures(); \/\/ Wait 2 seconds, then refresh signatures\n        }, 2000);\n    }\n\n    \/\/ Confetti effect function\n    function launchConfetti() {\n        confetti({\n            particleCount: 3000,\n            spread: 5000,\n            origin: { x: 0.8, y: 0.2 } \/\/ Shift confetti left\n        });\n    }\n\n    \/\/ Attach form submission listener\n    document.addEventListener(\"DOMContentLoaded\", function () {\n        let form = document.querySelector(\"form\"); \/\/ Adjust if your form has a different selector\n        if (form) {\n            form.addEventListener(\"submit\", handleFormSubmission);\n        }\n    });\n\n    updateSignatures(); \/\/ Run update initially\n    <\/script>\n\n    \n<\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Stans kj\u00f8nnsapartheid! \u2013 Underskriftskampanje<\/p>","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-no-title","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","footnotes":""},"class_list":["post-708","page","type-page","status-publish","hentry"],"acf":[],"mb":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Petition Display - Documenting Gender Apartheid<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/genderapartheid.no\/no\/petition-display\/\" \/>\n<meta property=\"og:locale\" content=\"nb_NO\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Petition Display - Documenting Gender Apartheid\" \/>\n<meta property=\"og:description\" content=\"End Gender Apartheid! Petition\" \/>\n<meta property=\"og:url\" content=\"https:\/\/genderapartheid.no\/no\/petition-display\/\" \/>\n<meta property=\"og:site_name\" content=\"Documenting Gender Apartheid\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-01T11:57:34+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Ansl. lesetid\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minutt\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/genderapartheid.no\\\/petition-display\\\/\",\"url\":\"https:\\\/\\\/genderapartheid.no\\\/petition-display\\\/\",\"name\":\"Petition Display - Documenting Gender Apartheid\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/genderapartheid.no\\\/#website\"},\"datePublished\":\"2025-01-30T15:35:52+00:00\",\"dateModified\":\"2025-02-01T11:57:34+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/genderapartheid.no\\\/petition-display\\\/#breadcrumb\"},\"inLanguage\":\"nb-NO\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/genderapartheid.no\\\/petition-display\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/genderapartheid.no\\\/petition-display\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"GA\",\"item\":\"https:\\\/\\\/genderapartheid.no\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Petition Display\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/genderapartheid.no\\\/#website\",\"url\":\"https:\\\/\\\/genderapartheid.no\\\/\",\"name\":\"Documenting Gender Apartheid\",\"description\":\"Documenting the voices of women who have lived under gender apartheid.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/genderapartheid.no\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"nb-NO\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Petition Display - Documenting Gender Apartheid","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/genderapartheid.no\/no\/petition-display\/","og_locale":"nb_NO","og_type":"article","og_title":"Petition Display - Documenting Gender Apartheid","og_description":"End Gender Apartheid! Petition","og_url":"https:\/\/genderapartheid.no\/no\/petition-display\/","og_site_name":"Documenting Gender Apartheid","article_modified_time":"2025-02-01T11:57:34+00:00","twitter_card":"summary_large_image","twitter_misc":{"Ansl. lesetid":"1 minutt"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/genderapartheid.no\/petition-display\/","url":"https:\/\/genderapartheid.no\/petition-display\/","name":"Petition Display - Documenting Gender Apartheid","isPartOf":{"@id":"https:\/\/genderapartheid.no\/#website"},"datePublished":"2025-01-30T15:35:52+00:00","dateModified":"2025-02-01T11:57:34+00:00","breadcrumb":{"@id":"https:\/\/genderapartheid.no\/petition-display\/#breadcrumb"},"inLanguage":"nb-NO","potentialAction":[{"@type":"ReadAction","target":["https:\/\/genderapartheid.no\/petition-display\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/genderapartheid.no\/petition-display\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"GA","item":"https:\/\/genderapartheid.no\/"},{"@type":"ListItem","position":2,"name":"Petition Display"}]},{"@type":"WebSite","@id":"https:\/\/genderapartheid.no\/#website","url":"https:\/\/genderapartheid.no\/","name":"Dokumentering av Gender Apartheid","description":"Documenting the voices of women who have lived under gender apartheid.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/genderapartheid.no\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"nb-NO"}]}},"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"trp-custom-language-flag":false},"uagb_author_info":{"display_name":"Oliver Vass","author_link":"https:\/\/genderapartheid.no\/no\/author\/oliver\/"},"uagb_comment_info":0,"uagb_excerpt":"End Gender Apartheid! Petition","jetpack_sharing_enabled":true,"mfb_rest_fields":["title","yoast_head","yoast_head_json","uagb_featured_image_src","uagb_author_info","uagb_comment_info","uagb_excerpt","jetpack_sharing_enabled"],"_links":{"self":[{"href":"https:\/\/genderapartheid.no\/no\/wp-json\/wp\/v2\/pages\/708","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/genderapartheid.no\/no\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/genderapartheid.no\/no\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/genderapartheid.no\/no\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/genderapartheid.no\/no\/wp-json\/wp\/v2\/comments?post=708"}],"version-history":[{"count":21,"href":"https:\/\/genderapartheid.no\/no\/wp-json\/wp\/v2\/pages\/708\/revisions"}],"predecessor-version":[{"id":746,"href":"https:\/\/genderapartheid.no\/no\/wp-json\/wp\/v2\/pages\/708\/revisions\/746"}],"wp:attachment":[{"href":"https:\/\/genderapartheid.no\/no\/wp-json\/wp\/v2\/media?parent=708"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}