Structure of the Spartan Base Theme

We recommend that you use Spartan to sub-theme, since Spartan includes some default styles for our custom functionality that make it faster to subtheme. Because of this recommendation, it is useful to explain the structure of the spartan folder. You will never be modifying any files in this base theme directly since you should always create a sub-theme instead but your sub-theme will most probably have similar structure.  You may often find yourself looking in the spartan folder for reference. The following screenshot illustrates the structure of the files folders in the theme.

  • css folder contains files for all cascading style sheets. Spartan has the ability to determine the width of the browser and responds accordingly. Styles are inherited from one layer to the next.
    • global.css = global – Bottommost layer and if not overwritten, it will have all of its styles inherited by all of the other CSS layers.
    • spartan-alpha-default.css = default
    • spartan-alpha-default-fluid.css = narrow
    • spartan-alpha-default-normal.css = normal
  • img folder contains image elements used in the theme. It is further divided into: 'admin', 'banners', 'buttons', and 'icons' sub-folders.
  • preprocess folder allows you to easily store and organize your preprocess functions
  • process folder allows you to easily store and organize your process functions
  • templates contains tpl files for the various nodes and regions on your site
  • logo.png and logo-sm.png are the logo image that gets placed in the header and footer of the theme
  • openomega.info declares basic information about the theme (it is discussed in more detail on the "Your First OpenPublic Subtheme" page)
  • screenshot.png is a screenshot of a page in your theme to be displayed on the Appearance screen in the OpenPublic administration. For more information about this see: http://drupal.org/node/647754.
  • template.php contains PHP code to preprocess the content before it gets placed into the templates. This is useful if you need to alter your content in a more advanced way.

Documentation

Loading widget...
No files to show
{{node.name}}
({{node.children.length}})
{{node.date}}
{{node.modified}}
{{node.filesize}}
{{node.filename}}