Improve comment templating

pull/733/head
Omar Roth 6 years ago
parent 3830604e42
commit 650b44ade2

@ -104,19 +104,20 @@ def template_youtube_comments(comments)
html += <<-END_HTML html += <<-END_HTML
<div class="pure-g"> <div class="pure-g">
<div class="pure-u-2-24"> <div class="pure-u-4-24 pure-u-md-2-24">
<img style="width:90%; padding-right:1em; padding-top:1em;" src="#{author_thumbnail}"> <img style="width:90%; padding-right:1em; padding-top:1em;" src="#{author_thumbnail}">
</div> </div>
<div class="pure-u-22-24"> <div class="pure-u-20-24 pure-u-md-22-24">
<p> <p>
<b><a href="#{child["authorUrl"]}">#{child["author"]}</a></b>
<a href="javascript:void(0)" onclick="toggle(this)">[ - ]</a> <a href="javascript:void(0)" onclick="toggle(this)">[ - ]</a>
<div>
<p style="white-space:pre-wrap">#{child["contentHtml"]}</p>
#{recode_date(Time.epoch(child["published"].as_i64))} ago
|
<i class="icon ion-ios-thumbs-up"></i> #{child["likeCount"]} <i class="icon ion-ios-thumbs-up"></i> #{child["likeCount"]}
<b><a href="#{child["authorUrl"]}">#{child["author"]}</a></b> </p>
- #{recode_date(Time.epoch(child["published"].as_i64))} ago #{replies_html}
</p>
<div>
<p style="white-space:pre-wrap">#{child["contentHtml"]}</p>
#{replies_html}
</div> </div>
</div> </div>
</div> </div>
@ -157,9 +158,9 @@ def template_reddit_comments(root)
content = <<-END_HTML content = <<-END_HTML
<p> <p>
<a href="javascript:void(0)" onclick="toggle(this)">[ - ]</a> <a href="javascript:void(0)" onclick="toggle(this)">[ - ]</a>
<i class="icon ion-ios-thumbs-up"></i> #{score}
<b><a href="https://www.reddit.com/user/#{author}">#{author}</a></b> <b><a href="https://www.reddit.com/user/#{author}">#{author}</a></b>
- #{recode_date(child.created_utc)} ago #{score} points
#{recode_date(child.created_utc)} ago
</p> </p>
<div> <div>
#{body_html} #{body_html}

Loading…
Cancel
Save