Sha256: 057f34c7ffc5f5ebd1795eab353af8911e69187ec7a2205881bbec50c270f0e7
Contents?: true
Size: 726 Bytes
Versions: 2
Compression:
Stored size: 726 Bytes
Contents
# Thanks to https://github.com/simonwhitaker/github-fork-ribbon-css require 'rack/dev-mark/theme/base' module Rack module DevMark module Theme class GithubForkRibbon < Base def insert_into(html, env, revision) s = <<-EOS #{stylesheet_link_tag "github-fork-ribbon-css/gh-fork-ribbon.css"} <!--[if lt IE 9]> #{stylesheet_link_tag "github-fork-ribbon-css/gh-fork-ribbon.ie.css"} <![endif]--> <div class="github-fork-ribbon-wrapper left" onClick="this.style.display='none'" title="#{revision}"><div class="github-fork-ribbon"><span class="github-fork-ribbon-text">#{env}</span></div></div> EOS html.sub %r{(<body[^>]*>)}i, "\\1#{s.strip}" end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rack-dev-mark-0.1.2 | lib/rack/dev-mark/theme/github_fork_ribbon.rb |
rack-dev-mark-0.1.0 | lib/rack/dev-mark/theme/github_fork_ribbon.rb |