Commit 9f6bce56 authored by danpros's avatar danpros

Yay! Danland 8.x-1.x branch.

parent d9980161
This diff is collapsed.
Superfish Drop Menu:
1) Build a standard drupal menu. Set the correct levels to "expanded" (the parent item).
2) Disable Main menu in the Danland theme settings.
3) Place the Main menu block in the Superfish menu region. Your menu will be automatically rendered as a Drop menu.
4) To modify the animation style and speed please see the following site for a full run down on configuring the Superfish plugin: http://users.tpg.com.au/j_birch/plugins/superfish/
\ No newline at end of file
<?php
/**
* @file
* Default theme implementation to display a block.
*
* Available variables:
* - $block->subject: Block title.
* - $content: Block content.
* - $block->module: Module that generated the block.
* - $block->delta: An ID for the block, unique within each module.
* - $block->region: The block region embedding the current block.
* - $classes: String of classes that can be used to style contextually through
* CSS. It can be manipulated through the variable $classes_array from
* preprocess functions. The default values can be one or more of the following:
* - block: The current template type, i.e., "theming hook".
* - block-[module]: The module generating the block. For example, the user module
* is responsible for handling the default user navigation block. In that case
* the class would be "block-user".
* - $title_prefix (array): An array containing additional output populated by
* modules, intended to be displayed in front of the main title tag that
* appears in the template.
* - $title_suffix (array): An array containing additional output populated by
* modules, intended to be displayed after the main title tag that appears in
* the template.
*
* Helper variables:
* - $classes_array: Array of html class attribute values. It is flattened
* into a string within the variable $classes.
* - $block_zebra: Outputs 'odd' and 'even' dependent on each block region.
* - $zebra: Same output as $block_zebra but independent of any block region.
* - $block_id: Counter dependent on each block region.
* - $id: Same output as $block_id but independent of any block region.
* - $is_front: Flags true when presented in the front page.
* - $logged_in: Flags true when the current user is a logged-in member.
* - $is_admin: Flags true when the current user is an administrator.
* - $block_html_id: A valid HTML ID and guaranteed unique.
*
* @see template_preprocess()
* @see template_preprocess_block()
* @see template_process()
*/
?>
<div id="<?php print $block_html_id; ?>" class="<?php print $classes; ?>"<?php print $attributes; ?>>
<?php print render($title_prefix); ?>
<?php if ($block->subject): ?>
<h2<?php print $title_attributes; ?> class="block-title"><?php print $block->subject ?></h2>
<?php endif;?>
<?php print render($title_suffix); ?>
<div class="content"<?php print $content_attributes; ?>>
<?php print $content ?>
</div> <!-- end block content -->
</div> <!-- end block -->
\ No newline at end of file
<?php
/**
* @file
* Default theme implementation for comments.
*
* Available variables:
* - $author: Comment author. Can be link or plain text.
* - $content: An array of comment items. Use render($content) to print them all, or
* print a subset such as render($content['field_example']). Use
* hide($content['field_example']) to temporarily suppress the printing of a
* given element.
* - $created: Formatted date and time for when the comment was created.
* Preprocess functions can reformat it by calling format_date() with the
* desired parameters on the $comment->created variable.
* - $changed: Formatted date and time for when the comment was last changed.
* Preprocess functions can reformat it by calling format_date() with the
* desired parameters on the $comment->changed variable.
* - $new: New comment marker.
* - $permalink: Comment permalink.
* - $submitted: Submission information created from $author and $created during
* template_preprocess_comment().
* - $picture: Authors picture.
* - $signature: Authors signature.
* - $status: Comment status. Possible values are:
* comment-unpublished, comment-published or comment-preview.
* - $title: Linked title.
* - $classes: String of classes that can be used to style contextually through
* CSS. It can be manipulated through the variable $classes_array from
* preprocess functions. The default values can be one or more of the following:
* - comment: The current template type, i.e., "theming hook".
* - comment-by-anonymous: Comment by an unregistered user.
* - comment-by-node-author: Comment by the author of the parent node.
* - comment-preview: When previewing a new or edited comment.
* The following applies only to viewers who are registered users:
* - comment-unpublished: An unpublished comment visible only to administrators.
* - comment-by-viewer: Comment by the user currently viewing the page.
* - comment-new: New comment since last the visit.
* - $title_prefix (array): An array containing additional output populated by
* modules, intended to be displayed in front of the main title tag that
* appears in the template.
* - $title_suffix (array): An array containing additional output populated by
* modules, intended to be displayed after the main title tag that appears in
* the template.
*
* These two variables are provided for context:
* - $comment: Full comment object.
* - $node: Node object the comments are attached to.
*
* Other variables:
* - $classes_array: Array of html class attribute values. It is flattened
* into a string within the variable $classes.
*
* @see template_preprocess()
* @see template_preprocess_comment()
* @see template_process()
* @see theme_comment()
*/
?>
<div class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>
<?php print $picture ?>
<?php if ($new): ?>
<span class="new"><?php print $new ?></span>
<?php endif; ?>
<?php print render($title_prefix); ?>
<h3<?php print $title_attributes; ?> class="title"><?php print $title ?></h3>
<?php print render($title_suffix); ?>
<div class="submitted">
<?php print $permalink; ?>
<?php
print t('Submitted by !username on !datetime.',
array('!username' => $author, '!datetime' => $created));
?>
</div>
<div class="content"<?php print $content_attributes; ?>>
<?php
hide($content['links']);
print render($content);
?>
<?php if ($signature): ?>
<div class="user-signature clearfix">
<?php print $signature ?>
</div>
<?php endif; ?>
</div>
<?php print render($content['links']) ?>
</div>
\ No newline at end of file
/****************************/
/* LOCAL CSS */
/****************************/
/* Put your custom css and css overrides in this file. */
/* By restricting your css changes to local.css, your */
/* changes will not be overwritten when upgrading to a */
/* new version of this theme. */
@media all and (max-width: 949px) {
#header, #menu, .slideshow-inner, .slideshow, #slideshow-bottom, #preface-wrapper, #bottom-teaser, #bottom-wrapper, #wrapper, #footer-wrapper {
width: 768px;
}
#mission-wrapper {
width: 768px!important;
}
}
@media all and (max-width: 800px) {
#header, #menu, .slideshow-inner, .slideshow, #slideshow-bottom, #preface-wrapper, #bottom-teaser, #bottom-wrapper, #wrapper, #footer-wrapper {
width: 730px;
}
#mission-wrapper {
width: 730px!important;
}
}
@media all and (max-width: 767px) {
#header, #menu, .slideshow-inner, .slideshow, #slideshow-bottom, #preface-wrapper, #bottom-teaser, #bottom-wrapper, #wrapper, #footer-wrapper {
width: 620px;
}
#mission-wrapper {
width: 620px!important;
}
}
@media all and (max-width: 640px) {
#header, #menu, .slideshow-inner, .slideshow, #slideshow-bottom, #preface-wrapper, #bottom-teaser, #bottom-wrapper, #wrapper, #footer-wrapper, #footer {
width: 100%;
}
#mission-wrapper {
width: 100%!important;
}
#preface {
font-size: 84%;
}
.slideshow-inner, .slideshow {
height:300px;
}
#slideshow-wrapper {
height:365px;
background-image: url("../images/slideshow-shadow.gif");
}
#preface-wrapper.in3 .column, #preface-wrapper.in2 .column, #preface-wrapper.in1 .column, #bottom-teaser.in3 .column, #bottom-teaser.in2 .column, #bottom-teaser.in1 .column, #bottom-wrapper.in4 .column, #bottom-wrapper.in3 .column, #bottom-wrapper.in2 .column, #bottom-wrapper.in1 .column {
width:100%;
}
.one-sidebar #content, .two-sidebars #content {
width:100%;
float:left;
margin:0;
}
#layout-type-1 #sidebar-left, #layout-type-1 #sidebar-right, #layout-type-2 #sidebar-left, #layout-type-2 #sidebar-right {
width:100%;
float:right;
margin:0;
position:relative;
}
.region {
padding: 0 10px;
}
.content-top, .content-bottom {
margin: 0 10px 20px;
}
.content-top .region, .content-bottom .region {
padding:0;
}
#header .region, #menu .region, #slideshow .region {
padding:0;
}
}
@media all and (max-width: 480px) {
.slideshow-inner, .slideshow {
height:200px;
}
#slideshow-wrapper {
height:265px;
background-image: url("../images/slideshow-shadow.gif");
}
.region-header {
text-align:left;
float:left;
}
#logo-wrapper, #branding-wrapper {
float:left;
margin:0;
}
#branding-wrapper {
margin-top:15px;
}
#header-wrapper #search-box {
margin:0;
position: relative;
right: 0;
top: 0;
left:0;
text-align:center;
white-space: nowrap;
float:left;
}
#header .region.region-search_box {
padding: 15px;
display:block;
}
.site-slogan {
display:block;
}
#menu {
height: auto;
background:none;
width:100%;
margin: 0 auto;
}
#nav {
height: auto;
background:none;
float:left;
padding: 0 10px;
margin-top:1em;
}
#nav ul.menu li {
float:left;
background:none;
height:auto;
padding:0 1px 0 0;
margin:0;
}
#nav .menu li a{
color:#333;
text-decoration:none;
font-size:12px;
padding:5px;
display:inline-block;
font-weight:bold;
height:25px;
text-transform:normal;
}
#nav ul.menu li a:hover {
background:none;
text-decoration:underline;
}
#nav ul.menu li.active-trail a {
background:none;
text-decoration:underline;
}
#rounded-menu-left {
display:none;
}
#rounded-menu-right {
display:none;
}
#nav ul.menu, #nav ul.menu li.leaf {
list-style-image:none;
list-style:none;
}
#nav ul.menu, #nav .block ul.menu, #nav ol {
margin:0;
padding:0;
}
}
\ No newline at end of file
This diff is collapsed.
/* Put your custom css and css overrides in this file */
body {
font-size: 84%;
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #000;
margin: 0;
padding: 0;
line-height: 1.5em;
}
h1,h2,h3,h4,h5,h6 {
font-family: Arial, Helvetica, sans-serif;
}
#nav li a{
font-family: Arial, Helvetica, sans-serif;
}
#superfish .menu a,
#superfish .menu a:visited {
font-family: Arial, Helvetica, sans-serif;
}
a:link {
color: #005a8c;/*#e87e17*/
text-decoration: none;
font-weight: bold;
}
a:visited {
color: #005a8c;/*#e87e17*/
text-decoration: none;
font-weight: bold;
}
a:hover {
text-decoration: underline;
}
.site-name a:hover {
text-decoration: none;
}
.comment .new {
text-align: right; /* LTR */
font-weight: bold;
float: right; /* LTR */
color: red;
margin:.5em;
}
.comment .title {
line-height: 1.2em;
}
.comment .title a:hover {
text-decoration: none;
}
#subnav li a {
font-weight:bold;
}
#subnav li a:hover {
text-decoration: underline;
color: #005a8c;/*#e87e17*/
}
.title {
line-height:1.2em;
}
.node .title a:hover {
text-decoration: none;
}
#aggregator h3 a:hover {
text-decoration: none;
color: #005a8c;/*#e87e17*/
}
#mission-wrapper {
width:950px;
margin:0 auto;
}
#mission {
font-size:1.4em;
display:block;
line-height:1.2em;
font-family:Georgia, "Bitstream Vera Serif", serif;
font-size: 20px;
font-style:italic;
}
#mission .contextual-links {
font-size: 13px;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-style:normal;
}
#mission .block-title {
margin-top:20px;
}
#mission .region {
margin:20px 10px;
}
.item-list .pager li a:hover {
text-decoration:none;
}
name = Danblog
description = Danland sub theme. Danland with no frontpage image banner and slideshow.
engine = phptemplate
base theme = danland
stylesheets[all][] = danblog.css
regions[search_box] = Search region
regions[superfish_menu] = Superfish menu
regions[page_top] = Page top
regions[highlighted] = Highlighted
regions[preface_first] = Preface first
regions[preface_middle] = Preface middle
regions[preface_last] = Preface last
regions[sidebar_first] = Left sidebar
regions[sidebar_second] = Right sidebar
regions[content_top] = Content top
regions[help] = Help
regions[content] = Main content
regions[content_bottom] = Content bottom
regions[bottom_first] = Bottom first
regions[bottom_middle] = Bottom middle
regions[bottom_last] = Bottom last
regions[bottom_1] = Bottom 1
regions[bottom_2] = Bottom 2
regions[bottom_3] = Bottom 3
regions[bottom_4] = Bottom 4
regions[footer] = Footer
regions[page_bottom] = Page bottom
core = "7.x"
\ No newline at end of file
This diff is collapsed.
#content {
overflow:hidden;
}
#bottom-wrapper.in2 .column {
width: 49%;
}
#bottom-wrapper.in4 .column {
width: 24%;
}
\ No newline at end of file
<?php
function danblog_preprocess_html(&$variables) {
drupal_add_css(path_to_theme() . '/style.ie6.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'IE 6', '!IE' => FALSE), 'preprocess' => FALSE));
}
name = Danland
description = Drupal Theme provided by <a href="http://www.danetsoft.com">Danetsoft</a> developed by <a href="http://www.danpros.com">Danang Probo Sayekti</a> inspired by <a href="http://www.maksimer.no">Maksimer</a>.
engine = phptemplate
stylesheets[all][] = style.css
;stylesheets[all][] = local.css
regions[search_box] = Search region
regions[superfish_menu] = Superfish menu
regions[page_top] = Page top
regions[slideshow] = Slideshow
regions[preface] = Preface top
regions[highlighted] = Highlighted
regions[preface_first] = Preface first
regions[preface_middle] = Preface middle
regions[preface_last] = Preface last
regions[sidebar_first] = Left sidebar
regions[sidebar_second] = Right sidebar
regions[content_top] = Content top
regions[help] = Help
regions[content] = Main content
regions[content_bottom] = Content bottom
regions[bottom_first] = Bottom first
regions[bottom_middle] = Bottom middle
regions[bottom_last] = Bottom last
regions[bottom_1] = Bottom 1
regions[bottom_2] = Bottom 2
regions[bottom_3] = Bottom 3
regions[bottom_4] = Bottom 4
regions[footer] = Footer
regions[page_bottom] = Page bottom
core = "7.x"
scripts[] = scripts/hoverIntent.js
scripts[] = scripts/superfish.js
\ No newline at end of file
name: Danland
type: theme
base theme: classy
description: Drupal Theme provided by <a href="http://www.danetsoft.com">Danetsoft</a> developed by <a href="http://www.danpros.com">Danang Probo Sayekti</a> inspired by <a href="http://www.maksimer.no">Maksimer</a>.
core: 8.x
regions:
header: Header
search_box: Search region
primary_menu: 'Primary menu'
secondary_menu: 'Secondary menu'
slideshow: 'Slideshow'
page_top: Page top
preface: Preface top
highlighted: Highlighted
preface_first: Preface first
preface_middle: Preface middle
preface_last: Preface last
sidebar_first: Left sidebar
sidebar_second: Right sidebar
content_top: Content top
help: Help
messages: Messages
breadcrumb: Breadcrumb
content: Main content
content_bottom: Content bottom
bottom_first: Bottom first
bottom_middle: Bottom middle
bottom_last: Bottom last
bottom_1: Bottom 1
bottom_2: Bottom 2
bottom_3: Bottom 3
bottom_4: Bottom 4
footer: Footer
page_bottom: Page bottom
screenshot: screenshot.png
libraries:
- danland/global
\ No newline at end of file
global:
version: 1.x
css:
theme:
css/style.css: {}
css/responsive.css: {}
#css/local.css: {}
js:
js/jquery.cycle.lite.js: {}
dependencies:
- core/jquery
\ No newline at end of file
<?php
use Drupal\Component\Utility\SafeMarkup;
use Drupal\Component\Utility\Xss;
use Drupal\Core\Template\Attribute;
use Drupal\Core\Url;
use Drupal\Core\Render\Element;
/**
* Implements template_preprocess_html().
*/
function danland_preprocess_html(&$variables) {
if (!empty($variables['page']['sidebar_first']) && !empty($variables['page']['sidebar_second'])) {
$variables['attributes']['class'][] = 'two-sidebars';
}
elseif (!empty($variables['page']['sidebar_first']) || !empty($variables['page']['sidebar_second'])) {
$variables['attributes']['class'][] = 'one-sidebar';
}
else {
$variables['attributes']['class'][] = 'no-sidebars';
}
}
/**
* Implements template_preprocess_page().
*/
function danland_preprocess_page(&$variables) {
$variables['danland_layout'] = new Attribute;
$variables['danland_layout']['id'] = array();
if (!empty($variables['page']['sidebar_first']) && !empty($variables['page']['sidebar_second'])) {
$variables['danland_layout']['id'][] = 'layout-type-2';
}
elseif (!empty($variables['page']['sidebar_first']) || !empty($variables['page']['sidebar_second'])) {
$variables['danland_layout']['id'][] = 'layout-type-1';
}
$preface = (bool) $variables['page']['preface_first'] + (bool) $variables['page']['preface_middle'] + (bool) $variables['page']['preface_last'];
$variables['danland_preface'] = new Attribute;
$variables['danland_preface']['class'] = array();
$variables['danland_preface']['class'][] = 'in' . $preface;
$bottom_a = (bool) $variables['page']['bottom_first'] + (bool) $variables['page']['bottom_middle'] + (bool) $variables['page']['bottom_last'];
$variables['danland_bottom_a'] = new Attribute;
$variables['danland_bottom_a']['class'] = array();
$variables['danland_bottom_a']['class'][] = 'in' . $bottom_a;
$bottom_b = (bool) $variables['page']['bottom_1'] + (bool) $variables['page']['bottom_2'] + (bool) $variables['page']['bottom_3'] + (bool) $variables['page']['bottom_4'];
$variables['danland_bottom_b'] = new Attribute;
$variables['danland_bottom_b']['class'] = array();
$variables['danland_bottom_b']['class'][] = 'in' . $bottom_b;
$mask = '/\.(?:jp[e]?g|gif|png)$/i';
$files = file_scan_directory(drupal_get_path('theme', 'danland') . '/images/slideshows', $mask);
$variables['files'] = $files;
}
/**
* Implements template_preprocess_block().
*/
function danland_preprocess_block(&$variables) {
$variables['attributes']['class'][] = 'block';
$variables['title_attributes']['class'][] = 'block-title';
}
/**
* Implements template_preprocess_menu().
*/
function danland_preprocess_menu(&$variables, $hook) {
if ($hook == 'menu') {
$current_path = \Drupal::request()->getRequestUri();
$items = $variables['items'];
foreach ($items as $key => $item) {
// Set an active-trail class if item path matched with current path
if ($item['url']->toString() == $current_path) {
$item['attributes']->addClass('active-trail');
}
}
}
}
\ No newline at end of file
images/add.gif

982 Bytes