summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Axelsson2011-06-19 12:53:48 (GMT)
committerMattias Axelsson2011-06-19 12:53:48 (GMT)
commit0e508a7683d1bf42a5b45294c0af93d477c4037c (patch)
treeae312b9582adfd4b1659654850396666f4e0fa80
parentfa3203e2f7a2e2e7c50ea381df3744c1b4d4291c (diff)
one more try7.x-1.1
-rw-r--r--README.txt48
-rw-r--r--comment.tpl.php65
-rw-r--r--node.tpl.php58
-rw-r--r--page.tpl.php195
-rw-r--r--screenshot.pngbin7350 -> 23139 bytes
-rw-r--r--search-results.tpl.php54
-rw-r--r--simpleclean.info18
-rw-r--r--style.css501
-rw-r--r--template.php152
-rw-r--r--theme-settings.php44
10 files changed, 661 insertions, 474 deletions
diff --git a/README.txt b/README.txt
index a0af118..89e6758 100644
--- a/README.txt
+++ b/README.txt
@@ -1,36 +1,46 @@
Simple Clean
------------
-The main purpose of the Simple Clean Theme is for it to be crazy simple to get a clean simple site up and running in no time. Just install and follow the step-by-step guide and your simple but still good looking clean website is running within the hour.
+The main purpose of the Simple Clean Theme is for it to be simple to get a clean simple site up and running in no time. Just install and follow the step-by-step guide and your simple but still good looking clean website is running within the hour.
Simple Clean is a two column fixed design (optimized for width 960px). The content column have width 610px and right column (sidebar) have width 260px.
+News in 7.x
+* No more built in sub navigation. Use the module Menu Block instead (http://drupal.org/project/menu_block).
+* Links instead of buttons for Read more and Add comments etc.
+* New design for tags
+
Quick step-by-step
------------------
-Setting up a Drupal site involves many steps. This is some of the steps usually go through when I set up a Drupal site with Simple Clean Theme:
+Setting up a Drupal site involves many steps. This is some of the steps I usually go through when setting up a Drupal site with Simple Clean Theme:
-1. Install Drupal 6.x
+1. Install Drupal 7.x
2. Install Simple Clean Theme (Put simpleclean-folder in: sites/all/themes)
-3. Enable and make Simple Clean default (admin/build/themes)
-4. Edit theme settings (admin/build/themes/settings/simpleclean) - Add mission, slogan, etc.
-5. Edit site information (admin/settings/site-information)
-4. Activate search module (admin/build/modules)
-5. Edit search settings (admin/settings/search)
-6. Set permissions for search module (admin/permissions)
-7. Enable Serch box in theme settings (admin/build/themes/settings/simpleclean)
-8. Run cron to index search (admin/reports/status/run-cron)
-9. Activate clean urls (admin/settings/clean-urls)
-10. Add Home to Primary Links (admin/build/menu-customize/primary-links/add)
-11. Edit settings for posts to have "submitted by" (admin/build/themes/settings)
-12. If you want images in posts, edit user settings (admin/user/settings) Paste this url into default picture: sites/all/themes/simpleclean/images/no-pic.png (dont't forget to also active pictures in theme settings (admin/build/themes/settings/simpleclean)
+3. Enable and make Simple Clean default (admin/appearance)
+4. Edit theme settings (admin/appearance/settings/simpleclean) - Add mission, slogan, etc.
+5. Edit site information (admin/config/system/site-information)
+6. Add Home to Main menu (admin/structure/menu/manage/main-menu/add)
+
+If you want user pictures or signatures:
+
+1. Enable user pictures and/or signatures (admin/config/people/accounts)
+2. For Default picture use: /sites/all/themes/simpleclean/images/no-pic.png
+3. Make user pictures in posts and/or user pictures in comments are enabled in theme settings (admin/appearance/settings/simpleclean)
+If you want a search engine on your site:
-Additional moduls
------------------
+1. Activate search module (admin/modules) or install the Search By Page module (http://drupal.org/project/search_by_page) which is a bit more sophisticated
+2. Edit search settings (admin/config/search/settings)
+3. Set permissions for search module (admin/people/permissions)
+4. Run cron to index search and active cron at your host or install the modele Poor mans cron if you host dosn't support cron
-You probably want to install serveral additional modules. If you want to use Block Menu instead of the built in subnavigation you can deactivate built in subnavigation in the theme settings (admin/build/themes/settings/simpleclean).
+
+Tips & tricks
+-------------
+
+If you install a WYSIWYG editor like CK Editor. Don't forget to edit the settings for comment text format at (admin/structure/types/manage/article/comment/fields/comment_body)
Author's Information
@@ -38,4 +48,6 @@ Author's Information
Simple Clean is designed and developed by Mattias Axelsson (drupalname: acke) at Happiness Web Agency (www.happiness.se) in the beautiful city Stockholm, Sweden.
+Follow me at http://twitter.com/mattiasaxelsson
+
Enjoy!
diff --git a/comment.tpl.php b/comment.tpl.php
index a00a25d..f088835 100644
--- a/comment.tpl.php
+++ b/comment.tpl.php
@@ -3,57 +3,38 @@
/**
* @file
* Theme implementation for comments.
- *
- * Available variables:
- * - $author: Comment author. Can be link or plain text.
- * - $content: Body of the post.
- * - $date: Date and time of posting.
- * - $links: Various operational links.
- * - $new: New comment marker.
- * - $picture: Authors picture.
- * - $signature: Authors signature.
- * - $status: Comment status. Possible values are:
- * comment-unpublished, comment-published or comment-preview.
- * - $submitted: By line with date and time.
- * - $title: Linked title.
- *
- * These two variables are provided for context.
- * - $comment: Full comment object.
- * - $node: Node object the comments are attached to.
- *
- * @see template_preprocess_comment()
- * @see theme_comment()
*/
?>
-<div class="comment<?php print($comment->new) ? ' comment-new' : ''; print ' '. $status; print ' '. $zebra; ?>">
+<div class="<?php print $classes . ' ' . $zebra; ?>"<?php print $attributes; ?>>
- <?php print $picture ?>
-
- <?php if ($comment->new) : ?>
- <span class="new"><?php print drupal_ucfirst($new) ?></span>
+ <div class="clearfix">
+
+ <?php if ($picture): ?>
+ <div class="user-picture">
+ <?php print $picture; ?>
+ </div>
<?php endif; ?>
- <h3><?php print $title ?></h3>
- <?php if ($submitted): ?>
- <span class="submitted"><?php print $submitted; ?></span>
+ <?php if ($new): ?>
+ <span class="new"><?php print $new; ?></span>
<?php endif; ?>
-
- <div class="content">
- <?php print $content ?>
+
+ <?php print render($title_prefix); ?>
+ <h3<?php print $title_attributes; ?>><?php print $title; ?></h3>
+ <?php print render($title_suffix); ?>
+
+ <span class="submitted"><?php print $submitted; ?></span>
+
+ <div class="content"<?php print $content_attributes; ?>>
+ <?php
+
+ print render($content); ?>
<?php if ($signature): ?>
- <div class="clear-block">
- <div>—</div>
- <?php print $signature ?>
+ <div class="clearfix">
+ <hr />
+ <?php print $signature; ?>
</div>
<?php endif; ?>
</div>
-
- <div class="clear-block">
-
-
</div>
-
- <?php if ($links): ?>
- <div class="links"><?php print $links ?></div>
- <?php endif; ?>
</div> \ No newline at end of file
diff --git a/node.tpl.php b/node.tpl.php
index 7a9d2f0..4cf1522 100644
--- a/node.tpl.php
+++ b/node.tpl.php
@@ -45,41 +45,43 @@
* @see template_preprocess_node()
*/
?>
-<div id="node-<?php print $node->nid; ?>" class="node<?php if ($sticky) {
- print ' sticky'; }
-?><?php if (!$status) {
- print ' node-unpublished'; }
-?>">
-
-<?php if ($page == 0): ?>
- <h2><a href="<?php print $node_url ?>" title="<?php print $title; ?>"><?php print $title; ?></a></h2>
-<?php endif; ?>
+<div id="node-<?php print $node->nid; ?>" class="<?php print $classes; ?>"<?php print $attributes; ?>>
- <?php if ($submitted): ?>
- <span class="submitted"><?php print $submitted; ?></span>
+ <?php print render($title_prefix); ?>
+ <?php if (!$page): ?>
+ <h2<?php print $title_attributes; ?>><a href="<?php print $node_url; ?>"><?php print $title; ?></a></h2>
<?php endif; ?>
+ <?php print render($title_suffix); ?>
- <div class="content clear-block">
- <?php print $content; ?>
+ <?php if ($display_submitted): ?>
+ <span class="submitted">
+ <?php print $submitted; ?>
+ </span>
+ <?php endif; ?>
+
+ <div class="content clearfix"<?php print $content_attributes; ?>>
+ <?php
+ // We hide the comments and links now so that we can render them later.
+ hide($content['comments']);
+ hide($content['links']);
+ print render($content);
+ ?>
</div>
- <div class="clear-block">
- <div class="meta">
- <?php if ($taxonomy): ?>
- <div class="terms"><?php print $terms; ?></div>
- <?php endif;?>
- </div>
+ <div class="clearfix">
+ <?php if (!empty($content['links'])): ?>
+ <div class="links"><?php print render($content['links']); ?></div>
+ <?php endif; ?>
+
+ <?php if ($page != 0): ?>
+ <?php if ($submitted): ?>
+ <?php print $simpleclean_postfooter; ?>
+ <?php endif; ?>
+ <?php endif; ?>
- <?php if ($links): ?>
- <div class="links"><?php print $links; ?></div>
+ <?php if (!empty($content['comments'])): ?>
+ <?php print render($content['comments']); ?>
<?php endif; ?>
</div>
-
-<?php if ($page != 0): ?>
- <?php if ($submitted): ?>
- <?php print $simpleclean_postfooter; ?>
- <?php endif; ?>
-<?php endif; ?>
-
</div>
diff --git a/page.tpl.php b/page.tpl.php
index ec68de2..b122727 100644
--- a/page.tpl.php
+++ b/page.tpl.php
@@ -8,143 +8,143 @@
* General utility variables:
* - $base_path: The base URL path of the Drupal installation. At the very
* least, this will always default to /.
- * - $css: An array of CSS files for the current page.
- * - $directory: The directory the theme is located in, e.g. themes/garland or
- * themes/garland/minelli.
- * - $is_front: TRUE if the current page is the front page. Used to toggle the mission statement.
+ * - $directory: The directory the template is located in, e.g. themes/simpleclean.
+ * - $is_front: TRUE if the current page is the front page.
* - $logged_in: TRUE if the user is registered and signed in.
* - $is_admin: TRUE if the user has permission to access administration pages.
*
- * Page metadata:
- * - $language: (object) The language the site is being displayed in.
- * $language->language contains its textual representation.
- * $language->dir contains the language direction. It will either be 'ltr' or 'rtl'.
- * - $head_title: A modified version of the page title, for use in the TITLE tag.
- * - $head: Markup for the HEAD section (including meta tags, keyword tags, and
- * so on).
- * - $styles: Style tags necessary to import all CSS files for the page.
- * - $scripts: Script tags necessary to load the JavaScript files and settings
- * for the page.
- * - $body_classes: A set of CSS classes for the BODY tag. This contains flags
- * indicating the current layout (multiple columns, single column), the current
- * path, whether the user is logged in, and so on.
- *
* Site identity:
* - $front_page: The URL of the front page. Use this instead of $base_path,
- * when linking to the front page. This includes the language domain or prefix.
+ * when linking to the front page. This includes the language domain or
+ * prefix.
* - $logo: The path to the logo image, as defined in theme configuration.
* - $site_name: The name of the site, empty when display has been disabled
* in theme settings.
* - $site_slogan: The slogan of the site, empty when display has been disabled
* in theme settings.
- * - $mission: The text of the site mission, empty when display has been disabled
- * in theme settings.
+ * - $hide_site_name: TRUE if the site name has been toggled off on the theme
+ * settings page. If hidden, the "element-invisible" class is added to make
+ * the site name visually hidden, but still accessible.
+ * - $hide_site_slogan: TRUE if the site slogan has been toggled off on the
+ * theme settings page. If hidden, the "element-invisible" class is added to
+ * make the site slogan visually hidden, but still accessible.
*
* Navigation:
- * - $search_box: HTML to display the search box, empty if search has been disabled.
- * - $primary_links (array): An array containing primary navigation links for the
+ * - $main_menu (array): An array containing the Main menu links for the
* site, if they have been configured.
- * - $secondary_links (array): An array containing secondary navigation links for
+ * - $secondary_menu (array): An array containing the Secondary menu links for
* the site, if they have been configured.
- *
- * Page content (in order of occurrance in the default page.tpl.php):
- * - $left: The HTML for the left sidebar.
- *
* - $breadcrumb: The breadcrumb trail for the current page.
- * - $title: The page title, for use in the actual HTML content.
- * - $help: Dynamic help text, mostly for admin pages.
- * - $messages: HTML for status and error messages. Should be displayed prominently.
- * - $tabs: Tabs linking to any sub-pages beneath the current page (e.g., the view
- * and edit tabs when displaying a node).
- *
- * - $content: The main content of the current Drupal page.
- *
- * - $right: The HTML for the right sidebar.
*
- * Footer/closing data:
+ * Page content (in order of occurrence in the default page.tpl.php):
+ * - $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: The page title, for use in the actual HTML content.
+ * - $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.
+ * - $messages: HTML for status and error messages. Should be displayed
+ * prominently.
+ * - $tabs (array): Tabs linking to any sub-pages beneath the current page
+ * (e.g., the view and edit tabs when displaying a node).
+ * - $action_links (array): Actions local to the page, such as 'Add menu' on the
+ * menu administration interface.
* - $feed_icons: A string of all feed icons for the current page.
- * - $footer_message: The footer message as defined in the admin settings.
- * - $footer: The footer region.
- * - $closure: Final closing markup from any modules that have altered the page.
- * This variable should always be output last, after all other dynamic content.
+ * - $node: The node object, if there is an automatically-loaded node
+ * associated with the page, and the node ID is the second argument
+ * in the page's path (e.g. node/12345 and node/12345/revisions, but not
+ * comment/reply/12345).
+ *
+ * Regions:
+ * - $page['header']: Items for the header region.
+ * - $page['featured']: Items for the featured region.
+ * - $page['highlighted']: Items for the highlighted content region.
+ * - $page['help']: Dynamic help text, mostly for admin pages.
+ * - $page['content']: The main content of the current page.
+ * - $page['sidebar_first']: Items for the first sidebar.
+ * - $page['footer']: Items for the footer region.
*
* @see template_preprocess()
* @see template_preprocess_page()
*/
?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php print $language->language ?>" xml:lang="<?php print $language->language ?>" dir="<?php print $language->dir ?>">
- <head>
- <?php print $head ?>
- <title><?php print $head_title ?></title>
- <meta http-equiv="X-UA-Compatible" content="IE=9" />
- <?php print $styles ?>
- <?php print $scripts ?>
- <!--[if lt IE 7]>
- <style type="text/css" media="all">@import "<?php print base_path() . path_to_theme() ?>/ie6.css";</style>
- <![endif]-->
- </head>
- <body class="<?php print $body_classes; ?>">
-
- <div id="wrap">
-
+<div id="wrap">
<div id="header">
- <?php if ($header): ?>
- <?php print $header; ?>
- <?php endif;?>
+ <?php if ($page['header']): ?>
+ <?php print render($page['header']); ?>
+ <?php endif; ?>
<div id="logo">
<?php if ($logo): ?>
- <a href="<?php print $front_page; ?>"><img src="<?php print $logo; ?>" alt="Logo" /></a>
+ <a href="<?php print $front_page; ?>"><img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" /></a>
<?php else: ?>
- <?php if ($site_name): ?>
- <h1 id="logo-text"><a href="<?php print $front_page; ?>" title="<?php print t('Home') ?>"><?php print $site_name ?></a></h1>
- <?php endif; ?>
+ <?php if ($site_name): ?>
+ <h1 id="logo-text"><a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>"><?php print $site_name; ?></a></h1>
+ <?php endif; ?>
<?php endif; ?>
<?php if ($site_slogan): ?>
<p id="slogan"><?php print $site_slogan; ?></p>
<?php endif; ?>
+
</div>
- <?php if ($search_box): ?>
- <?php print $search_box; ?>
- <?php endif; ?>
-
<div class="clear"></div>
- <div id="nav">
- <?php if (isset($primary_links)): ?>
- <?php print theme('links', $primary_links, array('class' => 'links', 'id' => 'navlist')) ?>
+ <?php if ($main_menu): ?>
+ <div id="nav">
+ <?php print theme('links__system_main_menu', array(
+ 'links' => $main_menu,
+ 'attributes' => array(
+ 'id' => 'main-menu-links',
+ 'class' => array('links', 'clearfix'),
+ ),
+ 'heading' => array(
+ 'text' => t('Main menu'),
+ 'level' => 'h2',
+ 'class' => array('element-invisible'),
+ ),
+ )); ?>
+ </div>
<?php endif; ?>
- </div>
</div>
<div id="content-wrap">
- <?php if ($mission): ?>
- <div id="mission"><?php print $mission; ?></div>
+ <?php
+ $simpleclean_mission = theme_get_setting('simpleclean_mission');
+ if ($simpleclean_mission && $is_front): ?>
+ <div id="mission"><?php print render($simpleclean_mission); ?></div>
<?php endif; ?>
- <?php if ($splash): ?>
- <div id="splash"><?php print $splash; ?></div>
+ <?php if ($page['highlighted']): ?>
+ <div id="highlighted"><?php print render($page['highlighted']); ?></div>
<?php endif; ?>
<div id="content">
+ <?php print render($title_prefix); ?>
<?php if ($title): ?>
<h1 class="node-title"><?php print $title; ?></h1>
<?php endif; ?>
- <div class="tabs"><?php print $tabs; ?></div>
- <?php if ($show_messages): ?>
- <?php print $messages; ?>
- <?php endif; ?>
- <?php print $help; ?>
- <?php print $content; ?>
- <?php print $feed_icons; ?>
+ <?php print render($title_suffix); ?>
+ <?php if ($tabs): ?>
+ <div class="tabs"><?php print render($tabs); ?></div>
+ <?php endif; ?>
+ <?php if ($show_messages): ?>
+ <?php print $messages; ?>
+ <?php endif; ?>
+ <?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; ?>
</div>
<div id="sidebar">
- <?php print $simpleclean_submenu; ?>
- <?php if ($right): ?>
- <?php print $right; ?>
+ <?php if ($page['sidebar_first']): ?>
+ <?php print render($page['sidebar_first']); ?>
<?php endif; ?>
</div>
@@ -154,25 +154,16 @@
<div id="footer-wrap">
- <?php if ($footer): ?>
- <?php print $footer; ?>
- <?php endif; ?>
-
- <?php if ($footer_message): ?>
- <div id="footer-message"><?php print $footer_message; ?></div>
- <?php endif; ?>
+ <?php if ($page['footer']): ?>
+ <?php print render($page['footer']); ?>
+ <?php endif; ?>
<div id="footer">
- This site is powered by <a href="http://drupal.org/">Drupal</a>. Theme: <a href="http://drupal.org/projects/simpleclean">Simple Clean</a> by <a href="http://drupal.org/user/765764">acke</a> @ <a href="http://www.happiness.se/">happiness</a>.
- <?php // Feel free to remove credits if you want your site even cleaner ;) /acke ?>
+ <p>This site is powered by <a href="http://drupal.org/">Drupal</a>. Theme: <a href="http://drupal.org/projects/simpleclean">Simple Clean</a> by <a href="http://drupal.org/user/765764">acke</a> @ <a href="http://www.happiness.se/">happiness</a>.</p>
+ <?php // Feel free to remove credits if you want your site even cleaner ;) /acke ?>
</div>
</div>
<div class="clear"></div>
</div>
-
-<?php print $closure; ?>
-
-</body>
-</html> \ No newline at end of file
diff --git a/screenshot.png b/screenshot.png
index 01d3b6c..24bed54 100644
--- a/screenshot.png
+++ b/screenshot.png
Binary files differ
diff --git a/search-results.tpl.php b/search-results.tpl.php
index dbfba7a..f87fb57 100644
--- a/search-results.tpl.php
+++ b/search-results.tpl.php
@@ -1,12 +1,52 @@
<?php
-/*
+/**
* @file
- * Add number of hits to search results
+ * Default theme implementation for displaying search results.
*
+ * This template collects each invocation of theme_search_result(). This and
+ * the child template are dependent to one another sharing the markup for
+ * definition lists.
+ *
+ * Note that modules may implement their own search type and theme function
+ * completely bypassing this template.
+ *
+ * Available variables:
+ * - $search_results: All results as it is rendered through
+ * search-result.tpl.php
+ * - $module: The machine-readable name of the module (tab) being searched, such
+ * as "node" or "user".
+ *
+ *
+ * @see template_preprocess_search_results()
*/
?>
-<?php print $simpleclean_search_totals; ?>
-<dl class="search-results <?php print $type; ?>-results">
- <?php print $search_results; ?>
-</dl>
-<?php print $pager;
+
+<?php
+ $items_per_page = 10;
+ if (!isset($current_page )) {
+ $current_page = isset($_GET['page']) ? $_GET['page'] + 1 : 1;
+}
+ $total = $GLOBALS['pager_total_items'][0];
+ $start = 10*$current_page-9;
+ $end = $items_per_page * $current_page;
+ if ($end>$total) $end = $total;
+ if ($total > 1) {
+ $message = '<p>'. t('Displaying @start - @end of @total results', array('@start' => $start, '@end' => $end, '@total' => $total)) .'</p>';
+ }
+ else {
+ $message = '<p>'. t('Displaying @start - @end of @total result', array('@start' => $start, '@end' => $end, '@total' => $total)) .'</p>';
+}
+?>
+
+<?php if ($search_results) : ?>
+ <h2><?php print t('Search results');?></h2>
+ <ol class="search-results <?php print $module; ?>-results">
+
+ <?php print $message; ?>
+ <?php print $search_results; ?>
+ </ol>
+ <?php print $pager; ?>
+<?php else : ?>
+ <h2><?php print t('Your search yielded no results');?></h2>
+ <?php print search_help('search#noresults', drupal_help_arg()); ?>
+<?php endif; ?>
diff --git a/simpleclean.info b/simpleclean.info
index fd87f56..af9a439 100644
--- a/simpleclean.info
+++ b/simpleclean.info
@@ -1,26 +1,28 @@
name = Simple Clean
description = Tableless, two-column, fixed 960px width theme.
-core = 6.x
+core = 7.x
engine = phptemplate
; STYLESHEETS
stylesheets[all][] = style.css
; REGIONS
-regions[right] = Right sidebar
-regions[header] = Header
-regions[splash] = Splash
regions[content] = Content
+regions[header] = Header
+regions[highlighted] = Highlighted
+regions[sidebar_first] = Right sidebar
regions[footer] = Footer
; FEATURES
features[] = logo
features[] = name
features[] = slogan
-features[] = mission
features[] = search
features[] = favicon
-features[] = primary_links
-features[] = secondary_links
+features[] = main_menu
+features[] = secondary_menu
features[] = comment_user_picture
-features[] = node_user_picture \ No newline at end of file
+features[] = node_user_picture
+
+; SETTINGS
+settings[simpleclean_mission] = \ No newline at end of file
diff --git a/style.css b/style.css
index cd9473a..710923d 100644
--- a/style.css
+++ b/style.css
@@ -13,21 +13,41 @@ body {
text-rendering: optimizeLegibility;
}
-a {
+/**
+ * Link colors
+ */
+
+a,
+li a.active {
color: #39B9EE;
}
-
-a:hover {
+a:hover,
+li a.active:hover {
color: #808080;
}
+/**
+ * Skip link
+ */
+
+#skip-link {
+ display: none;
+}
+
+/**
+ * Wrap
+ */
+
#wrap {
margin: 0 auto;
width: 960px;
}
+/**
+ * Header
+ */
+
#logo {
- clear: both;
float: left;
}
@@ -45,22 +65,28 @@ p#slogan {
margin: 0;
}
-#search,
-#sidebar .block-search {
- background-color: #FFFFFF;
+/**
+ * Search block
+ * Works with standard search and module Search by page
+ */
+
+#header .block-search,
+#header .block-search-by-page,
+#header .block-search-by-page .form-item {
float: right;
+ margin: 0;
}
-
-#search label,
-#sidebar .block-search label {
+#header .block-search label,
+#header .block-search-by-page h2,
+#header .block-search-by-page label {
display: none;
}
-
-#search .form-text {
+#header .block-search .form-text,
+#header .block-search-by-page .form-text {
background-color: #EEEEEE;
border: 0;
float: right;
- font-family: monospace;
+ font-family: Georgia, serif;
font-size: 16px;
height: 24px;
line-height: 24px;
@@ -70,8 +96,8 @@ p#slogan {
-webkit-border-radius: 5px;
border-radius: 5px 5px 5px 5px;
}
-
-#search .form-submit {
+#header .block-search .form-submit,
+#header .block-search-by-page .form-submit {
background: url(images/search.png) no-repeat right center;
border: 0;
cursor: pointer;
@@ -83,38 +109,6 @@ p#slogan {
top: 0px;
}
-#sidebar .block-search .form-text {
- background-color: #EEEEEE;
- border: 0;
- font-family: monospace;
- font-size: 16px;
- height: 24px;
- line-height: 24px;
- margin: 0 0 20px 0;
- padding: 10px;
- width: 240px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- border-radius: 5px 5px 5px 5px;
-}
-
-#sidebar .block-search .form-submit {
- background-color: #808080;
- border: 0;
- color: #FFFFFF;
- cursor: pointer;
- font-family: Georgia, "Adobe Garamond Pro", "Apple Garamond", "ITC Garamond", "Times New Roman", Times, serif;
- font-size: 16px;
- height: 44px;
- line-height: 24px;
- margin: 0 0 30px 0;
- padding: 5px 20px;
- text-decoration: none;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- border-radius: 5px 5px 5px 5px;
-}
-
#mission {
color: #808080;
font-size: 42px;
@@ -123,8 +117,13 @@ p#slogan {
margin: 16px 0;
}
+/**
+ * Headings
+ */
+
h1,
-h2.comments {
+h2.comments,
+#comments h2.title {
font-size: 42px;
font-weight: normal;
line-height: 48px;
@@ -139,16 +138,33 @@ h3 {
margin: 32px 0 16px 0;
}
+h2 a {
+ color: #242021;
+ text-decoration: none;
+}
+
+/**
+ * Navigation
+ */
+
#nav {
padding: 40px 0 40px 0;
}
-#nav #navlist li {
+#nav ul#main-menu-links {
+ margin: 0;
+ padding: 0;
+}
+
+#nav #main-menu-links li {
+ display: block;
+ float: left;
+ list-style-type: none;
margin: 0 20px 0 0;
padding: 0;
}
-#nav #navlist li a {
+#nav #main-menu-links li a {
color: #242021;
font-size: 18px;
line-height: 24px;
@@ -157,45 +173,53 @@ h3 {
text-decoration: none;
}
-#nav #navlist li a:hover {
+#nav #main-menu-links li a:hover {
background-color: #dddddd;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px 5px 5px 5px;
}
-#nav #navlist li a.active,
-#nav #navlist li.active-trail a {
+#nav #main-menu-links li a.active,
+#nav #main-menu-links li.active-trail a {
background-color: #eeeeee;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px 5px 5px 5px;
}
-/* SUB MENU */
+/**
+ * Sub navigation for use with module Menu Block
+ */
-#sidebar .submenu h2.title-subnav {
+#sidebar .block-menu-block h2 {
border-bottom: 3px solid #dddddd;
margin: 0 0 5px 0;
padding: 0 0 5px 0;
}
-#sidebar .submenu h2.title-subnav a {
+#sidebar .block-menu-block h2 a {
color: #242021;
text-decoration: none;
}
-#sidebar .submenu h2.title-subnav a:hover {
+#sidebar .block-menu-block h2 a:hover {
color: #444;
}
-#sidebar .submenu ul.menu {
+#sidebar .block-menu-block {
+ background: none !important;
+ margin: 0 !important;
+ padding: 0 !important;
+}
+
+#sidebar .block-menu-block ul.menu {
margin: 0;
padding: 0;
width: 260px;
}
-#sidebar .submenu ul.menu li a {
+#sidebar .block-menu-block ul.menu li a {
color: #242021;
display: block;
padding: 10px 10px 10px 20px;
@@ -206,68 +230,83 @@ h3 {
border-radius: 5px 5px 5px 5px;
}
-#sidebar .submenu ul.menu li a:hover {
+#sidebar .block-menu-block ul.menu li a:hover {
background-color: #DDDDDD !important;
}
-#sidebar .submenu ul.menu li a.active {
+#sidebar .block-menu-block ul.menu li a.active {
background-color: #EEEEEE !important;
}
-#sidebar .submenu ul.menu li.collapsed a,
-#sidebar .submenu ul.menu li.expanded a {
+#sidebar .block-menu-block ul.menu li.collapsed a,
+#sidebar .block-menu-block ul.menu li.expanded a {
padding: 10px 10px 10px 40px;
width: 210px;
}
-#sidebar .submenu ul.menu li.collapsed a {
- background: url(images/arrow-collapsed.png) no-repeat left center;
+#sidebar .block-menu-block ul.menu li.collapsed a {
+ background: url(images/arrow-collapsed.png) no-repeat left 16px;
}
-#sidebar .submenu ul.menu li.expanded a {
- background: url(images/arrow-expanded.png) no-repeat left center;
+#sidebar .block-menu-block ul.menu li.expanded a {
+ background: url(images/arrow-expanded.png) no-repeat left 16px;
}
-#sidebar .submenu ul.menu li.leaf a {
+#sidebar .block-menu-block ul.menu li.leaf a {
background: none;
}
-#sidebar .submenu ul.menu li.expanded a li a {
+#sidebar .block-menu-block ul.menu li.expanded a li a {
padding: 10px 10px 10px 40px;
width: 210px;
}
-#sidebar .submenu ul.menu li {
+#sidebar .block-menu-block ul.menu li {
margin: 0 0 5px 0;
}
-#sidebar .submenu ul.menu li ul li {
+#sidebar .block-menu-block ul.menu li ul li {
margin: 5px 0 5px 0;
}
-#sidebar .submenu li.collapsed,
-#sidebar .submenu li.leaf,
-#sidebar .submenu li.expanded {
+#sidebar .block-menu-block li.collapsed,
+#sidebar .block-menu-block li.leaf,
+#sidebar .block-menu-block li.expanded {
list-style-image: none;
list-style-type: none;
}
-
-/* SIDEBAR */
-#sidebar .block-comment ul,
-#sidebar .block-forum .item-list ul {
+/**
+ * Sidebar
+ */
+
+#sidebar {
+ float: right;
+ width: 260px;
+}
+
+#sidebar .block ul,
+#sidebar .block .item-list ul {
padding: 0;
}
-#sidebar .block-comment ul li,
-#sidebar .block-forum .item-list ul li {
+#sidebar .block ul li,
+#sidebar .block .item-list ul li {
list-style-type: none;
margin: 0 0 10px 0;
}
-#sidebar .block-block,
-#sidebar .block-user,
-#sidebar .block-forum {
+#sidebar .block .item-list ul li a {
+ clear: both;
+ display: block;
+}
+
+#sidebar .block ul.links,
+#sidebar .block ul.links li {
+ padding: 0;
+}
+
+#sidebar .block {
background-color: #eeeeee;
margin-top: 30px;
padding: 20px;
@@ -276,9 +315,7 @@ h3 {
border-radius: 5px 5px 5px 5px;
}
-#sidebar .block-block h2,
-#sidebar .block-user h2,
-#sidebar .block-forum h2 {
+#sidebar .block h2 {
margin-top: 0;
}
@@ -286,15 +323,31 @@ h3 {
text-align: left;
}
-.clear {
- clear:both;
+#sidebar table {
+ border-collapse: separate;
+}
+
+#sidebar ul li.leaf {
+ list-style-image: none;
+}
+
+#sidebar ul.menu li {
+ list-style-image: none;
}
-#splash {
+/**
+ * Highlight
+ */
+
+#highlighted {
width: 960px;
margin: 16px 0;
}
+/**
+ * Main content
+ */
+
#content{
float: left;
width: 610px;
@@ -307,12 +360,12 @@ h3 {
border-radius: 0 0 5px 5px;
}
-#content .picture {
+#content .user-picture {
margin: 0;
padding: 0;
}
-#content .picture img {
+#content .user-picture img {
border: 1px solid #CDCCCC;
float: right;
height: 85px;
@@ -335,7 +388,7 @@ h3 {
border-radius: 5px 5px 5px 5px;
}
-#content .post-footer .picture img {
+#content .post-footer .user-picture img {
margin: 30px 0 20px 20px;
}
@@ -351,7 +404,7 @@ body.page-comment #content .node h2 a {
}
body.front #content .node {
- padding: 0 0 40px 0;
+ padding: 0 0 10px 0;
}
#content div.comment h3 a {
@@ -369,7 +422,7 @@ body.front #content .node {
margin: 30px 0 0 0;
}
-#content .submitted {
+#content .node .submitted {
display: block;
font-style: italic;
margin: 0 0 20px 0;
@@ -379,33 +432,30 @@ body.front #content .node {
margin: 0;
}
+div.links {
+ margin: 20px 0 0 0;
+}
+
ul.links {
clear: both;
}
+ul.inline,
+ul.links.inline {
+ display: block;
+}
+
#content ul.links,
-ul.links li {
- padding: 0 20px 30px 0;
+ul.links li,
+ul.inline li {
+ margin: 0 20px 30px 0;
+ padding: 0;
}
#content .content {
margin: 0 0 10px 0;
}
-#content ul.links li a {
- background-color: #EEEEEE;
- border: 0;
- color: #808080;
- height: 24px;
- line-height: 48px;
- padding: 13px 20px 13px 20px;
- text-decoration: none;
- white-space: nowrap;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- border-radius: 5px 5px 5px 5px;
-}
-
#content #edit-submit,
#content #edit-submit-1,
#content #edit-preview,
@@ -414,14 +464,37 @@ ul.links li {
#content #edit-delete {
background-color: #EEEEEE;
border: 0;
- color: #808080;
+ color: #808080;
cursor: pointer;
height: 44px;
line-height: 24px;
font-family: Georgia, "Adobe Garamond Pro", "Apple Garamond", "ITC Garamond", "Times New Roman", Times, serif;
font-size: 16px;
+ margin: 0 20px 0 0;
+ padding: 5px 20px;
+ text-decoration: none;
+ text-transform : capitalize;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px 5px 5px 5px;
+}
+
+.comment ul.links li.comment-delete a,
+.comment ul.links li.comment-edit a,
+.comment ul.links li.comment-reply a {
+ background-color: #EEEEEE;
+ border: 0;
+ color: #808080;
+ cursor: pointer;
+ display: inline-block;
+ height: 34px;
+ line-height: 34px;
+ font-family: Georgia, "Adobe Garamond Pro", "Apple Garamond", "ITC Garamond", "Times New Roman", Times, serif;
+ font-size: 16px;
+ margin: 0;
padding: 5px 20px;
text-decoration: none;
+ text-transform : capitalize;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px 5px 5px 5px;
@@ -431,7 +504,8 @@ ul.links li {
text-align: left;
}
-#sidebar #edit-submit {
+#sidebar #edit-submit,
+#sidebar .form-submit {
background-color: #808080;
border: 0;
color: #ffffff;
@@ -442,6 +516,7 @@ ul.links li {
height: 40px;
padding: 5px 20px;
text-decoration: none;
+ text-transform : capitalize;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px 5px 5px 5px;
@@ -482,29 +557,28 @@ body.page-user #content #edit-name,
border-radius: 5px 5px 5px 5px;
}
-#content #edit-comment {
+#content #edit-comment,
+#content .form-textarea {
background-color: #EEEEEE;
border: 0;
font-family: monospace;
font-size: 16px;
line-height: 24px;
padding: 10px;
- width: 590px;
+ width: 610px;
-moz-border-radius: 5px 5px 0 0;
-webkit-border-radius: 5px 5px 0 0;
border-radius: 5px 5px 0 0;
}
#content #edit-submit:hover,
-#content #edit-preview:hover {
- background-color: #DDDDDD;
-}
-
-#content ul.links li.comment_comments a {
- background-color: #D9E5D5;
-}
-
-#content ul.links li a:hover {
+#content #edit-preview:hover,
+#content #edit-submit:hover,
+#content #edit-vote:hover,
+#sidebar .form-submit:hover,
+#content input.form-submit:hover,
+#comments ul.links li a:hover,
+.comment ul.links li a:hover {
background-color: #DDDDDD;
}
@@ -515,18 +589,19 @@ body.page-user #content #edit-name,
text-align: right;
}
-#sidebar {
- float: right;
- width: 260px;
+#content #comments h2.comment-form {
+ margin-top: 40px;
}
-/* FOOTER (AND SOME HEADER) */
+/**
+ * Footer (and some header)
+ */
#footer-wrap {
border-top: 3px solid #DDDDDD;
font-style: italic;
margin: 50px 0 0 0;
- padding: 30px 0 30px 0;
+ padding: 10px 0 30px 0;
}
#footer-wrap #block-menu-secondary-links h2,
@@ -560,16 +635,14 @@ body.page-user #content #edit-name,
text-align: right;
}
-#header .block-search {
- display: none;
-}
-
#footer-message {
clear: both;
margin: 10px 0;
}
-/* FEED & NEW ICONS */
+/**
+ * Feed & new icons
+ */
a.feed-icon {
background-image: url('images/feed.png');
@@ -593,7 +666,13 @@ a.feed-icon {
width: 47px;
}
-/* PAGER */
+.marker {
+ color: #7FAE79;
+}
+
+/**
+ * Pager
+ */
#content ul.pager li {
margin: 0;
@@ -602,6 +681,7 @@ a.feed-icon {
#content ul.pager li a {
background: #EEEEEE;
+ color: #242021;
margin: 0 10px 0 0;
padding: 10px 14px;
text-decoration: none;
@@ -629,13 +709,17 @@ a.feed-icon {
padding: 30px 0 0 0;
}
-.poll {
+/**
+ * Poll
+ */
+
+.block-poll {
margin: 30px 0 0 0;
}
.poll .title {
font-weight: bold;
- margin: 0 0 30px 0;
+ margin: 0 0 20px 0;
}
.poll .total {
@@ -666,6 +750,15 @@ a.feed-icon {
padding: 0;
}
+.poll .form-item,
+.poll .form-actions {
+ margin-top: 0;
+}
+
+/**
+ * User
+ */
+
.block-user .item-list ul {
margin: 20px 0 0 0;
padding: 0;
@@ -678,6 +771,10 @@ a.feed-icon {
padding: 0;
}
+/**
+ * Standard html tags
+ */
+
pre {
white-space: pre-wrap;
white-space: -moz-pre-wrap !important;
@@ -687,47 +784,159 @@ pre {
width: 99%;
}
-/* FORUM */
+blockquote {
+ font-style: italic;
+}
+
+/**
+ * Forum
+ */
#forum table {
width: 610px;
}
-
#forum td.icon {
background: url(images/forum-default.png) no-repeat center center;
padding: 0 0 0 30px;
}
-
#forum td.icon img {
display:none;
}
#content .tabs a {
color: #242021;
- padding: 10px 20px;
+ padding: 5px 20px;
-moz-border-radius: 5px 5px 0 0;
-webkit-border-radius: 5px 5px 0 0;
border-radius: 5px 5px 0 0;
}
-
#content .tabs ul {
- padding: 10px 0 10px 0;
+ padding: 5px 0 5px 0;
}
-
#content .messages {
margin: 10px 0;
- padding: 10px 20px;
+ padding: 10px 20px 10px 40px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px 5px 5px 5px;
}
-/* ADMIN MENU */
+/**
+ * In case of Admin menu
+ */
body #admin-menu {
font-size: 12px;
}
-
body #admin-menu li.admin-menu-icon {
padding-top: 3px;
}
+
+/**
+ * Tags
+ */
+
+.field-name-field-tags .field-label {
+ display: none;
+}
+
+.field-name-field-tags .field-item a,
+#block-menu-menu-tags ul.menu li a {
+ float:left;
+ height:24px;
+ line-height:24px;
+ position:relative;
+ font-size:11px;
+ margin-left:20px;
+ padding:0 10px 0 12px;
+ background: #AAAAAA;
+ color:#fff;
+ text-decoration:none;
+ -moz-border-radius-bottomright:4px;
+ -webkit-border-bottom-right-radius:4px;
+ border-bottom-right-radius:4px;
+ -moz-border-radius-topright:4px;
+ -webkit-border-top-right-radius:4px;
+ border-top-right-radius:4px;
+}
+
+.field-name-field-tags .field-item a:before,
+#block-menu-menu-tags ul.menu li a:before {
+ content:"";
+ float:left;
+ position:absolute;
+ top:0;
+ left:-12px;
+ width:0;
+ height:0;
+ border-color:transparent #AAAAAA transparent transparent;
+ border-style:solid;
+ border-width:12px 12px 12px 0;
+}
+
+.field-name-field-tags .field-item a:after,
+#block-menu-menu-tags ul.menu li a:after {
+ content:"";
+ position:absolute;
+ top:10px;
+ left:0;
+ float:left;
+ width:4px;
+ height:4px;
+ -moz-border-radius:2px;
+ -webkit-border-radius:2px;
+ border-radius:2px;
+ background:#fff;
+ -moz-box-shadow:-1px -1px 2px #555555;
+ -webkit-box-shadow:-1px -1px 2px #555555;
+ box-shadow:-1px -1px 2px #555555;
+}
+
+.field-name-field-tags .field-item a:hover,
+#block-menu-menu-tags ul.menu li a:hover {
+ background: #808080;
+}
+.field-name-field-tags .field-item a:hover:before,
+#block-menu-menu-tags ul.menu li a:hover:before {
+ border-color: transparent #808080 transparent transparent;
+}
+
+#block-menu-menu-tags ul.menu li {
+ float: left;
+}
+
+#block-menu-menu-tags ul.menu {
+ margin: 0;
+}
+#block-menu-menu-tags .content {
+ clear: both;
+ display: block;
+ overflow: hidden;
+}
+
+/**
+ * Extra
+ */
+
+.clear {
+ clear: both;
+}
+
+.form-required {
+ color: #888888;
+}
+
+#content #edit-comment-body-und-0-format {
+ display: none;
+}
+
+ol.search-results {
+ padding: 0;
+}
+
+hr {
+ border: none 0;
+ border-top: 3px solid #DDDDDD;/
+ height: 3px;
+ margin: 20px 0;
+} \ No newline at end of file
diff --git a/template.php b/template.php
index a7cde20..244e719 100644
--- a/template.php
+++ b/template.php
@@ -4,110 +4,72 @@
* Contains theme preprocess functions
*/
-if (is_null(theme_get_setting('simpleclean_show_submenu'))) {
- global $theme_key;
-
- /*
- * The default values for the theme variables. Make sure $defaults exactly
- * matches the $defaults in the theme-settings.php file.
- */
- $defaults = array(
- 'simpleclean_show_submenu' => 1
- );
-
- // Get default theme settings.
- $settings = theme_get_settings($theme_key);
- // Don't save the toggle_node_info_ variables.
- if (module_exists('node')) {
- foreach (node_get_types() as $type => $name) {
- unset($settings['toggle_node_info_' . $type]);
- }
- }
- // Save default theme settings.
- variable_set(
- str_replace('/', '_', 'theme_'. $theme_key .'_settings'),
- array_merge($defaults, $settings)
- );
- // Force refresh of Drupal internals.
- theme_get_setting('', TRUE);
+ /**
+ * Override or insert variables into the html template.
+ */
+function simpleclean_preprocess_html(&$vars) {
+ // Add conditional CSS for IE6.
+ drupal_add_css(path_to_theme() . '/ie6.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lt IE 7', '!IE' => FALSE), 'preprocess' => FALSE));
}
-function simpleclean_preprocess_page(&$vars) {
- // Remove double meta content-type tag
- $vars['head'] = preg_replace('/<meta http-equiv=\"Content-Type\"[^>]*>/', '', $vars['head']);
+/**
+ * Format submitted by in articles
+ */
+function simpleclean_preprocess_node(&$vars) {
+ $node = $vars['node'];
+ $vars['date'] = format_date($node->created, 'custom', 'd M Y');
- // Print submenu
- $show_submenu = theme_get_setting('simpleclean_show_submenu');
- if ($show_submenu) {
- $tree = menu_tree_page_data('primary-links');
- foreach ($tree as $key => $mi) {
- if ($mi['link']['in_active_trail'] && $tree[$key]['below']) {
- $menu = menu_tree_output($tree[$key]['below']);
- $menu = $menu . '</div>';
- $link = $mi['link']['link_path'];
- $title = $mi['link']['title'];
- $menu_header = "<div class=\"submenu\"><h2 class=\"title-subnav\">" . l($title, $link) . "</h2>";
- $menu = $menu_header . $menu;
- }
- }
- $vars['simpleclean_submenu'] = $menu;
+ if (variable_get('node_submitted_' . $node->type, TRUE)) {
+ $vars['display_submitted'] = TRUE;
+ $vars['submitted'] = t('By !username on !datetime', array('!username' => $node->name, '!datetime' => $vars['date']));
+ $vars['user_picture'] = theme_get_setting('toggle_node_user_picture') ? theme('user_picture', array('account' => $node)) : '';
+
+ // Add a footer for post
+ $account = user_load($vars['node']->uid);
+ $vars['simpleclean_postfooter'] = '';
+ if (!empty($account->signature)) {
+ $postfooter = "<div class='post-footer'>" . $vars['user_picture'] . "<h3>" . check_plain(format_username($account)) . "</h3>";
+ $cleansignature = strip_tags($account->signature);
+ $postfooter .= "<p>" . check_plain($cleansignature) . "</p>";
+ $postfooter .= "</div>";
+ $vars['simpleclean_postfooter'] = $postfooter;
+ }
}
-}
-
-function simpleclean_preprocess(&$vars) {
- // Add a footer for post
- $postfooter = "<div class='post-footer'>" . $vars['picture'] . "<h3>" . $vars['title'] . "</h3><span class='submitted'>" . $vars['submitted'] . "</span>";
- $account = user_load(array('uid' => $vars['node']->uid));
- if (!empty($account->signature)) {
- $postfooter .= "<p>" . check_plain($account->signature) . "</p>";
- }
- $postfooter .= "</div>";
- $vars['simpleclean_postfooter'] = $postfooter;
-}
-
-function simpleclean_preprocess_comment_wrapper(&$vars) {
- // Add a "Comments" heading above comments except on forum pages.
- if ($vars['content'] && $vars['node']->type != 'forum') {
- $vars['content'] = '<h2 class="comments">'. t('Comments') .'</h2>'. $vars['content'];
+ else {
+ $vars['display_submitted'] = FALSE;
+ $vars['submitted'] = '';
+ $vars['user_picture'] = '';
+ }
+
+ // Remove Add new comment from teasers on frontpage
+
+ if ($vars['is_front']) {
+ unset($vars['content']['links']['comment']['#links']['comment-add']);
+ unset($vars['content']['links']['comment']['#links']['comment_forbidden']);
}
+
}
-function simpleclean_node_submitted($node) {
- return t('By !username on @date', array(
- '!username' => theme('username', $node),
- '@date' => format_date($node->created, 'custom', 'd M Y')
- ));
+/**
+ * Format submitted by in comments
+ */
+function simpleclean_preprocess_comment(&$vars) {
+ $comment = $vars['elements']['#comment'];
+ $node = $vars['elements']['#node'];
+ $vars['created'] = format_date($comment->created, 'custom', 'd M Y');
+ $vars['changed'] = format_date($comment->changed, 'custom', 'd M Y');
+ $vars['submitted'] = t('By !username on !datetime at about @time.', array('!username' => $node->name, '!datetime' => $vars['created'], '@time' => format_date($comment->created, 'custom', 'H:i')));
}
-function simpleclean_comment_submitted($comment) {
- return t('By !username on @date at about @time.', array(
- '!username' => theme('username', $comment),
- '@date' => format_date($comment->timestamp, 'custom', 'd M Y'),
- '@time' => format_date($comment->timestamp, 'custom', 'H:i')
- ));
+/**
+ * Change button to Post instead of Save
+ */
+function simpleclean_form_comment_form_alter(&$form, &$form_state, &$form_id) {
+ $form['actions']['submit']['#value'] = t('Post');
+ $form['comment_body']['#after_build'][] = 'configure_comment_form';
}
-function simpleclean_preprocess_search_results(&$variables) {
-
- // define the number of results being shown on a page
- $items_per_page = 10;
-
- // get the current page
- $current_page = $_REQUEST['page']+1;
-
- // get the total number of results from the $GLOBALS
- $total = $GLOBALS['pager_total_items'][0];
-
- // perform calculation
- $start = 10*$current_page-9;
- $end = $items_per_page * $current_page;
- if ($end>$total) $end = $total;
-
- // set this html to the $variables
- if ($total > 1) {
- $variables['simpleclean_search_totals'] = '<p>'. t('Displaying @start - @end of @total results', array('@start' => $start, '@end' => $end, '@total' => $total)) .'</p>';
- }
- else {
- $variables['simpleclean_search_totals'] = '<p>'. t('Displaying @start - @end of @total result', array('@start' => $start, '@end' => $end, '@total' => $total)) .'</p>';
-}
+function configure_comment_form(&$form) {
+ $form['und'][0]['format']['#access'] = FALSE;
+ return $form;
} \ No newline at end of file
diff --git a/theme-settings.php b/theme-settings.php
index 6bca487..d3740a2 100644
--- a/theme-settings.php
+++ b/theme-settings.php
@@ -1,33 +1,21 @@
<?php
/**
- * @file
- * Implementation of THEMEHOOK_settings() function.
- *
- * @param $saved_settings
- * array An array of saved settings for this theme.
- * @return
- * array A form array.
- */
+* @file
+* Implementation of THEMEHOOK_settings() function.
+*
+* @param $saved_settings
+* array An array of saved settings for this theme.
+* @return
+* array A form array.
+*/
-function phptemplate_settings($saved_settings) {
- /*
- * The default values for the theme variables. Make sure $defaults exactly
- * matches the $defaults in the template.php file.
- */
- $defaults = array(
- 'simpleclean_show_submenu' => 1,
+function simpleclean_form_system_theme_settings_alter(&$form, $form_state) {
+ $form['simpleclean_mission'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Mission statement'),
+ '#default_value' => theme_get_setting('simpleclean_mission'),
+ '#size' => 128,
+ '#description' => t('Specify the text for the mission statement visable on frontpage. Leave it empty if you dont want a mission statement or if you want to use blocks instead.'),
+ '#weight' => -2,
);
-
- // Merge the saved variables and their default values
- $settings = array_merge($defaults, $saved_settings);
-
- // Create the form widgets using Forms API
- $form['simpleclean_show_submenu'] = array(
- '#type' => 'checkbox',
- '#title' => t('Show submenu (primary links subnavigation in right column)'),
- '#default_value' => $settings['simpleclean_show_submenu'],
- );
-
- // Return the additional form widgets
- return $form;
}