diff options
author | rvelices <rv-github@modusoptimus.com> | 2010-12-03 07:00:49 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2010-12-03 07:00:49 +0000 |
commit | 9db8ee600860893a18f76ebbe822393426463bcb (patch) | |
tree | 50713ffba9561c0eab4c663cc0852a1f42d04f1a /themes | |
parent | af1cbac19d7478b935a991abddaa2dd4c8df6c34 (diff) |
new template feature: combine_css
- fully functional with file merging
- takes care of url() in css and recursively merge all @import
- migrated public templates only; need more code doc
git-svn-id: http://piwigo.org/svn/trunk@7987 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | themes/default/local_head.tpl | 16 | ||||
-rw-r--r-- | themes/default/print.css | 2 | ||||
-rw-r--r-- | themes/default/template/header.tpl | 15 | ||||
-rw-r--r-- | themes/default/template/include/datepicker.inc.tpl | 4 |
4 files changed, 20 insertions, 17 deletions
diff --git a/themes/default/local_head.tpl b/themes/default/local_head.tpl index 728feb21f..d35ab8401 100644 --- a/themes/default/local_head.tpl +++ b/themes/default/local_head.tpl @@ -1,7 +1,9 @@ -<!--[if lt IE 7]> - <link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/default/fix-ie5-ie6.css"> -<![endif]--> -<!--[if IE 7]> - <link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/default/fix-ie7.css"> -<![endif]--> -<link rel="stylesheet" type="text/css" media="print" href="{$ROOT_URL}themes/default/print.css"> +{if $load_css} + <!--[if lt IE 7]> + <link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/default/fix-ie5-ie6.css"> + <![endif]--> + <!--[if IE 7]> + <link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/default/fix-ie7.css"> + <![endif]--> + {combine_css path="themes/default/print.css" order=-10} +{/if}
\ No newline at end of file diff --git a/themes/default/print.css b/themes/default/print.css index 5e6fcabb9..18f2a6891 100644 --- a/themes/default/print.css +++ b/themes/default/print.css @@ -1,3 +1,4 @@ +@media print { #menubar, .content .navigationBar, UL.categoryActions, .content .calendarViews, .calendarBar, #imageToolBar, .navThumb, #addComment { display: none; @@ -12,3 +13,4 @@ BODY { #theCategoryPage .content { margin: 0 !important; } +}
\ No newline at end of file diff --git a/themes/default/template/header.tpl b/themes/default/template/header.tpl index 36222e268..45152d206 100644 --- a/themes/default/template/header.tpl +++ b/themes/default/template/header.tpl @@ -30,25 +30,26 @@ {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} + +{get_combined_css} + {foreach from=$themes item=theme} {if $theme.load_css} -<link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/{$theme.id}/theme.css"> +{combine_css path="themes/`$theme.id`/theme.css" order=-10} {/if} -{if !empty($theme.local_head)}{include file=$theme.local_head}{/if} +{if !empty($theme.local_head)}{include file=$theme.local_head load_css=$theme.load_css}{/if} {/foreach} + {if isset($U_PREFETCH) }<link rel="prefetch" href="{$U_PREFETCH}">{/if} {if not empty($page_refresh) }<meta http-equiv="refresh" content="{$page_refresh.TIME};url={$page_refresh.U_REFRESH}">{/if} -{* -<script type="text/javascript" src="{$ROOT_URL}themes/default/js/scripts.js"></script> -*} + +{get_combined_scripts load='header'} <!--[if lt IE 7]> <script type="text/javascript" src="{$ROOT_URL}themes/default/js/pngfix.js"></script> <![endif]--> -{get_combined_scripts load='header'} - {if not empty($head_elements)} {foreach from=$head_elements item=elt}{$elt} {/foreach} diff --git a/themes/default/template/include/datepicker.inc.tpl b/themes/default/template/include/datepicker.inc.tpl index 0ed844942..9308fd3ff 100644 --- a/themes/default/template/include/datepicker.inc.tpl +++ b/themes/default/template/include/datepicker.inc.tpl @@ -10,9 +10,7 @@ {combine_script id="jquery.ui.datepicker-$lang_info.code" path=$datepicker_language} {/if} -{html_head} -<link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/default/js/ui/theme/ui.datepicker.css"> -{/html_head} +{combine_css path="themes/default/js/ui/theme/ui.datepicker.css"} {footer_script} function pwg_initialization_datepicker(day, month, year, linked_date, checked_on_change, min_linked_date, max_linked_date) |