This adds a "share this page" link to the bottom of the home page. With
javascript enabled, the link makes a new section appear at the bottom, with
links to share on many popular sites. Without javascript (so everything is on
one page) the "share this page" link scrolls you down to the bottom where the
share links are.
No icons were used. This is easy, fast, and there's no potential licensing or
trademark issues.
---
index.html | 14 ++++++++++++++
modern.js | 9 +++++++++
2 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/index.html b/index.html
index 954444f..1b8d290 100644
--- a/index.html
+++ b/index.html
@@ -30,6 +30,7 @@
<div class="chapter">
cmus is a small, <em>fast</em> and powerful console music player for Unix-like operating systems.
<img class="screenshot" alt="cmus screenshot" title="cmus' tree view" src="cmus-2.3.0.png" />
+ <p><a class="share-button" href="#share">Share This Page</a></p>
</div>
<h2 id="features">Features</h2>
@@ -163,6 +164,19 @@ make install</code></pre>
<li><a href="http://mikmod.raphnet.net/">libmikmod</a> (.mod, .s3m, ...)</li>
</ul>
</div>
+ <h2 id="share">Share This Page On:</h2>
+ <div class="chapter">
+ <ul>
+ <li><a href="http://identi.ca/index.php?action=newnotice&status_textarea=C%2a%20Music%20Player%3a%20http%3A%2F%2Fcmus.sourceforge.net%2F">Identi.ca</a></li>
+ <li><a href="http://del.icio.us/post?url=http%3A%2F%2Fcmus.sourceforge.net%2F&title=C%2a%20Music%20Player">Delicious</a></li>
+ <li><a href="http://digg.com/submit?phase=2&url=http%3A%2F%2Fcmus.sourceforge.net%2F&title=C%2a%20Music%20Player">Digg</a></li>
+ <li><a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fcmus.sourceforge.net%2F&title=C%2a%20Music%20Player">StubleUpon</a></li>
+ <li><a href="http://www.google.com/bookmarks/mark?op=add&bkmk=http%3A%2F%2Fcmus.sourceforge.net%2F&title=C%2a%20Music%20Player">Google</a></li>
+ <li><a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fcmus.sourceforge.net%2F&t=C%2a%20Music%20Player">Yahoo</a></li>
+ <li><a href="http://twitter.com/home?status=http%3A%2F%2Fcmus.sourceforge.net%2F">Twitter</a></li>
+ <li><a href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fcmus.sourceforge.net%2F&t=C%2a%20Music%20Player">Facebook</a></li>
+ </ol>
+ </div>
</div>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
diff --git a/modern.js b/modern.js
index 9acad27..0735b44 100644
--- a/modern.js
+++ b/modern.js
@@ -41,5 +41,14 @@ $(function() {
show_only(href.substring(1));
});
+ $('.share-button')
+ .attr('href', 'javascript:void(0)')
+ .click(function(e) {
+ e.preventDefault();
+
+ show_content('share');
+ });
+
+
show_only(location_id());
});
--
1.7.4.4