You can set options when you add the themes into your app. Otherwise, just put the symbol of the theme filename.
use Rack::DevMark::Middleware, [:title, Rack::DevMark::Theme::GithubForkRibbon.new(position: 'right')]
In config/application.rb
module MyApp
class Application < Rails::Application
config.rack_dev_mark.theme = [:title, Rack::DevMark::Theme::GithubForkRibbon.new(position: 'right')]
end
end
Insert the environment string into tags or attributes.
Rack::DevMark::Theme::Tag.new(attribute: 'data-title')
<div data-title="foo">foo</div>
will be <div data-title="(env) foo">foo</div>
Rack::DevMark::Theme::Tag.new(name: 'h1')
<h1>foo</h1>
will be <h1="foo">(env) foo</h1>
type
: prefix
(default) or postfix
upcase
: true
or false
(default)
name
: the name of tag to insert env
attribute
: the name of attribute to insert env
Subclass of tag theme specifically made for title tag. It just adds the environment string into the page title.
My Homepage
on development env will be (development) My Homepage
type
: prefix
(default) or postfix
upcase
: true
or false
(default)
"Fork Me on GitHub" like ribbon originally created by simonwhitaker
It shows a banner of the environment on the ribbon.
It also shows deployment revision and timestamp on the tooltip if available.
Click the banner to remove it temporarily.
position
: left (default), right, left-bottom, right-bottom
color
: red (default), orange, green, black
fixed
: true
or false
(default)