gen_html_categories.php (4459B)
1 <?php 2 function gen_html_categories($config) { 3 ?> 4 5 <h3 id="sources" style="margin-top:5em;"> 6 Eigenen Nachrichten-Feed generieren 7 </h3> 8 <p> 9 Wähle beliebig viele Nachrichtenquellen aus der unteren Liste aus 10 und klicke auf den <strong>Nachrichten-Feed erzeugen</strong> Knopf. 11 Speichere die darauf angebotene OPML-Datei ab und importiere sie in 12 deinen RSS-Reader. 13 </p> 14 <p> 15 Kontra bietet zur Zeit Zugriff auf 16 <strong><?php echo count($config["sources"]); ?></strong> 17 Nachrichten-Feeds aus 18 <strong><?php echo count($config["publisher"]); ?></strong> 19 unterschiedlichen Quellen, zu 20 <strong><?php echo count($config["topics"]); ?></strong> 21 Themenbereichen, innerhalb von 22 <strong><?php echo count($config["regions"]); ?></strong> 23 Regionen, in 24 <strong><?php echo count($config["languages"]); ?></strong> 25 verschiedenen Sprachen. Nutze die Suchfunktion und die 26 Kategorienliste, um die Auswahl zu erleichtern. 27 </p> 28 <!-- Filterbar --> 29 <input 30 id="sources_filterbar" 31 name="sources" 32 type="text" 33 placeholder="Suche nach Nachrichtenquellen oder Kategorien..." 34 oninput="filter_sources('sources_filterbar');" 35 > 36 <noscript> 37 <div class="notice"> 38 <p> 39 Achtung: Die Nutzung der Suchfunktion benötigt aktiviertes 40 JavaScript. Entweder unterstützt dein Browser diese 41 Funktion nicht, oder du hast sie auf dieser Seite blockiert. 42 <strong> 43 Du kannst dennoch einen Nachrichten-Feed erzeugen, jedoch 44 ohne die Suchfunktion oben dafür nutzen zu können. 45 </strong> 46 </p> 47 </div> 48 </noscript> 49 50 <!-- Category Buttons --> 51 <details id="categories"> 52 <summary>Kategorien</summary> 53 54 <h4>Themen</h4> 55 <div class="row"> 56 57 <!-- List all configured regions --> 58 <?php 59 foreach ($config["topics"] as $topic) { 60 ?> 61 <button 62 onclick="filter_category('<?php echo $topic["name"]; ?>');" 63 title="<?php echo $topic["description"]; ?>" 64 > 65 <?php echo "#" . $topic["name"]; ?> 66 </button> 67 <?php 68 } 69 ?> 70 71 </div> 72 73 <h4>Regionen</h4> 74 <div class="row"> 75 76 <!-- List all configured regions --> 77 <?php 78 foreach ($config["regions"] as $region) { 79 ?> 80 <button 81 onclick="filter_category('<?php echo $region["name"]; ?>');" 82 title="<?php echo $region["description"]; ?>" 83 > 84 <?php echo "#" . $region["name"]; ?> 85 </button> 86 <?php 87 } 88 ?> 89 90 </div> 91 92 <h4>Sprachen</h4> 93 <div class="row"> 94 95 <!-- List all configured languages --> 96 <?php 97 foreach ($config["languages"] as $language) { 98 ?> 99 <button 100 onclick="filter_category('<?php echo $language["name"]; ?>');" 101 title="<?php echo $language["description"]; ?>" 102 > 103 <?php echo "#" . $language["name"]; ?> 104 </button> 105 <?php 106 } 107 ?> 108 109 </div> 110 111 <h4>Zugriff</h4> 112 <div class="row"> 113 114 <!-- List all configured access types --> 115 <?php 116 foreach ($config["access"] as $access) { 117 ?> 118 <button 119 onclick="filter_category('<?php echo $access["name"]; ?>');" 120 title="<?php echo $access["description"]; ?>" 121 > 122 <?php echo "#" . $access["name"]; ?> 123 </button> 124 <?php 125 } 126 ?> 127 128 </div> 129 130 <h4>Medium</h4> 131 <div class="row"> 132 133 <!-- List all configured media --> 134 <?php 135 foreach ($config["medium"] as $medium) { 136 ?> 137 <button 138 onclick="filter_category('<?php echo $medium["name"]; ?>');" 139 title="<?php echo $medium["description"]; ?>" 140 > 141 <?php echo "#" . $medium["name"]; ?> 142 </button> 143 <?php 144 } 145 ?> 146 147 </div> 148 149 <h4>Quellen</h4> 150 <div class="row"> 151 152 <!-- List all configured sources --> 153 <?php 154 foreach ($config["publisher"] as $publisher) { 155 ?> 156 <button 157 onclick="filter_category('<?php echo $publisher["button"]; ?>');" 158 title="<?php echo $publisher["description"]; ?>" 159 > 160 <?php echo "#" . $publisher["button"]; ?> 161 </button> 162 <?php 163 } 164 ?> 165 166 </div> 167 168 </details> 169 170 <?php 171 } 172 ?>