Răsfoiți Sursa

Template: Restore proper format of non-authenticated pages and menus.

Nate 5 ani în urmă
părinte
comite
9de329100f
4 a modificat fișierele cu 17 adăugiri și 16 ștergeri
  1. 2 0
      resources/footer.php
  2. 1 0
      resources/login.php
  3. 2 4
      themes/default/css.php
  4. 12 12
      themes/default/template.php

+ 2 - 0
resources/footer.php

@@ -247,6 +247,8 @@
 		$view->assign('login_logo_source', $login_logo_source);
 		$view->assign('login_logo_source', $login_logo_source);
 		$view->assign('login_logo_width', $login_logo_width);
 		$view->assign('login_logo_width', $login_logo_width);
 		$view->assign('login_logo_height', $login_logo_height);
 		$view->assign('login_logo_height', $login_logo_height);
+	//login page
+		$view->assign('login_page', $login_page);
 	//messages
 	//messages
 		$view->assign('messages', message::html(true, '		'));
 		$view->assign('messages', message::html(true, '		'));
 
 

+ 1 - 0
resources/login.php

@@ -376,6 +376,7 @@
 	}
 	}
 
 
 //add the footer
 //add the footer
+	$login_page = true;
 	include "resources/footer.php";
 	include "resources/footer.php";
 
 
 ?>
 ?>

+ 2 - 4
themes/default/css.php

@@ -1093,10 +1093,8 @@ header('Expires: '.gmdate('D, d M Y H:i:s',time()+3600).' GMT');
 		display: inline-block;
 		display: inline-block;
 		width: 100%;
 		width: 100%;
 		<?php
 		<?php
-		if (
-			isset($_SESSION['username']) && $_SESSION['username'] != '' &&
-			(isset($background_images) || $background_colors[0] != '' || $background_colors[1] != '')
-			) { ?>
+		if (isset($background_images) || $background_colors[0] != '' || $background_colors[1] != '') {
+			?>
 			background: <?php echo ($_SESSION['theme']['body_color']['text'] != '') ? $_SESSION['theme']['body_color']['text'] : "#ffffff"; ?>;
 			background: <?php echo ($_SESSION['theme']['body_color']['text'] != '') ? $_SESSION['theme']['body_color']['text'] : "#ffffff"; ?>;
 			background-attachment: fixed;
 			background-attachment: fixed;
 			<?php $br = format_border_radius($_SESSION['theme']['body_border_radius']['text'], '4px'); ?>
 			<?php $br = format_border_radius($_SESSION['theme']['body_border_radius']['text'], '4px'); ?>

+ 12 - 12
themes/default/template.php

@@ -871,8 +871,18 @@
 			</td></tr></table>
 			</td></tr></table>
 		</div>
 		</div>
 
 
-	{*//logged in *}
-		{if $authenticated}
+	{*//login page *}
+		{if $login_page}
+			<div id='default_login'>
+				<a href='{$project_path}/'><img id='login_logo' style='width: {$login_logo_width}; height: {$login_logo_height};' src='{$login_logo_source}'></a><br />
+				{$document_body}
+			</div>
+			<div id='footer_login'>
+				<span class='footer'>{$settings.theme.footer}</span>
+			</div>
+
+	{*//other pages *}
+		{else}
 			{if $settings.theme.menu_style == 'side' || $settings.theme.menu_style == 'inline' || $settings.theme.menu_style == 'static'}
 			{if $settings.theme.menu_style == 'side' || $settings.theme.menu_style == 'inline' || $settings.theme.menu_style == 'static'}
 				{$container_open}
 				{$container_open}
 				{if $settings.theme.menu_style == 'inline'}{$logo}{/if}
 				{if $settings.theme.menu_style == 'inline'}{$logo}{/if}
@@ -889,16 +899,6 @@
 				<span class='footer'>{$settings.theme.footer}</span>
 				<span class='footer'>{$settings.theme.footer}</span>
 			</div>
 			</div>
 			{$container_close}
 			{$container_close}
-
-	{*//not logged in *}
-		{else}
-			<div id='default_login'>
-				<a href='{$project_path}/'><img id='login_logo' style='width: {$login_logo_width}; height: {$login_logo_height};' src='{$login_logo_source}'></a><br />
-				{$document_body}
-			</div>
-			<div id='footer_login'>
-				<span class='footer'>{$settings.theme.footer}</span>
-			</div>
 		{/if}
 		{/if}
 
 
 </body>
 </body>