Browse Source

CSS going multiple files

Xen 1 year ago
parent
commit
71628ec62f
4 changed files with 78 additions and 41 deletions
  1. 18 13
      www/article.php
  2. 11 10
      www/image.php
  3. 39 10
      www/index.php
  4. 10 8
      www/main.css

+ 18 - 13
www/article.php

@@ -60,17 +60,22 @@ function clean_str($str) {
 }
 ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 2.0//EN">
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<link rel="stylesheet" type="text/css" href="/main.css">
- 
- <html>
- <head>
-     <title><?php echo $readability->getTitle();?></title>
- </head>
- <body>
-    <small><a href="/index.php?loc=<?php echo $loc ?>">< Back to <font color="#9400d3">NewsFeed</font> <?php echo $loc ?> front page</a></small>
-    <h1><?php echo clean_str($readability->getTitle());?></h1>
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <link rel="stylesheet" type="text/css" href="/main.css">
+	<title>
+        <?php echo $readability->getTitle();?>
+    </title>
+</head>
+<body>
+    <small><a href="/index.php?loc=<?php echo $loc ?>">
+        &lt; Back to
+        <span class="newsfeed">NewsFeed</span>
+        <?php echo $loc ?> front page
+    </a></small>
+    <h1 class="newsfeed"><?php echo clean_str($readability->getTitle());?></h1>
     <p><small><a href="<?php echo $article_url ?>" target="_blank">Original source</a> (on modern site) <?php
         $img_num = 0;
         $imgline_html = "| Article images:";
