timeline-tweet.html 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <div class="dtc w-10">
  2. <img src="{{ tweet.avi_icon_url }}" alt="Avi">
  3. </div>
  4. <div class="dtc w-90 v-top">
  5. <p class="w-100 mt0 pt0">
  6. <strong><a href="{{ tweet.author_url }}" class="w-100">{{ tweet.display_name }}</a></strong>
  7. {% if tweet.author_is_verified %}
  8. <small class="verified">[verified]</small>
  9. {% endif %}
  10. <a href="{{ tweet.author_url }}" class="silver">@{{ tweet.handle }}</a>
  11. <a href="{{ tweet.source_url }}">{{ tweet.created_at }}</a>
  12. </p>
  13. <p class="w-100">{{ tweet.text | replace('<', '&lt;') | replace('\n', '<br>') | safe }}</p>
  14. {% if tweet.quoted_tweet %}
  15. <div class="dt qt-box">
  16. <div class="dt-row">
  17. {% with tweet = tweet.quoted_tweet %}
  18. {% include "partial/timeline-tweet.html" %}
  19. {% endwith %}
  20. </div>
  21. </div>
  22. {% endif %}
  23. {% if tweet.photos %}
  24. <p class="w-100">
  25. <ul>
  26. {% for photo in tweet.photos %}
  27. <li><img class="w-100" src="{{ photo.preview_image_url }}" crossorigin="" referrerpolicy="no-referrer" onclick="this.src='{{ photo.url }}'"></li>
  28. {% endfor %}
  29. </ul>
  30. </p>
  31. {% endif %}
  32. {% if tweet.videos %}
  33. <p class="w-100">
  34. <p>VIDEOS</p>
  35. <ul>
  36. {% for video in tweet.videos %}
  37. <li><img class="w-100" src="{{ video.preview_image_url }}" crossorigin="" referrerpolicy="no-referrer" onclick="this.src='{{ video.image_url }}'"></li>
  38. {% endfor %}
  39. </ul>
  40. </p>
  41. {% endif %}
  42. {% if tweet.card %}
  43. <div class="card-box w-100">
  44. <p><a href="{{ tweet.card.source_url }}">{{ tweet.card.display_url }}</a></p>
  45. <p><strong>{{ tweet.card.title }}</strong></p>
  46. <p>{{ tweet.card.content }}</p>
  47. </div>
  48. {% endif %}
  49. {% if tweet.public_metrics %}
  50. <p class="w-100">replies: {{ tweet.public_metrics.reply_count }},
  51. quotes: {{ tweet.public_metrics.quote_count }},
  52. rt: {{ tweet.public_metrics.retweet_count }},
  53. likes: {{ tweet.public_metrics.like_count }}
  54. </p>
  55. {% endif %}
  56. {% if tweet.non_public_metrics %}
  57. <p class="w-100">
  58. impressions: {{ tweet.non_public_metrics.impression_count }},
  59. clicks: {{ tweet.non_public_metrics.user_profile_clicks }},
  60. link clicks: {{ tweet.non_public_metrics.url_link_clicks | default('n/a') }},
  61. profile clicks: {{ tweet.non_public_metrics.user_profile_clicks | default('n/a') }}
  62. </p>
  63. {% endif %}
  64. </div>