Skip to content

Instantly share code, notes, and snippets.

@alanhogan
Created December 13, 2013 18:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alanhogan/7948410 to your computer and use it in GitHub Desktop.
Save alanhogan/7948410 to your computer and use it in GitHub Desktop.
- title "#{@module_name} Module"
- desc = Descss.new @module_name
.l-max-readable-width.l-h-center.l-v-spaced
.txt
%header
%h1
Module info:
%code= @module_name
%p
%a{href: devtools_modules_path} ‹ All Modules
%h3 Description
= desc.documentation || "<em>No description provided.</em>".html_safe
- if desc.has_submodules?
.txt
%h3 Submodules
= desc.submodules.map {|sm| "<code>.#{h sm}</code>"}.join(", ").html_safe
- if desc.has_states?
.txt
%h3 States
= desc.states.map {|s| "<code>.#{h s}</code>"}.join(", ").html_safe
- if desc.has_example_html?
.txt
%h3 Example(s)
%h4 Visual
= desc.example_html
.txt
%h4 Haml
%pre.code= desc.example_haml
.txt
%h4 HTML
%pre.code= CGI::escape_html(desc.example_html).html_safe
- if desc.has_javascript?
.txt
%h3 JavaScript (for example)
%pre.code= CGI::escape_html(desc.javascript).html_safe
- content_for :stylesheet do
= stylesheet_link_tag "nri-modules/#{@module_name}"
- content_for :javascript do
= javascript_include_tag "nri-modules/#{@module_name}"
- if desc.has_javascript?
-content_for :javascript do
= desc.javascript
@alanhogan
Copy link
Author

screen shot
screen shot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment