-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the Continuous Good subtheme (cg_theme)
- Loading branch information
Showing
92 changed files
with
8,072 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
source 'https://rubygems.org' | ||
|
||
group :frontend do | ||
gem 'compass', '<= 0.13' | ||
# Build compass sprites faster with oily_png. | ||
gem 'oily_png', '~> 1.1' | ||
gem 'sass', '~> 3.2.0' | ||
gem 'sass-globbing', '~> 1.1' | ||
gem 'zen-grids', '~> 1.5' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
BUILD A THEME WITH ZEN | ||
---------------------- | ||
|
||
The base Zen theme is designed to be easily extended by its sub-themes. You | ||
shouldn't modify any of the CSS or PHP files in the zen/ folder; but instead you | ||
should create a sub-theme of zen which is located in a folder outside of the | ||
root zen/ folder. The examples below assume zen and your sub-theme will be | ||
installed in sites/all/themes/, but any valid theme directory is acceptable | ||
(read the sites/default/default.settings.php for more info.) | ||
|
||
Why? To learn why you shouldn't modify any of the files in the zen/ folder, | ||
see https://drupal.org/node/245802 | ||
|
||
|
||
*** IMPORTANT NOTE *** | ||
* | ||
* In Drupal 7, the theme system caches which template files and which theme | ||
* functions should be called. This means that if you add a new theme, | ||
* preprocess or process function to your template.php file or add a new template | ||
* (.tpl.php) file to your sub-theme, you will need to rebuild the "theme | ||
* registry." See https://drupal.org/node/173880#theme-registry | ||
* | ||
* Drupal 7 also stores a cache of the data in .info files. If you modify any | ||
* lines in your sub-theme's .info file, you MUST refresh Drupal 7's cache by | ||
* simply visiting the Appearance page at admin/appearance. | ||
* | ||
|
||
|
||
1. Setup the location for your new sub-theme. | ||
|
||
Copy the STARTERKIT folder out of the zen/ folder and rename it to be your | ||
new sub-theme. IMPORTANT: The name of your sub-theme must start with an | ||
alphabetic character and can only contain lowercase letters, numbers and | ||
underscores. | ||
|
||
For example, copy the sites/all/themes/zen/STARTERKIT folder and rename it | ||
as sites/all/themes/foo. | ||
|
||
Why? Each theme should reside in its own folder. To make it easier to | ||
upgrade Zen, sub-themes should reside in a folder separate from the base | ||
theme. | ||
|
||
2. Setup the basic information for your sub-theme. | ||
|
||
In your new sub-theme folder, rename the STARTERKIT.info.txt file to include | ||
the name of your new sub-theme and remove the ".txt" extension. Then edit | ||
the .info file by editing the name and description field. | ||
|
||
For example, rename the foo/STARTERKIT.info file to foo/foo.info. Edit the | ||
foo.info file and change "name = Zen Sub-theme Starter Kit" to "name = Foo" | ||
and "description = Read..." to "description = A Zen sub-theme". | ||
|
||
Why? The .info file describes the basic things about your theme: its | ||
name, description, features, template regions, CSS files, and JavaScript | ||
files. See the Drupal 7 Theme Guide for more info: | ||
https://drupal.org/node/171205 | ||
|
||
Then, visit your site's Appearance page at admin/appearance to refresh | ||
Drupal 7's cache of .info file data. | ||
|
||
3. Choose your preferred page layout method or grid system. | ||
|
||
By default your new sub-theme is using a responsive layout. If you want a | ||
fixed layout for your theme, delete the unneeded "responsive" and | ||
"responsive-rtl" css/sass files and edit your sub-theme's styles.css | ||
or styles.scss file and replace the reference to "responsive" with | ||
"fixed". | ||
|
||
For example, edit foo/sass/styles.scss and change this line: | ||
@import "layouts/responsive"; | ||
to: | ||
@import "layouts/fixed"; | ||
|
||
Alternatively, if you are more familiar with a different CSS layout method, | ||
such as GridSetApp or 960.gs, etc., you can replace the | ||
"layouts/responsive" line in your styles.scss file with a line | ||
pointing at your choice of layout CSS file. | ||
|
||
Then, visit your site's Appearance page at admin/appearance to refresh | ||
Drupal 7's theme cache. | ||
|
||
4. Edit your sub-theme to use the proper function names. | ||
|
||
Edit the template.php and theme-settings.php files in your sub-theme's | ||
folder; replace ALL occurrences of "STARTERKIT" with the name of your | ||
sub-theme. | ||
|
||
For example, edit foo/template.php and foo/theme-settings.php and replace | ||
every occurrence of "STARTERKIT" with "foo". | ||
|
||
It is recommended to use a text editing application with search and | ||
"replace all" functionality. | ||
|
||
5. Set your website's default theme. | ||
|
||
Log in as an administrator on your Drupal site, go to the Appearance page at | ||
admin/appearance and click the "Enable and set default" link next to your | ||
new sub-theme. | ||
|
||
|
||
Optional steps: | ||
|
||
6. Modify the markup in Zen core's template files. | ||
|
||
If you decide you want to modify any of the .tpl.php template files in the | ||
zen folder, copy them to your sub-theme's folder before making any changes. | ||
And then rebuild the theme registry. | ||
|
||
For example, copy zen/templates/page.tpl.php to foo/templates/page.tpl.php. | ||
|
||
7. Modify the markup in Drupal's search form. | ||
|
||
Copy the search-block-form.tpl.php template file from the modules/search/ | ||
folder and place it in your sub-theme's template folder. And then rebuild | ||
the theme registry. | ||
|
||
You can find a full list of Drupal templates that you can override in the | ||
templates/README.txt file or https://drupal.org/node/190815 | ||
|
||
Why? In Drupal 7 theming, if you want to modify a template included by a | ||
module, you should copy the template file from the module's directory to | ||
your sub-theme's template directory and then rebuild the theme registry. | ||
See the Drupal 7 Theme Guide for more info: https://drupal.org/node/173880 | ||
|
||
8. Further extend your sub-theme. | ||
|
||
Discover further ways to extend your sub-theme by reading Zen's | ||
documentation online at: | ||
https://drupal.org/documentation/theme/zen | ||
and Drupal 7's Theme Guide online at: | ||
https://drupal.org/theme-guide |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
; Drupal's .info files allow themers to easily specify some of the static | ||
; properties of your theme. Properties such as its name, stylesheets, | ||
; javascripts, and block regions. | ||
; | ||
; Drupal 7 stores a cache of the data in this .info files. If you modify any | ||
; lines in this file, you MUST refresh Drupal 7's cache by simply visiting the | ||
; Appearance page at admin/appearance. | ||
|
||
|
||
|
||
; The name, description and screenshot used for this theme on the Appearance | ||
; page at admin/appearance. | ||
|
||
screenshot = screenshot.png | ||
name = Continuous Good Theme (cg_theme) | ||
description = This is the zen subtheme theme for the Continuous Good website. | ||
|
||
|
||
|
||
; This theme is compatible with Drupal 7 core. And it is a sub-theme of Zen. | ||
|
||
core = 7.x | ||
base theme = zen | ||
|
||
|
||
|
||
; This section controls the CSS files for your theme. There are 3 different | ||
; things you can do with a "stylesheets" line: | ||
; - Add a new stylesheet for your theme. | ||
; - Override a module's stylesheet. If the stylesheet you are adding uses the | ||
; same filename as a stylesheet from a Drupal core or contrib module, your CSS | ||
; file will be used instead of the module's file. | ||
; - Remove a module's stylesheet. If you specify the name of a Drupal core or | ||
; contrib module's stylesheets, Drupal will remove that stylesheet if you do | ||
; NOT include a file with that name with your theme. | ||
; | ||
; stylesheets[MEDIA][] = FILE | ||
; | ||
; The "FILE" is the name of the stylesheet to add/override/remove. | ||
; The "MEDIA" in the first set of brackets is a media type or a media query. | ||
; Typical CSS media types include "all", "screen", "print", and "handheld". A | ||
; typical media query is "screen and (max-width: 320px)". | ||
; | ||
; CSS2.1 media types: http://www.w3.org/TR/CSS21/media.html#media-types | ||
; CSS3 media queries: http://www.w3.org/TR/css3-mediaqueries/ | ||
|
||
; First we remove the system's menu and message styling since Zen has its own. | ||
stylesheets[all][] = system.menus.css | ||
stylesheets[all][] = system.messages.css | ||
stylesheets[all][] = system.theme.css | ||
|
||
; Then we add our own stylesheet. | ||
stylesheets[all][] = css/styles.css | ||
|
||
; Built-in conditional stylesheet support has been removed from Zen 7.x-5.x. | ||
; Instead, Zen now adds conditional-comment-included classes to the html | ||
; element, such as .lt-ie9, .lt-ie8, .lt-ie7. More information on this | ||
; technique can be found at: | ||
; http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ | ||
; | ||
; If you still wish to use conditional stylesheets, you must install the | ||
; conditional stylesheets module: https://drupal.org/project/conditional_styles | ||
;stylesheets-conditional[lte IE 8][all][] = css/ie8.css | ||
|
||
|
||
|
||
; Optionally add some JavaScripts to your theme. | ||
|
||
;scripts[] = js/script.js | ||
|
||
|
||
|
||
; This section lists the regions defined in Zen's default page.tpl.php and | ||
; maintenance-page.tpl.php files. The name in brackets is the machine name of | ||
; the region. The text after the equals sign is a descriptive text used on the | ||
; admin/structure/blocks page. | ||
; | ||
; In the page.tpl, the contents of the region are output with a | ||
; $page['MACHINE-NAME'] variable and, in the maintenance-page.tpl, the region is | ||
; output with a $MACHINE-NAME variable. For example, with this line in the .info | ||
; file: | ||
; regions[header_top] = Header top | ||
; You'll use this variable in page.tpl.php: | ||
; <?php print render($page['header_top']); ?> | ||
; And you'll use this variable in maintenance-page.tpl.php: | ||
; <?php print $header_top; ?> | ||
|
||
regions[header] = Header | ||
regions[navigation] = Navigation bar | ||
regions[highlighted] = Highlighted | ||
regions[help] = Help | ||
regions[content] = Content | ||
regions[sidebar_first] = First sidebar | ||
regions[sidebar_second] = Second sidebar | ||
regions[footer] = Footer | ||
regions[bottom] = Page bottom | ||
|
||
; The page_top and page_bottom regions are hidden, which means they will not | ||
; show up on the blocks administration page. But they are required in order for | ||
; the html.tpl.php to work properly, so do not delete them. | ||
|
||
regions[page_top] = Page top | ||
regions[page_bottom] = Page bottom | ||
|
||
|
||
|
||
; Various page elements output by the theme can be toggled on and off. The | ||
; "features" control which of these check boxes display on the | ||
; admin/appearance config page. This is useful for suppressing check boxes | ||
; for elements not used by your sub-theme. To suppress a check box, omit the | ||
; entry for it below. See the Drupal 7 Theme Guide for more info: | ||
; https://drupal.org/node/171205#features | ||
|
||
features[] = logo | ||
features[] = name | ||
features[] = slogan | ||
features[] = node_user_picture | ||
features[] = comment_user_picture | ||
features[] = favicon | ||
features[] = main_menu | ||
features[] = secondary_menu | ||
|
||
|
||
|
||
; Set the default values of settings on the theme-settings.php form. | ||
|
||
settings[zen_breadcrumb] = yes | ||
settings[zen_breadcrumb_separator] = ' › ' | ||
settings[zen_breadcrumb_home] = 1 | ||
settings[zen_breadcrumb_trailing] = 0 | ||
settings[zen_breadcrumb_title] = 0 | ||
settings[zen_skip_link_anchor] = main-menu | ||
settings[zen_skip_link_text] = Jump to navigation | ||
settings[zen_html5_respond_meta][] = respond | ||
settings[zen_html5_respond_meta][] = html5 | ||
settings[zen_html5_respond_meta][] = meta | ||
settings[zen_rebuild_registry] = 1 | ||
settings[zen_wireframes] = 0 | ||
|
||
; To make this sub-theme an admin theme with shortcut links next to titles, | ||
; uncomment the line below. | ||
|
||
;settings[shortcut_module_link] = 1 | ||
|
||
; To add a Panels layout (which can also be used by Display Suite), uncomment | ||
; the line below and see the documentation at: https://drupal.org/node/495654 | ||
;plugins[panels][layouts] = panels-layouts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# | ||
# This file is only needed for Compass/Sass integration. If you are not using | ||
# Compass, you may safely ignore or delete this file. | ||
# | ||
# If you'd like to learn more about Sass and Compass, see the sass/README.txt | ||
# file for more information. | ||
# | ||
|
||
|
||
# Change this to :production when ready to deploy the CSS to the live server. | ||
environment = :development | ||
#environment = :production | ||
|
||
# If in development (set above), we can turn on the sourcemap file generation. | ||
# Requires sass 3.3+ and compass 1.0.1+ | ||
# Determine version from command line: sass --version && compass --version | ||
sourcemap = false | ||
#sourcemap = true | ||
|
||
# Alternative development debugging methods | ||
# If in development (above), we can enable line_comments for FireCompass plugin. | ||
# Requires Firebug plugin and FireCompass plugin | ||
firecompass = false | ||
#firecompass = true | ||
|
||
# If in development (above), we can enable debug_info for the FireSass plugin. | ||
# Requires Firebug plugin and Firesass plugin | ||
firesass = false | ||
#firesass = true | ||
|
||
|
||
# Location of the theme's resources. | ||
css_dir = "css" | ||
sass_dir = "sass" | ||
extensions_dir = "sass-extensions" | ||
images_dir = "images" | ||
javascripts_dir = "js" | ||
|
||
|
||
# Require any additional compass plugins installed on your system. | ||
#require 'ninesixty' | ||
#require 'zen-grids' | ||
|
||
# Assuming this theme is in sites/*/themes/THEMENAME, you can add the partials | ||
# included with a module by uncommenting and modifying one of the lines below: | ||
#add_import_path "../../../default/modules/FOO" | ||
#add_import_path "../../../all/modules/FOO" | ||
#add_import_path "../../../../modules/FOO" | ||
|
||
|
||
## | ||
## You probably don't need to edit anything below this. | ||
## | ||
|
||
# You can select your preferred output style here (can be overridden via the command line): | ||
# output_style = :expanded or :nested or :compact or :compressed | ||
output_style = (environment == :development) ? :expanded : :compressed | ||
|
||
# To enable relative paths to assets via compass helper functions. Since Drupal | ||
# themes can be installed in multiple locations, we don't need to worry about | ||
# the absolute path to the theme from the server root. | ||
relative_assets = true | ||
|
||
# To disable debugging comments that display the original location of your selectors. Uncomment: | ||
# line_comments = false | ||
|
||
# Pass options to sass. For development, we turn on the FireSass-compatible | ||
# debug_info if the firesass config variable above is true. | ||
sass_options = (environment == :development && firesass == true) ? {:debug_info => true} : {} | ||
|
||
# Pass options to sass. For development, we turn on the FireCompass-compatible | ||
# line_comments if the firecompass config variable above is true. | ||
sass_options = (environment == :development && firecompass == true) ? {:line_comments => true} : sass_options | ||
|
||
# Pass options to sass. For development and sourcemap variable is true (above), | ||
# then pass the "--sourcemap" option flag to compass/sass. | ||
sass_options = (environment == :development && sourcemap == true) ? {:sourcemap => true} : sass_options |
Oops, something went wrong.