function materialize_select($variables) { $classes = array('browser-default'); if (!isset($variables['element']['#attributes']['class'])) { $variables['element']['#attributes'] = array('class' => $classes); } else { $variables['element']['#attributes']['class'] = array_merge($variables['element']['#attributes']['class'], $classes); } return '<select' . backdrop_attributes($variables['element']['#attributes']) . '>' . form_select_options($variables['element']) . '</select>'; }
/** * Implements theme_field__field_type(). */ function bartik_field__taxonomy_term_reference($variables) { $output = ''; // Render the label, if it's not hidden. if (!$variables['label_hidden']) { $output .= '<h3 class="field-label">' . $variables['label'] . ': </h3>'; } // Render the items. $output .= $variables['element']['#label_display'] == 'inline' ? '<ul class="links inline">' : '<ul class="links">'; foreach ($variables['items'] as $delta => $item) { $item_attributes = isset($variables['item_attributes'][$delta]) ? backdrop_attributes($variables['item_attributes'][$delta]) : ''; $output .= '<li class="taxonomy-term-reference-' . $delta . '"' . $item_attributes . '>' . backdrop_render($item) . '</li>'; } $output .= '</ul>'; // Render the surrounding DIV with appropriate classes and attributes. if (!in_array('clearfix', $variables['classes'])) { $variables['classes'][] = 'clearfix'; } $output = '<div class="' . implode(' ', $variables['classes']) . '"' . backdrop_attributes($variables['attributes']) . '>' . $output . '</div>'; return $output; }
* - $tabs: Tabs linking to any sub-pages beneath the current page * (e.g., the view and edit tabs when displaying a node). * - $action_links: Array of actions local to the page, such as 'Add menu' on * the menu administration interface. * - $classes: Array of CSS classes to be added to the layout wrapper. * - $attributes: Array of additional HTML attributes to be added to the layout * wrapper. Flatten using backdrop_attributes(). * - $content: An array of content, each item in the array is keyed to one * region of the layout. This layout supports the following divs: */ ?> <div class="layout--juiced-up-full-screen-right container <?php print implode(' ', $classes); ?> "<?php print backdrop_attributes($attributes); ?> > <div id="skip-link"> <a href="#main-content" class="element-invisible element-focusable"><?php print t('Skip to main content'); ?> </a> </div> <main class="l-wrapper container" role="main" aria-label="<?php print t('Main content'); ?> "> <a id="main-content"></a>
print implode(' ', $classes); ?> "<?php print backdrop_attributes($attributes); ?> > <div id="skip-link"> <a href="#main-content" class="element-invisible element-focusable"><?php print t('Skip to main content'); ?> </a> </div> <div class="l-container"> <main role="main"<?php print backdrop_attributes($main_attributes); ?> > <div class="l-content-wrapper"> <div class="l-content-top"> <a id="main-content"></a> <?php print render($title_prefix); ?> <?php if ($title) { ?> <h1 class="title" id="page-title"> <?php
?> <footer> <?php print $user_picture; ?> <p class="submitted"><?php print $submitted; ?> </p> </footer> <?php } ?> <div class="content"<?php print backdrop_attributes($content_attributes); ?> > <?php // We hide the links now so that we can render them later. hide($content['links']); print render($content); ?> </div> <?php print render($content['links']); ?> <?php if ($page && isset($comments['comments'])) {
/** * Implements theme_preprocess_menu_link(). */ function teamwork_15_subtheme_menu_link(array $variables) { $element = $variables['element']; $classes = array('pure-menu-item'); $element['#attributes']['class'] = array_merge($element['#attributes']['class'], $classes); $sub_menu = ''; if ($element['#below']) { $sub_menu = backdrop_render($element['#below']); } $output = l($element['#title'], $element['#href'], $element['#localized_options']); return '<li' . backdrop_attributes($element['#attributes']) . '>' . $output . $sub_menu . "</li>\n"; }
foreach ($rows as $row_count => $row) { ?> <tr <?php if (!empty($row_classes[$row_count])) { print 'class="' . implode(' ', $row_classes[$row_count]) . '"'; } ?> > <?php foreach ($row as $field => $content) { ?> <td <?php if ($field_classes[$field][$row_count]) { print 'class="' . implode(' ', $field_classes[$field][$row_count]) . '" '; } print backdrop_attributes($field_attributes[$field][$row_count]); ?> > <?php print $content; ?> </td> <?php } ?> </tr> <?php } ?> </tbody> </table>
/** * Overwrite theme_button() */ function zurb_foundation_6_subtheme_button($variables) { $element = $variables['element']; $element['#attributes']['type'] = 'submit'; element_set_attributes($element, array('id', 'name', 'value')); $element['#attributes']['class'][] = 'form-' . $element['#button_type']; if (!empty($element['#attributes']['disabled'])) { $element['#attributes']['class'][] = 'form-button-disabled'; } //custom class $element['#attributes']['class'][] = 'button'; $element['#attributes']['class'][] = 'hollow'; // $element['#attributes']['class'][] = 'radius'; return '<input' . backdrop_attributes($element['#attributes']) . ' />'; }
/** * Overrides theme_form_element_label(). */ function afterlight_tribute_subtheme_form_element_label(&$variables) { $element = $variables['element']; $title = filter_xss_admin($element['#title']); // If the element is required, a required marker is appended to the label. $required = !empty($element['#required']) ? theme('form_required_marker', array('element' => $element)) : ''; // // This is also used in the installer, pre-database setup. $t = get_t(); $attributes = array(); if (!empty($element['#id'])) { $attributes['for'] = $element['#id']; } $output = ''; if (isset($variables['#children'])) { if ($element['#type'] === "radio") { $output .= $variables['#children']; } if ($element['#type'] === "checkbox") { $output .= $variables['#children']; } } return ' <label' . backdrop_attributes($attributes) . '></label><div>' . $t('!title', array('!title' => $title)) . "</div> \n"; }
?> <title><?php print $head_title; ?> </title> <?php print backdrop_get_css(); ?> <?php print backdrop_get_js(); ?> </head> <body class="<?php print implode(' ', $classes); ?> "<?php print backdrop_attributes($body_attributes); ?> > <?php print $page; ?> <?php print $page_bottom; ?> <?php print backdrop_get_js('footer'); ?> </body> </html>
/** * Overrides theme_menu_link(). */ function borg_menu_link(array $variables) { $element = $variables['element']; $sub_menu = ''; if ($element['#below']) { $sub_menu = backdrop_render($element['#below']); } $menu_name = isset($element['#original_link']['menu_name']) ? $element['#original_link']['menu_name'] : NULL; if ($menu_name === 'main-menu' || $menu_name === 'menu-handbook') { // Add the font awesome icon. if ($element['#href']) { $element['#title'] .= ' <i class="fa fa-forward fa-fw"></i>'; $element['#localized_options']['html'] = TRUE; } // If this is the handbook link and we're on a book page, set an active class. if ($element['#href'] === 'node/1') { $node = menu_get_object(); if (isset($node) && isset($node->type) && $node->type === 'book') { $element['#attributes']['class'][] = 'active'; } } } $output = l($element['#title'], $element['#href'], $element['#localized_options']); return '<li' . backdrop_attributes($element['#attributes']) . '>' . $output . $sub_menu . "</li>\n"; }
function afterlight_tribute_menu_link(array $variables) { $element = $variables['element']; $sub_menu = ''; if ($element['#below']) { $sub_menu = backdrop_render($element['#below']); } $output = l($element['#title'], $element['#href'], $element['#localized_options']); return '<li' . backdrop_attributes($element['#attributes']) . '>' . $output . $sub_menu . "</li>\n"; }
/** * @file * Default theme implementation to display a single Backdrop page while offline. * * All the available variables are mirrored in html.tpl.php and page.tpl.php. * Some may be blank but they are provided for consistency. * * @see template_preprocess() * @see template_preprocess_maintenance_page() * * @ingroup themeable */ ?> <!DOCTYPE html> <html<?php print backdrop_attributes($html_attributes); ?> > <head> <?php print backdrop_get_html_head(); ?> <title><?php print $head_title; ?> </title> <?php print backdrop_get_css(); ?> <?php
?> <div class="field-label"><?php print $label; ?> : </div> <?php } ?> <div class="field-items"<?php print backdrop_attributes($content_attributes); ?> > <?php foreach ($items as $delta => $item) { ?> <div class="field-item <?php print $delta % 2 ? 'odd' : 'even'; ?> "<?php print backdrop_attributes($item_attributes[$delta]); ?> ><?php print render($item); ?> </div> <?php } ?> </div> </div>