my website banner

new index, blog, library, .htaccess
authorDavid Polakovic <email@dpolakovic.space>
Fri, 8 Sep 2023 22:32:39 +0000 (00:32 +0200)
committerDavid Polakovic <email@dpolakovic.space>
Fri, 8 Sep 2023 22:32:39 +0000 (00:32 +0200)
15 files changed:
.htaccess
README.txt [changed mode: 0644->0755]
Styles/styles.css
blog.php [changed mode: 0755->0644]
blogs/blog-list.html
blogs/blog-template.html
clue.php [new file with mode: 0644]
cypher.html [new file with mode: 0755]
dir.html [deleted file]
index.php [changed mode: 0755->0644]
lib.php [new file with mode: 0644]
lib.txt [new file with mode: 0644]
rnd.html [deleted file]
rnd.txt [new file with mode: 0644]
test.html

index b705e0b709eda1795f7971ea1c82ea90d53d07fc..fcc6cd4f65ba16a2cc097ff4c7aa37852a0dfe79 100644 (file)
--- a/.htaccess
+++ b/.htaccess
@@ -1,16 +1,19 @@
-RewriteEngine on 
-#redirect /file.php to /file
+RewriteEngine on
+
 RewriteCond %{THE_REQUEST} \s/([^.]+)\.php [NC]
 RewriteRule ^ /%1 [NE,L,R]
-# now we will internally map /file to /file.php
 RewriteCond %{REQUEST_FILENAME}.php -f
 RewriteRule ^(.*)/?$ /$1.php  [L]
 
-RewriteEngine on
-#redirect /file.html to /file
+
 RewriteCond %{THE_REQUEST} \s/([^.]+)\.html [NC]
 RewriteRule ^ /%1 [NE,L,R]
-# now we will internally map /file to/ file.html
 RewriteCond %{REQUEST_FILENAME}.html -f
 RewriteRule ^(.*)/?$ /$1.html  [L]
 
+
+RewriteCond %{REQUEST_URI} !^/blogs/ [NC]
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteCond %{REQUEST_FILENAME} !-d
+RewriteRule ^(.*)$ blogs/$1 [L]
+
old mode 100644 (file)
new mode 100755 (executable)
index 7083b7d..32a7542
@@ -1,9 +1,24 @@
 my-website
+A simple website that I run. Check it out on https://dpolakovic.space
 Copyright 2023, David Polakovic
 
 ABOUT:
-This is simple website that I run. You can copy it for sure,
-but read the licence first.
+This is my static, old school, 90's, web 1.0 website. I despise the responsiveness,
+mobile design and client side computing. So I made html/php site to occupy little
+piece of cyberspace. Here is description of the files:
+
+.htaccess - hides file extensions in address bar
+index.php - the "About page" with contacts (not much going on here)
+blog.php - here I place my toughts which could be sorted by form (blogs or tweets)
+lib.php - my book library in one table
+gpg.html - page with my email gpg key
+test.html - default test page for troubleshooting new features
+both .txt files are sources for php sites with hand written content.
+blog/pics/ - pictures for blogs
+blogs/blog-list.html - source for tweets and links to blogs for blog.php
+blogs/blog-template.html - default template for new blogs
+Pictures/ - directory with all pictures for sites (except the blogs)
+Styles/* - dir with font I use and CSS style file 
 
 LICENSE:
 https://www.gnu.org/licenses/gpl-3.0.en.html
index deab5d7ea8deb6aff624ac060573be59e8d6ba43..e8d15bb55eda7c8e38042574c35b6dde50f57e28 100755 (executable)
@@ -1,3 +1,4 @@
+
 /* Styles.css
    this is a file for setting visual styles of the web page
    I am no webdesigner so the comments are rather simple
@@ -262,3 +263,5 @@ body {
     color: inherit;
     text-decoration: inherit;
 }
+/* styles.css */
+
old mode 100755 (executable)
new mode 100644 (file)
index 49345b1..fa574d7
--- a/blog.php
+++ b/blog.php
@@ -28,7 +28,7 @@
       <ul>
        <li><a href="https://dpolakovic.space">About</a></li>
        <li><a href="https://dpolakovic.space/blog.php">Blog</a></li>
