You are here

sassy_foundation.module in Sassy 7.3

File

sassy_foundation/sassy_foundation.module
View source
<?php

/**
 * Implements hook_sassy_resolve_path_NAMESPACE().
 */
function sassy_foundation_sassy_resolve_path_foundation($filename, $syntax = 'scss') {
  $path = drupal_get_path('module', 'sassy_foundation') . '/foundation/stylesheets/';
  $syn = '.css';
  $filename = str_replace(array(
    '.scss',
    '.sass',
    '.css',
  ), '', trim($filename, ' /._'));
  if ($filename == '*') {
    $filename == 'foundation';
  }
  $available = array(
    'foundation',
    'app',
    'forms',
    'globals',
    'grid',
    'ie',
    'mobile',
    'orbit',
    'reveal',
    'typography',
    'ui',
  );
  if (in_array($filename, $available)) {
    return $path . $filename . $syn;
  }
  $message = 'Sassy Foundation - unrecognised stylesheet "' . $filename . '" requested. ';
  $message .= 'Available files are: ' . implode(', ', $available);
  drupal_set_message($message, 'error');
  return FALSE;
}

/**
 * Implements hook_library().
 */
function sassy_foundation_library() {
  $path = drupal_get_path('module', 'sassy_foundation') . '/foundation/';
  return array(
    'foundation-orbit' => array(
      'title' => 'Foundation Orbit',
      'version' => '1.3.0',
      'website' => 'http://foundation.zurb.com/docs/orbit.php',
      'js' => array(
        $path . 'javascripts/jquery.orbit-1.3.0.js',
      ),
      'css' => array(
        $path . 'stylesheets/orbit.css',
      ),
    ),
    'foundation-reveal' => array(
      'title' => 'Foundation Reveal',
      'version' => '2.0.3',
      'website' => 'http://foundation.zurb.com/docs/reveal.php',
      'js' => array(
        $path . 'javascripts/jquery.reveal.js',
      ),
      'css' => array(
        $path . 'stylesheets/reveal.css',
      ),
    ),
  );
}