소스 검색

Merge branch 'newui' into master.

seavenois 9 년 전
부모
커밋
a11fd7fc6f
10개의 변경된 파일83개의 추가작업 그리고 67개의 파일을 삭제
  1. 4 6
      www/blog/buscar.php
  2. 6 2
      www/css/blog.css
  3. 5 0
      www/css/galeria.css
  4. 2 2
      www/css/lablanca.css
  5. 21 16
      www/css/ui.css
  6. 9 2
      www/functions.php
  7. 4 5
      www/galeria/index.php
  8. 28 30
      www/galeria/upload.php
  9. 3 3
      www/script/blog.js
  10. 1 1
      www/script/galeria.js

+ 4 - 6
www/blog/buscar.php

@@ -87,19 +87,17 @@
 			<?php include("common/leftpanel.php"); ?>
 			<div id="middle_column">
 				<div class="section">
+					<h3 class="section_title"><?php echo($lng['blog_search']);?></h3>
 					<div class="entry">
 						<?php
 							if (mysqli_num_rows($q) == 1){
-								echo "$lng[blog_search_1]<span class='italic'>$search_term</span>$lng[blog_search_2]<span class='italic'>$search_field</span>: " . strval(mysqli_num_rows($q)) . $lng['blog_search_result'];
+								echo "$lng[blog_search_1]<span class='italic'>$search_term</span>&nbsp: " . strval(mysqli_num_rows($q)) . $lng['blog_search_result'];
 							}
 							else{
-								echo "$lng[blog_search_1]<span class='italic'>$search_term</span>$lng[blog_search_2]<span class='italic'>$search_field</span>: " . strval(mysqli_num_rows($q)) . $lng['blog_search_results'];
+								echo "$lng[blog_search_1]<span class='italic'>$search_term</span>&nbsp: " . strval(mysqli_num_rows($q)) . $lng['blog_search_results'];
 							}
 						?>
 					</div>
-				</div>
-				<br/>
-				<div class="section">
 					<?php
 						while($r = mysqli_fetch_array($q)){
 							echo "<div itemscope itemtype='http://schema.org/BlogPosting' class='entry blog_entry'>\n";
@@ -134,7 +132,7 @@
 								echo "<td><span class='date'>" . formatDate($r['dtime'], $lang, false) . "</span>&nbsp;&nbsp;&nbsp;$tag_string</td>\n";
 							}
 							else{
-								echo "<td><span class='date'></span>" . formatDate($r['dtime'], $lang) . "</span>/td>\n";
+								echo "<td><span class='date'></span>" . formatDate($r['dtime'], $lang) . "</span></td>\n";
 							}
 							echo "</tr></table><hr class='post_search_separator'/>\n";
 							#Image and text

+ 6 - 2
www/css/blog.css

@@ -45,14 +45,18 @@ div.list_year{
 }
 
 ul.post_list{
-	margin-top:		0.5em;
-	margin-bottom:	0.5em;
+	margin-top:		0em;
+	margin-bottom:	0em;
 	/* 	display:		none; */
 	max-height:		0em;
 	overflow-y:		hidden;
 	transition:	max-height 0.6s ease-in-out;
 }
 
+ul.post_list li{
+	padding:	0.2em 0 0.2em 0;
+}
+
 div.post_list_image_container{
 	text-align:	center;
 }

+ 5 - 0
www/css/galeria.css

@@ -1,3 +1,8 @@
+div#gallery_entry_contribute{
+	text-align:	left;
+	margin:		3em 1em 1em 1em;
+}
+
 div#album_list{
 	text-align:	center;
 }

+ 2 - 2
www/css/lablanca.css

@@ -189,12 +189,12 @@ div#prices table#table_offers p.description{
 
 ul#no_fiestas{
 	margin:			0 2em 2em 2em;
-	list-style-image:	url('https://margolariak.com/img/misc/ul.png');
-	list-style-type:	circle;
 }
 
 ul#no_fiestas li{
 	margin-top: 2em;
+	list-style-image:       url('https://margolariak.com/img/misc/ul.png');
+        list-style-type:        circle;
 }
 
 ul#no_fiestas li span{

+ 21 - 16
www/css/ui.css

