/trunk/themes/ods/template.php |
---|
34,7 → 34,7 |
* @return |
* A string containing an unordered list of links. |
*/ |
function ods_links($links, $attributes = array('class' => 'links')) { |
function primary_links($links, $attributes = array('class' => 'links')) { |
global $language; |
$output = ''; |
60,9 → 60,10 |
$class .= ' active'; |
} |
$class .= ' lien_primaire_'.$i; |
$id = 'lien_primaire_'.$i; |
$class .= ' lien_primaire'; |
$output .= '<li'. drupal_attributes(array('class' => $class)) .'>'; |
$output .= '<li'. drupal_attributes(array('id' => $id, 'class' => $class)) .'>'; |
if (isset($link['href'])) { |
97,6 → 98,85 |
} |
/** |
* Override or insert PHPTemplate variables into the search_theme_form template. |
* |
* @param $vars |
* A sequential array of variables to pass to the theme template. |
* @param $hook |
* The name of the theme function being called (not used in this case.) |
*/ |
function ods_preprocess_search_theme_form(&$vars, $hook) { |
// Remove the "Search this site" label from the form. |
$vars['form']['search_theme_form']['#title'] = t(''); |
// Set a default value for text inside the search box field. |
$vars['form']['search_theme_form']['#value'] = t(''); |
// Add a custom class and placeholder text to the search box. |
$vars['form']['search_theme_form']['#attributes'] = array('class' => 'NormalTextBox txtSearch', |
'onfocus' => "if (this.value == '') {this.value = '';}", |
'onblur' => "if (this.value == '') {this.value = '';}"); |
// Change the text on the submit button |
//$vars['form']['submit']['#value'] = t('Go'); |
// Rebuild the rendered version (search form only, rest remains unchanged) |
unset($vars['form']['search_theme_form']['#printed']); |
$vars['search']['search_theme_form'] = drupal_render($vars['form']['search_theme_form']); |
$vars['form']['submit']['#type'] = 'image_button'; |
$vars['form']['submit']['#src'] = path_to_theme() . '/images/search.jpg'; |
// Rebuild the rendered version (submit button, rest remains unchanged) |
unset($vars['form']['submit']['#printed']); |
$vars['search']['submit'] = drupal_render($vars['form']['submit']); |
// Collect all form elements to make it easier to print the whole form. |
$vars['search_form'] = implode($vars['search']); |
} |
/** |
* Override or insert PHPTemplate variables into the search_block_form template. |
* |
* @param $vars |
* A sequential array of variables to pass to the theme template. |
* @param $hook |
* The name of the theme function being called (not used in this case.) |
*/ |
function ods_preprocess_search_block_form(&$vars, $hook) { |
// Remove the "Search this site" label from the form. |
$vars['form']['search_block_form']['#title'] = t(''); |
// Set a default value for text inside the search box field. |
$vars['form']['search_block_form']['#value'] = t('Rechercher'); |
// Add a custom class and placeholder text to the search box. |
$vars['form']['search_block_form']['#attributes'] = array('class' => 'NormalTextBox txtSearch', |
'onfocus' => "if (this.value == 'Rechercher') {this.value = '';}", |
'onblur' => "if (this.value == 'Rechercher') {this.value = '';}"); |
// Change the text on the submit button |
//$vars['form']['submit']['#value'] = t('Go'); |
$vars['form']['search_block_form']['#label'] = t(''); |
// Rebuild the rendered version (search form only, rest remains unchanged) |
unset($vars['form']['search_block_form']['#printed']); |
$vars['search']['search_block_form'] = drupal_render($vars['form']['search_block_form']); |
$vars['form']['submit']['#type'] = 'image_button'; |
$vars['form']['submit']['#src'] = path_to_theme() . '/images/search.jpg'; |
// Rebuild the rendered version (submit button, rest remains unchanged) |
unset($vars['form']['submit']['#printed']); |
$vars['search']['submit'] = drupal_render($vars['form']['submit']); |
// Collect all form elements to make it easier to print the whole form. |
$vars['search_form'] = implode($vars['search']); |
} |
/** |
* Return a themed breadcrumb trail. |
* |
* @param $breadcrumb |
/trunk/themes/ods/search-block-form.tpl.php |
---|
New file |
0,0 → 1,39 |
<?php |
// $Id: search-block-form.tpl.php,v 1.1 2007/10/31 18:06:38 dries Exp $ |
/** |
* @file search-block-form.tpl.php |
* Default theme implementation for displaying a search form within a block region. |
* |
* Available variables: |
* - $search_form: The complete search form ready for print. |
* - $search: Array of keyed search elements. Can be used to print each form |
* element separately. |
* |
* Default keys within $search: |
* - $search['search_block_form']: Text input area wrapped in a div. |
* - $search['submit']: Form submit button. |
* - $search['hidden']: Hidden form elements. Used to validate forms when submitted. |
* |
* Since $search is keyed, a direct print of the form element is possible. |
* Modules can add to the search form so it is recommended to check for their |
* existance before printing. The default keys will always exist. |
* |
* <?php if (isset($search['extra_field'])): ?> |
* <div class="extra-field"> |
* <?php print $search['extra_field']; ?> |
* </div> |
* <?php endif; ?> |
* |
* To check for all available data within $search, use the code below. |
* |
* <?php print '<pre>'. check_plain(print_r($search, 1)) .'</pre>'; ?> |
* |
* @see template_preprocess_search_block_form() |
*/ |
?> |
<div class="container-inline"> |
<?php print $search['search_block_form'] ?> |
<?php print $search['submit'] ?> |
<?php print $search['hidden'] ?> |
</div> |
/trunk/themes/ods/style.css |
---|
286,6 → 286,10 |
margin: 2em 0.5em 1em 0; /* LTR */ |
} |
.form-submit#edit-submit { |
margin-bottom: -7px; |
} |
#dblog-form-overview .form-submit, |
.confirmation .form-submit, |
.search-form .form-submit, |
309,17 → 313,20 |
} |
@font-face { |
/* On donne un nom (au choix) à la fonte téléchargée */ |
/* Fonte pour le titre en haut à gauche */ |
font-family: "BorisBlackBloxx"; |
/* On indique le chemin du fichier de fonte à télécharger */ |
/* L'indication du format n'est pas obligatoire */ |
src: url("font/BorisBlackBloxx.ttf") format("truetype"); |
} |
.titre_site { |
font-family: BorisBlackBloxx, Cursive; |
margin-left: 490px; |
font-size: 14px; |
margin-left: auto; |
margin-right: auto; |
padding-left: 50px; |
padding-top: 5px; |
padding-bottom: 10px; |
width: 955px; |
} |
.titre_site #observatoire { |
386,6 → 393,9 |
margin-left:auto; |
margin-right:auto; |
background-color: #FFFFFF; |
-moz-box-shadow: 3px 0px 0 #aaa; |
-webkit-box-shadow: 3px 0px 0 #aaa; |
box-shadow: 3px 0px 0 #aaa; |
} |
#wrapper #container { |
441,15 → 451,26 |
#left { |
width: 215px; |
padding:5px; |
padding-left: 0px; |
float: left; |
min-height: 650px |
background-color: #FFFFFF; |
} |
#sidebar-left > div > div > div > ul.menu > li { |
padding-left:20px; |
} |
#sidebar-left { |
-moz-border-radius-topright: 50px 50px; |
-moz-border-radius-bottomright: 50px 50px; |
background-color: #0396A6; |
-webkit-border-radius-topright: 20px 20px; |
-webkit-border-radius-bottomright: 20px 20px; |
-moz-border-radius-topright: 20px 20px; |
-moz-border-radius-bottomright: 20px 20px; |
border-top-right-radius: 20px 20px; |
border-bottom-right-radius: 20px 20px; |
background-color: #5F8DBF; |
position:absolute; |
width: inherit; |
} |
#sidebar-left > div > h2 { |
459,6 → 480,7 |
#sidebar-left a { |
color: #FFFFFF; |
font-weight: bold; |
padding-left: 5px; |
} |
.content > div > ul > li { |
466,16 → 488,29 |
} |
ul.menu > li { |
padding-bottom:5px; |
padding-left:20px; |
padding-top:5px; |
padding-left:5px; |
} |
#sidebar-left a.active-trail { |
background-color: #CDEBED; |
color: #0396A6; |
color: #800000; |
text-decoration: underline; |
} |
.menu_recourbe { |
-moz-border-radius-bottomleft: 901px 158px; |
-moz-border-radius-bottomright: 300px 24px; |
border-bottom-left-radius: 901px 158px; |
border-bottom-right-radius: 300px 24px; |
background-color: #FFFFFF; |
width:inherit; |
height: 30px; |
position: absolute; |
z-index: 50; |
} |
#right { |
width: 210px; |
float: right; |
482,6 → 517,44 |
background-color: #FFFFFF; |
} |
#right h2 { |
display: none; |
} |
.titre_bloc { |
color: #FFFFFF; |
font-weight: bold; |
background-color: #5F8DBF; |
-webkit-border-radius-topleft: 20px 20px; |
-moz-border-radius-topleft: 20px 20px; |
border-top-left-radius: 20px 20px; |
} |
.info_utilisateur, .formulaire_identification_ods { |
-webkit-border-radius-topleft: 20px 20px; |
-webkit-border-radius-bottomleft: 20px 20px; |
-moz-border-radius-topleft: 20px 20px; |
-moz-border-radius-bottomleft: 20px 20px; |
border-top-left-radius: 20px 20px; |
border-bottom-left-radius: 20px 20px; |
border: solid 1px; |
background-color: #F4F2EB; |
text-align: center; |
} |
.info_utilisateur a { |
padding: 10px; |
} |
.nb_inscrits { |
background: transparent url(images/puce-inscrits.png) no-repeat; |
padding: 5px; |
padding-left: 30px; |
text-align: right; |
font-size: 1.2em; |
} |
/* We ensure the sidebars are still clickable using z-index */ |
#wrapper #container .sidebar { |
margin: 60px 0 5em; |
497,7 → 570,7 |
} |
#sidebar-left .block { |
padding: 0 15px 0 0px; |
padding: 25px 15px 0 0px; |
} |
#sidebar-right .block { |
619,8 → 692,23 |
margin-left:auto; |
margin-right: auto; |
background-color: #FFFFFF; |
text-align: center; |
vertical-align: bottom; |
} |
.liens_bas_page { |
padding-top: 85px; |
color: #FF7F00; |
font-weight: bold; |
} |
.liens_bas_page a { |
color: #FF7F00; |
margin-left: 4px; |
margin-right: 4px; |
font-size: 1.1em; |
} |
/** |
* Primary navigation |
*/ |
631,38 → 719,50 |
float: right; /* LTR */ |
position: relative; |
z-index: 4; |
height: 30px; |
height: 25px; |
} |
ul.primary-links li { |
margin: 0; |
ul.primary-links li { |
padding: 0; |
height: 25px; |
margin-left: 2px; |
float: left; /* LTR */ |
background-image: none; |
-moz-border-radius-topright: 1em; |
-moz-border-radius-topleft: 1em; |
margin-right: 3px; |
border-top-right-radius: 1em; |
border-top-left-radius: 1em; |
} |
li.lien_primaire_1 { |
ul.primary-links li.lien_primaire { |
margin-left: 3px; |
margin-top: 0px; |
margin-bottom: 0px; |
margin-right: 0px; |
-moz-box-shadow: 3px 0px 0 #aaa; |
-webkit-box-shadow: 3px 0px 0 #aaa; |
box-shadow: 3px 0px 0 #aaa; |
} |
li#lien_primaire_1 { |
width: 20px; |
background-color : #6C9ED8; |
} |
li.lien_primaire_1 a img { |
li#lien_primaire_1 a img { |
padding-top: 2px; |
} |
li.lien_primaire_2 { |
li#lien_primaire_2 { |
background-color : #800000; |
} |
li.lien_primaire_3 { |
li#lien_primaire_3 { |
background-color : #9AC343; |
} |
li.lien_primaire_4 { |
li#lien_primaire_4 { |
background-color : #EF7B1D; |
} |
680,7 → 780,7 |
ul.primary-links li.active-trail { |
height:35px; |
margin:-10px 0 0; |
margin-top:-10px; |
} |
ul.primary-links li.active-trail a { |
/trunk/themes/ods/search-theme-form.tpl.php |
---|
New file |
0,0 → 1,38 |
<?php |
// $Id: search-theme-form.tpl.php,v 1.1 2007/10/31 18:06:38 dries Exp $ |
/** |
* @file search-theme-form.tpl.php |
* Default theme implementation for displaying a search form directly into the |
* theme layout. Not to be confused with the search block or the search page. |
* |
* Available variables: |
* - $search_form: The complete search form ready for print. |
* - $search: Array of keyed search elements. Can be used to print each form |
* element separately. |
* |
* Default keys within $search: |
* - $search['search_theme_form']: Text input area wrapped in a div. |
* - $search['submit']: Form submit button. |
* - $search['hidden']: Hidden form elements. Used to validate forms when submitted. |
* |
* Since $search is keyed, a direct print of the form element is possible. |
* Modules can add to the search form so it is recommended to check for their |
* existance before printing. The default keys will always exist. |
* |
* <?php if (isset($search['extra_field'])): ?> |
* <div class="extra-field"> |
* <?php print $search['extra_field']; ?> |
* </div> |
* <?php endif; ?> |
* |
* To check for all available data within $search, use the code below. |
* |
* <?php print '<pre>'. check_plain(print_r($search, 1)) .'</pre>'; ?> |
* |
* @see template_preprocess_search_theme_form() |
*/ |
?> |
<div id="search" class="container-inline"> |
<?php print $search_form; ?> |
</div> |