public
Description: Makes uniform buttons and links that look like buttons easier
Clone URL: git://github.com/relevance/pretty_buttons.git
Search Repo:
name age message
folder MIT-LICENSE Fri Apr 11 10:03:03 -0700 2008 move from svn [gdagley]
folder README Fri Apr 11 10:03:03 -0700 2008 move from svn [gdagley]
folder Rakefile Fri Apr 11 10:03:03 -0700 2008 move from svn [gdagley]
folder init.rb Fri Apr 11 10:03:03 -0700 2008 move from svn [gdagley]
folder install.rb Fri Apr 11 10:03:03 -0700 2008 move from svn [gdagley]
folder lib/ Thu May 01 20:06:29 -0700 2008 allow buttons to be created without icons [gdagley]
folder public/ Fri Apr 11 10:03:03 -0700 2008 move from svn [gdagley]
folder tasks/ Fri Apr 11 10:03:03 -0700 2008 move from svn [gdagley]
folder test/ Thu May 01 20:06:29 -0700 2008 allow buttons to be created without icons [gdagley]
folder uninstall.rb Fri Apr 11 10:03:03 -0700 2008 move from svn [gdagley]
README
PrettyButtons
=============

 Based on the methods by Kevin Hale to create nice cross browser buttons.
 (see http://particletree.com/features/rediscovering-the-button-element)

<button type="submit" class="button positive">
  <img src="css/blueprint/plugins/buttons/icons/tick.png" alt=""/> Save
</button>

<a class="button" href="/password/reset/">
  <img src="css/blueprint/plugins/buttons/icons/key.png" alt=""/> Change Password
</a>

<a href="#" class="button negative">
  <img src="css/blueprint/plugins/buttons/icons/cross.png" alt=""/> Cancel
</a>


Example
=======

<p class="buttons">
  <%= pretty_positive_button "Create" %>
  <%= pretty_negative_button_link 'Cancel', posts_path %>
</p>

<p class="buttons">
  <%= pretty_button "Add Comment", "icons/comment.gif" %>
</p>

<p class="buttons">
  <%= pretty_button_link "Contact Us", contact_path, {:icon_path => "icons/contact.gif"} %>
</p>

Silk Icons from http://famfamfam.com/lab/icons/silk/, released under the Creative Commons Attribution 2.5 License
Copyright (c) 2008 Relevance, Inc., released under the MIT license