added tweet share to each article (generates an ugly tweet with html code in it)

small-nav
chimchooree 4 years ago
parent 71e67ed1e6
commit 51b5e2c63c

@ -43,7 +43,6 @@ def list_snippets(articles):
content += '</ul>' content += '</ul>'
a.append(content) a.append(content)
a.append(text[head + 1].replace('<br>','')) a.append(text[head + 1].replace('<br>',''))
a.append("social")
a.append(path) a.append(path)
result.append(a) result.append(a)
return result return result

@ -69,16 +69,17 @@
% for s in snippets[page * limit:page * limit + limit]: % for s in snippets[page * limit:page * limit + limit]:
<div class="snippet"> <div class="snippet">
<div class="snippet-title"> <div class="snippet-title">
<a href={{s[4]}} rel="nofollow">{{!s[0]}}</a> <a href={{s[3]}} rel="nofollow"><h1>{{!s[0]}}</h1></a>
</div> </div>
<div class="snippet-content"> <div class="snippet-content">
{{!s[1]}} {{!s[1]}}
</div> </div>
<div class="snippet-info"> <div class="snippet-info">
{{!s[2]}}{{!s[3]}} {{!s[2]}} • <a class="share-link share-twitter" href="http://twitter.com/share?text={{s[0]}}&url={{s[3]}}&via=lilchimchooree" target="_blank">tweet</a>
</div> </div>
<div class="snippet-link"> <div class="snippet-link">
<a href={{s[4]}} rel="nofollow">Read More</a> <a href={{s[3]}} rel="nofollow">Read More</a>
</div> </div>
</div> </div>
% end % end

Loading…
Cancel
Save