Added the link icons plugin from blueprint 0.8. To install this plugin:

compass -f blueprint -p link_icons
This commit is contained in:
Chris Eppstein 2009-04-05 03:14:47 -07:00
parent bed5fe3458
commit a5712edc3e
11 changed files with 67 additions and 0 deletions

View File

@ -0,0 +1,44 @@
=no-link-icon
:background transparent none !important
:padding 0 !important
:margin 0 !important
=link-icon-base
:padding 2px 22px 2px 0
:margin -2px 0
:background-repeat no-repeat
:background-position right center
=link-icon(!name, !include_base = true)
@if !include_base
+link-icon-base
:background-image= image_url("link_icons/#{!name}")
=link-icons
a[href^="http:"],
a[href^="mailto:"],
a[href^="http:"]:visited,
a[href$=".pdf"],
a[href$=".doc"],
a[href$=".xls"],
a[href$=".rss"],
a[href$=".rdf"],
a[href^="aim:"]
+link-icon-base
a[href^="http:"]
+link-icon("external.png", false)
a[href^="mailto:"]
+link-icon("email.png", false)
a[href^="http:"]:visited
+link-icon("visited.png", false)
a[href$=".pdf"]
+link-icon("pdf.png", false)
a[href$=".doc"]
+link-icon("doc.png", false)
a[href$=".xls"]
+link-icon("xls.png", false)
a[href$=".rss"],
a[href$=".rdf"]
+link-icon("feed.png", false)
a[href^="aim:"]
+link-icon("im.png", false)

View File

@ -0,0 +1,13 @@
@import blueprint/modules/link_icons.sass
// This turns link icons on for all links. You can change the scoping selector from
// body to something more specific if you prefer.
body
+link-icons
// Use this class if a link gets an icon when it shouldn't.
a.noicon
+no-link-icon
// Not all links have a url structure that can be detected,
// So you can set them explicitly yourself like so:
a#this-is-a-pdf-link
+link-icon("pdf.png")

Binary file not shown.

After

Width:  |  Height:  |  Size: 777 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 691 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 741 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 663 B

View File

@ -0,0 +1,10 @@
stylesheet "link_icons.sass", :media => 'screen, projection'
image 'link_icons/doc.png'
image 'link_icons/email.png'
image 'link_icons/external.png'
image 'link_icons/feed.png'
image 'link_icons/im.png'
image 'link_icons/pdf.png'
image 'link_icons/visited.png'
image 'link_icons/xls.png'