123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235 |
- <div class="dtc w-10">
- <img loading="lazy" src="{{ tweet.avi_icon_url }}" alt="Avi">
- {% if True or enable_select_tweets %}
- <br>
- <input type="checkbox" name="select_tweet" value="{{ tweet.id }}">
- {% endif %}
- </div>
- <div class="dtc w-90 v-top">
- {% if tweet.title %}
- <h2 class="w-100 mt0">
- <a href="{{ tweet.url }}">
- {{ tweet.title }}
- </a>
- </h2>
- {% endif %}
- <p class="w-100 mt0 pt0">
- <strong><a href="{{ tweet.author_url }}" class="w-100">{{ tweet.display_name }}</a></strong>
- {% if tweet.author_is_verified %}
- <small class="verified">[verified]</small>
- {% endif %}
-
- <a href="{{ tweet.author_url }}" class="silver">@{{ tweet.handle }}</a>
- <a href="{{ tweet.url }}">{{ tweet.created_at }}</a> [<a href="{{ tweet.source_url }}" target="tweet_{{ tweet.id }}">source</a>]
-
- {% if tweet.is_viewed %}
- [viewed]
- {% endif %}
- </p>
- <p class="w-100">
-
- {% if tweet.html %}
- {{ tweet.html | safe }}
- {% else %}
- {{ tweet.text | replace('<', '<') | replace('\n', '<br>') | safe }}
- {% endif %}
- </p>
- {% if tweet.quoted_tweet %}
- <div class="dt qt-box">
- <div class="dt-row">
- {% with tweet = tweet.quoted_tweet %}
- {% include "partial/timeline-tweet.html" %}
- {% endwith %}
- </div>
- </div>
- {% endif %}
-
- {% if not skip_embed_replies %}
- {% if tweet.replied_tweet %}
- <p style="color: silver">
- Replying to:
- </p>
- <div class="reply_to w-100" style="border: 1px solid silver; padding: 6px">
- <div class="dt reply-box">
- <div class="dt-row">
- {% with tweet = tweet.replied_tweet %}
- {% include "partial/timeline-tweet.html" %}
- {% endwith %}
- </div>
- </div>
- </div>
- {% elif tweet.replied_tweet_id %}
- <p style="color: silver">
- Replying to:
- </p>
- {% if tweet.actions.view_replied_tweet %}
- <p class="reply_to w-100" style="border: 1px solid silver; padding: 6px">
- <a href="{{ url_for(tweet.actions.view_replied_tweet.route, **tweet.actions.view_replies.route_params) }}">View in Thread</a>.
- </p>
- {% endif %}
- {% endif %}
- {% endif %}
-
- {% if tweet.note %}
- <p class="note w-100" style="border: 1px solid black; background-color: yellow; padding: 6px">
- {{ tweet.note.replace('\n', '<br>') | safe }}
- </p>
- {% endif %}
- {% if tweet.photos %}
- <p class="w-100">
- <ul>
- {% for photo in tweet.photos %}
- <li><img loading="lazy" class="w-100" src="{{ photo.preview_image_url }}"
- referrerpolicy="no-referrer" onclick="this.src='{{ photo.url }}'" style="max-height: {{ photo.height }};""></li>
- {% endfor %}
- </ul>
- </p>
- {% endif %}
- {% if tweet.videos %}
- <p class="w-100">
- <p>VIDEOS</p>
- <ul>
- {% for video in tweet.videos %}
- <li><img loading="lazy" class="w-100"
- src="{{ video.preview_image_url }}" referrerpolicy="no-referrer"
-
-
- {% if video.image_url %}
- onclick="this.src='{{ video.image_url }}'; this.onclick = undefined"
- {% endif %}
-
- {% if video.url %}
- ondblclick="swapVideoPlayer(this, '{{ video.url }}', '{{ video.content_type }}')"
- {% endif %}
-
- style="max-height: {{ video.height }};"
- >
-
- <dl>
- {% if video.duration_str %}
- <dt>Duration</dt>
- <dd>{{ video.duration_str }}</dt>
- {% elif video.duration_ms %}
- <dt>Duration</dt>
- <dd>{{ video.duration_ms / 1000 / 60 }} minutes</dt>
- {% endif %}
- </dl>
-
- {% if video.public_metrics and video.public_metrics.view_count %}
- <p class="w-100">
- view count: {{ video.public_metrics.view_count }}
- </p>
- {% endif %}
-
- </li>
-
- {% endfor %}
- </ul>
- </p>
- {% endif %}
-
- {% if tweet.card %}
-
- <div class="card-box w-100">
- <div style="display: flex; flex-direction: row;">
- {% if tweet.card.preview_image_url %}
- <img style="margin-right: 4px; max-height: 150px; max-width: 150px;" src="{{ tweet.card.preview_image_url }}">
- {% endif %}
-
- <div style="display: flex; flex-direction: column">
- <span><a href="{{ tweet.card.source_url }}">{{ tweet.card.display_url }}</a></span>
- <span><strong>{{ tweet.card.title }}</strong></span>
- <p>{{ tweet.card.content }}</p>
- </div>
- </div>
- </div>
- {% endif %}
-
-
-
- {% if False and tweet.replied_tweet %}
- <a href="{{ tweet.replied_tweet.url }}">View Parent</a>
- <a href="{{ url_for('.get_tweet_html', tweet_id=tweet.replied_tweet.conversation_id) }}">View Conversation</a>
- {% endif %}
-
- {% if tweet.public_metrics %}
-
- <p class="w-100">
- {% for k, v in tweet.public_metrics.items() %}
- {% if v != None %}
- {{ k.replace('_count', 's').replace('ys', 'ies').replace('_', ' ') }}: {{ v }},
- {% endif %}
- {% endfor %}
-
- </p>
- {% endif %}
-
-
-
- {% if tweet.non_public_metrics %}
-
-
- <p class="w-100">
- {% for k, v in tweet.non_public_metrics.items() %}
- {% if v != None %}
- {{ k.replace('_count', 's').replace('ys', 'ies').replace('_', ' ') }}: {{ v }},
- {% endif %}
- {% endfor %}
-
- </p>
- {% endif %}
-
- {% if tweet.attachments %}
- <ul>
- {% for a in tweet.attachments %}
- {% if a.content_type == 'application/vnd-hogumathi.livestream-details+json' %}
- <li class="livestream-details">
- <dl>
-
- {% if a.content.scheduled_start_time %}
- <dt>Scheduled Start Time</dt>
- <dd>{{ a.content.scheduled_start_time }}</dd>
- {% endif %}
-
- {% if a.content.start_time %}
- <dt>Start Time</dt>
- <dd>{{ a.content.start_time }}</dd>
- {% endif %}
-
- {% if a.content.chat_embed_url %}
- <dt>Chat</dt>
- <dd>
- <iframe class="w-100" height="400" src="{{ a.content.chat_embed_url }}" referrerpolicy="origin"></iframe>
- </dd>
- {% endif %}
-
-
- </dl>
- </li>
- {% else %}
- <li><a href="{{ a.url }}">{{ a.name }}</a> {{ a.content_type }} ({{ a.size }})
- {% endif %}
- </li>
- {% endfor %}
- </ul>
- {% endif %}
-
- {% if show_conversation_id %}
- <p class="w-100">
- Conversation: {{ tweet.conversation_id }}
-
- </p>
- {% endif %}
- </div>
|