Skip to content

Commit

Permalink
Add embedded tweets to table
Browse files Browse the repository at this point in the history
  • Loading branch information
andylolz committed May 3, 2024
1 parent 0687a48 commit 0fd8939
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ <h1>{{ page.title }}</h1>
{% if forloop.first %}
<thead>
<tr>
<th>Created</th>
<th>Note created</th>
<th>Tweet</th>
<th>Classification</th>
<th>Reasons</th>
<th>Summary</th>
Expand All @@ -36,6 +37,7 @@ <h1>{{ page.title }}</h1>

<tr id="{{ row['note_id'] }}">
<td><a target="_blank" href="https://twitter.com/_/status/{{ row['tweet_id'] }}">{{ row['created_at'] | date:"%Y-%m-%d" }}</a></td>
<td><blockquote class="twitter-tweet"><a href="https://twitter.com/_/status/{{ row['tweet_id'] }}"></a></blockquote></td>
<td>{{ row['classification'] }}</td>
<td>{{ row['reasons'] }}</td>
<td>{{ row['summary'] }}</td>
Expand All @@ -52,10 +54,13 @@ <h1>{{ page.title }}</h1>
</table>
</div>
</main>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<script src="//cdn.datatables.net/v/bs5/jq-3.7.0/dt-2.0.5/datatables.min.js"></script>
<script>
let table = new DataTable('table', {
// options
drawCallback: function (settings) {
twttr.widgets.load();
}
});
</script>
</body>
Expand Down

0 comments on commit 0fd8939

Please sign in to comment.