aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2011-11-13 12:44:30 +0100
committerHarald Eilertsen <haraldei@anduin.net>2011-11-13 12:44:30 +0100
commita4d2b1dd343c2abde14843055c40a77e4cc7643b (patch)
treeaaa354bd8e6f7d2035ae9e401d2c57dc12c58272
parent2bc8b4ab03216c8ae169b0afa788420b55f4bc11 (diff)
downloadThrash-and-Burn-Tour-2012-Website-a4d2b1dd343c2abde14843055c40a77e4cc7643b.tar.gz
Thrash-and-Burn-Tour-2012-Website-a4d2b1dd343c2abde14843055c40a77e4cc7643b.tar.bz2
Thrash-and-Burn-Tour-2012-Website-a4d2b1dd343c2abde14843055c40a77e4cc7643b.zip
Add buttons for sharing on FB, Google+ and Delicious
-rw-r--r--src/_layouts/default.haml15
-rw-r--r--src/images/delicious-icon.pngbin0 -> 342 bytes
-rw-r--r--src/javascripts/facebook.js8
-rw-r--r--src/stylesheets/application.sass37
4 files changed, 58 insertions, 2 deletions
diff --git a/src/_layouts/default.haml b/src/_layouts/default.haml
index 4bc6d71..f2c2c65 100644
--- a/src/_layouts/default.haml
+++ b/src/_layouts/default.haml
@@ -4,5 +4,18 @@
%title Thrash and Burn Tour 2012
%meta{ :charset => 'UTF-8' }
= stylesheets
- %body
+ %script{ :type => "text/javascript", :src => "https://apis.google.com/js/plusone.js" }
+ %body
+ %div#fb-root
+ = javascripts('facebook')
= yield
+ %div#sharebar
+ %div#google_plus_button.sharebutton
+ = '<g:plusone href="http://thrash-and-burn.no"></g:plusone>'
+ %div#delicious_button.sharebutton
+ %div.icon
+ = img "delicious-icon.png", :alt => "Delicious"
+ %div.link
+ = link "Bookmark on Delicious", "http://www.delicious.com/save", :onclick => %q{window.open('http://www.delicious.com/save?v=5&noui&jump=close&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title), 'delicious','toolbar=no,width=550,height=550'); return false;}
+ %div#facebook_button.sharebutton
+ %div.fb-like{:data => { :href => "http://thrash-and-burn.no", :send => "false", :width => "450", :colorscheme => "dark", 'show-faces' => "false"}}
diff --git a/src/images/delicious-icon.png b/src/images/delicious-icon.png
new file mode 100644
index 0000000..2a10be2
--- /dev/null
+++ b/src/images/delicious-icon.png
Binary files differ
diff --git a/src/javascripts/facebook.js b/src/javascripts/facebook.js
new file mode 100644
index 0000000..f92c961
--- /dev/null
+++ b/src/javascripts/facebook.js
@@ -0,0 +1,8 @@
+(function(d, s, id) {
+ var js, fjs = d.getElementsByTagName(s)[0];
+ if (d.getElementById(id)) {return;}
+ js = d.createElement(s); js.id = id;
+ js.src = "https://connect.facebook.net/en_US/all.js#xfbml=1&appId=156503997720402";
+ fjs.parentNode.insertBefore(js, fjs);
+}(document, 'script', 'facebook-jssdk'));
+
diff --git a/src/stylesheets/application.sass b/src/stylesheets/application.sass
index 8541f20..711de1d 100644
--- a/src/stylesheets/application.sass
+++ b/src/stylesheets/application.sass
@@ -42,6 +42,7 @@ strong
#content
+content-pane
background-image: url('/images/content_background.jpg')
+ padding-bottom: 40px
#body
position: relative
top: 160px
@@ -61,4 +62,38 @@ strong
.intro
font-size: 105%
- font-weight: bolder \ No newline at end of file
+ font-weight: bolder
+
+$sharebar-height: 40px
+$button-height: $sharebar-height - 5px
+
+#sharebar
+ position: fixed
+ bottom: 0
+ left: 10%
+ right: 10%
+ height: $sharebar-height
+ border-top: 1px solid lightgray
+ font-size: 80%
+ background-color: rgba(0, 0, 0, 0.7)
+
+.sharebutton
+ display: inline-block
+ vertical-align: top
+ padding-top: 6px
+
+#facebook_button
+
+#delicious_button
+ padding-right: 3em
+ .icon
+ display: inline-block
+ height: $button-height
+ .link
+ display: inline-block
+ height: $button-height
+ padding-top: 3px
+ vertical-align: middle
+ font-size: 8pt
+
+#google_plus_button