@@ -64,34 +64,39 @@ body{
 input[type="text"], input[type="number"], input[type="date"]{
 	border-radius:		0.3em;
 	height:				1.5em;
-	border:				0.2em solid #406896;
-	color:				#ccccdc;
-	background-color:	#0F263C;
+	border:				0.2em solid #0078ff;
+	color:				#002255;
+	background-color:	#ccddff;
 	margin:				0.1em;
 }
 
 input[type="button"], input[type="submit"], select{
 	border-radius:		0.3em;
 	height:				2em;
-	border:				0.2em solid #406896;
+	border:				0.2em solid #0078ff;
 	font-weight:		bold;
 	color:				#ffffff;
-	background-color:	#618CB7;
+	background-color:	#124567;
 	cursor:				pointer;
 	margin:				0.1em;
+	letter-spacing: 	0.1em;
 }
 
 textarea{
 	border-radius:		0.3em;
 	min-height:			2em;
 	max-height:			15em;
-	border:				0.2em solid #406896;
-	color:				#bbbbbb;
-	background-color:	#223344;
+	border:				0.2em solid #0078ff;
+	color:				#002255;
+	background-color:	#ccddff;
 	resize:				vertical;
 	margin:				0.1em;
 }
 
+li{
+	list-style-image:	url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAG0lEQVQImWNgIBqU//+PWwKGcUoQVECanVgAAJSsH/KywgEfAAAAAElFTkSuQmCC');
+}
+
 /******************************************
 * Common elements present across the      *
 * whle site.                              *
@@ -496,23 +501,22 @@ div#comment_new input[type='submit']{
 ******************************************/
 div#ad{
 	border:						0.1em solid #000011;
-	width:						25%;
+	width:						45%;
 	max-width:					25em;
 	min-width:					12em;
-	max-height:					20em;
+	max-height:					25em;
 	position:					fixed;
 	bottom:						-25em;
 	left:						3em;
 	margin-bottom:				0;
 	box-shadow:					0 0 2em #111122;
-	border-top-left-radius:		1em;
-	border-top-right-radius:	1em;
+	border-bottom-left-radius:		0em;
+	border-bottom-right-radius:	0em;
 	transition:					bottom .5s ease-in-out;
 }
 
-
-div#ad h3{
-	margin-top:	0.3em;
+div#ad h3 a{
+	color:		#ffffff
 }
 
 div#ad div#ad_details{
@@ -538,7 +542,8 @@ div#ad div.entry div#ad_image_container{
 
 div#ad div.entry div#ad_image_container img{
 	max-height:	9em;
-	border:	0.1em solid #111111;
+	max-width:	100%;
+	border:		0.1em solid #111111;
 }
 
 div#ad div.entry a{

+ 9 - 2
www/functions.php

@@ -315,6 +315,13 @@
 		mysqli_query($con, 'UPDATE settings SET value = value + 1 WHERE name = "version";');
 	}
 	