-       <li><a href="https://dpolakovic.space/dir.html">My web directory</a></li>       
+       <li><a href="https://dpolakovic.space/lib.php">My library</a></li>      
        <li><a class="gitserver" href="https://git.dpolakovic.space">Git server</a>
        </li>
       </ul>
        <br>
        After eating and breathing, expressing opinions on the internet is the
        most important human need. Here are some of mine that occupied my mind
-       for more than few seconds.
+       for more than few seconds (but not much more). You can sort them to see
+       bigger blogs or smaller, more random "tweets".
       </p>
       <?php
 
-       $sort = 'new';
+       $sort = 'all';
 
        // check if hyperlink has been clicked
        if (isset($_GET['sort']))
        {
          $sort = $_GET['sort'];
        }
-        
-        // function to print file line by line
-        function printFile($filename)
-        {
-          $lines = file($filename);
-          foreach ($lines as $line)
-          {
-             echo $line . '<br>';
-          }
-        }
-
-        // function to print file line by line in reverse order
-        function printFileReversed($filename)
-        {
-          $lines = file($filename);
-          $reversedLines = array_reverse($lines);
-          foreach ($reversedLines as $line)
-          {
-             echo $line . '<br>';
-          }
-        }
-
-       // function to print file line by line which has "Edit" in them
-       function printFileEdited($filename)
-       {
-          $file = fopen($filename, "r");
+
+
+       // Function for front page, shows latest 5 entries
+       function printFile($filename) {
+          $lines = file($filename);
+         $count = 0;    // counter for lines
+         echo '<div>';  // a container for the lines
+
+             foreach ($lines as $line) {
+                echo $line . '<br>';
+                $count++;
+
+                // break the loop after displaying 5 lines
+                if ($count >= 5) {
+                   break; 
+                }
+             }
+
+          echo '</div>';
+       }
+
+
+       // Prints latest 15 tweets and offers user to see them all 
+       function printFileTweets($filename) {
+          $lines = file($filename); 
+          $count = 0; 
+          echo '<div>';
+
+             foreach ($lines as $line) {
+                // check for word "tweet" in the lines
+                if (strpos($line, 'tweet') !== false) {
+                   echo $line . '<br>'; // Display the line if it contains 'foo'
+                   $count++;
+
+                   if ($count >= 15) {
+                      break; // Break the loop after displaying 15 matching lines
+                   }
+                }
+             }
+
+         if ($count >= 15) {
+             // Display a clickable link if there are more than 15 matching lines
+             echo '<center><a href="https://dpolakovic.space/blog.php?sort=tweetsfull">Check the rest...</a></center>';
+         }
+
+         echo '</div>';
+       }
     
+  
+       // Prints all tweets
+       function printFileAllTweets($filename) {
+          $file = fopen($filename, "r");
+         
           while (($line = fgets($file)) !== false) {
-          if (strpos($line, 'Edited') !== false)
-              {
+             // check for word "tweet" in the lines
+             if (strpos($line, 'tweet') !== false) {
                 echo $line . '<br>';
-              }
-            }
-            fclose($file);
-         }     
+             }
+          }
+          fclose($file);
+       }
+
+
+       // Prints latest 15 blogs and offers user to see them all
+       function printFileBlogs($filename) {
+         $lines = file($filename); 
+         $count = 0; 
+         echo '<div>'; 
+
+         foreach ($lines as $line) {
+             // check for word "blog-prev" in the lines
+             if (strpos($line, 'blog-prev') !== false) {
+                echo $line . '<br>'; // Display the line if it contains 'foo'
+                $count++;
+
+                if ($count >= 15) {
+                   break; // Break the loop after displaying 15 matching lines
+                }
+             }
+         }
+
+         if ($count >= 15) {
+             // Display a clickable link if there are more than 15 matching lines
+             echo '<center><a href="https://dpolakovic.space/blog.php?sort=blogsfull">Check the rest...</a></center>';
+         }
+         echo '</div>';
+       }
+
+
+       // Prints all blogs
+       function printFileAllBlogs($filename) {
+          $file = fopen($filename, "r");
+         
+          while (($line = fgets($file)) !== false) {
+             // check for word "blog-prev" in the lines
+             if (strpos($line, 'blog-prev') !== false) {
+                echo $line . '<br>';
+             }
+          }
+          fclose($file);
+       }                   
       ?>
       <p>
        <center>
        Sort: &nbsp;
