Sha256: c5c4ab23c086516a199ff99e3637a780fa9acab79069641adfbfc56e7bcc65a0

Contents?: true

Size: 1.51 KB

Versions: 5

Compression:

Stored size: 1.51 KB

Contents

module FabulatorTags
  include Radiant::Taggable

  class TagError < StandardError; end

  mattr_accessor :theme_for_this_page

  desc %{
  }
  tag 'fabulator' do |tag|
    tag.expand
  end

  desc %{
    Adds links to the javascript and css for jquery.
  }
  tag 'fabulator:resources' do |tag|
    theme = tag.attr['theme'] || 'coal'
    FabulatorTags.theme_for_this_page = theme
    ret = %{
    <link rel="stylesheet" href="/stylesheets/fabulator/css/fss-reset.css" />
    <link rel="stylesheet" href="/stylesheets/fabulator/css/fss-layout.css" />
    <link rel="stylesheet" href="/stylesheets/fabulator/css/fss-text.css" />
    <link rel="stylesheet" href="/stylesheets/fabulator/css/fss-theme-#{theme}.css" />
    <link rel="stylesheet" href="/stylesheets/fabulator/css/smoothness/jquery-ui-1.8.5.custom.css" />
    <link rel="stylesheet" href="/stylesheets/fabulator/core.css" />
    }

    FabulatorExtension.css.each do |c|
      ret += %{<link rel="stylesheet" href="/stylesheets/#{c}" />}
    end

    ret += %{
    <script src="/javascripts/fabulator/InfusionAll.js" type="text/javascript"></script>
    <script src="/javascripts/fabulator/jquery-ui-1.8.5.custom.min.js" type="text/javascript"></script>
    <script src="/javascripts/fabulator/jquery.tools.min.js" type="text/javascript"></script>
    <script src="/javascripts/fabulator/core.js" type="text/javascript"></script>
    }

    FabulatorExtension.scripts.each do |c|
      ret += %{<script src="/javascripts/#{c}" type="text/javascript"></script>}
    end

    ret
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
radiant-fabulator-extension-0.0.10 app/models/fabulator_tags.rb
radiant-fabulator-extension-0.0.9 app/models/fabulator_tags.rb
radiant-fabulator-extension-0.0.8 app/models/fabulator_tags.rb
radiant-fabulator-extension-0.0.7 app/models/fabulator_tags.rb
radiant-fabulator-extension-0.0.6 app/models/fabulator_tags.rb