relevance / pretty_buttons

Makes uniform buttons and links that look like buttons easier

This URL has Read+Write access

gdagley (author)
Thu May 01 20:06:29 -0700 2008
commit  ad6290df9a04657cb6d29dcbc08594f15b4391b7
tree    c377562ba94c8bcb1f7733eb08d4154c7fb787ac
parent  5fb1e04a7b7e3181215a6777a9e0db7159113636
pretty_buttons / README
100644 38 lines (27 sloc) 1.082 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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