Skip to content

towerhe/yeqs_sexybuttons

Repository files navigation

YeqsSexybuttons

This project rocks and uses MIT-LICENSE.

Installation

Install yeqs_sexybuttons as a gem and get it work with your rails 3 applications.

gem install yeqs_sexybuttons

Add yeqs_sexybuttons to your Gemfile.

gem 'yeqs_sexybuttons'

Generate the assets of yeqs_sexybuttons.

rails g yeqs:sexybuttons

Usage

Yeqs Sexybuttons provide a view helper to generate a sexybutton. First of all, your need to add a sexybuttons css to your layout.

<%= include_sexybuttons %>

this will produce html like:

<link type="text/css" media="screen" rel="stylesheet" href="/components/SexyButtons/sexybuttons.css" />

Generate a linkage.

<%= sexybutton('Google', 'http://www.google.com') do |b|
  b.color = 'orange'                # default is black
  b.image = 'google'                # optional
end %>

this will produce html like:

<a class="sexybutton sexysimple sexyorange" href="http://www.google.com"><span class="google">Google</span></a>

Generate a submit button.

<%= sexybutton('Simple Button') do |b|
   b.id = 'sbtn-id'
   b.style = 'custom'
   b.type = 'submit'
   b.color = 'orange'
   b.image = 'ok'
   b.html_options = { :rel => 'sbtn' }
 end %>

this will produce html like:

<button class="sexybutton sexysimple sexyorange custom" id="sbtn-id" rel="sbtn" type="submit"><span class="ok">Simple Button</span></button>

About

Wrapper of SexyButtons

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages