| View previous topic :: View next topic |
| Author |
Message |
spasticdonkey Super Dev Donkey


Joined: May 08, 2009 Posts: 58
   votes: 1
|
Posted: Sun Jun 14, 2009 5:38 pm Post subject: CSS Sprites and Social Bookmarks |
|
|
Well first off, huge kudos to you for the work done here on the site! Awesome!
I've been playing with CSS sprites this afternoon and thought I would share something for social bookmark icons I came up with:
This method using css sprites only loads 2 images and allows for mouseover effects without javascript, just css
Here's the demo: http://rtsforce.com/bookmark-sprites.html
not sure if you are using nukeSEO sb for the social bookmarks, or if it is hard coded... so if you want to use that's cool, if not (or you cant), that's cool too
here's what i did for those who are curious:
images:
http://rtsforce.com/images/socialbookmarks/bookmark-sprites.gif
http://rtsforce.com/images/socialbookmarks/transparent.gif
CSS
Code: .socials {background:transparent url(../images/socialbookmarks/bookmark-sprites.gif);}
.bookmark {height:18px;}
.articleaction {height:18px;}
.blinklist img{width:18px; background-position:0 0;}
.delicious img{width:18px; background-position:-17px 0;}
.diggit img{width:18px; background-position:-34px 0;}
.stumble img{width:18px; background-position:-51px 0;}
.myspace img{width:18px; background-position:-68px 0;}
.reddit img{width:18px; background-position:-85px 0;}
.technorati img{width:18px; background-position:-102px 0;}
.facebook img{width:18px; background-position:-119px 0;}
.twitter img{width:18px; background-position:-136px 0;}
.printer img{width:17px; background-position:-153px 0;}
.emailer img{width:17px; background-position:-171px 0;}
.pdfer img{width:18px; background-position:-188px 0;}
.blinklist:hover img{width:18px; background-position:0 -18px;}
.delicious:hover img{width:18px; background-position:-17px -18px;}
.diggit:hover img{width:18px; background-position:-34px -18px;}
.stumble:hover img{width:18px; background-position:-51px -18px;}
.myspace:hover img{width:18px; background-position:-68px -18px;}
.reddit:hover img{width:18px; background-position:-85px -18px;}
.technorati:hover img{width:18px; background-position:-102px -18px;}
.facebook:hover img{width:18px; background-position:-119px -18px;}
.twitter:hover img{width:18px; background-position:-136px -18px;}
.printer:hover img{width:17px; background-position:-153px -18px;}
.emailer:hover img{width:17px; background-position:-171px -18px;}
.pdfer:hover img{width:18px; background-position:-188px -18px;}
|
and you can look at demo for the small html edits required... basically just adding a class to the link and replacing each image with a transparent gif and assigning it multiple classes:
Code:<a href="article-print-46.html" class="printer" style="text-decoration: none">
<img class="socials articleaction printer" src="images/socialbookmarks/transparent.gif" border="0" alt="Printer Friendly" title="header=[Printer Friendly]body=[]" style="margin-top: 8px;" /></a>
<a href="article-friend-46.html" class="emailer" style="text-decoration: none">
<img class="socials articleaction emailer" src="images/socialbookmarks/transparent.gif" border="0" alt="Send to a Friend" title="header=[Send to a Friend]body=[]" style="margin-top: 8px;" /></a>
<a target="_blank" href="article-printpdf-46.html" class="pdfer" style="text-decoration: none"><img class="socials articleaction pdfer" src="images/socialbookmarks/transparent.gif" border="0" alt="Save as PDF" title="header=[Save as PDF]body=[]" style="margin-top: 8px;" /></a>
|
and so on..... not exactly sure how i got off in this direction today... but oh well, all in good fun
the image may need tweaking, here,s the PSD file if desired
http://rtsforce.com/files/bookmark-sprites2.zip |
|
| Back to top |
|
 |
bobby Site Admin


Joined: Jan 20, 2009 Posts: 600 Location: North Carolina
    votes: 4
|
|
| Back to top |
|
 |
spasticdonkey Super Dev Donkey


Joined: May 08, 2009 Posts: 58
   votes: 1
|
|
| Back to top |
|
 |
bobby Site Admin


Joined: Jan 20, 2009 Posts: 600 Location: North Carolina
    votes: 4
|
|
| Back to top |
|
 |
spasticdonkey Super Dev Donkey


Joined: May 08, 2009 Posts: 58
   votes: 1
|
|
| Back to top |
|
 |
bobby Site Admin


Joined: Jan 20, 2009 Posts: 600 Location: North Carolina
    votes: 4
|
|
| Back to top |
|
 |
kguske Blingaholic


Joined: May 19, 2009 Posts: 24
   votes: 1
|
Posted: Sat Sep 11, 2010 4:59 pm Post subject: |
|
|
This is nice, but I found a couple of issues during testing.
First, a minor compliance issue in includes/nukeSEO_SB.php (and this could have been there from the beginning...):
Code:$bookmarks["google"] = array (
"siteurl" => "http://www.google.com/bookmarks/mark?op=edit&bkmk={MYNUKEURL}&title={MYNUKETITLE}",
"imgalt" => "header=[Google Bookmarks] body=[Bookmark and share this link with Google Bookmarks]",
"imgclass" => "google"
);
|
should be: Code:$bookmarks["google"] = array (
"siteurl" => "http://www.google.com/bookmarks/mark?op=edit&bkmk={MYNUKEURL}&title={MYNUKETITLE}",
"imgalt" => "header=[Google Bookmarks] body=[Bookmark and share this link with Google Bookmarks]",
"imgclass" => "google"
);
|
The other issue is trickier. When I click on some of the links (mainly those with titles), the title in the result includes a LOT more than just the title of the article. Haven't figured out why yet, but I'd sure like to do that so I can switch my sites to Tricked Out News with social sprites bookmarks...
Has anyone else seen this? _________________ nukeSEO(tm) |
|
| Back to top |
|
 |
bobby Site Admin


Joined: Jan 20, 2009 Posts: 600 Location: North Carolina
    votes: 4
|
|
| Back to top |
|
 |
kguske Blingaholic


Joined: May 19, 2009 Posts: 24
   votes: 1
|
|
| Back to top |
|
 |
bobby Site Admin


Joined: Jan 20, 2009 Posts: 600 Location: North Carolina
    votes: 4
|
|
| Back to top |
|
 |
neralex Regular


Joined: Nov 01, 2010 Posts: 15
  
|
|
| Back to top |
|
 |
bobby Site Admin


Joined: Jan 20, 2009 Posts: 600 Location: North Carolina
    votes: 4
|
|
| Back to top |
|
 |
neralex Regular


Joined: Nov 01, 2010 Posts: 15
  
|
|
| Back to top |
|
 |
neralex Regular


Joined: Nov 01, 2010 Posts: 15
  
|
|
| Back to top |
|
 |
Guardian Blingaholic


Joined: Nov 03, 2009 Posts: 22
  
|
|
| Back to top |
|
 |
|
|