tty-Startseite für bessere Darstellung in ELinks optimiert
authorMalte Bublitz <malte@rolltreppe3.de>
Sun, 8 Jan 2023 18:31:20 +0000 (19:31 +0100)
committerMalte Bublitz <malte@rolltreppe3.de>
Sun, 8 Jan 2023 18:31:20 +0000 (19:31 +0100)
template.inc.php
tty/index.php
tty/tty.css [new file with mode: 0644]

index 05f59d47344623d1c36039c1429e8ab3011030a8..c6b3abe726cc69c167d2c31db8c7e4978e86f85a 100644 (file)
@@ -30,8 +30,10 @@ unset($i);
 <html lang="<?=$Data["Meta"]["Lang"]?>">
        <head>
                <meta charset="<?=$Data["Meta"]["Charset"]?>">
+<?php if (@$Data["Meta"]["DisablePreconnectLinks"] !== true): ?>
                <link rel="preconnect" href="https://fonts.googleapis.com"> 
                <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+<?php endif; ?>
                
                <meta name="viewport" content="width=device-width, initial-scale=1.0">
                <meta http-equiv="X-UA-Compatible" content="IE=edge">
@@ -41,7 +43,11 @@ unset($i);
                <meta name="author" content="<?=$Data["Meta"]["Author"]?>">
                <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/dialog-polyfill/0.4.9/dialog-polyfill.min.css">
 <?php foreach ($Data["Meta"]["Stylesheets"] as $css): ?>
+       <?php if (!is_array($css)): ?>
                <link rel="stylesheet" type="text/css" href="<?=$css?>">
+       <?php else: ?>
+               <link rel="stylesheet" type="text/css" media="<?=$css[1]?>" href="<?=$css[0]?>">
+       <?php endif; ?>
 <?php endforeach; ?>
                <link rel="icon" type="image/png" href="<?=$Data["Meta"]["Icon"]?>" sizes="64x64">
                <!--[if IE]><script>document.charset="<?=$Data["Meta"]["Charset"]?>";</script><![endif]-->
@@ -83,7 +89,13 @@ unset($i);
                        <p>&nbsp;</p>
                        
 <?php endif; ?>
+<?php if(@$Data["WhoAmI_TagName"] == "h1"): ?>
+                       <h1 id="whoami">
+                               <a href="./"><?=$Data["WhoAmI"]?></a>
+                       </h1>
+<?php else: ?>
                        <section id="whoami"><?=$Data["WhoAmI"]?></section>
+<?php endif; ?>
                        
 <?php if (!$Data["JS"]): ?>
                        <p>&nbsp;</p>
@@ -171,7 +183,8 @@ foreach ($Data["Links"] as $LinkRow) {
                        </p>
                </footer>
                
-               <script src="https://cdnjs.cloudflare.com/ajax/libs/dialog-polyfill/0.5.6/dialog-polyfill.min.js" integrity="sha512-qUIG93zKzcLBVD5RGRbx2PBmbVRu+tJIl+EPLTus0z8I1AMru9sQYdlf6cBacSzYmZVncB9rcc8rYBnazqgrxA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
+               <!--<script src="https://cdnjs.cloudflare.com/ajax/libs/dialog-polyfill/0.5.6/dialog-polyfill.min.js" integrity="sha512-qUIG93zKzcLBVD5RGRbx2PBmbVRu+tJIl+EPLTus0z8I1AMru9sQYdlf6cBacSzYmZVncB9rcc8rYBnazqgrxA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>-->
+               <script src="https://xyz.malte70.de/js/dialog-polyfill/dialog-polyfill.min.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
                <script>
                        //"use_ strict";
 <?php
index 99a6ce0329b84aa4e43290f8275b09d5c4ed6f3d..bc3e460e35cf90d2fe829231e8ea7bdc6a1c778c 100644 (file)
@@ -24,13 +24,18 @@ $Data = Array(
                //"Title"      => "Homepage @ ".$host,
                "Title"      => "Homepage",
                "Author"     => "malte70@".$host,
-               "Stylesheets" => Array("../css/style.css"),
+               "Stylesheets" => Array(
+                       Array("../css/style.css", "screen"),
+                       Array("tty.css", "tty")
+               ),
                //"Icon"       => "https://xyz.malte70.de/img/icons_tango/go-home-512.png",
                "Icon"       => "../favicon.png",
+               "DisablePreconnectLinks" => true,
        ),
        "Links"   => NULL,
        "Notepad" => false,
        "WhoAmI"  => $user["name"]."@".$user["host"],
+       "WhoAmI_TagName" => "h1",
        "JS"      => false,
        "Search"  => "Google",
        "Footer"  => Array(
diff --git a/tty/tty.css b/tty/tty.css
new file mode 100644 (file)
index 0000000..370d513
--- /dev/null
@@ -0,0 +1,93 @@
+/**
+ * startseite.malte70.de/tty/tty.css
+ *
+ * Stylesheets for the "tty" media
+ *
+ */
+
+body {
+       background: #eee;
+       font: 26px "Source Code Pro", monospace;
+}
+
+
+main {
+       /*width: 30em;*/
+       width: 40em;
+       margin: 3em auto 1em;
+       color: #444;
+}
+
+
+a:link, a:visited {
+       color: #888;
+       text-decoration: none;
+}
+a:hover, a:active {
+       color: #444;
+}
+
+.red {
+       color: #ff8000;
+}
+
+
+/**
+ * WhoAmI / User name
+ */
+section#whoami {
+       font-weight: bold;
+       color: green;
+}
+
+
+/**
+ * Google Search
+ */
+#google-search p * {
+       display:      inline-block;
+}
+#google-search input[type=text] {
+       font:         1em "Source Code Pro", monospace;
+       display:      inline-block;
+       padding:      6px;
+       background:   #eee;
+       color:        #888;
+       border:        0;
+       border-bottom: 2px solid #888;
+}
+#google-search input[type=text]:focus {
+    outline: 0;
+}
+#google-search input[type=text]:hover {
+    border-bottom-color: #ff8000;
+}
+
+
+
+/**
+ * Footer
+ */
+footer {
+       border-top: 2em;
+
+       r/*ight: 0;
+       bottom: 0;
+       margin: 7px;
+       padding: 0;
+       text-align: right;*/
+}
+footer p {
+       margin: 0;
+       padding: .1em;
+       font-size: 0.6em;
+       color: #444;
+}
+footer p a:link, footer p a:visited {
+       color: #444;
+       text-decoration: underline;
+}
+footer p a:hover, footer p a:active {
+       color: #888;
+}
+