diff options
author | Nathan Lasseter <nathan@4574.co.uk> | 2012-10-29 23:17:12 +0000 |
---|---|---|
committer | Nathan Lasseter <nathan@4574.co.uk> | 2012-10-29 23:17:12 +0000 |
commit | 84cfb101931e84e52d49e85147296602708049e3 (patch) | |
tree | 9bb401a40b40686c7e5a64d52cb0404c4e4db6f8 | |
parent | 6d3ce1d38378d64858b5aceee4f2058064918762 (diff) |
Tweet button
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | styles.css | 7 | ||||
-rw-r--r-- | viewpost.php | 7 |
3 files changed, 13 insertions, 2 deletions
@@ -1,2 +1,3 @@ .htpasswd posts/ +*.swp @@ -19,6 +19,13 @@ a.title { font-weight: normal; } +#tweet { + font-size: 8pt; + font-weight: normal; + text-decoration: none; + color: black; +} + a.toplink { font-size: 14pt; letter-spacing: -1px; diff --git a/viewpost.php b/viewpost.php index e4c6cab..d07399b 100644 --- a/viewpost.php +++ b/viewpost.php @@ -8,8 +8,11 @@ $file = $_GET['post']; echo "<div>\n"; - echo "<a class=\"title\" href=\"{$blogRoot}post/" . urlencode($file) . "\">$file <span id=\"perma\">[Permalink]</span></a>\n"; - + echo "<a class=\"title\" href=\"{$blogRoot}post/" . urlencode($file) . "\">$file <span id=\"perma\">[Permalink]</span></a> "; +?> + <a href="https://twitter.com/share" class="twitter-share-button" id="tweet" data-via="twitterapi" data-lang="en">[Tweet]</a> + <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> +<?php $stat = stat("{$blogPosts}$file"); $date = date('d-m-Y H:i T', $stat['mtime']); echo "<span class=\"date\">$date</span>\n"; |