clean HTML code of header and footer

git-svn-id: http://piwigo.org/svn/trunk@28690 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
mistic100 2014-06-13 19:10:41 +00:00
commit b153d19474
4 changed files with 128 additions and 131 deletions

View file

@ -2,82 +2,59 @@
Warning : This is the admin pages footer only
don't be confusing with the public page footer
*}
</div> <!-- pwgMain -->
</div>{* <!-- pwgMain --> *}
{if isset($footer_elements)}
{foreach from=$footer_elements item=v}
{$v}
{foreach from=$footer_elements item=elt}
{$elt}
{/foreach}
{/if}
{if isset($debug.QUERIES_LIST)}
<div id="debug">
{$debug.QUERIES_LIST}
{$debug.QUERIES_LIST}
</div>
{/if}
<div id="footer">
<div id="piwigoInfos">
{* Please, do not remove this copyright. If you really want to,
contact us on http://piwigo.org to find a solution on how
to show the origin of the script...
*}
{'Powered by'|@translate}
<a class="externalLink" href="{$PHPWG_URL}" title="{'Visit Piwigo project website'|@translate}">
<span class="Piwigo">Piwigo</span></a>
{'Powered by'|translate}
<a class="externalLink tiptip" href="{$PHPWG_URL}" title="{'Visit Piwigo project website'|translate}"><span class="Piwigo">Piwigo</span></a>
{$VERSION}
| <a class="externalLink" href="{$pwgmenu.WIKI}" title="{'Read Piwigo Documentation'|@translate}">{'Documentation'|@translate}</a>
| <a class="externalLink" href="{$pwgmenu.FORUM}" title="{'Get Support on Piwigo Forum'|@translate}">{'Support'|@translate}</a>
</div> <!-- piwigoInfos -->
| <a class="externalLink tiptip" href="{$pwgmenu.WIKI}" title="{'Read Piwigo Documentation'|translate}">{'Documentation'|translate}</a>
| <a class="externalLink tiptip" href="{$pwgmenu.FORUM}" title="{'Get Support on Piwigo Forum'|translate}">{'Support'|translate}</a>
</div>
<div id="pageInfos">
{if isset($debug.TIME) }
{'Page generated in'|@translate} {$debug.TIME} ({$debug.NB_QUERIES} {'SQL queries in'|@translate} {$debug.SQL_TIME}) -
{/if}
{if isset($debug.TIME) }
{'Page generated in'|translate} {$debug.TIME} ({$debug.NB_QUERIES} {'SQL queries in'|translate} {$debug.SQL_TIME}) -
{/if}
{'Contact'|translate}
<a href="mailto:{$CONTACT_MAIL}?subject={'A comment on your site'|translate|escape:url}">{'Webmaster'|translate}</a>
</div>{* <!-- pageInfos --> *}
</div>{* <!-- footer --> *}
</div>{* <!-- the_page --> *}
{'Contact'|@translate}
<a href="mailto:{$CONTACT_MAIL}?subject={'A comment on your site'|@translate|@escape:url}">{'Webmaster'|@translate}</a>
</div> <!-- pageInfos -->
</div> <!-- footer -->
</div> <!-- the_page -->
{combine_script id='jquery.tipTip' load='async' path='themes/default/js/plugins/jquery.tipTip.minified.js'}
{combine_script id='jquery.tipTip' load='footer' path='themes/default/js/plugins/jquery.tipTip.minified.js'}
{footer_script require='jquery.tipTip'}
jQuery(document).ready(function() {ldelim}
jQuery('#pwgHead A[title], #footer A[title], .themeActions .tiptip, .languageActions .tiptip').tipTip({ldelim}
'delay' : 0,
'fadeIn' : 200,
'fadeOut' : 200
});
jQuery('.tiptip').tipTip({
delay: 0,
fadeIn: 200,
fadeOut: 200
});
jQuery('a.externalLink').click(function() {
window.open(jQuery(this).attr("href"));
return false;
});
{/footer_script}
<!-- BEGIN get_combined_scripts -->
<!-- BEGIN get_combined -->
{get_combined_scripts load='footer'}
<!-- END get_combined_scripts -->
{literal}
<script type='text/javascript'>
jQuery(document).ready(function() {
$("a.externalLink").click(function() {
window.open($(this).attr("href"));
return false;
});
});
</script>
{/literal}
{if not $ENABLE_SYNCHRONIZATION}
{literal}
<script type='text/javascript'>
$(document).ready(function() {
$("#helpSynchro").hide();
});
</script>
{/literal}
{/if}
<!-- END get_combined -->
</body>
</html>

