This commit is contained in:
Ondřej Nývlt 2023-08-16 19:41:55 +02:00
parent 41575bf4a9
commit 165948da05
4 changed files with 109 additions and 17 deletions

View file

@ -0,0 +1,91 @@
:root {
--border-color: hsl(0 0% 90%);
--accent-color: red;
}
html {
box-sizing: border-box;
font-family: system-ui;
}
*,
*::before,
*::after {
box-sizing: inherit;
}
* {
margin: 0;
}
body {
line-height: 1.5;
}
img,
picture,
video,
canvas,
svg {
display: block;
max-width: 100%;
}
input,
button,
textarea,
select {
font: inherit;
}
p,
h1,
h2,
h3,
h4,
h5,
h6 {
overflow-wrap: break-word;
}
body {
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: stretch;
}
.footer {
margin-top: auto;
padding: 1.5rem 0;
margin-top: 1.5rem;
border-top: 1px solid var(--border-color);
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 2rem;
}
table,
th,
tr,
td {
text-align: inherit;
}
.pagination {
list-style-type: none;
padding: 0;
display: flex;
}
.page-link {
display: block;
padding: 0.5em 1em;
}
.page-item.active {
background-color: var(--accent-color);
}

View file

@ -19,7 +19,16 @@
></script> ></script>
</head> </head>
<body> <body>
{% block body %}{% endblock %} <header class="header">
<div class="container">
<h1>
Headliner
</h1>
</div>
</header>
<main>
{% block body %}{% endblock %}
</main>
{% include 'parts/footer.html' %} {% include 'parts/footer.html' %}
</body> </body>
</html> </html>

View file

@ -2,7 +2,7 @@
{% block body %} {% block body %}
<div class="container"> <div class="container">
<form> <form method="get">
<div class="d-flex"> <div class="d-flex">
<input <input
class="m-2 form-control" class="m-2 form-control"
@ -11,13 +11,11 @@
name="search" name="search"
value="{{ search|e }}" value="{{ search|e }}"
/> />
<input <button
class="m-2 btn btn-primary" class="button"
type="submit" type="submit"
formenctype="application/x-www-form-urlencoded"
formmethod="get"
value="Hledat" value="Hledat"
/> >Hledat</button>
</div> </div>
</form> </form>
<div class="table-responsive"> <div class="table-responsive">
@ -42,11 +40,9 @@
</td> </td>
<td>{{ diff.diff_html|safe }}</td> <td>{{ diff.diff_html|safe }}</td>
<td class="expanded"> <td class="expanded">
<span class="short">{{ diff.title_orig|truncate(15) }} </span>
<span class="long">{{ diff.title_orig }} </span> <span class="long">{{ diff.title_orig }} </span>
</td> </td>
<td class="expanded"> <td class="expanded">
<span class="short">{{ diff.title_new|truncate(15) }} </span>
<span class="long">{{ diff.title_new}} </span> <span class="long">{{ diff.title_new}} </span>
</td> </td>
</tr> </tr>
@ -54,11 +50,7 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="container text-center"> {{ pagination.links }}
<div class="row"> {{ pagination.info }}
<div class="col">{{ pagination.links }}</div>
<div class="col">{{ pagination.info }}</div>
</div>
</div>
</div> </div>
{% endblock body %} {% endblock body %}

View file

@ -1,5 +1,5 @@
<footer class="footer mt-auto py-3 bg-light"> <footer class="footer">
<div class="container"> <div class="container">
<span class="text-muted"> <a href="{{ url_for('index') }}">Headliner</a> | <a href="{{ url_for('feed_list') }}">Feed list</a> | <a href="{{ url_for('about') }}">About</a> | <a href="https://nolog.cz">NoLog.cz</a></span> <span class="text-muted"> <a href="{{ url_for('index') }}">Headliner</a> | <a href="{{ url_for('feed_list') }}">Feed list</a> | <a href="{{ url_for('about') }}">About</a> | <a href="https://nolog.cz">NoLog.cz</a></span>
</div> </div>
</footer> </footer>