2019-03-28 13:45:03 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml"
|
|
|
|
xmlns:xi="http://www.w3.org/2001/XInclude"
|
|
|
|
xmlns:py="http://genshi.edgewall.org/"
|
|
|
|
xmlns:i18n="http://genshi.edgewall.org/i18n"
|
|
|
|
xmlns:og="http://opengraphprotocol.org/schema/"
|
|
|
|
py:strip="">
|
|
|
|
|
|
|
|
<?python
|
|
|
|
from six.moves import urllib
|
|
|
|
|
2020-08-28 17:48:30 +00:00
|
|
|
def p(params):
|
|
|
|
return urllib.parse.urlencode(params).replace('+', '%20')
|
2019-03-28 13:45:03 +00:00
|
|
|
?>
|
|
|
|
|
|
|
|
|
2020-08-28 17:48:30 +00:00
|
|
|
<py:def function="fb_share(url)">
|
2019-03-28 13:45:03 +00:00
|
|
|
<?python
|
|
|
|
params = {
|
2020-08-28 17:48:30 +00:00
|
|
|
'u': url,
|
2019-03-28 13:45:03 +00:00
|
|
|
}
|
|
|
|
?>
|
2020-08-28 17:48:30 +00:00
|
|
|
<div class="social-button fb-share-button">
|
|
|
|
<a href="https://www.facebook.com/sharer.php?${p(params)}"
|
2019-03-28 13:45:03 +00:00
|
|
|
title="Share on Facebook"
|
2020-08-28 17:48:30 +00:00
|
|
|
onclick="open_share_popup(this.href, this.target, 640, 320)"
|
|
|
|
target="_top">
|
2019-03-28 13:45:03 +00:00
|
|
|
<span class="icon icon_facebook" />
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</py:def>
|
|
|
|
|
|
|
|
<py:def function="tw_share(url, text)">
|
|
|
|
<!-- tweet without javascript -->
|
|
|
|
<?python
|
|
|
|
params = {
|
|
|
|
'url': url,
|
2020-08-28 17:48:30 +00:00
|
|
|
'text': text.encode('utf-8'),
|
2019-03-28 13:45:03 +00:00
|
|
|
'count': 'none',
|
|
|
|
'lang': os.twitter_lang,
|
|
|
|
'related': "gutenberg_new:Project Gutenberg New Books"
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<div class="social-button twitter-share-button">
|
2020-08-28 17:48:30 +00:00
|
|
|
<a href="https://twitter.com/share?${p(params)}"
|
2019-03-28 13:45:03 +00:00
|
|
|
title="Share on Twitter"
|
|
|
|
onclick="open_share_popup(this.href, this.target, 640, 320)"
|
2020-03-11 19:47:51 +00:00
|
|
|
target="_top">
|
2019-03-28 13:45:03 +00:00
|
|
|
<span class="icon icon_twitter" />
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</py:def>
|
|
|
|
|
|
|
|
|
|
|
|
<py:def function="rss_follow()">
|
|
|
|
<div class="social-button rss-follow-button">
|
|
|
|
<a href="/feeds/today.rss"
|
|
|
|
title="Subscribe to the New Books RSS feed.">
|
|
|
|
<span class="icon icon_rss" />
|
|
|
|
<span class="alt" i18n:comment="Subscribe to RSS feed.">Subscribe</span>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</py:def>
|
|
|
|
|
|
|
|
</html>
|