Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Shares cameras to Pinterest

  • Loading branch information...
commit 0237a27bf079e4caf63870ee17f190207fd7b010 1 parent 35dce68
@thiagocaiubi authored
View
3  public/stylesheets/style.css
@@ -9,3 +9,6 @@ body {
#cameras {
list-style:none;
}
+.social {
+ padding:10px 0;
+}
View
4 views/index.jade
@@ -20,4 +20,6 @@ ul#cameras
h5= camera.title
div
a(href=baseUrl+camera.image)
- img(src=baseUrl+camera.image, alt=camera.title, title=camera.title)
+ img(src=baseUrl + camera.image, alt=camera.title, title=camera.title)
+ div.social
+ a.pin-it-button(href='http://pinterest.com/pin/create/button/?url=reise.herokuapp.com&media=' + baseUrl + camera.image + '&description=' + camera.title) Pin It
View
1  views/layout.jade
@@ -32,6 +32,7 @@ html
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
+ include pinterest
body
div.navbar.navbar-fixed-top
div.navbar-inner
View
21 views/pinterest.jade
@@ -0,0 +1,21 @@
+script(type='text/javascript')
+ (function() {
+ window.PinIt = window.PinIt || { loaded:false };
+ if (window.PinIt.loaded) return;
+ window.PinIt.loaded = true;
+ function async_load(){
+ var s = document.createElement('script');
+ s.type = 'text/javascript';
+ s.async = true;
+ if (window.location.protocol == 'https:')
+ s.src = 'https://assets.pinterest.com/js/pinit.js';
+ else
+ s.src = 'http://assets.pinterest.com/js/pinit.js';
+ var x = document.getElementsByTagName('script')[0];
+ x.parentNode.insertBefore(s, x);
+ }
+ if (window.attachEvent)
+ window.attachEvent('onload', async_load);
+ else
+ window.addEventListener('load', async_load, false);
+ })();
Please sign in to comment.
Something went wrong with that request. Please try again.