diff --git a/README.txt b/README.txt index a0af1183a94f9964884348e8155c1b80d94886fa..89e6758dc6c415f07f812f01593d63f63fc2e135 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 a00a25d70995ba2672f2a04926de826779ae0e6a..f08883512219c47503e80bfafc653630affc6cc8 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() */ ?> -
+
> - - - new) : ?> - +
+ + +
+ +
-

- - + + - -
- + + + > + + + + +
> + -
-
- +
+
+
- -
- -
- - - -
\ No newline at end of file diff --git a/node.tpl.php b/node.tpl.php index 7a9d2f05208828627dcfa0d6b2554a38909f7968..4cf15222b4b601e9e2c240f44f3be025a938d5ac 100644 --- a/node.tpl.php +++ b/node.tpl.php @@ -45,41 +45,43 @@ * @see template_preprocess_node() */ ?> -
- - -

- +
> - - + + + > + -
- + + + + +
> +
-
-
- -
- -
+
+ + + + + + + + + - - + +
- - - - - - -
diff --git a/page.tpl.php b/page.tpl.php index ec68de281265f5711ded4a4963ac00be0fc87d68..b122727cbe603ace2de38e46e17c0008d9202fb9 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() */ ?> - - - - - <?php print $head_title ?> - - - - - - - -
- +
- -
+ +
- -
+ +
+

-
- - - - - - + + +
+ + + + + + + + + + +
@@ -154,25 +154,16 @@
- - - - - \ No newline at end of file diff --git a/screenshot.png b/screenshot.png index 01d3b6c865ef3a988c17dda31a4380aaf5b6033b..24bed54bbcc36f9eb7c055d5b43307e7d771d73f 100644 Binary files a/screenshot.png and b/screenshot.png differ diff --git a/search-results.tpl.php b/search-results.tpl.php index dbfba7a2afeda0211a1d7941eb0cca08d523b646..f87fb5717eb4f40ff9df6a96931b3e045d0a6493 100644 --- a/search-results.tpl.php +++ b/search-results.tpl.php @@ -1,12 +1,52 @@ - -
- -
-$total) $end = $total; + if ($total > 1) { + $message = '

'. t('Displaying @start - @end of @total results', array('@start' => $start, '@end' => $end, '@total' => $total)) .'

'; + } + else { + $message = '

'. t('Displaying @start - @end of @total result', array('@start' => $start, '@end' => $end, '@total' => $total)) .'

'; +} +?> + + +

+
    + + + +
+ + +

+ + diff --git a/simpleclean.info b/simpleclean.info index fd87f56ee9f51eeb6cf0dc50c34fc0aabada5e0b..af9a439a7a9b686e4194e5b19e8718c0896a2991 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 cd9473a8393ecaac38d7ec06a81343ab0beaae4d..710923dab1a0f2ba3b397cc28ac6a429f85f4f56 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 a7cde20ee1e9cd4d278e58e50adbd5aff4e02b29..244e719e75f08572c041e076305500cebaaf2a44 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('/]*>/', '', $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 . '
'; - $link = $mi['link']['link_path']; - $title = $mi['link']['title']; - $menu_header = "

" . l($title, $link) . "

"; - $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 = ""; + $vars['simpleclean_postfooter'] = $postfooter; + } } -} - -function simpleclean_preprocess(&$vars) { - // Add a footer for post - $postfooter = ""; - $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'] = '

'. t('Comments') .'

'. $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'] = '

'. t('Displaying @start - @end of @total results', array('@start' => $start, '@end' => $end, '@total' => $total)) .'

'; - } - else { - $variables['simpleclean_search_totals'] = '

'. t('Displaying @start - @end of @total result', array('@start' => $start, '@end' => $end, '@total' => $total)) .'

'; -} +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 6bca4879f498d66b0a33d15e10e548ef63e203e3..d3740a2d219d1a4a798f367007236b384a2a823d 100644 --- a/theme-settings.php +++ b/theme-settings.php @@ -1,33 +1,21 @@ 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; }