Update text.
This commit is contained in:
@@ -1,41 +1,25 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
function sluggify($input) {
|
function sluggify($input) {
|
||||||
return strtolower(str_replace(' ', '-', $input));
|
return strtolower(str_replace(' ', '-', $input));
|
||||||
}
|
}
|
||||||
|
|
||||||
$surveyLink = "<a href=\"https://forms.gle/gnDNyBiVC64tDo2Y7\">Streets People Love Pledge and Survey</a>";
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- wp:paragraph -->
|
<!-- wp:paragraph -->
|
||||||
<p>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.</p>
|
<p>The Streets People Love campaign offers council candidates the opportunity to take the following pledge:</p>
|
||||||
<!-- /wp:paragraph -->
|
<!-- /wp:paragraph -->
|
||||||
|
|
||||||
<!-- wp:paragraph -->
|
<!-- wp:paragraph -->
|
||||||
<p>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 <?php echo $surveyLink; ?> 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.</p>
|
<p>If elected Councillor, I pledge to allocate budget and street space to build streets people love, and ensure that residents of all ages and abilities can safely move around our council area, irrespective of whether they choose to walk, cycle, wheel, use public transport or drive.</p>
|
||||||
<!-- /wp:paragraph -->
|
<!-- /wp:paragraph -->
|
||||||
|
|
||||||
<?php if (isset($media["header.jpg"])): ?>
|
<!-- wp:paragraph -->
|
||||||
<!-- wp:image {"id":<?php echo $media["header.jpg"]['id']; ?>,"aspectRatio":"16/9","scale":"cover","sizeSlug":"full","linkDestination":"none"} -->
|
<p>Candidates from these councils have taken the pledge:</p>
|
||||||
<figure class="wp-block-image size-full"><img src="<?php echo $media["header.jpg"]['url']; ?>" alt="" class="wp-image-<?php echo $media["header.jpg"]['id']; ?>" style="aspect-ratio:16/9;object-fit:cover"/></figure>
|
|
||||||
<!-- /wp:image -->
|
|
||||||
<?php endif ?>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
$councilCount = count($councils);
|
|
||||||
|
|
||||||
if ($councilCount > 1) {
|
|
||||||
$wardsDescription = "Candidates from " . $councilCount . " wards have taken the pledge:";
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- wp:paragraph -->
|
|
||||||
<p><?php echo $wardsDescription; ?></p>
|
|
||||||
<!-- /wp:paragraph -->
|
<!-- /wp:paragraph -->
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$councilCount = count($councils);
|
||||||
|
?>
|
||||||
|
|
||||||
<?php if ($councilCount > 1): ?>
|
<?php if ($councilCount > 1): ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
@@ -93,62 +77,53 @@ $surveyLink = "<a href=\"https://forms.gle/gnDNyBiVC64tDo2Y7\">Streets People Lo
|
|||||||
return $candidate['Council'] === $council;
|
return $candidate['Council'] === $council;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (count($groupCandidates) > 0):
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$columnCount = 4;
|
$columnCount = 4;
|
||||||
|
|
||||||
$chunkedCouncilCandidates = array_chunk($groupCandidates, $columnCount);
|
$chunkedCouncilCandidates = array_chunk($groupCandidates, $columnCount);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php foreach($chunkedCouncilCandidates as $chunk): ?>
|
<?php foreach($chunkedCouncilCandidates as $chunk): ?>
|
||||||
<!-- wp:columns -->
|
<!-- wp:columns -->
|
||||||
<div class="wp-block-columns">
|
<div class="wp-block-columns">
|
||||||
|
|
||||||
<?php for ($columnIdx = 0; $columnIdx < $columnCount; $columnIdx++): ?>
|
<?php for ($columnIdx = 0; $columnIdx < $columnCount; $columnIdx++): ?>
|
||||||
<!-- wp:column -->
|
<!-- wp:column -->
|
||||||
<div class="wp-block-column">
|
<div class="wp-block-column">
|
||||||
|
|
||||||
<?php if (array_key_exists($columnIdx, $chunk)): ?>
|
<?php if (array_key_exists($columnIdx, $chunk)): ?>
|
||||||
<?php
|
<?php
|
||||||
$candidate = $chunk[$columnIdx];
|
$candidate = $chunk[$columnIdx];
|
||||||
|
|
||||||
if (isset($candidate['Picture']) && strlen($candidate['image_url'])) {
|
if (isset($candidate['Picture']) && strlen($candidate['image_url'])) {
|
||||||
$candidate_image['url'] = $candidate['image_url'];
|
$candidate_image['url'] = $candidate['image_url'];
|
||||||
$candidate_image['id'] = $candidate['image_id'];
|
$candidate_image['id'] = $candidate['image_id'];
|
||||||
} else {
|
} else {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- wp:image {"id":<?php echo $candidate_image['id']; ?>,"width":"200px","height":"200px","scale":"cover","align":"center","style":{"color":{}},"className":"is-resized"} -->
|
<!-- wp:image {"id":<?php echo $candidate_image['id']; ?>,"width":"200px","height":"200px","scale":"cover","align":"center","style":{"color":{}},"className":"is-resized"} -->
|
||||||
<figure class="wp-block-image aligncenter is-resized"><img src="<?php echo $candidate_image['url']; ?>" alt="" class="wp-image-<?php echo $candidate_image['id']; ?>" style="object-fit:cover;width:200px;height:200px"/></figure>
|
<figure class="wp-block-image aligncenter is-resized"><img src="<?php echo $candidate_image['url']; ?>" alt="" class="wp-image-<?php echo $candidate_image['id']; ?>" style="object-fit:cover;width:200px;height:200px"/></figure>
|
||||||
<!-- /wp:image -->
|
<!-- /wp:image -->
|
||||||
|
|
||||||
<!-- wp:heading {"textAlign":"center","className":"wp-block-heading has-text-align-center has-medium-font-size","style":{"spacing":{"margin":{"top":"1rem","bottom":"0.5rem"}}}} -->
|
<!-- wp:heading {"textAlign":"center","className":"wp-block-heading has-text-align-center has-medium-font-size","style":{"spacing":{"margin":{"top":"1rem","bottom":"0.5rem"}}}} -->
|
||||||
<h2 class="wp-block-heading has-text-align-center has-medium-font-size" style="margin-top:1rem;margin-bottom:0.5rem"><strong><?php echo htmlspecialchars($candidate['Candidate Name']); ?></strong></h2>
|
<h2 class="wp-block-heading has-text-align-center has-medium-font-size" style="margin-top:1rem;margin-bottom:0.5rem"><strong><?php echo htmlspecialchars($candidate['Candidate Name']); ?></strong></h2>
|
||||||
<!-- /wp:heading -->
|
<!-- /wp:heading -->
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- /wp:column -->
|
<!-- /wp:column -->
|
||||||
<?php endfor; ?>
|
<?php endfor; ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- /wp:columns -->
|
<!-- /wp:columns -->
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|
||||||
<?php else: ?>
|
|
||||||
|
|
||||||
<!-- wp:paragraph -->
|
|
||||||
<p>No candidates in this ward have completed the survey. Send your local candidates the <?php echo $surveyLink; ?> and ask them to take part so that local residents can vote for the candidates who want to build the streets people love.</p>
|
|
||||||
<!-- /wp:paragraph -->
|
|
||||||
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|
||||||
<?php if (isset($config['footer'])): ?>
|
<?php if (isset($config['footer'])): ?>
|
||||||
|
|||||||
Reference in New Issue
Block a user