فهرست منبع

UI improvements to the festivals page.

Iñigo Valentin 9 سال پیش
والد
کامیت
b0837725ee
4فایلهای تغییر یافته به همراه130 افزوده شده و 66 حذف شده
  1. 57 19
      www/css/lablanca.css
  2. 7 1
      www/css/m/lablanca.css
  3. 64 46
      www/lablanca/fiestas.php
  4. 2 0
      www/lablanca/index.php

+ 57 - 19
www/css/lablanca.css

@@ -46,7 +46,32 @@ div.horiz p{
 	vertical-align:	top;
 }
 
+div#past_festivals ul li{
+	margin:	0.5em;
+}
+
+
 /* fiestas.php */
+div#festivals_image_top_container{
+	display:	block;
+	text-align:	center;
+	margin:		0.5em auto 0.5em auto;
+}
+
+div#festivals_image_top_container div#festivals_image_container{
+	display:		inline-block;
+	border:			0.1em solid #001133;
+	border-radius:	1em;
+	box-shadow:		0 0 1em #111122;
+	margin:			0.8em auto 0.8em auto;
+}
+
+div#festivals_image_top_container div#festivals_image_container img#festivals_image{
+	border-radius:	1em;
+	max-width:		60em;
+	max-height:		20em;
+}
+
 div#schedule{
 	display:		inline-block;
 	vertical-align:	top;
@@ -74,7 +99,7 @@ table.schedule td{
 	vertical-align:	top;
 	padding-left:	0.5em;
 	padding-right:	0.5em;
-	padding-bottom:	0.6em;
+	padding-bottom:	1em;
 }
 
 table.schedule td span.time{
@@ -83,49 +108,47 @@ table.schedule td span.time{
 
 table.schedule td span.title{
 	font-weight:	bold;
+	font-style:		italic;
+	font-size:		110%;
+	color:			#001133;
+	margin:			0 0.5em 0.5em 0.3em;
+	letter-spacing:	0.05em;
 }
 
-table.schedule td span.description{
-	font-size:		90%;
-	font-style:		italic;
-	margin-left:	1.2em;
+table.schedule td div.description{
+	margin:	0.3em 2em 0.5em 1.2em;
+	color:	#222222;
 }
 
 table.schedule td.timeline{
 	width:				0.06em;
-	padding:			0;
-	background-color:	#000000;
+	padding:			0 0 1em 0;
+	border-left:		dotted #333333 0.1em;
 	padding-left:		0;
 	padding-right:		0;
 	
 }
 
-
-
 table.schedule td.timeline img.timeline_dot{
 	width:			1em;
 	height:			1em;
-	margin-left:	-0.44em;
-	margin-right:	-0.44em;
-	margin-top:		0.3em;
+	margin-left:	-0.47em;
+	margin-right:	-0.41em;
+	margin-top:		0.2em;
 }
 
-table.schedule table.location{
+table.schedule div.location{
 	font-size:			80%;
 	border-collapse:	collapse;
 	margin-left:		2em;
 }
 
-table.schedule table.location td{
-	padding:	0.2em;
-}
-
-table.schedule table.location img{
+table.schedule div.location img{
 	max-height:		1.3em;
 	vertical-align:	middle;
 }
 
-table.schedule table.location span.address{
+table.schedule div.location span.address{
 	font-style:	italic;
 }
 
@@ -163,6 +186,12 @@ div#prices table#table_days td{
 	padding:	0.5em 2em 0.5em 2em; 
 }
 
+div#prices table#table_days td.price{
+	color:			#001133;
+	font-weight:	bold;
+	font-size:		110%;
+}
+
 div#prices td.price{
 	min-width:	4em;
 	text-align:	right;
@@ -178,10 +207,19 @@ div#prices table#table_offers td{
 	border-top:	0.2em solid #aaaaaa;
 }
 
+div#prices table#table_offers td.price{
+	min-width:		4em;
+	text-align:		right;
+	color:			#001133;
+	font-weight:	bold;
+	font-size:		110%;
+}
+
 div#prices table#table_offers p.description{
 	margin:		0.2em 0.2em 0.5em 2em;
 	font-size:	90%;
 	font-style:	italic;
+	color:		#444444;
 }
 
 

+ 7 - 1
www/css/m/lablanca.css

@@ -22,6 +22,12 @@ div#content_table div.content_tr div#content_td_prices{
 	width:		100%;
 }
 
