diff options
Diffstat (limited to 'themes')
-rw-r--r-- | themes/chameleon/chameleon.theme | 9 | ||||
-rw-r--r-- | themes/chameleon/pure/chameleon.css | 2 | ||||
-rw-r--r-- | themes/example/example.theme | 2 | ||||
-rw-r--r-- | themes/xtemplate/default/xtemplate.css | 96 | ||||
-rw-r--r-- | themes/xtemplate/default/xtemplate.xtmpl | 6 | ||||
-rw-r--r-- | themes/xtemplate/xtemplate.theme | 17 |
6 files changed, 107 insertions, 25 deletions
diff --git a/themes/chameleon/chameleon.theme b/themes/chameleon/chameleon.theme index 6906fbaa8..f3dcf1b6e 100644 --- a/themes/chameleon/chameleon.theme +++ b/themes/chameleon/chameleon.theme @@ -6,7 +6,7 @@ function chameleon_help($section) { $output = ''; switch ($section) { - case 'admin/system/themes#description': + case 'admin/themes#description': $output = t('A fast PHP theme with different stylesheets.'); break; } @@ -37,6 +37,7 @@ function chameleon_page($content, $title = NULL, $breadcrumb = NULL) { if (isset($title)) { drupal_set_title($title); } + if (isset($breadcrumb)) { drupal_set_breadcrumb($breadcrumb); } @@ -68,6 +69,10 @@ function chameleon_page($content, $title = NULL, $breadcrumb = NULL) { $output .= "<h2>$title</h2>"; } + if ($tabs = theme('menu_local_tasks')) { + $output .= $tabs; + } + if ($help = menu_get_active_help()) { $output .= "<small>$help</small><hr />"; } @@ -106,7 +111,7 @@ function chameleon_node($node, $main = 0, $page = 0) { $output = "<div class=\"node\">\n"; if (!$page) { - $output .= " <h2 class=\"title\">". ($main ? l($node->title, "node/view/$node->nid") : $node->title) ."</h2>\n"; + $output .= " <h2 class=\"title\">". ($main ? l($node->title, "node/$node->nid") : $node->title) ."</h2>\n"; } $output .= " <div class=\"content\">\n"; diff --git a/themes/chameleon/pure/chameleon.css b/themes/chameleon/pure/chameleon.css index e555b68ac..a7ab2ac76 100644 --- a/themes/chameleon/pure/chameleon.css +++ b/themes/chameleon/pure/chameleon.css @@ -87,4 +87,4 @@ ul { color: gray; font-style: italic; font-size: 0.9em; -}
\ No newline at end of file +} diff --git a/themes/example/example.theme b/themes/example/example.theme index bf4b780ef..d9a040f3e 100644 --- a/themes/example/example.theme +++ b/themes/example/example.theme @@ -6,7 +6,7 @@ function example_help($section) { $output = ""; switch ($section) { - case 'admin/system/themes#description': + case 'admin/themes#description': $output = t("Internet explorer, Netscape, Opera, Lynx"); break; } diff --git a/themes/xtemplate/default/xtemplate.css b/themes/xtemplate/default/xtemplate.css index 67994520a..6b2ff09a3 100644 --- a/themes/xtemplate/default/xtemplate.css +++ b/themes/xtemplate/default/xtemplate.css @@ -188,21 +188,89 @@ table { } .tabs { - color: #999; - margin: 0.5em 0; - padding: 0.5em 1em; - border-bottom: 1px solid black; + width: 100%; + diplay: block; + margin: 0; + padding: 0; + white-space: nowrap; } -.tabs a { - border: 1px solid black; - background: #f0f0f0; - font-weight: bold; - margin-right: 1em; - padding: 0.5em 1em; + +.tabs ul { + float: left; + diplay: block; + width: 100%; + margin: 0; + padding: 0; + list-style-type: none; } -.tabs a.active { - border-bottom: 1px solid white; - background: #fff; + +.tabs li { + float: left; + diplay: block; + width: auto; + margin: 0 0.2em 0 0.2em; + padding: 0; + list-style-type: none; +} + +.tabs li a { + position: relative; + display: block; + margin: 0; + padding: 0 0.9em; + background-color: #eee; + border-top: 1px solid #888; + border-right: 1px solid #888; + border-bottom: 2px solid #fff; + border-left: 1px solid #888; + background-color: #fff; + text-align: center; + } + +.tabs li.active a, .tabs li.active { + background-color: #eee; + border-top: 1px solid #bbb; + border-right: 1px solid #bbb; + border-bottom: 2px solid #eee; + border-left: 1px solid #ccc; + z-index: 2; +} + +.tabs li.active ul { + display: inline; + float: none; + position: absolute; + padding: 0; + margin: 0; + border-top: 2px solid #888; + border-left: 2px solid #bbb; + background-color: none; + white-space: nowrap; +} + +.tabs li.active ul li { + width: auto; + display: inline; + list-style: none; + margin: 0; + border: 0; + z-index: 1; +} + +.tabs li.active ul li a { + width: auto; + margin: 0; + padding: 0; + background-color: #eee; + border-top: none; + border-right: 1px solid #bbb; + border-bottom: none; + border-left: none; + z-index: 2; +} + +.clear-tabs { + clear: both; } .block, .box { @@ -222,7 +290,7 @@ table { .node { margin: .5em 0 1em 0; } -.static { +.sticky { padding: .5em; background-color: #eee; border: solid 1px #ddd; diff --git a/themes/xtemplate/default/xtemplate.xtmpl b/themes/xtemplate/default/xtemplate.xtmpl index a1e0e72ac..2c8db0eef 100644 --- a/themes/xtemplate/default/xtemplate.xtmpl +++ b/themes/xtemplate/default/xtemplate.xtmpl @@ -45,6 +45,10 @@ <!-- BEGIN: title --> {breadcrumb} <h1 class="title">{title}</h1> + <!-- BEGIN: tabs --> + <div class="tabs">{tabs}</div> + <div class="clear-tabs"></div> + <!-- END: tabs --> <!-- END: title --> <!-- BEGIN: help --> <div id="help">{help}</div> @@ -55,7 +59,7 @@ <!-- END: header --> <!-- BEGIN: node --> - <div class="node {static}"> + <div class="node {sticky}"> <!-- BEGIN: picture --> {picture} <!-- END: picture --> diff --git a/themes/xtemplate/xtemplate.theme b/themes/xtemplate/xtemplate.theme index 3a63e03ee..9d72d6a96 100644 --- a/themes/xtemplate/xtemplate.theme +++ b/themes/xtemplate/xtemplate.theme @@ -26,8 +26,8 @@ function xtemplate_settings() { $output = form_group(t('Template selection'), $group); $group = form_textarea(t('Logo'), 'xtemplate_logo', variable_get('xtemplate_logo', "<img src=\"themes/xtemplate/$template_directory/logo.gif\" alt=\"Logo\" />"), 70, 4, t('The HTML code for displaying the logo.')); - $group .= form_textarea(t('Primary links'), 'xtemplate_primary_links', variable_get('xtemplate_primary_links', l('edit primary links', 'admin/system/themes/xtemplate')), 70, 8, t('The HTML code for the primary links.')); - $group .= form_textarea(t('Secondary links'), 'xtemplate_secondary_links', variable_get('xtemplate_secondary_links', l('edit secondary links', 'admin/system/themes/xtemplate')), 70, 8, t('The HTML code for the secondary links.')); + $group .= form_textarea(t('Primary links'), 'xtemplate_primary_links', variable_get('xtemplate_primary_links', l('edit primary links', 'admin/themes/xtemplate')), 70, 8, t('The HTML code for the primary links.')); + $group .= form_textarea(t('Secondary links'), 'xtemplate_secondary_links', variable_get('xtemplate_secondary_links', l('edit secondary links', 'admin/themes/xtemplate')), 70, 8, t('The HTML code for the secondary links.')); $group .= form_textarea(t('Message on front page'), 'xtemplate_mission', variable_get('xtemplate_mission', 'edit mission'), 70, 6, t('This text will be displayed on the front page. It can be used to display a mission statement, announcement or site description..')); $group .= form_radios(t('Search box'), 'xtemplate_search_box', variable_get('xtemplate_search_box', 0), array(t('Disabled'), t('Enabled')), t('Show a search box in the upper right corner.')); $output .= form_group(t('Header settings'), $group); @@ -44,7 +44,7 @@ function xtemplate_help($section) { $output = ''; switch ($section) { - case 'admin/system/themes#description': + case 'admin/themes#description': $output = t('A template driven theme'); break; } @@ -59,7 +59,7 @@ function xtemplate_node($node, $main = 0, $page = 0) { "submitted" => t("Submitted by %a on %b.", array("%a" => format_name($node), "%b" => format_date($node->created))), - "link" => url("node/view/$node->nid"), + "link" => url("node/$node->nid"), "title" => $node->title, "author" => format_name($node), "date" => format_date($node->created), @@ -144,10 +144,15 @@ function xtemplate_page($content, $title = NULL, $breadcrumb = NULL) { "directory" => "themes/xtemplate/$template_directory", "onload_attributes" => theme_onload_attribute(), "logo" => variable_get('xtemplate_logo', "<img src=\"themes/xtemplate/$template_directory/logo.gif\" alt=\"Logo\" />"), - "primary_links" => variable_get("xtemplate_primary_links", l("edit primary links", "admin/system/themes/xtemplate")), - "secondary_links" => variable_get("xtemplate_secondary_links", l("edit secondary links", "admin/system/themes/xtemplate")) + "primary_links" => variable_get("xtemplate_primary_links", l("edit primary links", "admin/themes/xtemplate")), + "secondary_links" => variable_get("xtemplate_secondary_links", l("edit secondary links", "admin/themes/xtemplate")) )); + if ($tabs = theme('menu_local_tasks')) { + $xtemplate->template->assign("tabs", $tabs); + $xtemplate->template->parse("header.title.tabs"); + } + if ($title = drupal_get_title()) { $xtemplate->template->assign("title", $title); $xtemplate->template->assign("breadcrumb", theme("breadcrumb", drupal_get_breadcrumb())); |