diff options
Diffstat (limited to 'site/public/assets')
| -rw-r--r-- | site/public/assets/javascripts/_env.js | 23 | ||||
| -rw-r--r-- | site/public/assets/style.css | 10 |
2 files changed, 27 insertions, 6 deletions
diff --git a/site/public/assets/javascripts/_env.js b/site/public/assets/javascripts/_env.js index ac155b3..c34787d 100644 --- a/site/public/assets/javascripts/_env.js +++ b/site/public/assets/javascripts/_env.js @@ -105,6 +105,8 @@ environment.ready = function(){ load_hash(page) }) + Share.init() + $(window).mousedown(function(e){ if (! menu_open) { controls.pause() @@ -492,4 +494,25 @@ function HustleLoader () { init() } +var Share = { + init: function(){ + $(document).on("click", ".fb", Share.facebook) + $(document).on("click", ".tw", Share.twitter) + }, + + facebook: function (e) { + e.preventDefault() + var link = window.location.href + var msg = $(".postname").html() + var url = "https://www.facebook.com/share.php?u=" + encodeURIComponent(link) + "&t=" + encodeURIComponent(msg) + window.open(url, "_blank") + }, + twitter: function (e) { + e.preventDefault() + var link = window.location.href + var msg = $(".postname").html() + var url = "https://twitter.com/home?status=" + encodeURIComponent(msg + " " + link) + window.open(url, "_blank") + }, +}
\ No newline at end of file diff --git a/site/public/assets/style.css b/site/public/assets/style.css index e5a3404..6bf1fcb 100644 --- a/site/public/assets/style.css +++ b/site/public/assets/style.css @@ -454,18 +454,16 @@ nav a.active, nav .sub a:hover { color: #909090; } -.credit a { +.credit img { display:inline-block; opacity:0.9; + cursor: pointer; + width: 18px; } -.credit a:hover { +.credit img:hover { opacity:1; } -.credit a img { - width:18px; -} - .mx-object3d .image{ box-shadow:5px -10px 20px rgba(0,0,0,0.1); } |
