compass-aurora-os 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/aurora-os.rb +12 -0
- data/stylesheets/_aurora.scss +5 -0
- data/stylesheets/aurora/_singularity-grid.scss +2 -0
- data/stylesheets/aurora/_susy-grid.scss +2 -0
- data/stylesheets/aurora/_system.scss +24 -0
- data/stylesheets/drupal/_system.scss +19 -0
- data/stylesheets/drupal/_vertical-tabs.scss +196 -0
- data/templates/arcturus/arcturus.info.erb +69 -0
- data/templates/arcturus/manifest.rb +44 -0
- data/templates/arcturus/partials/global/_base.scss +24 -0
- data/templates/arcturus/partials/layouts/_layouts.scss +6 -0
- data/templates/arcturus/partials/modules/_modules.scss +6 -0
- data/templates/arcturus/partials/states/_states.scss +6 -0
- data/templates/arcturus/partials/styleguide/_style-guide.scss +19 -0
- data/templates/arcturus/print.scss +16 -0
- data/templates/arcturus/style.scss +41 -0
- data/templates/arcturus/template.php.erb +177 -0
- data/templates/bower/manifest.rb +20 -0
- data/templates/box-sizing/README-behaviors.md +4 -0
- data/templates/box-sizing/behaviors/box-sizing/boxsizing.htc +399 -0
- data/templates/box-sizing/behaviors/box-sizing/boxsizing.php +23 -0
- data/templates/box-sizing/manifest.rb +5 -0
- data/templates/corona/maintenance.scss +29 -0
- data/templates/corona/manifest.rb +47 -0
- data/templates/corona/partials/_base.scss +31 -0
- data/templates/corona/partials/_variables.scss +137 -0
- data/templates/corona/partials/design/_design.scss +4 -0
- data/templates/corona/partials/global/_defaults.scss +3 -0
- data/templates/corona/partials/global/_forms.scss +62 -0
- data/templates/corona/partials/global/_global.scss +11 -0
- data/templates/corona/partials/global/_type.scss +124 -0
- data/templates/corona/print.scss +16 -0
- data/templates/corona/style.scss +21 -0
- data/templates/grunt/manifest.rb +23 -0
- data/templates/polaris/manifest.rb +46 -0
- data/templates/polaris/partials/global/_base.scss +24 -0
- data/templates/polaris/partials/layouts/_layouts.scss +6 -0
- data/templates/polaris/partials/modules/_modules.scss +6 -0
- data/templates/polaris/partials/states/_states.scss +6 -0
- data/templates/polaris/partials/styleguide/_style-guide.scss +19 -0
- data/templates/polaris/print.scss +16 -0
- data/templates/polaris/style.scss +39 -0
- data/templates/project/manifest.rb +46 -0
- data/templates/project/partials/design/_design.scss +8 -0
- data/templates/project/partials/global/_base.scss +22 -0
- data/templates/project/partials/layout/_layout.scss +8 -0
- data/templates/project/partials/styleguide/_style-guide.scss +18 -0
- data/templates/project/print.scss +16 -0
- data/templates/project/style.scss +34 -0
- data/templates/shared/Gemfile.txt +16 -0
- data/templates/shared/Gruntfile.js.erb +159 -0
- data/templates/shared/README-Partials.md +82 -0
- data/templates/shared/README-Sass.md +77 -0
- data/templates/shared/README-templates.md +3 -0
- data/templates/shared/_extendables.scss +22 -0
- data/templates/shared/_functions.scss +5 -0
- data/templates/shared/_mixins.scss +5 -0
- data/templates/shared/_variables.scss +5 -0
- data/templates/shared/aurora.info.erb +69 -0
- data/templates/shared/bowerrc.txt +3 -0
- data/templates/shared/component.json.erb +8 -0
- data/templates/shared/config.rb.erb +40 -0
- data/templates/shared/editorconfig.txt +21 -0
- data/templates/shared/gitignore.txt +2 -0
- data/templates/shared/jshintrc.txt +24 -0
- data/templates/shared/package.json.erb +19 -0
- data/templates/shared/template.php.erb +180 -0
- metadata +229 -0
@@ -0,0 +1,82 @@
|
|
1
|
+
# Theme partials
|
2
|
+
|
3
|
+
|
4
|
+
## Intro to Sass partials
|
5
|
+
|
6
|
+
This directory contains includes known as [Sass partials](http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#partials). Like PHP, Sass can
|
7
|
+
"include" files and incorporate them into a larger master file. You can easily
|
8
|
+
identify a Sass partial because it begins with an underscore, indicating to Sass
|
9
|
+
that it should not generate a standalone .css file from the original .scss
|
10
|
+
|
11
|
+
Beyond that there are no enforced rules. It's up to each team to decide how
|
12
|
+
they're used.
|
13
|
+
|
14
|
+
|
15
|
+
## How does this theme use partials?
|
16
|
+
|
17
|
+
We incorporated the use of Sass partials and the [nesting](http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#nested_rules) architecture that Sass
|
18
|
+
provides to provide a more human-understandable organization to the CSS files.
|
19
|
+
|
20
|
+
We've also leveraged the respond-to Sass extension, which allows us to embed
|
21
|
+
rules involving media queries directly into each component rather than relying
|
22
|
+
on the extremely encumbering method of grouping styles per media query.
|
23
|
+
|
24
|
+
We have set up the CSS so that each file represents a component of the website.
|
25
|
+
If you are making changes to the Funding section, the styles belong in the
|
26
|
+
funding partial. If a style should be applied sitewide then place it in one of
|
27
|
+
the global partials.
|
28
|
+
|
29
|
+
**Example**
|
30
|
+
|
31
|
+
*Writing this Sass...*
|
32
|
+
|
33
|
+
#block-views-myview {
|
34
|
+
padding: 1em;
|
35
|
+
|
36
|
+
h2 {
|
37
|
+
font-size: 2em;
|
38
|
+
color: #fff;
|
39
|
+
}
|
40
|
+
|
41
|
+
p {
|
42
|
+
line-height: 2em;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
46
|
+
*Produces this CSS...*
|
47
|
+
|
48
|
+
#block-views-myview {
|
49
|
+
padding: 1em;
|
50
|
+
}
|
51
|
+
|
52
|
+
#block-views-myview h2 {
|
53
|
+
font-size: 2em;
|
54
|
+
color: #ffffff;
|
55
|
+
}
|
56
|
+
|
57
|
+
#block-views-myview p {
|
58
|
+
line-height: 2em;
|
59
|
+
}
|
60
|
+
|
61
|
+
|
62
|
+
## Benefits
|
63
|
+
|
64
|
+
The files are organized into a pattern that humans understand, rather than having
|
65
|
+
to be trained to separate styles into layout/typography/brand, or having to jump
|
66
|
+
between three media queries in order to consistently apply a change to an element
|
67
|
+
that changes appearance between mobile/tablet/desktop.
|
68
|
+
|
69
|
+
You can choose to stop using Sass at any time since it generates pure CSS files
|
70
|
+
each time you save a .scss file. See drawbacks before proceeding.
|
71
|
+
|
72
|
+
Finally, a nice side effect is that code split amongst many files makes merging,
|
73
|
+
collaborating and dealing with version control less painful.
|
74
|
+
|
75
|
+
|
76
|
+
## Drawbacks
|
77
|
+
|
78
|
+
If a team is unable or unwilling to use Sass and Compass, the .css files are
|
79
|
+
editable, but you cannot switch back to Sass once you switch to CSS. Technically
|
80
|
+
it is possible, but it will be a *HUGE* pain to get SCSS back in sync with CSS.
|
81
|
+
|
82
|
+
Besides, once you try Sass you will not want to go back :)
|
@@ -0,0 +1,77 @@
|
|
1
|
+
ABOUT SASS AND COMPASS
|
2
|
+
----------------------
|
3
|
+
|
4
|
+
Sass is a language that is just normal CSS plus some extra features, like
|
5
|
+
variables, nested rules, math, mixins, etc. If your stylesheets are written in
|
6
|
+
Sass, helper applications can convert them to standard CSS so that you can
|
7
|
+
include the CSS in the normal ways with your theme.
|
8
|
+
|
9
|
+
[Learn more about Sass](http://sass-lang.com)
|
10
|
+
|
11
|
+
Compass is a helper library for Sass. It includes libraries of shared mixins, a
|
12
|
+
package manager to add additional extension libraries, and an executable that
|
13
|
+
can easily convert Sass files into CSS.
|
14
|
+
|
15
|
+
[Learn more about Compass](http://compass-style.org)
|
16
|
+
|
17
|
+
HANDLING DEPENDENCIES
|
18
|
+
---------------------
|
19
|
+
|
20
|
+
Dependencies in Ruby are best handled by [Bundler](http://gembundler.com/). Bundler works by having you define a `Gemfile` of dependent gems and their version numbers, allowing you to ensure that the correct version of all of your gems are used. New Aurora subthemes come with a `Gemfile`, but if you do not have one already, you can create one yourself. Here is the contents of the `Gemfile` supplied by the current version of Aurora.
|
21
|
+
|
22
|
+
`# Pull gems from RubyGems
|
23
|
+
source 'https://rubygems.org'
|
24
|
+
# ~> Refers to all versions of the given gem on the current full version number, so it will be able to use any version of Compass Aurora until Compass Aurora 4.x.x. For a specific version of a gem, remove the ~>
|
25
|
+
gem 'compass-aurora', '~>3.0.0'
|
26
|
+
gem 'toolkit', '~>1.0.0'
|
27
|
+
gem 'singularitygs', '~>1.0.7'
|
28
|
+
gem 'breakpoint', '~>2.0.2'
|
29
|
+
gem 'sassy-buttons', '~>0.1.4'
|
30
|
+
gem 'compass-normalize', '~>1.4.3'`
|
31
|
+
|
32
|
+
These are the version numbers of these gems needed for Aurora 3.x. If you are using older versions of these gems, or require older versions of these gems, please change them to the versions you need. To see what versions of the gems you have installed, enter either `gem list` in the command line to see a list of all gems and their versions, or `gem list {name}` to see the list of versions for the named gem.
|
33
|
+
|
34
|
+
Once you have your `Gemfile` written, you need to install the gems so you can use them. To do so, in the command line, type the following:
|
35
|
+
|
36
|
+
`bundle install`
|
37
|
+
|
38
|
+
This will create a `Gemfile.lock` file with all relevant dependencies which should be committed into your version control.
|
39
|
+
|
40
|
+
|
41
|
+
DEVELOPING WITH SASS AND COMPASS
|
42
|
+
--------------------------------
|
43
|
+
|
44
|
+
To automatically generate the CSS versions of the scss while you are doing theme
|
45
|
+
development, you'll need to tell Compass to "watch" the sass directory so that
|
46
|
+
any time a .scss file is changed it will automatically place a generated CSS
|
47
|
+
file into your sub-theme's css directory:
|
48
|
+
|
49
|
+
`bundle exec compass watch <path to your sub-theme's directory>`
|
50
|
+
|
51
|
+
If you are already in the root of your sub-theme's directory, you can simply
|
52
|
+
type: `bundle exec compass watch`
|
53
|
+
|
54
|
+
While using generated CSS with your browser's inspectors, the line numbers it reports will be
|
55
|
+
wrong since it will be showing the generated CSS file's line numbers and not the
|
56
|
+
line numbers of the source Sass files. By default, Compass will output a comment with what line and what partial the CSS is comming from above the selector. This is useful if you're looking at your CSS file itself, but not as useful if you're trying to debug straight from your inspector. If you'd like to debug straight from your inspector, there are two options, one for Google Chrome and one for Firefox.
|
57
|
+
|
58
|
+
If you are using Firefox, you can install the [FireSass](https://addons.mozilla.org/en-US/firefox/addon/firesass-for-firebug/) plug-in into Firefox. Then, edit your sub-theme's config.rb file so Firesass is true (`firesass = true`) and make sure that `sass_options = :debug_info => true` is enabled (in the example config.rb file, there's a check for whether you're on the development environment). If you are using Google Chrome, make sure the Debug Info is enabled as well, go to `about://flags`, Enable Developer Tools experiments, restart Chrome, open your inspector, click settings (the gear on the bottom right), open experiments, and check Support for Sass.
|
59
|
+
|
60
|
+
|
61
|
+
MOVING YOUR CSS TO PRODUCTION
|
62
|
+
-----------------------------
|
63
|
+
|
64
|
+
Once you have finished your sub-theme development and are ready to move your CSS
|
65
|
+
files to your production server, you'll need to tell sass to update all your CSS
|
66
|
+
files and to compress them (to improve performance). Note: the Compass command
|
67
|
+
will only generate CSS for .scss files that have recently changed; in order to
|
68
|
+
force it to regenerate all the CSS files, you can use the Compass' clean command
|
69
|
+
to delete all the generated CSS files.
|
70
|
+
|
71
|
+
- Delete all CSS files by running: `compass clean`
|
72
|
+
- Edit the config.rb file in your theme's directory and uncomment this line by
|
73
|
+
deleting the "#" from the beginnning:
|
74
|
+
`#environment = :production`
|
75
|
+
- Regenerate all the CSS files by running: `compass compile`
|
76
|
+
|
77
|
+
And don't forget to turn on Drupal's CSS aggregation. :-)
|
@@ -0,0 +1,22 @@
|
|
1
|
+
////////////////////////
|
2
|
+
// Extendables Partials
|
3
|
+
//
|
4
|
+
// All of your extendable classes, ids, and placeholder extendables
|
5
|
+
// should go in this file.
|
6
|
+
////////////////////////
|
7
|
+
|
8
|
+
.clearfix {
|
9
|
+
@if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
|
10
|
+
*zoom: 1;
|
11
|
+
}
|
12
|
+
|
13
|
+
&:before,
|
14
|
+
&:after {
|
15
|
+
display: table;
|
16
|
+
content: "";
|
17
|
+
}
|
18
|
+
|
19
|
+
&:after {
|
20
|
+
clear: both;
|
21
|
+
}
|
22
|
+
}
|
@@ -0,0 +1,69 @@
|
|
1
|
+
<% project_name = File.basename(Compass.configuration.project_path) %><% project_js = Compass.configuration.javascripts_dir %><% project_css = Compass.configuration.css_dir %>name = <%= project_name %>
|
2
|
+
description = <%= project_name %> theme based on the Aurora base theme.
|
3
|
+
core = 7.x
|
4
|
+
base theme = aurora
|
5
|
+
|
6
|
+
; ========================================
|
7
|
+
; Regions
|
8
|
+
; ========================================
|
9
|
+
|
10
|
+
regions[header] = 'Header'
|
11
|
+
regions[main_prefix] = 'Main Region Prefix'
|
12
|
+
regions[content] = 'Main Region'
|
13
|
+
regions[main_suffix] = 'Main Region Suffix'
|
14
|
+
regions[footer] = 'Footer'
|
15
|
+
|
16
|
+
; ========================================
|
17
|
+
; Stylesheets
|
18
|
+
; ========================================
|
19
|
+
|
20
|
+
stylesheets[all][] = '<%= project_css %>/style.css'
|
21
|
+
stylesheets[print][] = '<%= project_css %>/print.css'
|
22
|
+
|
23
|
+
; If installed through Bower
|
24
|
+
; stylesheets[all][] = 'components/formalize/assets/css/formalize.css'
|
25
|
+
|
26
|
+
; ========================================
|
27
|
+
; Scripts
|
28
|
+
; ========================================
|
29
|
+
|
30
|
+
; If installed through Bower
|
31
|
+
; scripts[] = 'components/formalize/assets/js/jquery.formalize.min.js'
|
32
|
+
|
33
|
+
; ========================================
|
34
|
+
; Modernizr
|
35
|
+
; ========================================
|
36
|
+
|
37
|
+
modernizr[tests][] = css_boxsizing
|
38
|
+
|
39
|
+
; ========================================
|
40
|
+
; Settings
|
41
|
+
; ========================================
|
42
|
+
|
43
|
+
settings[toggle_node_user_picture] = '1'
|
44
|
+
settings[toggle_comment_user_picture] = '1'
|
45
|
+
settings[toggle_comment_user_verification] = '1'
|
46
|
+
settings[default_logo] = '1'
|
47
|
+
settings[logo_path] = ''
|
48
|
+
settings[logo_upload] = ''
|
49
|
+
settings[default_favicon] = '1'
|
50
|
+
settings[favicon_path] = ''
|
51
|
+
settings[favicon_upload] = ''
|
52
|
+
settings[hide_recomended_modules] = '0'
|
53
|
+
settings[aurora_enable_chrome_frame] = '1'
|
54
|
+
settings[aurora_min_ie_support] = '10'
|
55
|
+
settings[aurora_html_tags] = '1'
|
56
|
+
settings[aurora_typekit_id] = '0'
|
57
|
+
settings[aurora_livereload] = '0'
|
58
|
+
settings[magic_embedded_mqs] = '0'
|
59
|
+
settings[magic_css_excludes] = ''
|
60
|
+
settings[magic_footer_js] = '0'
|
61
|
+
settings[magic_library_head] = '0'
|
62
|
+
settings[magic_experimental_js] = '0'
|
63
|
+
settings[magic_js_excludes] = ''
|
64
|
+
settings[magic_rebuild_registry] = '0'
|
65
|
+
settings[magic_viewport_indicator] = '0'
|
66
|
+
settings[magic_modernizr_debug] = '0'
|
67
|
+
settings[magic_performance__active_tab] = 'edit-dev'
|
68
|
+
settings[magic_css_excludes_regex] = ''
|
69
|
+
settings[magic_js_excludes_regex] = ''
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<% project_name = File.basename(Compass.configuration.project_path) %><% project_js = Compass.configuration.javascripts_dir %><% project_css = Compass.configuration.css_dir %>{
|
2
|
+
"name": "<%= project_name%>",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"dependencies": {
|
5
|
+
"formalize": "git://github.com/nathansmith/formalize"
|
6
|
+
},
|
7
|
+
"devDependencies": {}
|
8
|
+
}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<% project_name = File.basename(Compass.configuration.project_path) %><% project_js = Compass.configuration.javascripts_dir %><% project_css = Compass.configuration.css_dir %><% project_sass = Compass.configuration.sass_dir %><% project_img = Compass.configuration.images_dir %><% project_fonts = Compass.configuration.fonts_dir %># Require any additional compass plugins here.
|
2
|
+
require 'aurora-os'
|
3
|
+
|
4
|
+
# Set this to the root of your project when deployed:
|
5
|
+
http_path = "/sites/all/themes/<%= project_name %>"
|
6
|
+
css_dir = "<%= project_css %>"
|
7
|
+
sass_dir = "<%= project_sass %>"
|
8
|
+
images_dir = "<%= project_img %>"
|
9
|
+
javascripts_dir = "<%= project_js %>"
|
10
|
+
fonts_dir = "<%= project_fonts %>"
|
11
|
+
|
12
|
+
# Change this to :production when ready to deploy the CSS to the live server.
|
13
|
+
# Note: If you are using grunt.js, these variables will be overriden.
|
14
|
+
environment = :development
|
15
|
+
#environment = :production
|
16
|
+
|
17
|
+
# To enable relative paths to assets via compass helper functions. Since Drupal themes can be installed in multiple locations, we shouldn't need to worry about the absolute path to the theme from the server root.
|
18
|
+
relative_assets = true
|
19
|
+
|
20
|
+
# To enable debugging comments that display the original location of your selectors. Comment:
|
21
|
+
line_comments = false
|
22
|
+
|
23
|
+
# In development, we can turn on the debug_info to use with FireSass or Chrome Web Inspector. Uncomment:
|
24
|
+
# debug = true
|
25
|
+
|
26
|
+
|
27
|
+
##############################
|
28
|
+
## You probably don't need to edit anything below this.
|
29
|
+
##############################
|
30
|
+
|
31
|
+
# Disable cache busting on image assets
|
32
|
+
asset_cache_buster :none
|
33
|
+
|
34
|
+
# You can select your preferred output style here (can be overridden via the command line):
|
35
|
+
# output_style = :expanded or :nested or :compact or :compressed
|
36
|
+
output_style = (environment == :development) ? :expanded : :compressed
|
37
|
+
|
38
|
+
# Pass options to sass. For development, we turn on the FireSass-compatible
|
39
|
+
# debug_info if the debug config variable above is true.
|
40
|
+
sass_options = (environment == :development && debug == true) ? {:debug_info => true} : {}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# EditorConfig helps developers define and maintain consistent
|
2
|
+
# coding styles between different editors and IDEs
|
3
|
+
# editorconfig.org
|
4
|
+
|
5
|
+
root = true
|
6
|
+
|
7
|
+
|
8
|
+
[*]
|
9
|
+
|
10
|
+
# Change these settings to your own preference
|
11
|
+
indent_style = space
|
12
|
+
indent_size = 2
|
13
|
+
|
14
|
+
# We recommend you to keep these unchanged
|
15
|
+
end_of_line = lf
|
16
|
+
charset = utf-8
|
17
|
+
trim_trailing_whitespace = true
|
18
|
+
insert_final_newline = true
|
19
|
+
|
20
|
+
[*.md]
|
21
|
+
trim_trailing_whitespace = false
|
@@ -0,0 +1,24 @@
|
|
1
|
+
{
|
2
|
+
"browser": true,
|
3
|
+
"bitwise": true,
|
4
|
+
"devel": true,
|
5
|
+
"curly": true,
|
6
|
+
"eqeqeq": true,
|
7
|
+
"forin": true,
|
8
|
+
"immed": true,
|
9
|
+
"indent": 2,
|
10
|
+
"jquery": true,
|
11
|
+
"latedef": true,
|
12
|
+
"newcap": true,
|
13
|
+
"noarg": true,
|
14
|
+
"quotmark": true,
|
15
|
+
"regexp": true,
|
16
|
+
"undef": true,
|
17
|
+
"unused": true,
|
18
|
+
"trailing": true,
|
19
|
+
"smarttabs": true,
|
20
|
+
"predef": [
|
21
|
+
"Drupal",
|
22
|
+
"Modernizr"
|
23
|
+
]
|
24
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<% project_name = File.basename(Compass.configuration.project_path) %><% project_js = Compass.configuration.javascripts_dir %><% project_css = Compass.configuration.css_dir %>{
|
2
|
+
"name": "<%= project_name%>",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"dependencies": {},
|
5
|
+
"devDependencies": {
|
6
|
+
"grunt": "~0.4.0",
|
7
|
+
"grunt-contrib-watch": "~0.4.3",
|
8
|
+
"grunt-contrib-compass": "~0.2.0",
|
9
|
+
"grunt-contrib-jshint": "~0.1.1",
|
10
|
+
"grunt-contrib-uglify": "~0.2.0",
|
11
|
+
"grunt-contrib-imagemin": "~0.1.4",
|
12
|
+
"grunt-parallel": "~0.1.0",
|
13
|
+
"grunt-svgmin": "~0.1.0",
|
14
|
+
"grunt-contrib-copy": "~0.4.1"
|
15
|
+
},
|
16
|
+
"engines": {
|
17
|
+
"node": ">=0.8.0"
|
18
|
+
}
|
19
|
+
}
|
@@ -0,0 +1,180 @@
|
|
1
|
+
<% project_name = File.basename(Compass.configuration.project_path) %><% project_js = Compass.configuration.javascripts_dir %><% project_css = Compass.configuration.css_dir %><?php
|
2
|
+
|
3
|
+
/**
|
4
|
+
* Override or insert variables into the maintenance page template.
|
5
|
+
*
|
6
|
+
* @param $vars
|
7
|
+
* An array of variables to pass to the theme template.
|
8
|
+
* @param $hook
|
9
|
+
* The name of the template being rendered ("maintenance_page" in this case.)
|
10
|
+
*/
|
11
|
+
function <%= project_name %>_preprocess_maintenance_page(&$vars, $hook) {
|
12
|
+
// When a variable is manipulated or added in preprocess_html or
|
13
|
+
// preprocess_page, that same work is probably needed for the maintenance page
|
14
|
+
// as well, so we can just re-use those functions to do that work here.
|
15
|
+
// <%= project_name %>_preprocess_html($variables, $hook);
|
16
|
+
// <%= project_name %>_preprocess_page($variables, $hook);
|
17
|
+
|
18
|
+
// This preprocessor will also be used if the db is inactive. To ensure your
|
19
|
+
// theme is used, add the following line to your settings.php file:
|
20
|
+
// $conf['maintenance_theme'] = '<%= project_name %>';
|
21
|
+
// Also, check $vars['db_is_active'] before doing any db queries.
|
22
|
+
}
|
23
|
+
|
24
|
+
/**
|
25
|
+
* Implements hook_modernizr_load_alter().
|
26
|
+
*
|
27
|
+
* @return
|
28
|
+
* An array to be output as yepnope testObjects.
|
29
|
+
*/
|
30
|
+
/* -- Delete this line if you want to use this function
|
31
|
+
function <%= project_name %>_modernizr_load_alter(&$load) {
|
32
|
+
|
33
|
+
}
|
34
|
+
|
35
|
+
/**
|
36
|
+
* Implements hook_preprocess_html()
|
37
|
+
*
|
38
|
+
* @param $vars
|
39
|
+
* An array of variables to pass to the theme template.
|
40
|
+
* @param $hook
|
41
|
+
* The name of the template being rendered ("html" in this case.)
|
42
|
+
*/
|
43
|
+
/* -- Delete this line if you want to use this function
|
44
|
+
function <%= project_name %>_preprocess_html(&$vars) {
|
45
|
+
|
46
|
+
}
|
47
|
+
|
48
|
+
/**
|
49
|
+
* Override or insert variables into the page template.
|
50
|
+
*
|
51
|
+
* @param $vars
|
52
|
+
* An array of variables to pass to the theme template.
|
53
|
+
* @param $hook
|
54
|
+
* The name of the template being rendered ("page" in this case.)
|
55
|
+
*/
|
56
|
+
/* -- Delete this line if you want to use this function
|
57
|
+
function <%= project_name %>_preprocess_page(&$vars) {
|
58
|
+
|
59
|
+
}
|
60
|
+
|
61
|
+
/**
|
62
|
+
* Override or insert variables into the region templates.
|
63
|
+
*
|
64
|
+
* @param $vars
|
65
|
+
* An array of variables to pass to the theme template.
|
66
|
+
* @param $hook
|
67
|
+
* The name of the template being rendered ("region" in this case.)
|
68
|
+
*/
|
69
|
+
/* -- Delete this line if you want to use this function
|
70
|
+
function <%= project_name %>_preprocess_region(&$vars, $hook) {
|
71
|
+
|
72
|
+
}
|
73
|
+
// */
|
74
|
+
|
75
|
+
/**
|
76
|
+
* Override or insert variables into the block templates.
|
77
|
+
*
|
78
|
+
* @param $vars
|
79
|
+
* An array of variables to pass to the theme template.
|
80
|
+
* @param $hook
|
81
|
+
* The name of the template being rendered ("block" in this case.)
|
82
|
+
*/
|
83
|
+
/* -- Delete this line if you want to use this function
|
84
|
+
function <%= project_name %>_preprocess_block(&$vars, $hook) {
|
85
|
+
|
86
|
+
}
|
87
|
+
// */
|
88
|
+
|
89
|
+
/**
|
90
|
+
* Override or insert variables into the entity template.
|
91
|
+
*
|
92
|
+
* @param $vars
|
93
|
+
* An array of variables to pass to the theme template.
|
94
|
+
* @param $hook
|
95
|
+
* The name of the template being rendered ("entity" in this case.)
|
96
|
+
*/
|
97
|
+
/* -- Delete this line if you want to use this function
|
98
|
+
function <%= project_name %>_preprocess_entity(&$vars, $hook) {
|
99
|
+
|
100
|
+
}
|
101
|
+
// */
|
102
|
+
|
103
|
+
/**
|
104
|
+
* Override or insert variables into the node template.
|
105
|
+
*
|
106
|
+
* @param $vars
|
107
|
+
* An array of variables to pass to the theme template.
|
108
|
+
* @param $hook
|
109
|
+
* The name of the template being rendered ("node" in this case.)
|
110
|
+
*/
|
111
|
+
/* -- Delete this line if you want to use this function
|
112
|
+
function <%= project_name %>_preprocess_node(&$vars, $hook) {
|
113
|
+
$node = $vars['node'];
|
114
|
+
}
|
115
|
+
// */
|
116
|
+
|
117
|
+
/**
|
118
|
+
* Override or insert variables into the field template.
|
119
|
+
*
|
120
|
+
* @param $vars
|
121
|
+
* An array of variables to pass to the theme template.
|
122
|
+
* @param $hook
|
123
|
+
* The name of the template being rendered ("field" in this case.)
|
124
|
+
*/
|
125
|
+
/* -- Delete this line if you want to use this function
|
126
|
+
function <%= project_name %>_preprocess_field(&$vars, $hook) {
|
127
|
+
|
128
|
+
}
|
129
|
+
// */
|
130
|
+
|
131
|
+
/**
|
132
|
+
* Override or insert variables into the comment template.
|
133
|
+
*
|
134
|
+
* @param $vars
|
135
|
+
* An array of variables to pass to the theme template.
|
136
|
+
* @param $hook
|
137
|
+
* The name of the template being rendered ("comment" in this case.)
|
138
|
+
*/
|
139
|
+
/* -- Delete this line if you want to use this function
|
140
|
+
function <%= project_name %>_preprocess_comment(&$vars, $hook) {
|
141
|
+
$comment = $vars['comment'];
|
142
|
+
}
|
143
|
+
// */
|
144
|
+
|
145
|
+
/**
|
146
|
+
* Override or insert variables into the views template.
|
147
|
+
*
|
148
|
+
* @param $vars
|
149
|
+
* An array of variables to pass to the theme template.
|
150
|
+
*/
|
151
|
+
/* -- Delete this line if you want to use this function
|
152
|
+
function <%= project_name %>_preprocess_views_view(&$vars) {
|
153
|
+
$view = $vars['view'];
|
154
|
+
}
|
155
|
+
// */
|
156
|
+
|
157
|
+
|
158
|
+
/**
|
159
|
+
* Override or insert css on the site.
|
160
|
+
*
|
161
|
+
* @param $css
|
162
|
+
* An array of all CSS items being requested on the page.
|
163
|
+
*/
|
164
|
+
/* -- Delete this line if you want to use this function
|
165
|
+
function <%= project_name %>_css_alter(&$css) {
|
166
|
+
|
167
|
+
}
|
168
|
+
// */
|
169
|
+
|
170
|
+
/**
|
171
|
+
* Override or insert javascript on the site.
|
172
|
+
*
|
173
|
+
* @param $js
|
174
|
+
* An array of all JavaScript being presented on the page.
|
175
|
+
*/
|
176
|
+
/* -- Delete this line if you want to use this function
|
177
|
+
function <%= project_name %>_js_alter(&$js) {
|
178
|
+
|
179
|
+
}
|
180
|
+
// */
|