View file

@ -1,8 +1,6 @@
{*
Warning : This is the admin pages header only
don't confuse with the public page header
*}
<!DOCTYPE html>
<html lang="{$lang_info.code}" dir="{$lang_info.direction}">
@ -11,27 +9,32 @@
<title>{$GALLERY_TITLE} :: {$PAGE_TITLE}</title>
<link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}{$themeconf.icon_dir}/favicon.ico">
{get_combined_css}
{strip}
{foreach from=$themes item=theme}
{if $theme.load_css}
{combine_css path="admin/themes/`$theme.id`/theme.css" order=-10}
{/if}
{if !empty($theme.local_head)}{include file=$theme.local_head load_css=$theme.load_css}{/if}
{if $theme.load_css}
{combine_css path="admin/themes/`$theme.id`/theme.css" order=-10}
{/if}
{if !empty($theme.local_head)}
{include file=$theme.local_head load_css=$theme.load_css}
{/if}
{/foreach}
{combine_css path="admin/themes/default/fontello/css/fontello.css"}
<!-- BEGIN get_combined_scripts -->
{get_combined_scripts load='header'}
<!-- END get_combined_scripts -->
{combine_script id='jquery' path='themes/default/js/jquery.min.js'}
{/strip}
<!-- BEGIN get_combined -->
{get_combined_css}
{get_combined_scripts load='header'}
<!-- END get_combined -->
{if not empty($head_elements)}
{foreach from=$head_elements item=elt}
{$elt}
{$elt}
{/foreach}
{/if}
</head>
<body id="{$BODY_ID}">
@ -48,18 +51,18 @@
<div id="pwgHead">
<h1>
<a href="{$U_RETURN}" title="{'Visit Gallery'|@translate}">
<span class="icon-home" style="font-size:larger"></span>
{$GALLERY_TITLE}
<a href="{$U_RETURN}" title="{'Visit Gallery'|translate}" class="tiptip">
<span class="icon-home" style="font-size:larger"></span>
{$GALLERY_TITLE}
</a>
</h1>
<div id="headActions">
{'Hello'|@translate} {$USERNAME} |
<a class="icon-eye" href="{$U_RETURN}">{'Visit Gallery'|@translate}</a> |
<a class="icon-brush" href="{$U_CHANGE_THEME}" title="{'Switch to clear or dark colors for administration'|@translate}">{'Change Admin Colors'|@translate}</a> |
<a class="icon-help-circled" href="{$U_FAQ}" title="{'Instructions to use Piwigo'|@translate}">{'Help Me'|@translate}</a> |
<a class="icon-logout" href="{$U_LOGOUT}">{'Logout'|@translate}</a>
{'Hello'|translate} {$USERNAME} |
<a class="icon-eye" href="{$U_RETURN}">{'Visit Gallery'|translate}</a> |
<a class="icon-brush tiptip" href="{$U_CHANGE_THEME}" title="{'Switch to clear or dark colors for administration'|translate}">{'Change Admin Colors'|translate}</a> |
<a class="icon-help-circled tiptip" href="{$U_FAQ}" title="{'Instructions to use Piwigo'|@translate}">{'Help Me'|translate}</a> |
<a class="icon-logout" href="{$U_LOGOUT}">{'Logout'|translate}</a>
</div>
</div>

View file

