Improve layout and CSS
authorJoey Schulze <joey@infodrom.org>
Wed, 16 Dec 2015 16:28:32 +0000 (16:28 +0000)
committerJoey Schulze <joey@infodrom.org>
Wed, 16 Dec 2015 16:28:32 +0000 (16:28 +0000)
class/teachings.class.php
src/infocon.css

index faa9372..ee74be5 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
 <?php
 
-define('TEACHINGS', '<root_prefix>/teachings.txt');
+define('TEACHINGS', $_SERVER['DOCUMENT_ROOT'] . '/teachings.txt');
 
 class Teachings {
   private static $instance = false;
 
 class Teachings {
   private static $instance = false;
@@ -62,13 +62,16 @@ class Teachings {
 
     if (strlen($html)) {
       $html = '<table class="teachings" width="100%">'
 
     if (strlen($html)) {
       $html = '<table class="teachings" width="100%">'
+       . '<thead>'
        . '<tr>'
        . '<th width="20%">Datum</th>'
        . '<th width="60%" align="left">Beschreibung</th>'
        . '<th width="20%">Link</th>'
        . '</tr>'
        . '<tr>'
        . '<th width="20%">Datum</th>'
        . '<th width="60%" align="left">Beschreibung</th>'
        . '<th width="20%">Link</th>'
        . '</tr>'
-       . '<tr>'
+       . '</thead>'
+       . '<tbody>'
        . $html
        . $html
+       . '</tbody>'
        . '</table>';
     }
     return $html;
        . '</table>';
     }
     return $html;
index 5faa86f..57998db 100644 (file)
@@ -186,6 +186,17 @@ html>body div.vmenu ul li a {
   width: auto;
 }
 
   width: auto;
 }
 
+table.teachings {
+  font-size: inherit;
+  border: 1px solid #aaa;
+}
+table.teachings tbody tr:nth-child(even) {
+  background: #d0d0d0;
+}
+table.teachings tbody tr:nth-child(odd) {
+  background: #eeeeee;
+}
+
 /*
  * Local variables:
  * mode: indented-text
 /*
  * Local variables:
  * mode: indented-text