Last active
May 19, 2017 02:58
-
-
Save sam452/f5762b3043f6a06dee0a2ce8d287186a to your computer and use it in GitHub Desktop.
zen files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Returns the HTML for a single Drupal page. | |
* | |
* Complete documentation for this file is available online. | |
* @see https://drupal.org/node/1728148 | |
*/ | |
?> | |
<div class="layout-center"> | |
<header class="header" role="banner"> | |
<?php if ($logo): ?> | |
<a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" class="header__logo"><img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" class="header__logo-image" /></a> | |
<?php endif; ?> | |
<?php if ($site_name || $site_slogan): ?> | |
<div class="header__name-and-slogan"> | |
<?php if ($site_name): ?> | |
<h1 class="header__site-name"> | |
<a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" class="header__site-link" rel="home"><span><?php print $site_name; ?></span></a> | |
</h1> | |
<?php endif; ?> | |
<?php if ($site_slogan): ?> | |
<div class="header__site-slogan"><?php print $site_slogan; ?></div> | |
<?php endif; ?> | |
</div> | |
<?php endif; ?> | |
<?php if ($secondary_menu): ?> | |
<nav class="header__secondary-menu" role="navigation"> | |
<?php print theme('links__system_secondary_menu', array( | |
'links' => $secondary_menu, | |
'attributes' => array( | |
'class' => array('links', 'inline', 'clearfix'), | |
), | |
'heading' => array( | |
'text' => $secondary_menu_heading, | |
'level' => 'h2', | |
'class' => array('visually-hidden'), | |
), | |
)); ?> | |
</nav> | |
<?php endif; ?> | |
<?php print render($page['header']); ?> | |
</header> | |
<div class="layout-3col__full"> | |
<?php print render($page['featured']); ?> | |
</div> | |
<div class="layout-3col layout-swap"> | |
<?php | |
// Render the sidebars to see if there's anything in them. | |
$sidebar_first = render($page['sidebar_first']); | |
$sidebar_second = render($page['sidebar_second']); | |
// Decide on layout classes by checking if sidebars have content. | |
$content_class = 'layout-3col__full'; | |
$sidebar_first_class = $sidebar_second_class = ''; | |
if ($sidebar_first && $sidebar_second): | |
$content_class = 'layout-3col__right-content'; | |
$sidebar_first_class = 'layout-3col__first-left-sidebar'; | |
$sidebar_second_class = 'layout-3col__second-left-sidebar'; | |
elseif ($sidebar_second): | |
$content_class = 'layout-3col__left-content'; | |
$sidebar_second_class = 'layout-3col__right-sidebar'; | |
elseif ($sidebar_first): | |
$content_class = 'layout-3col__right-content'; | |
$sidebar_first_class = 'layout-3col__left-sidebar'; | |
endif; | |
?> | |
<main class="<?php print $content_class; ?>" role="main"> | |
<?php print render($page['highlighted']); ?> | |
<?php print $breadcrumb; ?> | |
<a href="#skip-link" class="visually-hidden visually-hidden--focusable" id="main-content">Back to top</a> | |
<?php print render($title_prefix); ?> | |
<?php if ($title): ?> | |
<h1><?php print $title; ?></h1> | |
<?php endif; ?> | |
<?php print render($title_suffix); ?> | |
<?php print $messages; ?> | |
<?php print render($tabs); ?> | |
<?php print render($page['help']); ?> | |
<?php if ($action_links): ?> | |
<ul class="action-links"><?php print render($action_links); ?></ul> | |
<?php endif; ?> | |
<?php print render($page['content']); ?> | |
<?php print $feed_icons; ?> | |
</main> | |
<div class="layout-swap__top layout-3col__full"> | |
<a href="#skip-link" class="visually-hidden visually-hidden--focusable" id="main-menu" tabindex="-1">Back to top</a> | |
<?php if ($main_menu): ?> | |
<nav class="main-menu" role="navigation"> | |
<?php | |
// This code snippet is hard to modify. We recommend turning off the | |
// "Main menu" on your sub-theme's settings form, deleting this PHP | |
// code block, and, instead, using the "Menu block" module. | |
// @see https://drupal.org/project/menu_block | |
print theme('links__system_main_menu', array( | |
'links' => $main_menu, | |
'attributes' => array( | |
'class' => array('navbar', 'clearfix'), | |
), | |
'heading' => array( | |
'text' => t('Main menu'), | |
'level' => 'h2', | |
'class' => array('visually-hidden'), | |
), | |
)); ?> | |
</nav> | |
<?php endif; ?> | |
<?php print render($page['navigation']); ?> | |
</div> | |
<?php if ($sidebar_first): ?> | |
<aside class="<?php print $sidebar_first_class; ?>" role="complementary"> | |
<?php print $sidebar_first; ?> | |
</aside> | |
<?php endif; ?> | |
<?php if ($sidebar_second): ?> | |
<aside class="<?php print $sidebar_second_class; ?>" role="complementary"> | |
<?php print $sidebar_second; ?> | |
</aside> | |
<?php endif; ?> | |
</div> | |
</div> | |
<div id="tn_footer"> | |
<?php if ($footer_sub_left); ?> | |
<div><?php print $footer_sub_left; ?></div> | |
<php endif; ?> | |
<?php print render($page['footer']); ?> | |
<?php if ($footer_sub_right); ?> | |
<div><?php print $footer_sub_right; ?></div> | |
<php endif; ?> | |
<?php print render($page['bottom']); ?> | |
</div> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Returns HTML for a region. | |
* | |
* Complete documentation for this file is available online. | |
* @see https://drupal.org/node/1728112 | |
*/ | |
?> | |
<?php if ($content): ?> | |
<div class="<?php print $classes; ?>"> | |
<?php print $content; ?> | |
</div> | |
<?php endif; ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.sf-menu.sf-style-blue { | |
float: left; | |
margin-bottom: 1em; | |
padding: 0; | |
} | |
.sf-menu.sf-style-blue.sf-navbar { | |
width: 100%; | |
} | |
.sf-menu.sf-style-blue ul { | |
padding-left: 0; | |
} | |
.sf-menu.sf-style-blue a, .sf-menu.sf-style-blue span.nolink { | |
border: none; | |
color: #476ccb; | |
padding: 0.75em 1em; | |
text-decoration: none; | |
} | |
.sf-menu.sf-style-blue a.sf-with-ul, .sf-menu.sf-style-blue span.nolink.sf-with-ul { | |
padding-right: 2.25em; | |
} | |
.sf-menu.sf-style-blue.rtl a.sf-with-ul, .sf-menu.sf-style-blue.rtl span.nolink.sf-with-ul { | |
padding-left: 2.25em; | |
padding-right: 1em; | |
} | |
.sf-menu.sf-style-blue.sf-navbar a, .sf-menu.sf-style-blue.sf-navbar span.nolink { | |
border: 0 none; | |
} | |
.sf-menu.sf-style-blue span.sf-description { | |
color: #ffffff; | |
display: block; | |
font-size: 0.833em; | |
line-height: 1.5; | |
margin: 5px 0 0 5px; | |
padding: 0; | |
} | |
.sf-menu.sf-style-blue.rtl span.sf-description { | |
margin: 5px 5px 0 0; | |
} | |
.sf-menu.sf-style-blue li, .sf-menu.sf-style-blue.sf-navbar { | |
background: transparent; | |
} | |
.sf-menu.sf-style-blue li li { | |
background: #119fc2; | |
} | |
.sf-menu.sf-style-blue li li li { | |
background: #119fc2; | |
} | |
.sf-menu.sf-style-blue li:hover, .sf-menu.sf-style-sr-blue, .sf-menu.sf-style-blue li.sfHover, .sf-menu.sf-style-blue a:focus, .sf-menu.sf-style-sr-blue a:focus, .sf-menu.sf-style-blue a:hover, sf-menu.sf-style-sr-blue a:hover, .sf-menu.sf-style-blue a:active, sf-menu.sf-style-sr-blue a:active, .sf-menu.sf-style-blue span.nolink:hover, .sf-menu.sf-style-sr-blue span.nolink:hover, .sf-menu.sf-style-blue.sf-navbar li li, .sf-menu.sf-style-sr-blue.sf-navbar li li { | |
background: #3270c5 none repeat scroll 0 0; | |
color: #fff; | |
border-top-left-radius: 5px; | |
border-top-right-radius: 5px; | |
} | |
.sf-menu.sf-style-blue.sf-navbar li ul { | |
background-color: #3270c5; | |
border-radius: 5px; | |
} | |
.sf-menu.sf-style-blue.sf-navbar li ul li ul { | |
background-color: transparent; | |
} | |
div.sf-accordion-toggle.sf-style-blue a { | |
background: #095cb1 none repeat scroll 0 0; | |
border: none; | |
color: #ffffff; | |
padding: 1em; | |
border-top-left-radius: 5px; | |
border-top-right-radius: 5px; | |
} | |
div.sf-accordion-toggle.sf-style-blue a.sf-expanded, .sf-menu.sf-style-blue.sf-accordion li.sf-expanded { | |
background-color: #3270c5; | |
} | |
div.sf-accordion-toggle.sf-style-blue a.sf-expanded, .sf-menu.sf-style-blue.sf-accordion li.sf-expanded > a, .sf-menu.sf-style-blue.sf-accordion li.sf-expanded > span.nolink { | |
font-weight: bold; | |
} | |
.sf-menu.sf-style-blue.sf-accordion li a.sf-accordion-button { | |
font-weight: bold; | |
position: absolute; | |
right: 0; | |
top: 0; | |
z-index: 499; | |
} | |
.sf-menu.sf-style-blue.sf-accordion li li a, .sf-menu.sf-style-blue.sf-accordion li li span.nolink { | |
padding-left: 2em; | |
} | |
.sf-menu.sf-style-blue.sf-accordion li li li a, .sf-menu.sf-style-blue.sf-accordion li li li span.nolink { | |
padding-left: 3em; | |
} | |
.sf-menu.sf-style-blue.sf-accordion li li li li a, .sf-menu.sf-style-blue.sf-accordion li li li li span.nolink { | |
padding-left: 4em; | |
} | |
.sf-menu.sf-style-blue.sf-accordion li li li li a, .sf-menu.sf-style-blue.sf-accordion li li li li span.nolink { | |
padding-left: 5em; | |
} | |
.sf-menu.sf-style-blue.rtl.sf-accordion li li a, .sf-menu.sf-style-blue.rtl.sf-accordion li li span.nolink { | |
padding-right: 2em; | |
} | |
.sf-menu.sf-style-blue.rtl.sf-accordion li li li a, .sf-menu.sf-style-blue.rtl.sf-accordion li li li span.nolink { | |
padding-right: 3em; | |
} | |
.sf-menu.sf-style-blue.rtl.sf-accordion li li li li a, .sf-menu.sf-style-blue.rtl.sf-accordion li li li li span.nolink { | |
padding-right: 4em; | |
} | |
.sf-menu.sf-style-blue.rtl.sf-accordion li li li li li a, .sf-menu.sf-style-blue.rtl.sf-accordion li li li li li span.nolink { | |
padding-right: 5em; | |
} | |
.sf-menu.sf-style-blue ul.sf-megamenu li.sf-megamenu-wrapper ol, .sf-menu.sf-style-blue ul.sf-megamenu li.sf-megamenu-wrapper ol li { | |
margin: 0; | |
padding: 0; | |
} | |
.sf-menu.sf-style-blue ul.sf-megamenu li.sf-megamenu-wrapper a.menuparent, .sf-menu.sf-style-blue ul.sf-megamenu li.sf-megamenu-wrapper span.nolink.menuparent { | |
font-weight: bold; | |
} | |
.sf-menu.sf-style-blue ul.sf-megamenu li.sf-megamenu-wrapper ol li.sf-megamenu-column { | |
display: inline; | |
float: left; | |
} | |
.sf-menu.sf-style-blue.rtl ul.sf-megamenu li.sf-megamenu-wrapper ol li.sf-megamenu-column { | |
float: right; | |
} | |
.sf-menu-side-nav { | |
} | |
.sf-menu.sf-menu-side-nav.sf-vertical.sf-style-sr-blue { | |
/*line-height: 1.2; | |
padding-bottom: 11px; | |
background-repeat: no-repeat; | |
color: #476ccb; | |
padding-left: 10px; | |
background-position: bottom right; | |
background-image: url(/sites/default/files/images/sn-nor-bottom.png); | |
min-height: 18px; | |
padding-right: 15px;*/ | |
background-repeat: no-repeat; | |
text-decoration: none; | |
background-position: top right; | |
border-top-left-radius: 5px; | |
border-bottom-left-radius: 5px; | |
background-image: url(/sites/default/files/images/sn-nor-top2.png); | |
min-height: 40px; | |
} | |
/*.sf-menu.sf-style-sr-blue li { | |
background: transparent; | |
}*/ | |
/*.sf-menu a { | |
text-decoration: none; | |
}*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Contains the theme's functions to manipulate Drupal's default markup. | |
* | |
* Complete documentation for this file is available online. | |
* @see https://drupal.org/node/1728096 | |
*/ | |
/** | |
* Override or insert variables into the maintenance page template. | |
* | |
* @param array $variables | |
* Variables to pass to the theme template. | |
* @param string $hook | |
* The name of the template being rendered ("maintenance_page" in this case.) | |
*/ | |
/* -- Delete this line if you want to use this function | |
function tn_senior0_preprocess_maintenance_page(&$variables, $hook) { | |
// When a variable is manipulated or added in preprocess_html or | |
// preprocess_page, that same work is probably needed for the maintenance page | |
// as well, so we can just re-use those functions to do that work here. | |
tn_senior0_preprocess_html($variables, $hook); | |
tn_senior0_preprocess_page($variables, $hook); | |
} | |
// */ | |
/** | |
* Override or insert variables into the html templates. | |
* | |
* @param array $variables | |
* Variables to pass to the theme template. | |
* @param string $hook | |
* The name of the template being rendered ("html" in this case.) | |
*/ | |
/* -- Delete this line if you want to use this function | |
function tn_senior0_preprocess_html(&$variables, $hook) { | |
$variables['sample_variable'] = t('Lorem ipsum.'); | |
// The body tag's classes are controlled by the $classes_array variable. To | |
// remove a class from $classes_array, use array_diff(). | |
$variables['classes_array'] = array_diff($variables['classes_array'], | |
array('class-to-remove') | |
); | |
} | |
// */ | |
/** | |
* Override or insert variables into the page templates. | |
* | |
* @param array $variables | |
* Variables to pass to the theme template. | |
* @param string $hook | |
* The name of the template being rendered ("page" in this case.) | |
*/ | |
/* -- Delete this line if you want to use this function | |
function tn_senior0_preprocess_page(&$variables, $hook) { | |
$variables['sample_variable'] = t('Lorem ipsum.'); | |
} | |
// */ | |
/** | |
* Override or insert variables into the region templates. | |
* | |
* @param array $variables | |
* Variables to pass to the theme template. | |
* @param string $hook | |
* The name of the template being rendered ("region" in this case.) | |
*/ | |
/* -- Delete this line if you want to use this function | |
function tn_senior0_preprocess_region(&$variables, $hook) { | |
// Don't use Zen's region--no-wrapper.tpl.php template for sidebars. | |
if (strpos($variables['region'], 'sidebar_') === 0) { | |
$variables['theme_hook_suggestions'] = array_diff( | |
$variables['theme_hook_suggestions'], array('region__no_wrapper') | |
); | |
} | |
} | |
// */ | |
/** | |
* Override or insert variables into the block templates. | |
* | |
* @param array $variables | |
* Variables to pass to the theme template. | |
* @param string $hook | |
* The name of the template being rendered ("block" in this case.) | |
*/ | |
/* -- Delete this line if you want to use this function | |
function tn_senior0_preprocess_block(&$variables, $hook) { | |
// Add a count to all the blocks in the region. | |
// $variables['classes_array'][] = 'count-' . $variables['block_id']; | |
// By default, Zen will use the block--no-wrapper.tpl.php for the main | |
// content. This optional bit of code undoes that: | |
if ($variables['block_html_id'] == 'block-system-main') { | |
$variables['theme_hook_suggestions'] = array_diff( | |
$variables['theme_hook_suggestions'], array('block__no_wrapper') | |
); | |
} | |
} | |
// */ | |
/** | |
* Override or insert variables into the node templates. | |
* | |
* @param array $variables | |
* Variables to pass to the theme template. | |
* @param string $hook | |
* The name of the template being rendered ("node" in this case.) | |
*/ | |
/* -- Delete this line if you want to use this function | |
function tn_senior0_preprocess_node(&$variables, $hook) { | |
$variables['sample_variable'] = t('Lorem ipsum.'); | |
// Optionally, run node-type-specific preprocess functions, like | |
// tn_senior0_preprocess_node_page() or tn_senior0_preprocess_node_story(). | |
$function = __FUNCTION__ . '_' . $variables['node']->type; | |
if (function_exists($function)) { | |
$function($variables, $hook); | |
} | |
} | |
// */ | |
/** | |
* Override or insert variables into the comment templates. | |
* | |
* @param array $variables | |
* Variables to pass to the theme template. | |
* @param string $hook | |
* The name of the template being rendered ("comment" in this case.) | |
*/ | |
/* -- Delete this line if you want to use this function | |
function tn_senior0_preprocess_comment(&$variables, $hook) { | |
$variables['sample_variable'] = t('Lorem ipsum.'); | |
} | |
// */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Drupal's .info files allow themers to easily specify some of the static | |
; properties of your theme. Properties such as its name, stylesheets, | |
; javascripts, and block regions. | |
; | |
; Drupal 7 stores a cache of the data in this .info files. If you modify any | |
; lines in this file, you MUST refresh Drupal 7's cache by simply visiting the | |
; Appearance page at admin/appearance. | |
; The name, description and screenshot used for this theme on the Appearance | |
; page at admin/appearance. | |
screenshot = screenshot.png | |
name = tnsr_0 | |
description = Read the <a href="https://drupal.org/node/873778">online docs</a> or the included README.txt on how to create a theme with Zen. | |
; This theme is compatible with Drupal 7 core. And it is a sub-theme of Zen. | |
core = 7.x | |
base theme = zen | |
; This section controls the CSS files for your theme. There are 3 different | |
; things you can do with a "stylesheets" line: | |
; - Add a new stylesheet for your theme. | |
; - Override a module's stylesheet. If the stylesheet you are adding uses the | |
; same filename as a stylesheet from a Drupal core or contrib module, your CSS | |
; file will be used instead of the module's file. | |
; - Remove a module's stylesheet. If you specify the name of a Drupal core or | |
; contrib module's stylesheets, Drupal will remove that stylesheet if you do | |
; NOT include a file with that name with your theme. | |
; | |
; stylesheets[MEDIA][] = FILE | |
; | |
; The "FILE" is the name of the stylesheet to add/override/remove. | |
; The "MEDIA" in the first set of brackets is a media type or a media query. | |
; Typical CSS media types include "all", "screen", "print", and "handheld". A | |
; typical media query is "screen and (max-width: 320px)". | |
; | |
; CSS2.1 media types: http://www.w3.org/TR/CSS21/media.html#media-types | |
; CSS3 media queries: http://www.w3.org/TR/css3-mediaqueries/ | |
; First we remove any Drupal styling that Zen provides as components. | |
stylesheets[all][] = system.base.css | |
stylesheets[all][] = system.menus.css | |
stylesheets[all][] = system.messages.css | |
stylesheets[all][] = system.theme.css | |
stylesheets[all][] = comment.css | |
stylesheets[all][] = node.css | |
; Then we add our own stylesheet. | |
stylesheets[all][] = css/styles.css | |
; If you wish to use conditional stylesheets, you should install the | |
; conditional stylesheets module: https://drupal.org/project/conditional_styles | |
; | |
;stylesheets-conditional[lte IE 8][all][] = css/ie8.css | |
;stylesheets-conditional[(gte IE 9)|(gt IEMobile 7)|(!IE)][] = css/styles.css | |
; Optionally add some JavaScripts to your theme. | |
;scripts[] = js/script.js | |
; This section lists the regions defined in Zen's default page.tpl.php and | |
; maintenance-page.tpl.php files. The name in brackets is the machine name of | |
; the region. The text after the equals sign is a descriptive text used on the | |
; admin/structure/blocks page. | |
; | |
; In the page.tpl, the contents of the region are output with a | |
; $page['MACHINE-NAME'] variable and, in the maintenance-page.tpl, the region is | |
; output with a $MACHINE-NAME variable. For example, with this line in the .info | |
; file: | |
; regions[header_top] = Header top | |
; You'll use this variable in page.tpl.php: | |
; <?php print render($page['header_top']); ?> | |
; And you'll use this variable in maintenance-page.tpl.php: | |
; <?php print $header_top; ?> | |
regions[header] = Header | |
regions[navigation] = Navigation bar | |
regions[highlighted] = Highlighted | |
regions[featured] = Featured | |
regions[help] = Help | |
regions[sidebar_first] = First sidebar | |
regions[content] = Content | |
regions[sidebar_second] = Second sidebar | |
regions[footer_sub_left]= Footer Sub Left | |
regions[footer_sub_right]=Footer Sub Right | |
regions[footer] = Footer | |
regions[bottom] = Page bottom | |
; The page_top and page_bottom regions are hidden, which means they will not | |
; show up on the blocks administration page. But they are required in order for | |
; the html.tpl.php to work properly, so do not delete them. | |
regions[page_top] = Page top | |
regions[page_bottom] = Page bottom | |
; Various page elements output by the theme can be toggled on and off. The | |
; "features" control which of these check boxes display on the | |
; admin/appearance config page. This is useful for suppressing check boxes | |
; for elements not used by your sub-theme. To suppress a check box, omit the | |
; entry for it below. See the Drupal 7 Theme Guide for more info: | |
; https://drupal.org/node/171205#features | |
features[] = logo | |
features[] = name | |
features[] = slogan | |
features[] = node_user_picture | |
features[] = comment_user_picture | |
features[] = favicon | |
features[] = main_menu | |
features[] = secondary_menu | |
; Set the default values of settings on the theme-settings.php form. | |
settings[zen_breadcrumb] = yes | |
settings[zen_breadcrumb_separator] = ' › ' | |
settings[zen_breadcrumb_home] = 1 | |
settings[zen_breadcrumb_trailing] = 0 | |
settings[zen_breadcrumb_title] = 0 | |
settings[zen_skip_link_anchor] = main-menu | |
settings[zen_skip_link_text] = Jump to navigation | |
settings[zen_meta][] = html5 | |
settings[zen_meta][] = meta | |
settings[zen_rebuild_registry] = 1 | |
; To make this sub-theme an admin theme with shortcut links next to titles, | |
; uncomment the line below. | |
;settings[shortcut_module_link] = 1 | |
; To add a Panels layout (which can also be used by Display Suite), uncomment | |
; the line below and see the documentation at: https://drupal.org/node/495654 | |
;plugins[panels][layouts] = panels-layouts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment