Update pledge page to generate pledges for federal divisions.

This commit is contained in:
Kim Taylor
2025-03-04 22:28:19 +11:00
parent f5f04d01eb
commit 9b9c1a6869
2 changed files with 6 additions and 6 deletions

View File

@@ -4,7 +4,7 @@
# The folder containing data for each council.
# Includes the list of candidates and any media.
DATA_PATH="../spl-data"
DATA_PATH="../spl-data/federal_2025"
DEFAULT_IMAGE="../spl-data/default.png.json"
# Iterate over folders in data path
@@ -22,4 +22,4 @@ done
content=$(php pledge-update/pledge-page.php --candidates-files "${candidates_files[*]}" \
--default-image $DEFAULT_IMAGE)
echo "$content" | wp post update 12106 -
echo "$content" | wp post update 245816 -

View File

@@ -5,7 +5,7 @@ function sluggify($input) {
?>
<!-- wp:paragraph -->
<p>The Streets People Love campaign offers council candidates the opportunity to take the following pledge:</p>
<p>The Streets People Love campaign offers federal candidates the opportunity to take the following pledge:</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph {"style":{"color":{"background":"#10B5B0"}}} -->
@@ -13,7 +13,7 @@ function sluggify($input) {
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>Candidates from these councils have taken the pledge:</p>
<p>Candidates from these divisions have taken the pledge:</p>
<!-- /wp:paragraph -->
<?php
@@ -44,9 +44,9 @@ $councilCount = count($councils);
<!-- wp:list {"style":{"spacing":{"margin":{"top":"0","right":"0","bottom":"0","left":"0"}}}} -->
<ul style="margin-top:0;margin-right:0;margin-bottom:0;margin-left:0" class="wp-block-list">
<?php foreach($councilChunks[$columnIdx] as $councilName): ?>
<?php foreach($councilChunks[$columnIdx] as $divisionName): ?>
<!-- wp:list-item -->
<li><a href="#<?php echo sluggify($councilName); ?>"><?php echo $councilName; ?></a></li>
<li><a href="#<?php echo sluggify($divisionName); ?>"><?php echo $divisionName; ?></a></li>
<!-- /wp:list-item -->
<?php endforeach; ?>