changeset 387:3cc078b17260

Show backend work.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 05 Dec 2013 09:06:06 +0200
parents 0693747fa7d3
children 6b27b6d73dc5
files show.css showajax.php
diffstat 2 files changed, 56 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/show.css	Thu Dec 05 08:30:34 2013 +0200
+++ b/show.css	Thu Dec 05 09:06:06 2013 +0200
@@ -11,40 +11,61 @@
 }
 
 div.showHeader, div.compoHeader {
-	padding: 10pt;
+	padding: 1em;
 	z-index: 0;
 	text-align: center;
 	color: #0f0;
 }
 
-div.showHeader .title, div.compoHeader .title {
-	font-size: 32pt;
+div.showHeader .compoTitle, div.compoHeader .compoTitle {
+	font-size: 3em;
 }
 
-div.showText, div.compoNext {
+div.showText {
 	z-index: 5;
-	font-size: 64pt;
+	color: #0f0;
+	font-size: 4.5em;
 	text-align: center;
+}
+
+div.compoNext {
+	z-index: 5;
 	color: #0f0;
+	text-align: center;
+	font-family: Impact;
+	text-shadow: 4px 4px 6px #000;
 }
 
 div.compoNext .entryIndex {
+	z-index: -1;
 	position: absolute;
-	top: 1.5em;
-	left: 20pt;
-	font-size: 128pt;
-	color: rgba(0,255,0,0.3);
+	top: 0.5em;
+	left: 0.1em;
+	font-size: 15em;
+	color: rgba(0,255,0,0.4);
+}
+
+div.compoNext .entryName {
+	font-size: 5.5em;
+}
+
+div.compoNext .entryAuthor {
+	font-size: 3.5em;
+}
+
+div.compoNext .entryBy {
+	font-size: 2.5em;
 }
 
 div.compoNext .entryInfo {
 	position: absolute;
-	top: 50%;
-	right: 20pt;
-	width: 10em;
-	font-size: 24pt;
+	bottom: 5em;
+	right: 1em;
+	left: 1em;
+	min-height: 2em;
+	font-size: 2em;
 	padding: 5pt;
-	border-radius: 10pt;
-	box-shadow: 2px 2px 4px rgba(0,255,0,0.5) inset, -2px -2px 4px rgba(0,255,0,0.5) inset;
+	color: white;
 }
 
 
@@ -53,6 +74,7 @@
 	left: 1em;
 	bottom: 1em;
 	min-width: 30%;
+	max-width: 50%;
 	color: #0f0;
 	font-size: 16pt;
 	font-weight: bold;
@@ -64,13 +86,12 @@
 	text-align: right;
 }
 
-div.compoPrev .title {
+div.compoPrev .entryTitle {
 	border-bottom: 2px solid #0f0;
 	text-align: left;
 }
 
 
-
 div.guru {
 	margin: 2em;
 	padding: 2em;
--- a/showajax.php	Thu Dec 05 08:30:34 2013 +0200
+++ b/showajax.php	Thu Dec 05 09:06:06 2013 +0200
@@ -15,17 +15,23 @@
   
   if ($title !== false)
   echo
-  "    <div class=\"title\">".$title."</div>\n";
+  "    <div class=\"entryTitle\">".$title."</div>\n";
 
   echo
   "    <div class=\"entryIndex\">#".$entry["show_id"]."</div>\n".
   "    <div class=\"entryName\">".chentities($entry["name"])."</div>\n";
 
   if ($compo["showAuthors"])
+  {
+    if ($title === false)
+    echo "    <div class=\"entryBy\">by</div>\n";
     echo "    <div class=\"entryAuthor\">".chentities($entry["author"])."</div>\n";
+  }
+
+  if ($title === false)
+    echo "    <div class=\"entryInfo\">".chentities($entry["info"])."</div>\n";
 
   echo
-  "    <div class=\"entryInfo\">".chentities($entry["info"])."</div>\n".
   "  </div>\n";
 }
 
@@ -35,7 +41,7 @@
   echo
   "  <div class=\"compoHeader\">\n".
   "    <img src=\"img/fapsm.png\" /><br />\n".
-  "    <div class=\"title\">".chentities($compo["name"])." competition</div>\n".
+  "    <div class=\"compoTitle\">".chentities($compo["name"])." competition</div>\n".
   "  </div>\n";
   
   if ($entry !== false)
@@ -152,6 +158,9 @@
     // Competition mode, is controlled from admin UI, so we donẗ
     // actually do anything here.
     //
+    if (time() >= stGetDisplayVar("activeSlideExpire"))
+      stSetDisplayVar("activeSlideMode", SMODE_COMPO);
+    
     break;
 }
 
@@ -201,17 +210,18 @@
         
         case SMODE_COMPO:
           // Competition mode, show entry data
+          $compo_id = stGetDisplayVar("compoID");
           $compo = stFetchSQL(stPrepareSQL(
             "SELECT * FROM compos WHERE id=%d",
-            stGetDisplayVar("compoID")));
+            $compo_id));
 
           $prev = stFetchSQL(stPrepareSQL(
-            "SELECT * FROM entries WHERE id=%d",
-            stGetDisplayVar("compoPrevEntry")));
+            "SELECT * FROM entries WHERE compo_id=%d AND show_id=%d",
+            $compo_id, stGetDisplayVar("compoPrevEntry")));
 
           $entry = stFetchSQL(stPrepareSQL(
-            "SELECT * FROM entries WHERE id=%d",
-            stGetDisplayVar("compoCurrEntry")));
+            "SELECT * FROM entries WHERE compo_id=%d AND show_id=%d",
+            $compo_id, stGetDisplayVar("compoCurrEntry")));
 
           if ($compo !== false)
             stPrintCompoSlide($compo, $entry, $prev);