+	/****************************************************
+        * Shows an ad at random. It does that one in three  *
+        * times, and only one per session (inserts a cookie *
+        * to know if the ad has been shown. A sponsor has   *
+        * more chances of having his ad popping the more it *
+	* contributes with Gasteizko Margolariak.           *
+        ****************************************************/
 	function ad($con, $lang, $lng){
 	$id = -1;
 		//If the user hasn't still see an add on this session
@@ -344,12 +351,12 @@
 				$q = mysqli_query($con, "SELECT name_$lang AS name, text_$lang AS text, image, address_$lang AS address, link, lat, lon FROM sponsor WHERE id = $id;");
 				$r = mysqli_fetch_array($q);
 				echo("<div id='ad' class='section'>\n");
+				echo("<h3 class='section_title'><a target='_blank' href='$r[link]'>$r[name]</a></h3>\n");
+				echo("<div class='entry'>\n");
 				echo("<div id='ad_details'>\n");
 				echo($lng['ad_title']);
 				echo("<img class='pointer' src='/img/misc/slid-close.png' onClick='closeAd();' />\n");
 				echo("</div>\n");
-				echo("<h3><a target='_blank' href='$r[link]'>$r[name]</a></h3>\n");
-				echo("<div class='entry'>\n");
 				if (strlen($r['image']) > 0){
 					echo("<div id='ad_image_container'>\n");
 					echo("<img src='/img/spo/miniature/$r[image]'/>\n");

+ 4 - 5
www/galeria/index.php

@@ -61,11 +61,6 @@
 	<body>
 		<?php include("../header.php"); ?>
 		<div id="content">
-			<div class="section">
-				<div class="entry">
-					<?php echo $lng['gallery_header']; ?>
-				</div>
-			</div>
 			<br/>
 			<div class="section" id="album_list">
 				<?php
@@ -103,6 +98,10 @@
 					//Albums with no photos or photos without dates
 					$q = mysqli_query($con, "SELECT id, title_es FROM album WHERE id NOT IN (SELECT album FROM photo_album, photo WHERE photo = photo.id GROUP BY album);");
 				?>
+				<div class="entry" id="gallery_entry_contribute">
+                                        <?php echo $lng['gallery_header']; ?>
+                                </div>
+
 			</div>
 		</div>
 		<?php

+ 28 - 30
www/galeria/upload.php

@@ -66,12 +66,11 @@
 		<div id="content">
 			<form onSubmit="event.preventDefault(); submitPhotos();">
 				<div class="section">
+					<h3 class="section_title"><?php echo($lng['gallery_upload_submit']); ?></h3>
 					<div class="entry">
 						<?php echo $lng["gallery_upload_header"]; ?>
 					</div>
-				</div>
-				<br/>
-				<div class="section">
+				
 					<div id="file_box" ondragover="event.preventDefault();" ondrop="dropFile(event, '<?php echo $lng['gallery_upload_placeholder_title'] ?>', '<?php echo $lng['gallery_upload_placeholder_description'] ?>');">
 						<br/><br/><br/>
 						<span id='drag'><?php echo $lng["gallery_upload_drag"]; ?></span>
@@ -81,34 +80,33 @@
 						<br/><br/><br/>
 					</div>
 					
-				</div>
-				<br/><br/>
-				<div class="section" id="photo_upload_preview">
-					<div id="file_list">
+					<div  id="photo_upload_preview">
+						<div id="file_list">
+						</div>
+						<table>
+							<tr>
+								<td class='entry'>
+									<?php echo $lng["gallery_upload_tooltip_album"]; ?>
+									<br/><br/>
+									<select id="album" type="select">
+										<option value="-1" selected="selected"><?php echo $lng['gallery_upload_select_album'] ?></option>
+										<?php
+											$q_album = mysqli_query($con, "SELECT id, title_$lang AS title FROM album ORDER BY title;");
+											while ($r_album = mysqli_fetch_array($q_album)){
+												echo "<option value='$r_album[id]'>$r_album[title]</option>\n";
+											}
+										?>
+									</select>
+								</td>
+								<td class='entry'>
+									<?php echo $lng["gallery_upload_tooltip_name"]; ?>
+									<br/><br/>
+									<input type='text' id='username'/>
+								</td>
+							</tr>
+						</table>
+						<input type="submit" id="photo_submit" value="<?php echo $lng["gallery_upload_submit"];?>">
 					</div>
-					<table>
-						<tr>
-							<td class='entry'>
-								<?php echo $lng["gallery_upload_tooltip_album"]; ?>
-								<br/><br/>
-								<select id="album" type="select">
-									<option value="-1" selected="selected"><?php echo $lng['gallery_upload_select_album'] ?></option>
-									<?php
-										$q_album = mysqli_query($con, "SELECT id, title_$lang AS title FROM album ORDER BY title;");
-										while ($r_album = mysqli_fetch_array($q_album)){
-											echo "<option value='$r_album[id]'>$r_album[title]</option>\n";
-										}
-									?>
-								</select>
-							</td>
-							<td class='entry'>
-								<?php echo $lng["gallery_upload_tooltip_name"]; ?>
-								<br/><br/>
-								<input type='text' id='username'/>
-							</td>
-						</tr>
-					</table>
-					<input type="submit" id="photo_submit" value="<?php echo $lng["gallery_upload_submit"];?>">
 				</div>
 			</form>
 		</div>

+ 3 - 3
www/script/blog.js

@@ -20,7 +20,7 @@ function launchSearch(where){
 
 //WARNING: If changed in css, change here.
 function defaultInputBorder(id){
-	id.style.border = '0.4em solid #9cd3d9'
+	id.style.border = '0.2em solid #0078ff'
 }
 
 function postComment(post, lang){
@@ -32,12 +32,12 @@ function postComment(post, lang){
 	//Check fields
 	if (text.length == 0){
 		defaultBorderStyle = document.getElementById('new_comment_text').style.border;
-		document.getElementById('new_comment_text').style.border = '0.4em solid #fc5359';
+		document.getElementById('new_comment_text').style.border = '0.2em solid #fc5359';
 		document.getElementById('new_comment_text').focus();
 		return false;
 	}
 	if (user.length == 0){
-		document.getElementById('new_comment_user').style.border = '0.4em solid #fc5359';
+		document.getElementById('new_comment_user').style.border = '0.2em solid #fc5359';
 		document.getElementById('new_comment_user').focus();
 		return false;
 	}

+ 1 - 1
www/script/galeria.js

@@ -109,7 +109,7 @@ function scrollPhoto(inc){
 
 //WARNING: If changed in css, change here.
 function defaultInputBorder(id){
-	id.style.border = '0.4em solid #9cd3d9'
+	id.style.border = '0.2em solid #0078ff'
 }
 
 function postComment(photo, lang){