-       <a href="?sort=new">New first</a> &nbsp;
-       <a href="?sort=old">Old first</a> &nbsp;
-       <a href="?sort=edit">Edited only</a>
+       <!-- <a href="?sort=all">All</a> &nbsp; -->
+       <a href="?sort=tweets">Tweets</a> &nbsp;
+       <a href="?sort=blogs">Blogs</a>
        </center>
-      </p>
-      <p>
+      </p><br>
        <?php
-            //debug
-            //echo "<br>Current value of key: $key <br>";                                                 
-         if ($sort == "new")
-         {
-           printFile("./blogs/blog-list.html");
+          //debug
+          //echo "<br>Current value of key: $key <br>";        
+               
+         // Print file sorted by user input 
+
+          // save path to the file into variable... 
+          $filename = './blogs/blog-list.html';    
+      
+          // default - main page
+         if ($sort == "all") {
+           printFile($filename);
+         }
+
+          // show first 15 tweets
+         if ($sort == "tweets") {
+           printFileTweets($filename);
+         }
+
+          // show first 15 blogs
+         if ($sort == "blogs") {
+           printFileBlogs($filename);
          }
-         if ($sort == "old")
-         {
-           printFileReversed("./blogs/blog-list.html");
+
+          // show all tweets
+         if ($sort == "tweetsfull") {
+           printFileAllTweets($filename);
+         }
+
+          // show all blogs 
+          if ($sort == "blogsfull"){
+           printFileAllBlogs($filename);
          }
-         if ($sort == "edit")
-         {
-           printFileEdited("./blogs/blog-list.html");
-         }         
         ?>
-      </p>
       <br>
       </main>
 
       <a href="https://creativecommons.org/licenses/by-nc-nd/3.0/">CC BY-NC-ND 3.0</a>
       - <a href="https://git.dpolakovic.space/?p=my-website;a=tree">this site is free software</a>
     </footer>
+    <br><br>
     
   </body>
   </html>
index 0ba85c519835bfd676dcaa724a78509168927f5d..614ecc685302f37063c539861a13ae02243bc000 100755 (executable)
@@ -1 +1,2 @@
+<div class="tweet">01.01.2000<br>blah blah blah</div>
 <div class="blog-prev"><div class="blog-prev-img"><a href="https://dpolakovic.space/blogs/blog-template.html"><img src="https://dpolakovic.space/blogs/pics/bug.jpg" alt="text" style="object-position: 100% 0;"></a></div><div class="blog-prev-text">&nbsp;&nbsp;<a href="https://dpolakovic.space/blogs/blog-template.html">BLOG TITLE</a><br>&nbsp;&nbsp;DATE<br><i>&nbsp;&nbsp;text text text</i></div></div>
index 6c391affb6abd400958262b30916c4e7a61d28ee..b2983444a5b3954e4ba4e28c46044051d06855da 100755 (executable)
@@ -4,7 +4,7 @@
     <meta charset="UTF-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <title>Y2K38 bug</title>
+    <title>TITLE HERE</title>
     <link rel="icon"         href="../Pictures/dot.png">
     <link rel="stylesheet"   href="../Styles/styles.css?v=1.1">
     <link rel="author"       href="mailto:email@dpolakovic.space">
@@ -31,7 +31,7 @@
     <!-- page content -->
     <main class="content">
       <p>
-       <h2>Y2K38 bug</h2> 
+       <h2>TITLE HERE</h2> 
        <i>00.00.0000 - text text text</i>
        <br>
       <p>
diff --git a/clue.php b/clue.php
new file mode 100644 (file)
index 0000000..fb74f16
--- /dev/null
+++ b/clue.php
@@ -0,0 +1,111 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>dpolakovic.space</title>
+    <link rel="icon"         href="./Pictures/dot.png">
+    <link rel="stylesheet"   href="./Styles/styles.css?v=1.1">
+    <link rel="author"       href="mailto:email@dpolakovic.space">
+    <meta name="description" content="personal website and git server">
+    <meta name="author"      content="David Polakovic, 2023">
+  
+  </head>
+  <body>
+    
+    <!-- show pictures (banner) on top of the page -->
+    <div class="banner">
+      <p>
+       <img src="./Pictures/dpolakovic.png" alt="simple">
+       <img src="./Pictures/dot.png" alt="website">
+       <img src="./Pictures/space.png" alt="banner">
+      </p>
+    </div>
+    
+    <!-- navigation bar -->
+    <nav class="nav-bar">
+      <ul>
+       <li><a href="https://dpolakovic.space">About</a></li>
+       <li><a href="https://dpolakovic.space/blog.php">Blog</a></li>
+       <!-- <li><a href="https://dpolakovic.space/dir.html">My web directory</a></li> -->
+       <li><a href="https://dpolakovic.space/lib.php">My library</a></li>
+       <li><a href="https://dpolakovic.space/cypher.html">?</a></li>
+       <li><a class="gitserver" href="https://git.dpolakovic.space">Git server</a>
+       </li>
+      </ul>
+    </nav>
+
+    <!-- page content -->
+    <main class="content">
+      <p>
+       <h2> My library </h2> 
+       <i> Tell me what you read and I will tell you who you are. </i>
+       <br>
+       <br>
+       These are books I own and read. I tend to organize my library by topics
+       of the books, time I bought them, color of the cover, mood and other
+       subjective, chaotic and random rules. All of these are physical copies
+       of which almost half is from used bookstores.
+      </p>
+      <p>
+       Also, only ~5 million people speak my mother tongue, <i>Slovak</i>, so I
+       deeply value every opportunity I get to read a translated book. And since
+       most of my books are in Slovak language the table includes both English
+       title and traslation title as well.
+      </p>
+      <br>
+       <?php
+        // Read the contents of the lib.txt file
+        $fileContents = file_get_contents('lib.txt');
+
+        // Set the "*" as escape char for new table line
+        $rows = explode('*', $fileContents);
+
+        // Create the table
+        // the styles must be set here because the css won't work
+        // properly with this php monster
+        echo '<table border="1" style="border-collapse: collapse; border: 1px solid grey; width: 100%;">';
+
+        // Process each row
+        foreach ($rows as $key => $row) {
+       
+          // Set the "-" as escape char for new column
+          $columns = explode('-', $row);
+    
+          // Determine whether this is the first row
+          $isFirstRow = ($key === 0);
+    
+          // Start a new table row
+           echo '<tr>';
+    
+          // Process each column and create table cells
+          foreach ($columns as $column) {
+
+            // Use <th> for the first row, <td> for the rest
+             $cellTag = $isFirstRow ? 'th' : 'td';
+            // again... sorry for the styles
+             echo '<' . $cellTag . ' style="padding: 2px; border: 1px solid grey">' . htmlspecialchars($column) . '</' . $cellTag . '>';
+          }
+    
+        // End the table row
+        echo '</tr>';
+        }
+
+        // End the HTML table
+        echo '</table>';
+      ?>
+      <br><br>
+      </main>
+
+    <!-- footer  -->
+    <footer class="footer">      
+      copyright 2023 David Polakovic
+      - content of this web is licensed under
+      <a href="https://creativecommons.org/licenses/by-nc-nd/3.0/">CC BY-NC-ND 3.0</a>
+      - <a href="https://git.dpolakovic.space/?p=my-website;a=tree">this site is free software</a>
+    </footer>
+    <br><br>
+    
+  </body>
+  </html>
diff --git a/cypher.html b/cypher.html
new file mode 100755 (executable)
index 0000000..7805add
--- /dev/null
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>?</title>
+    <link rel="stylesheet"   href="./Styles/styles.css?v=1.1">
+  </head>
+  
+  <body>
+    <main class="content">
+      <br><br><br><br><br><br><br>
+      <center>
+       <h2>///revives.hours.hardly</h2>
+      </center>
+    </main>   
+  </body>
+  
+  </html>
diff --git a/dir.html b/dir.html
deleted file mode 100755 (executable)
index c709ff7..0000000
--- a/dir.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-  <head>
-    <meta charset="UTF-8">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge">
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <title>dpolakovic.space</title>
-    <link rel="icon"         href="./Pictures/dot.png">
-    <link rel="stylesheet"   href="./Styles/styles.css?v=1.1">
-    <link rel="author"       href="mailto:email@dpolakovic.space">
-    <meta name="description" content="personal website and git server">
-    <meta name="author"      content="David Polakovic, 2023">
-  
-  </head>
-  <body>
-    
-    <!-- show pictures (banner) on top of the page -->
-    <div class="banner">
-      <p>
-       <img src="./Pictures/dpolakovic.png" alt="simple">
-       <img src="./Pictures/dot.png" alt="website">
-       <img src="./Pictures/space.png" alt="banner">
-      </p>
-    </div>
-    
-    <!-- navigation bar -->
-    <nav class="nav-bar">
-      <ul>
-       <li><a href="https://dpolakovic.space">About</a></li>
-       <li><a href="https://dpolakovic.space/blog.php">Blog</a></li>
-       <li><a href="https://dpolakovic.space/dir.html">My web directory</a></li>
-       <li><a class="gitserver" href="https://git.dpolakovic.space">Git server</a>
-       </li>
-      </ul>
-    </nav>
-
-    <!-- page content -->
-    <main class="content">
-      <p>
-       <h2> My web directory </h2> 
-       <i> Let's explore the Web. </i>
-       <br>
-       <br>
-       Since the online space is vast and still expanding, it is good practice for
-       surfers to share links between each other in web directories like this one.
-       So here are links I thought you might find useful.
-      </p>
-      <p>
-       &nbsp;&nbsp; <a href="https://directory.fsf.org/wiki/Main_Page">Free software directory</a>
-       - a collaborative catalog of free software<br>
-       &nbsp;&nbsp; <a href="https://cidr.xyz/">Cidr.xyz</a>
-       - when you are setting up network and you don't want to die over subnet
-       tables [3]<br>
-       &nbsp;&nbsp; <a href="https://tube.cadence.moe/">CloudTube</a>
-       - free software instance of youtube.com<br> 
-       &nbsp;&nbsp; <a href="https://www.floppydisk.com">Floppydisk.com</a>
-       - new and refurbished floppies for okay prices [3]<br>
-       &nbsp;&nbsp; <a href="https://perlmonks.org/">Perl monks</a>
-       - best place  to seek help and wisdom in Perl<br>
-       &nbsp;&nbsp; <a href="https://cyber.dabamos.de/88x31/index.html">Web buttons</a>
-       - here is list of 4000+ web buttons from Cyber Vanguards website<br>
-       &nbsp;&nbsp; <a href="https://winworldpc.com/home">WinWorld</a>
-       - online museum/library of vintage software<br>
-       &nbsp;&nbsp; <a href="https://en.uesp.net/wiki/Main_Page">UESP Wiki</a>
-       - everything I ever needed for TES III Morrowind I found here [2]<br> 
-      </p>
-      <p>
-       Some of these websites contains "allergens"<br>
-       [1] - advertisements,
-       [2] - unnecessary cookies, 
-       [3] - proprietary javascript
-      </p>
-      <br>
-      </main>
-
-    <!-- footer  -->
-    <footer class="footer">      
-      copyright 2023 David Polakovic
-      - content of this web is licensed under
-      <a href="https://creativecommons.org/licenses/by-nc-nd/3.0/">CC BY-NC-ND 3.0</a>
-      - <a href="https://git.dpolakovic.space/?p=my-website;a=tree">this site is free software</a>
-    </footer>
-    <br><br>
-    
-  </body>
-  </html>
old mode 100755 (executable)
new mode 100644 (file)
index d7555c0..a2db92f
--- a/index.php
+++ b/index.php
@@ -26,7 +26,8 @@
       <ul>
        <li><a href="https://dpolakovic.space">About</a></li>
        <li><a href="https://dpolakovic.space/blog.php">Blog</a></li>
-       <li><a href="https://dpolakovic.space/dir.html">My web directory</a></li>
+       <!-- <li><a href="https://dpolakovic.space/dir.html">My web directory</a></li> -->
+       <li><a href="https://dpolakovic.space/lib.html">My library</a></li>
        <li><a class="gitserver" href="https://git.dpolakovic.space">Git server</a>
        </li>
       </ul>
@@ -43,7 +44,7 @@
        <a href="./Pictures/david.jpg" class="hide-link">David</a>
        and <?php
 
-        $file = "./rnd.html";
+        $file = "./rnd.txt";
         
         // Read all lines from the file into an array
         $lines = file($file, FILE_IGNORE_NEW_LINES); 
       <a href="https://creativecommons.org/licenses/by-nc-nd/3.0/">CC BY-NC-ND 3.0</a>
       <br>
       <a href="https://git.dpolakovic.space/?p=my-website;a=tree">this site is free software</a>
-    </footer>   
+    </footer>
+    <div class="what-is-this">
+      <center>
+      ..-. .. -. -.. / - .... . / -... .. --. --. . ... - / -.. --- - / .. -. / .-.. .. -... .-. .- .-. -.-- 
+      </center>
+    </div>
   </body>
   </html>
diff --git a/lib.php b/lib.php
new file mode 100644 (file)
index 0000000..eaee183
--- /dev/null
+++ b/lib.php
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>dpolakovic.space</title>
+    <link rel="icon"         href="./Pictures/dot.png">
+    <link rel="stylesheet"   href="./Styles/styles.css?v=1.1">
+    <link rel="author"       href="mailto:email@dpolakovic.space">
+    <meta name="description" content="personal website and git server">
+    <meta name="author"      content="David Polakovic, 2023">
+  
+  </head>
+  <body>
+    
+    <!-- show pictures (banner) on top of the page -->
+    <div class="banner">
+      <p>
+       <img src="./Pictures/dpolakovic.png" alt="simple">
+       <a href="https://dpolakovic.space/clue.php">
+         <img src="./Pictures/dot.png" alt="website">
+       </a>
+       <img src="./Pictures/space.png" alt="banner">
+      </p>
+    </div>
+    
+    <!-- navigation bar -->
+    <nav class="nav-bar">
+      <ul>
+       <li><a href="https://dpolakovic.space">About</a></li>
+       <li><a href="https://dpolakovic.space/blog.php">Blog</a></li>
+       <!-- <li><a href="https://dpolakovic.space/dir.html">My web directory</a></li> -->
+       <li><a href="https://dpolakovic.space/lib.php">My library</a></li>
+       <li><a class="gitserver" href="https://git.dpolakovic.space">Git server</a>
+       </li>
+      </ul>
+    </nav>
+
+    <!-- page content -->
+    <main class="content">
+      <p>
+       <h2> My library </h2> 
+       <i> Tell me what you read and I will tell you who you are. </i>
+       <br>
+       <br>
+       These are books I own and read. I tend to organize my library by topics
+       of the books, time I bought them, color of the cover, mood and other
+       subjective, chaotic and random rules. All of these are physical copies
+       of which almost half is from used bookstores.
+      </p>
+      <p>
+       Also, only ~5 million people speak my mother tongue, <i>Slovak</i>, so I
+       deeply value every opportunity I get to read a translated book. And since
+       most of my books are in Slovak language the table includes both English
+       title and traslation title as well.
+      </p>
+      <br>
+       <?php
+        // Read the contents of the lib.txt file
+        $fileContents = file_get_contents('lib.txt');
+
+        // Set the "*" as escape char for new table line
+        $rows = explode('*', $fileContents);
+
+        // Create the table
+        // the styles must be set here because the css won't work
+        // properly with this php monster
+        echo '<table border="1" style="border-collapse: collapse; border: 1px solid grey; width: 100%;">';
+
+        // Process each row
+        foreach ($rows as $key => $row) {
+       
+          // Set the "-" as escape char for new column
+          $columns = explode('-', $row);
+    
+          // Determine whether this is the first row
+          $isFirstRow = ($key === 0);
+    
+          // Start a new table row
+           echo '<tr>';
+    
+          // Process each column and create table cells
+          foreach ($columns as $column) {
+
+            // Use <th> for the first row, <td> for the rest
+             $cellTag = $isFirstRow ? 'th' : 'td';
+            // again... sorry for the styles
+             echo '<' . $cellTag . ' style="padding: 2px; border: 1px solid grey">' . htmlspecialchars($column) . '</' . $cellTag . '>';
+          }
+    
+        // End the table row
+        echo '</tr>';
+        }
+
+        // End the HTML table
+        echo '</table>';
+      ?>
+      <br><br>
+      </main>
+
+    <!-- footer  -->
+    <footer class="footer">      
+      copyright 2023 David Polakovic
+      - content of this web is licensed under
+      <a href="https://creativecommons.org/licenses/by-nc-nd/3.0/">CC BY-NC-ND 3.0</a>
+      - <a href="https://git.dpolakovic.space/?p=my-website;a=tree">this site is free software</a>
+    </footer>
+    <br><br>
+    
+  </body>
+  </html>
diff --git a/lib.txt b/lib.txt
new file mode 100644 (file)
index 0000000..6426dc7
--- /dev/null
+++ b/lib.txt
@@ -0,0 +1,2 @@
+Lng - Author -  English title -  Translation title (if different) *
+AA - Jon Doe - A book - Kniha *
diff --git a/rnd.html b/rnd.html
deleted file mode 100755 (executable)
index 33307f6..0000000
--- a/rnd.html
+++ /dev/null
@@ -1,21 +0,0 @@
-my favorite junk food is fish sticks.
-my favorite dinosaur is pterodactyl.
-my favorite drink is White russian (and yes, it happened after I've seen Big Lebowsky).
-my favorite color is yellow.
-I still write "www" in address bar.
-I unironically liked The Phantom Menace.
-I have one tomcat.
-I enjoy hacking board games.
-I willingly play healers in D&D.
-I prefer Star Trek TNG over the Original Series.
-I <i>bn gbo pg dszquphsbgz</i> ;-) .
-I still use shortcuts on desktop.
-I prefer pencils over pens.
-I still use floppy disks for backups.
-I don't drink coffe, but sometimes I drink mate tea.
-I use everything except bookmarks for bookmarking.
-I think way too much about time travel.
-I own ~200g of meteorites.
-I never sit on swivel chairs.
-I don't use Arch btw (I use Trisquel!).
-my favorite ice cream flavor is vanilla.
diff --git a/rnd.txt b/rnd.txt
new file mode 100644 (file)
index 0000000..ada6b59
--- /dev/null
+++ b/rnd.txt
@@ -0,0 +1,2 @@
+example.
+and here is another example.
index dbc25839ff7e3e64df7c0b9c31bb5e297e9e431e..fad1331ed55198c4842c1d6abcf2eb9aba39ec9e 100755 (executable)
--- a/test.html
+++ b/test.html
@@ -28,7 +28,8 @@
       <ul>
        <li><a href="https://dpolakovic.space">About</a></li>
        <li><a href="https://dpolakovic.space/blog.php">Blog</a></li>
-       <li><a href="https://dpolakovic.space/dir.html">My web directory</a></li>
+       <!-- <li><a href="https://dpolakovic.space/dir.html">My web directory</a></li> -->
+       <li><a href="https://dpolakovic.space/lib.html">My library</a></li> 
        <li><a href="https://dpolakovic.space/test.html">TEST</a></li>
        <li><a class="gitserver" href="https://git.dpolakovic.space">Git server</a>
        </li>