pub / kontra

Der linke Newsaggregator.
git clone src.jayvii.de/pub/kontra.git
Home | Log | Files | Exports | Refs | README | RSS

commit 10cc83bca5929a9789d6703a9ef06850c645990e
parent cd63fa3c05ce09a2ceeac0d4996d4de2f561b03c
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Thu,  3 Jul 2025 12:19:14 +0200

fix: adjust index page to categories changes

Diffstat:
Mindex.php | 56++++++++++++++++++++++----------------------------------
1 file changed, 22 insertions(+), 34 deletions(-)

diff --git a/index.php b/index.php @@ -52,15 +52,20 @@ <?php /* Cycle through each source and write source entry */ + $indexes = array( + "regions", "languages", "access", "medium", "topics" + ); foreach ($sources as $source) { /* Create category list */ $categories = array(); - foreach ($source["categories"] as $category) { - array_push( - $categories, - $config["categories"][$category]["name"] - ); + foreach ($indexes as $index) { + foreach ($source[$index] as $category) { + array_push( + $categories, + $config[$index][$category]["name"] + ); + } } ?> @@ -70,6 +75,7 @@ text="<?php echo $source["title"]; ?>" category="<?php echo implode(",", $categories); ?>" xmlUrl="<?php echo $source["rss"]; ?>" + htmlUrl="<?php echo $source["web"]; ?>" /> <?php @@ -178,15 +184,15 @@ Themenbereichen, aus dem sich Nutzer:innen nach ihren Interessen eigene Feeds erzeugen können. Die hier herunterladbaren <a href="https://de.wikipedia.org/wiki/Outline_Processor_Markup_Language" target="_blank"> - Nachrichten-Feed Dateien - </a> können in beliebigen + Nachrichten-Feed Dateien</a> + können in beliebigen <a href="https://de.wikipedia.org/wiki/Feedreader" target="_blank"> - Feed-Readern - </a> eingeladen uns sofort genutzt werden! + Feed-Readern</a> + eingeladen und sofort genutzt werden! Zum Beispiel in diesen <a href="https://fsfe.org/freesoftware/freesoftware.de.html" target="_blank"> - Freien - </a> und kostenlosen Apps für Android und iOS: + Freien</a> + und kostenlosen Apps für Android und iOS: <ul> <li><a href="https://apps.apple.com/us/app/netnewswire-rss-reader/id1480640210" target="_blank">NetNewsWire (iOS)</a></li> <li><a href="https://apps.apple.com/us/app/twine-rss-reader/id6465694958" target="_blank">Twine (iOS)</a></li> @@ -250,7 +256,7 @@ <details id="categories"> <summary>Kategorien</summary> - <h3>Regionen</h3> + <h4>Regionen</h4> <div class="row"> <!-- List all configured regions --> @@ -265,21 +271,11 @@ </button> <?php } - foreach ($config["local"] as $region) { - ?> - <button - onclick="filter_category('<?php echo $region["name"]; ?>');" - title="<?php echo $region["description"]; ?>" - > - <?php echo "#" . $region["name"]; ?> - </button> - <?php - } ?> </div> - <h3>Sprachen</h3> + <h4>Sprachen</h4> <div class="row"> <!-- List all configured regions --> @@ -298,7 +294,7 @@ </div> - <h3>Zugriff</h3> + <h4>Zugriff</h4> <div class="row"> <!-- List all configured regions --> @@ -317,7 +313,7 @@ </div> - <h3>Medium</h3> + <h4>Medium</h4> <div class="row"> <!-- List all configured regions --> @@ -336,7 +332,7 @@ </div> - <h3>Themen</h3> + <h4>Themen</h4> <div class="row"> <!-- List all configured regions --> @@ -411,14 +407,6 @@ </mark> <?php } - foreach ($source["local"] as $local) { - $catentry = $config["local"][$local] - ?> - <mark title="<?php echo $catentry["description"];?>"> - <?php echo "#" . $catentry["name"]; ?> - </mark> - <?php - } ?> </td> </tr>