pub / newsplanet

Planet-Style Newsfeed generated with perlanet
git clone https://src.jayvii.de/pub/newsplanet.git
Home | Log | Files | Exports | Refs | README | RSS

index.php (3353B)


      1 <!-- SPDX-License-Identifier: AGPL-3.0-or-later
      2      SPDX-FileCopyrightText: 2021-2025 JayVii <jayvii[AT]posteo[DOT]de>
      3 -->
      4 
      5 <!DOCTYPE html>
      6 <html>
      7   <head>
      8     <meta charset="utf-8">
      9     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
     10     <title>Newsplanet - Planet-style newsfeed</title>
     11     <meta name="description" content="Planet-style newsfeed">
     12     <link rel="icon" type="image/png" href="assets/favicon.png">
     13     <link rel="icon" type="image/png" sizes="16x16" href="assets/favicon_16.png">
     14     <link rel="icon" type="image/png" sizes="32x32" href="assets/favicon_32.png">
     15     <link rel="icon" type="image/png" sizes="64x64" href="assets/favicon_64.png">
     16     <link rel="icon" type="image/png" sizes="128x128"
     17       href="assets/favicon_128.png"
     18     />
     19     <link rel="apple-touch-icon" href="assets/favicon.png">
     20     <link rel="stylesheet" type="text/css" href="assets/css/simple.min.css">
     21     <link rel="stylesheet" type="text/css" href="assets/css/custom.css">
     22     <link crossorigin="use-credentials" rel="manifest" href="manifest.json">
     23     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     24     <meta name="robots" content="noindex">
     25   </head>
     26 
     27   <body>
     28 
     29     <header>
     30       <nav>
     31         <!-- Source Code -->
     32         <a href="https://src.jayvii.de/pub/newsplanet/" target="_blank">
     33           Source
     34         </a>
     35         <!-- Privacy Policy -->
     36         <a href="https://www.jayvii.de/privacy/#newsjayviide" target="_blank">
     37           Privacy
     38         </a>
     39       </nav>
     40       <!-- Feed Title -->
     41       <h1>Newsplanet</h1>
     42     </header>
     43 
     44     <main>
     45 
     46       <h4>About</h4>
     47       <p>
     48         <em>Newsplanet</em> is a news aggregator combining news from various
     49         sources and places into simple and distraction free feeds. All feeds are
     50         generated using the Free and Open Source
     51         <a href="https://github.com/davorg-cpan/perlanet/" target="_blank">
     52           perlanet
     53         </a>.
     54       </p><br>
     55 
     56       <table>
     57 
     58 <?php
     59   foreach (glob("perlanetrc/[0-9a-z_]*.yaml") as $yamlfile) {
     60     $yaml = explode(PHP_EOL, file_get_contents($yamlfile));
     61     $title_arr = array_values(preg_grep("/^title:.*$/", $yaml));
     62     $title = preg_replace("/^title:\s*/", "", $title_arr[0]);
     63     $desc_arr = array_values(preg_grep("/^description:.*$/", $yaml));
     64     $desc = preg_replace("/^description:\s*/", "", $desc_arr[0]);
     65     $url_arr = array_values(preg_grep("/^url:.*$/", $yaml));
     66     $url = preg_replace("/^url:\s*/", "", $url_arr[0]);
     67 ?>
     68 
     69         <tr>
     70           <th><?php echo $title; ?></th>
     71           <td><?php echo $desc; ?></td>
     72           <td style="text-align:center;">
     73             <a href="<?php echo $url; ?>" class="button" rel="nofollow">
     74               Open
     75             </a>
     76           </td>
     77         </tr>
     78 
     79 <?php
     80   }
     81 ?>
     82 
     83       </table>
     84 
     85     </main>
     86 
     87     <footer>
     88       <h4>Disclaimer:</h4>
     89       <p>
     90         The news headlines, content or attitudes of the editors and authors of
     91         the news outlets, blogs and newspapers featured here do not necessarily
     92         reflect the opinions and attitudes of the operators of this
     93         <em>Newsplanet</em> instance and this website. <em>Newsplanet</em> is a
     94         news aggregator that brings together content from many different
     95         sources, but has no influence on the editorial content directly.
     96       </p>
     97     </footer>
     98 
     99   </body>
    100 </html>