@ -1,34 +1,40 @@
<div id="copyright">
{if isset($debug.TIME)}
{'Page generated in'|@translate} {$debug.TIME} ({$debug.NB_QUERIES} {'SQL queries in'|@translate} {$debug.SQL_TIME}) -
{/if}
{if isset($debug.TIME)}
{'Page generated in'|translate} {$debug.TIME} ({$debug.NB_QUERIES} {'SQL queries in'|translate} {$debug.SQL_TIME}) -
{/if}
{*
Please, do not remove this copyright. If you really want to,
contact us on http://piwigo.org to find a solution on how
to show the origin of the script...
Please, do not remove this copyright. If you really want to,
contact us on http://piwigo.org to find a solution on how
to show the origin of the script...
*}
{'Powered by'|@translate} <a href="{$PHPWG_URL}" class="Piwigo">Piwigo</a>
{$VERSION}
{if isset($CONTACT_MAIL)}
- <a href="mailto:{$CONTACT_MAIL}?subject={'A comment on your site'|@translate|@escape:url}">{'Contact webmaster'|@translate}</a>
{/if}
{if isset($TOGGLE_MOBILE_THEME_URL)}
- {'View in'|@translate} : <a href="{$TOGGLE_MOBILE_THEME_URL}">{'Mobile'|@translate}</a> | <b>{'Desktop'|@translate}</b>
{/if}
{get_combined_scripts load='footer'}
{'Powered by'|translate} <a href="{$PHPWG_URL}" class="Piwigo">Piwigo</a>
{$VERSION}
{if isset($CONTACT_MAIL)}
- <a href="mailto:{$CONTACT_MAIL}?subject={'A comment on your site'|translate|@escape:url}">{'Contact webmaster'|translate}</a>
{/if}
{if isset($TOGGLE_MOBILE_THEME_URL)}
- {'View in'|translate} : <a href="{$TOGGLE_MOBILE_THEME_URL}">{'Mobile'|translate}</a> | <b>{'Desktop'|translate}</b>
{/if}
{if isset($footer_elements)}
{foreach from=$footer_elements item=elt}
{$elt}
{/foreach}
{/if}
</div>{* <!-- copyright --> *}
{if isset($footer_elements)}
{foreach from=$footer_elements item=v}
{$v}
{/foreach}
{/if}
</div> {* copyright *}
{if isset($debug.QUERIES_LIST)}
<div id="debug">
{$debug.QUERIES_LIST}
{$debug.QUERIES_LIST}
</div>
{/if}
</div>{* the_page *}
</div>{* <!-- the_page --> *}
<!-- BEGIN get_combined -->
{get_combined_scripts load='footer'}
<!-- END get_combined -->
</body>
</html>

View file