+div#festivals_image_top_container div#festivals_image_container img#festivals_image{
+	border-radius:	0.5em;
+	max-width:		initial;
+	max-height:		15em;
+}
+
 div#schedule{
 	display:		block;
 	margin-right:	0em;
@@ -29,4 +35,4 @@ div#schedule{
 
 div#prices{
 	display:		block;
-}
+}

+ 64 - 46
www/lablanca/fiestas.php

@@ -1,64 +1,82 @@
 <div class='section'>
-	<h3 class='section_title'><?php echo str_replace('#', $year, $lng['lablanca_title']);?></h3>
+	<h3 class='section_title'><?=str_replace('#', $year, $lng['lablanca_title'])?></h3>
 	<div class='entry'>
-	<?php
-		//Some text for the festivals
-		$q_f = mysqli_query($con, "SELECT * FROM festival WHERE year = $year");
-		if (mysqli_num_rows($q_f) > 0){
-			$r_f = mysqli_fetch_array($q_f);
-			if (strlen($r_f['img']) > 0){
-				echo "<img id='festivals_image' src='$proto$http_host/img/festival/$r_f[img]'>\n";
-			}
-			echo $r_f["text_$lang"] . "\n";
+<?php
+	//Some text for the festivals
+	$q_f = mysqli_query($con, "SELECT * FROM festival WHERE year = $year");
+	if (mysqli_num_rows($q_f) > 0){
+		$r_f = mysqli_fetch_array($q_f);
+		if (strlen($r_f['img']) > 0){
+			echo("<div id='festivals_image_top_container'><div id='festivals_image_container'><img id='festivals_image' src='$proto$http_host/img/fiestas/preview/$r_f[img]'/></div></div><br/>\n");
 		}
-	?>
+		echo $r_f["text_$lang"] . "\n";
+	}
+?>
 	</div>
 </div>
 <div id='content_table'>
 	<div class='content_tr'>
 		<div class='content_td' id='content_td_schedule'>
 			<div class='section' id='schedule'>
-				<h3 class='section_title'><?php echo $lng['lablanca_schedule']; ?></h3>
-					<?php
-						$q_days = mysqli_query($con, "SELECT id, date, DATE_FORMAT(date, '%Y-%m-%d') AS isodate, name_$lang AS name FROM festival_day WHERE year(date) = $year ORDER BY date");
-						while ($r_days = mysqli_fetch_array($q_days)){
-							echo "<div class='entry'>\n";
-							echo "<div onClick='expandDay($r_days[id]);' class='day_title pointer'>\n";
-							echo "<h4><img class='slid' src='$proto$http_host/img/misc/slid-right.png' id='slid_day_$r_days[id]'/>\n";
-							echo formatFestivalDate($r_days['date']) . " - $r_days[name]</h4>\n";
-							echo "</div>\n";
-							echo "<div class='day_schedule' id='day_schedule_$r_days[id]'>\n";
+				<h3 class='section_title'><?=$lng['lablanca_schedule']?></h3>
+<?php
+				$q_days = mysqli_query($con, "SELECT id, date, DATE_FORMAT(date, '%Y-%m-%d') AS isodate, name_$lang AS name FROM festival_day WHERE year(date) = $year ORDER BY date");
+				while ($r_days = mysqli_fetch_array($q_days)){
+?>
+					<div class='entry'>
+						<div onClick='expandDay(<?=$r_days['id']?>);' class='day_title pointer'>
+							<h4>
+								<img class='slid' src='<?=$server?>/img/misc/slid-right.png' id='slid_day_<?=$r_days['id']?>'/>
+								<?=formatFestivalDate($r_days['date'])?> - <?=$r_days['name']?>
+							</h4>
+						</div>
+						<div class='day_schedule' id='day_schedule_<?=$r_days['id']?>'>
+<?php
 							$q_sch = mysqli_query($con, "SELECT festival_event.id AS id, gm, title_$lang AS title, description_$lang AS description, host, place, date_format(start, '%H:%i') AS st, date_format(end, '%H:%i') AS end, place.name_$lang AS place, address_$lang AS address, lat, lon FROM festival_event, place WHERE place.id = festival_event.place AND gm = 1 AND start > str_to_date(addtime('$r_days[isodate] 00:00:00', '08:00:00'), '%Y-%m-%d %T') AND start < str_to_date(addtime('$r_days[isodate] 00:00:00', '32:00:00'), '%Y-%m-%d %T') ORDER BY start;");
 							if (mysqli_num_rows($q_sch) > 0){
-								echo "<table class='schedule'>\n";
+								echo("<table class='schedule'>\n");
 								while ($r_sch = mysqli_fetch_array($q_sch)){
-									echo "<tr><td><span class='time'>$r_sch[st]</span></td><td class='timeline'><img class='timeline_dot' alt=' ' src='$proto$http_host/img/misc/schedule-point.png'/></td>\n";
-									echo "<td><span class='title'>$r_sch[title]\n";
-									//if (strlen($r_sch['end']) > 0){
-									//	echo " ($r_sch[st] - $r_sch[end])\n";
-									//}
-									echo "</span>\n";
-									if (strlen($r_sch["description"]) > 0 && $r_sch["description"] != $r_sch["title"]){
-										echo "<br/><span class='description'>$r_sch[description]</span>\n";
-									}
-									echo "<table class='location'><tr>\n";
-									//TODO: td for image, if any
-									echo "<td><a target='_blank' href='http://maps.google.com/maps?q=$r_sch[lat],$r_sch[lon]+(My+Point)&z=14&ll=$r_sch[lat],$r_sch[lon]'><img alt=' ' src='$proto$http_host/img/misc/pinpoint.png'/></a></td>\n"; 
-									//If name and address are the same, show only name
-									if ($r_sch['place'] == $r_sch['address']){
-										echo "<td>$r_sch[place]</td></tr></table>\n";
-									}
-									else{
-										echo "<td>$r_sch[place] <span class='address'>- $r_sch[address]</span></td></tr></table>\n";
-									}
-									echo "</td></tr>\n";
+?>
+									<tr>
+										<td>
+											<span class='time'><?=$r_sch['st']?></span>
+										</td>
+										<td class='timeline'>
+											<img class='timeline_dot' alt=' ' src='<?=$server?>/img/misc/schedule-point.png'/>
+										</td>
+										<td>
+											<span class='title'><?=$r_sch['title']?></span>
+<?php
+											if (strlen($r_sch["description"]) > 0 && $r_sch["description"] != $r_sch["title"]){
+												echo("<br/><div class='description'>$r_sch[description]</div>\n");
+											}
+?>
+											<div class='location'>
+												<a target='_blank' href='http://maps.google.com/maps?q=<?=$r_sch['lat']?>,<?=$r_sch['lon']?>+(My+Point)&z=14&ll=<?=$r_sch['lat']?>,<?=$r_sch['lon']?>'>
+													<img alt=' ' src='<?=$server?>/img/misc/pinpoint.png'/>
+<?php
+													//If name and address are the same, show only name
+													if ($r_sch['place'] == $r_sch['address']){
+														echo("$r_sch[place]\n");
+													}
+													else{
+														echo("$r_sch[place] <span class='address'>- $r_sch[address]</span>\n");
+													}
+?>
+												</a>
+											</div>
+										</td>
+									</tr>
+<?php
 								}
 								echo "</table>\n";
 							}
-							echo "</div>\n";
-							echo "</div>\n";
-						}
-					?>
+?>
+						</div>
+					</div>
+<?php
+				} // while ($r_days = mysqli_fetch_array($q_days))
+?>
 			</div>
 		</div>
 		<div class='content_td' id='content_td_prices'>

+ 2 - 0
www/lablanca/index.php

@@ -3,6 +3,8 @@
 	include("../functions.php");
 	$con = startdb();
 	$proto = getProtocol();
+	$http_host = $_SERVER['HTTP_HOST'];
+	$server = "$proto" . "$http_host";
 	
 	//Language
 	$lang = selectLanguage();