Browse Source

fix social links

pull/1/head
wes 7 years ago
parent
commit
0026d85806
  1. 4
      src/scripts/social.tag
  2. 4
      src/website.py

4
src/scripts/social.tag

@ -26,8 +26,8 @@ updateButton(_id, title) {
if (_id == undefined) {
_id = self.opts.postid;
}
self.tweetHtml = '<a style="display:none;" data-size="small" class="twitter-share-button btn" data-text="'+title+'" data-via="weskerfoot" data-show-count="false" data-url="https://primop.me/blog/#!posts/'+_id+'" ref="tweet">Tweet '+_id+'</a>';
self.fbHtml = '<div class="fb-share-button" data-href="https://primop.me/blog/#!posts/'+_id+'" data-layout="button_count"></div>';
self.tweetHtml = '<a style="display:none;" data-size="small" class="twitter-share-button btn" data-text="'+title+'" data-via="weskerfoot" data-show-count="false" data-url="https://primop.me/blog/posts/'+_id+'" ref="tweet">Tweet '+_id+'</a>';
self.fbHtml = '<div class="fb-share-button" data-href="https://primop.me/blog/posts/'+_id+'" data-layout="button_count"></div>';
self._id = _id;
self.update();
}

4
src/website.py

@ -65,10 +65,12 @@ def NeverWhere(configfile=None):
# Set template variables to be injected
@app.context_processor
def inject_variables():
postcontent = defaultdict(str)
postcontent["title"] = initial_post["title"]
return {
"quote" : quote,
"postid" : initial_post["_id"],
"postcontent" : defaultdict(str),
"postcontent" : postcontent,
"links" : dumps([]),
"projects" : dumps([])
}

Loading…
Cancel
Save