headline/view/templates/index.html
2022-08-25 16:15:50 +02:00

66 lines
No EOL
1.9 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Headliner</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<style>
/* .expanded {
width: 100%;
} */
/* Longer name hidden by default */
span.long{
display:none;
}
/* On hover, hide the short name */
.expanded:hover span.short{
display:none;
}
/* On hover, display the longer name. */
.expanded:hover span.long{
display:block;
}
</style>
</head>
<body>
<div class="container">
<div class="table-responsive">
<table class="table table-hover">
<thead>
<tr>
<th>#</th>
<th>Detection time</th>
<th>Source</th>
<th>Diff</th>
<th>Original</th>
<th>Changed</th>
</tr>
</thead>
<tbody>
{% for diff in diffs %}
<tr>
<td>{{ diff.diff_id }}</td>
<td>{{ diff.diff_time }}</td>
<td><a href='{{ diff.article_url }}' target="_blank">{{ diff.feed_name }}</a></td>
<td>{{ diff.diff_html|safe }}</td>
<td class="expanded">
<span class="short">{{ diff.title_orig|truncate(15) }} </span>
<span class="long">{{ diff.title_orig }} </span>
</td>
<td class="expanded">
<span class="short">{{ diff.title_new|truncate(15) }} </span>
<span class="long">{{ diff.title_new}} </span>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{{ pagination.links }}
</div>
</body>
</html>