changeset 127:1e44468dbbd8

Various style changes, and add indicators to currently selected language and CSS style.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 27 Aug 2014 15:43:25 +0300
parents d954c4d34a3f
children 0f451151b9f1
files index.php luk.css luk1.css luk2.css luk3.css luk4.css
diffstat 6 files changed, 67 insertions(+), 98 deletions(-) [+]
line wrap: on
line diff
--- a/index.php	Tue Aug 19 16:34:49 2014 +0300
+++ b/index.php	Wed Aug 27 15:43:25 2014 +0300
@@ -1,13 +1,13 @@
 <?php
 //
-// OAMK Lukkari v2.1
+// OAMK Lukkari v2.3
 // (C) Copyright 2010 - 2014 Matti 'ccr' Hämäläinen <ccr@tnsp.org>
 // Yes, this code is rather horrible. :|
 //
 // Include framework
 require "mcommon.inc.php";
 
-$pageVersion = "2.2";
+$pageVersion = "2.3";
 $baseURI = "http://tnsp.org/luk/";
 $pageLang = "fi";
 $pageLanguages = array("fi", "en");
@@ -559,19 +559,27 @@
 if (!$mobileMode)
 {
   echo
-    "<div id=\"csssel\">\n".
+    "<div id=\"infobox\">\n".
     " <div id=\"ctitle\">OAMK Lukkari v".$pageVersion."</div>\n".
-    " <div>".cmQM("Style").": ";
+    " <div id=\"csssel\">".cmQM("Style").": ";
 
   foreach ($pageCSSAlts as $name => $id)
-    echo "<a href=\"".$baseURI."?css=".$id."\">".$name."</a>";
+  {
+    echo
+      "<a ".(($pageCSSIndex == $id) ? " class=\"selected\"" : "").
+      "href=\"".$baseURI."?css=".$id."\">".$name."</a>";
+  }
 
   echo
     "</div>\n".
     " <div id=\"clang\">";
 
   foreach ($pageLanguages as $id)
-    echo "<a href=\"".$baseURI."?lang=".$id."\">".$id."</a>";
+  {
+    echo
+      "<a ".(($pageLang == $id) ? " class=\"selected\"" : "").
+      "href=\"".$baseURI."?lang=".$id."\">".$id."</a>";
+  }
 
   echo "</div>\n";
 }
--- a/luk.css	Tue Aug 19 16:34:49 2014 +0300
+++ b/luk.css	Wed Aug 27 15:43:25 2014 +0300
@@ -49,16 +49,56 @@
 	background: red;
 }
 
-div.advert {
-	text-align: center;
-	padding: 5pt;
+.advert {
+	width: 130px;
+	height: 70px;
+}
+
+.advert img {
+	padding: 0px;
+	width: 120px;
+	height: 60px;
+}
+
+.advert img:hover {
+	animation: mpulsate 0.5s infinite;
+}
+
+@keyframes mpulsate {
+	0% { width: 120px; height: 60px; }
+	50% { width: 110px; height: 55px; }
+	100% { width: 120px; height: 60px; }
 }
 
-div.advert a {
+
+#infobox a {
+	padding: 2pt;
+	color: #ccc;
 	text-decoration: none;
-	padding: 5pt;
-	background: red;
-	-moz-border-radius: 5pt;
-	border-radius: 5pt;
-	box-shadow: 0px 0px 6px rgba(0,0,0,0.7);
+}
+
+#infobox a:hover {
+	text-decoration: underline;
+}
+
+#ctitle {
+	text-align: right;
+	font-size: 8pt;
 }
+
+
+#clang {
+	text-align: right;
+}
+
+
+#clang .selected {
+	font-weight: bold;
+	text-decoration: underline;
+}
+
+#csssel .selected {
+	font-weight: bold;
+	text-decoration: underline;
+}
+
--- a/luk1.css	Tue Aug 19 16:34:49 2014 +0300
+++ b/luk1.css	Wed Aug 27 15:43:25 2014 +0300
@@ -19,7 +19,7 @@
 	box-shadow: 0px 0px 6px rgba(0,0,0,0.7);
 }
 
-#csssel {
+#infobox {
 	position: absolute;
 	right: 1em;
 	top: 1em;
@@ -32,25 +32,6 @@
 	box-shadow: 2px 2px 6px rgba(0,0,0,0.7);
 }
 
-#ctitle {
-	text-align: right;
-	font-size: 8pt;
-}
-
-#csssel a {
-	padding: 2pt;
-	color: #ccc;
-	text-decoration: none;
-}
-
-#csssel a:hover {
-	text-decoration: underline;
-}
-
-#clang {
-	text-align: right;
-	font-weight: bold;
-}
 
 #clang a {
 	color: #0f0;
--- a/luk2.css	Tue Aug 19 16:34:49 2014 +0300
+++ b/luk2.css	Wed Aug 27 15:43:25 2014 +0300
@@ -16,7 +16,7 @@
 }
 
 
-#csssel {
+#infobox {
 	position: absolute;
 	right: 1em;
 	top: 1em;
@@ -28,26 +28,6 @@
 	text-shadow: 1px 1px 1px #000;
 }
 
-#ctitle {
-	text-align: right;
-	font-size: 8pt;
-}
-
-#csssel a {
-	padding: 2pt;
-	color: #ccc;
-	text-decoration: none;
-}
-
-#csssel a:hover {
-	text-decoration: underline;
-}
-
-#clang {
-	text-align: right;
-	font-weight: bold;
-}
-
 #clang a {
 	color: #0f0;
 }
--- a/luk3.css	Tue Aug 19 16:34:49 2014 +0300
+++ b/luk3.css	Wed Aug 27 15:43:25 2014 +0300
@@ -19,7 +19,7 @@
 	box-shadow: 0px 0px 6px rgba(0,0,0,0.7);
 }
 
-#csssel {
+#infobox {
 	position: absolute;
 	right: 1em;
 	top: 1em;
@@ -32,26 +32,6 @@
 	box-shadow: 0px 0px 6px rgba(200,0,100,0.7);
 }
 
-#ctitle {
-	text-align: right;
-	font-size: 8pt;
-}
-
-#csssel a {
-	padding: 2pt;
-	color: #ccc;
-	text-decoration: none;
-}
-
-#csssel a:hover {
-	text-decoration: underline;
-}
-
-#clang {
-	text-align: right;
-	font-weight: bold;
-}
-
 #clang a {
 	color: #f00;
 }
--- a/luk4.css	Tue Aug 19 16:34:49 2014 +0300
+++ b/luk4.css	Wed Aug 27 15:43:25 2014 +0300
@@ -19,7 +19,7 @@
 	box-shadow: 0px 0px 6px rgba(255,255,255,0.7);
 }
 
-#csssel {
+#infobox {
 	position: absolute;
 	right: 1em;
 	top: 1em;
@@ -32,26 +32,6 @@
 	box-shadow: 0px 0px 4px rgba(255,255,255,0.9);
 }
 
-#ctitle {
-	text-align: right;
-	font-size: 8pt;
-}
-
-#csssel a {
-	padding: 2pt;
-	color: #ccc;
-	text-decoration: none;
-}
-
-#csssel a:hover {
-	text-decoration: underline;
-}
-
-#clang {
-	text-align: right;
-	font-weight: bold;
-}
-
 #clang a {
 	color: #f00;
 }