@@ -87,6 +92,6 @@ function clean_str($str) {
     ?></small></p>
     <?php if($error_text) { echo "<p><font color='red'>" . $error_text . "</font></p>"; } ?>
     <p><?php echo $readable_article;?></font></p>
-    <small><a href="/index.php?loc=<?php echo $loc ?>">< Back to <font color="#9400d3">NewsFeed</font> <?php echo $loc ?> front page</a></small>
- </body>
+    <small><a href="/index.php?loc=<?php echo $loc ?>">< Back to <span class="brand">NewsFeed</span> <?php echo $loc ?> front page</a></small>
+</body>
  </html>

+ 11 - 10
www/image.php

@@ -29,18 +29,19 @@
 
 ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 2.0//EN">
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- 
- 
- <html>
- <head>
-     <title>68k.news Image Viewer</title>
- </head>
- <body">
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <link rel="stylesheet" type="text/css" href="/main.css">
+	<title>
+        68k.news Image Viewer
+    </title>
+</head>
+<body">
     <small><a href="<?php echo $_SERVER['HTTP_REFERER'] . '?loc=' . strtoupper($loc) ?>">< Back to article</a> | <a href="/index.php"><font color="#9400d3">68k.news</font> front page</a></small>
     <p><small><b>Viewing image:</b> <?php echo $url ?></small></p>
     <img src="/image_compressed.php?i=<?php echo $url; ?>">
     <br><br>
     <small><a href="<?php echo $_SERVER['HTTP_REFERER'] . '?loc=' . strtoupper($loc) ?>">< Back to article</a> | <a href="/index.php"><font color="#9400d3">68k.news</font> front page</a></small>
- </body>
- </html>
+</body>
+</html>

+ 39 - 10
www/index.php

@@ -49,18 +49,35 @@ function clean_str($str) {
  
 ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 2.0//EN">
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<link rel="stylesheet" type="text/css" href="/main.css">
-
 <html>
 <head>
-	<title>NewsFeed.FYI</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+	<meta name="viewport" content="width=device-width, initial-scale=1.0">
+	<link rel="stylesheet" type="text/css" href="/main.css">
+	<title>
+		NewsFeed.FYI
+	</title>
 </head>
 <body>
-	<center><h1><font color="#9400d3"><i>NewsFeed.FYI</i></font></h1></center>
+	<h1 class="newsfeed">
+		<i>NewsFeed.FYI</i>
+	</h1>
 	<hr>
-	<center><small>Basic HTML Google News Feed. Based on <a href="https://github.com/ActionRetro/68k-news" target="_blank"><b>source</b></a> for <a href="http://68k.news" target="_blank"><b>68k.news</b></a>, originally built by <a href="https://youtube.com/ActionRetro" target="_blank"><b>Action Retro</b></a>.</small></center>
+	<span style="text-align: center; font-size: small;">
+		Basic HTML Google News Feed. Based on 
+		<a href="https://github.com/ActionRetro/68k-news" target="_blank">
+			<b>source</b>
+		</a>
+		for 
+		<a href="http://68k.news" target="_blank">
+			<b>68k.news</b>
+		</a>
+		, originally built by 
+		<a href="https://youtube.com/ActionRetro" target="_blank">
+			<b>Action Retro</b>
+		</a>
+		.
+	</span>
 	<?php
 	if($section) {
 		$section_title = explode(" - ", strtoupper($feed->get_title()));
@@ -69,9 +86,21 @@ function clean_str($str) {
 	?>
 	<small>
 	<p>
-	<center><a href="index.php?loc=<?php echo $loc ?>">TOP</a> <a href="index.php?section=world&loc=<?php echo strtoupper($loc) ?>">WORLD</a> <a href="index.php?section=nation&loc=<?php echo strtoupper($loc) ?>">NATION</a> <a href="index.php?section=business&loc=<?php echo strtoupper($loc) ?>">BUSINESS</a> <a href="index.php?section=technology&loc=<?php echo strtoupper($loc) ?>">TECHNOLOGY</a> <a href="index.php?section=entertainment&loc=<?php echo strtoupper($loc) ?>">ENTERTAINMENT</a> <a href="index.php?section=science&loc=<?php echo strtoupper($loc) ?>">SCIENCE</a> <a href="index.php?section=health&loc=<?php echo strtoupper($loc) ?>">HEALTH</a><br>
-	<font size="1">-=-=-=-=-=-=-=-=-=-=-=-=-=-</font>
-	<br><?php echo strtoupper($loc) ?> Edition <a href="choose_edition.php">(Change)</a></center>
+	<center>
+		<a href="index.php?loc=<?php echo $loc ?>">TOP</a>
+		<a href="index.php?section=world&loc=<?php echo strtoupper($loc) ?>">WORLD</a>
+		<a href="index.php?section=nation&loc=<?php echo strtoupper($loc) ?>">NATION</a>
+		<a href="index.php?section=business&loc=<?php echo strtoupper($loc) ?>">BUSINESS</a>
+		<a href="index.php?section=technology&loc=<?php echo strtoupper($loc) ?>">TECHNOLOGY</a>
+		<a href="index.php?section=entertainment&loc=<?php echo strtoupper($loc) ?>">ENTERTAINMENT</a>
+		<a href="index.php?section=science&loc=<?php echo strtoupper($loc) ?>">SCIENCE</a>
+		<a href="index.php?section=health&loc=<?php echo strtoupper($loc) ?>">HEALTH</a>
+		<br>
+		<span class="brandname" style="size: 1;">-=-=-=-=-=-=-=-=-=-=-=-=-=-</span>
+		<br>
+		<?php echo strtoupper($loc) ?> Edition
+		<a href="choose_edition.php">(Change)</a>
+	</center>
 	</p>
 	</small>
 	<?php

+ 10 - 8
www/main.css

@@ -28,6 +28,14 @@ h3 a:active {
   text-decoration: none;
 }
 
+.newsfeed {
+  color: #9400d3;
+}
+
+h1.newsfeed {
+  text-align: center;
+}
+
 @media (prefers-color-scheme: dark) {
   body {
     color:#ebecf7;
@@ -37,7 +45,7 @@ h3 a:active {
     color:#a15cb3;
   }
   h3 a {
-    color:#5661bb;
+    color:#8d9afa;
   }
   a:visited {
     color:#ac71bb;
@@ -45,10 +53,4 @@ h3 a:active {
   a {
     color:#a7b1fc;
   }
-}
-
-@media (prefers-color-scheme: light) {
-  body {
-    color:#444;
-  }
-}
+}