@ -1,77 +1,88 @@
<!DOCTYPE html>
<html lang="{$lang_info.code}" dir="{$lang_info.direction}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={$CONTENT_ENCODING}">
<meta charset="{$CONTENT_ENCODING}">
<meta name="generator" content="Piwigo (aka PWG), see piwigo.org">
{if isset($meta_ref) }
{if isset($meta_ref)}
{if isset($INFO_AUTHOR)}
<meta name="author" content="{$INFO_AUTHOR|@strip_tags:false|@replace:'"':' '}">
<meta name="author" content="{$INFO_AUTHOR|strip_tags:false|replace:'"':' '}">
{/if}
{if isset($related_tags)}
<meta name="keywords" content="{foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}{$tag.name}{/foreach}">
{/if}
{if isset($COMMENT_IMG)}
<meta name="description" content="{$COMMENT_IMG|@strip_tags:false|@replace:'"':' '}{if isset($INFO_FILE)} - {$INFO_FILE}{/if}">
<meta name="description" content="{$COMMENT_IMG|strip_tags:false|replace:'"':' '}{if isset($INFO_FILE)} - {$INFO_FILE}{/if}">
{else}
<meta name="description" content="{$PAGE_TITLE}{if isset($INFO_FILE)} - {$INFO_FILE}{/if}">
{/if}
{/if}
<title>{if $PAGE_TITLE!=l10n('Home') && $PAGE_TITLE!=$GALLERY_TITLE}{$PAGE_TITLE} | {/if}{$GALLERY_TITLE}</title>
<link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}{$themeconf.icon_dir}/favicon.ico">
<link rel="start" title="{'Home'|@translate}" href="{$U_HOME}" >
<link rel="search" title="{'Search'|@translate}" href="{$ROOT_URL}search.php" >
{if isset($first.U_IMG) }<link rel="first" title="{'First'|@translate}" href="{$first.U_IMG}" >{/if}
{if isset($previous.U_IMG)}<link rel="prev" title="{'Previous'|@translate}" href="{$previous.U_IMG}" >{/if}
{if isset($next.U_IMG) }<link rel="next" title="{'Next'|@translate}" href="{$next.U_IMG}" >{/if}
{if isset($last.U_IMG) }<link rel="last" title="{'Last'|@translate}" href="{$last.U_IMG}" >{/if}
{if isset($U_UP) }<link rel="up" title="{'Thumbnails'|@translate}" href="{$U_UP}" >{/if}
<link rel="start" title="{'Home'|translate}" href="{$U_HOME}" >
<link rel="search" title="{'Search'|translate}" href="{$ROOT_URL}search.php" >
{get_combined_css}
{if isset($first.U_IMG) }<link rel="first" title="{'First'|translate}" href="{$first.U_IMG}" >{/if}
{if isset($previous.U_IMG)}<link rel="prev" title="{'Previous'|translate}" href="{$previous.U_IMG}" >{/if}
{if isset($next.U_IMG) }<link rel="next" title="{'Next'|translate}" href="{$next.U_IMG}" >{/if}
{if isset($last.U_IMG) }<link rel="last" title="{'Last'|translate}" href="{$last.U_IMG}" >{/if}
{if isset($U_UP) }<link rel="up" title="{'Thumbnails'|translate}" href="{$U_UP}" >{/if}
{if isset($U_PREFETCH) }<link rel="prefetch" href="{$U_PREFETCH}">{/if}
{if isset($U_CANONICAL) }<link rel="canonical" href="{$U_CANONICAL}">{/if}
{if not empty($page_refresh)}<meta http-equiv="refresh" content="{$page_refresh.TIME};url={$page_refresh.U_REFRESH}">{/if}
{strip}
{foreach from=$themes item=theme}
{if $theme.load_css}
{combine_css path="themes/`$theme.id`/theme.css" order=-10}
{/if}
{if !empty($theme.local_head)}{include file=$theme.local_head load_css=$theme.load_css}{/if}
{if $theme.load_css}
{combine_css path="themes/`$theme.id`/theme.css" order=-10}
{/if}
{if !empty($theme.local_head)}
{include file=$theme.local_head load_css=$theme.load_css}
{/if}
{/foreach}
{combine_script id="jquery" load="footer"}
{/strip}
{if isset($U_PREFETCH)}<link rel="prefetch" href="{$U_PREFETCH}">{/if}
{if isset($U_CANONICAL)}<link rel="canonical" href="{$U_CANONICAL}">{/if}
{if not empty($page_refresh) }<meta http-equiv="refresh" content="{$page_refresh.TIME};url={$page_refresh.U_REFRESH}">{/if}
<!-- BEGIN get_combined -->
{get_combined_css}
{get_combined_scripts load='header'}
<!-- END get_combined -->
<!--[if lt IE 7]>
<script type="text/javascript" src="{$ROOT_URL}themes/default/js/pngfix.js"></script>
<![endif]-->
{combine_script id="jquery" load="footer"}
{if not empty($head_elements)}
{foreach from=$head_elements item=elt}{$elt}
{/foreach}
{foreach from=$head_elements item=elt}
{$elt}
{/foreach}
{/if}
</head>
<body id="{$BODY_ID}">
<div id="the_page">
{if not empty($header_msgs)}
<div class="header_msgs">
{foreach from=$header_msgs item=elt}
{$elt}<br>
{/foreach}
{foreach from=$header_msgs item=elt}
{$elt}<br>
{/foreach}
</div>
{/if}
<div id="theHeader">{$PAGE_BANNER}</div>
{if isset($theSwiftHeader)}{$theSwiftHeader}{/if}
{if not empty($header_notes)}
<div class="header_notes">
{foreach from=$header_notes item=elt}
<p>{$elt}</p>
{/foreach}
{foreach from=$header_notes item=elt}
<p>{$elt}</p>
{/foreach}
</div>
{/if}