From 2e444113c82051b8538134b6d8f685679b08fa2a Mon Sep 17 00:00:00 2001 From: Kim Taylor Date: Tue, 17 Sep 2024 22:19:24 +1000 Subject: [PATCH] Plumb in Matt's PHP template. --- pledge-update/page_renderer.php | 28 +++++ pledge-update/pledge-page.php | 30 ++--- pledge-update/template.php | 198 ++++++++++++++++++++++++++++++++ 3 files changed, 235 insertions(+), 21 deletions(-) create mode 100644 pledge-update/page_renderer.php create mode 100644 pledge-update/template.php diff --git a/pledge-update/page_renderer.php b/pledge-update/page_renderer.php new file mode 100644 index 0000000..773a33a --- /dev/null +++ b/pledge-update/page_renderer.php @@ -0,0 +1,28 @@ +renderPledgePage($councilData, $candidateData, $mediaData); +if ($pageContent === null) { + exit(2); +} + +echo $pageContent; exit(0); diff --git a/pledge-update/template.php b/pledge-update/template.php new file mode 100644 index 0000000..a0cea5c --- /dev/null +++ b/pledge-update/template.php @@ -0,0 +1,198 @@ +Streets People Love Pledge and Survey"; +if (isset($config["survey"])) { + $surveyLink = $config["survey"]; +} + +?> + + +

The Streets People Love campaign has created scorecards for candidates in the 2024 council elections. Scorecards have been generated based on a candidate's engagement with the Streets People Love campaign, their commitment to our pledge, their responses to a survey and input from campaign members located in the local government area in which they are running.

+ + + +

Can't see a candidate you know is running? Candidates who don't take our survey won't appear on this page. Feel free to send your local candidates the and let them know it's important to local residents that they do take part, so that we can vote for those who want to build the streets people love.

+ + + + +
" alt="" class="wp-image-" style="aspect-ratio:16/9;object-fit:cover"/>
+ + + + 1) { + $wardsDescription = $config['councilName'] . " is divided into " . $wardCount . " wards:"; + } else { + $wardsDescription = $config['councilName'] . " is unsubdivided and does not contain any wards."; + } + + ?> + + +

+ + + + +
" target="_blank" rel="noreferrer noopener">" alt="" class="wp-image-" style="width:550px"/>
+ + + + 1): ?> + + 8) { + $wardListChunkSize = ceil($wardCount / 2); + } else { + $wardListChunkSize = $wardCount; + } + + $wardChunks = array_chunk($config['wardNames'], $wardListChunkSize); + + ?> + +
+ + + +
+ + + +
    + + + +
  • + + + +
+ + + +
+ + + +
+ + + +

+ + + + + + $groupName): ?> + + +

+ + + 0): + ?> + + + + + +
+ + + +
+ + + + + +
+ + + +

+ + + +

+ + + +
+ + + +
+ + + + + + +

No candidates in this ward have completed the survey. Send your local candidates the and ask them to take part so that local residents can vote for the candidates who want to build the streets people love.

+ + + + + + + + +

+ + \ No newline at end of file