Skip to content

Commit

Permalink
Merge pull request #1261 from twm/progress
Browse files Browse the repository at this point in the history
Visual tweaks
  • Loading branch information
twm authored Jan 19, 2025
2 parents 490f34f + 48fdff2 commit acaa725
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 16 deletions.
1 change: 1 addition & 0 deletions css/GlobalBar.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
justify-content: space-between;
background: var(--footer-background-color);
min-height: var(--bar-height); /* So .square is square */
border-bottom: 2px solid var(--border-color);

--focus-offset: calc(2 * var(--focus-offset-in)); /* Don't clip focus ring. */

Expand Down
6 changes: 4 additions & 2 deletions css/inventory.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
.feed-list,
.label-list {
white-space: nowrap;
border-block: 2px solid var(--border-color);

thead, tbody, tfoot {
display: contents;
Expand Down Expand Up @@ -84,7 +85,7 @@
.feed-list-item-header > th {
font: inherit;
background: var(--footer-background-color);
border-bottom: 2px solid var(--quiet-text-color);
border-bottom: 2px solid var(--border-color);
}
.feed-list-item:nth-child(even) > td {
background: var(--footer-background-color);
Expand Down Expand Up @@ -180,6 +181,7 @@
display: grid;
grid: "icon title feeds unread fave edit" auto /
max-content 5fr minmax(max-content, 1fr) minmax(max-content, 1fr) minmax(max-content, 1fr) minmax(max-content, 1fr);
border-block: 2px solid var(--border-color);
}

.label-list-item {
Expand Down Expand Up @@ -208,7 +210,7 @@
.label-list-item-header > th {
font-weight: normal;
background: var(--footer-background-color);
border-bottom: 2px solid var(--quiet-text-color);
border-bottom: 2px solid var(--border-color);
}
.label-list-item:nth-child(even) > td {
background: var(--footer-background-color);
Expand Down
1 change: 1 addition & 0 deletions css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ select[multiple] {
padding: 3em 0.25em;
text-align: center;
background: var(--footer-background-color);
border-top: 2px solid var(--border-color);
color: var(--footer-text-color);
}

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ cryptography==44.0.0
# via
# pyopenssl
# service-identity
django==4.2.17
django==4.2.18
# via yarrharr (pyproject.toml)
feedparser==6.0.11
# via yarrharr (pyproject.toml)
Expand Down
3 changes: 2 additions & 1 deletion yarrharr/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright © 2013–2019, 2021, 2022 Tom Most <[email protected]>
# Copyright © 2013–2019, 2021, 2022, 2025 Tom Most <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -203,6 +203,7 @@ def read_yarrharr_conf(files, namespace):
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.staticfiles",
"django.contrib.humanize",
"yarrharr",
)

Expand Down
5 changes: 3 additions & 2 deletions yarrharr/templates/all_header.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% load ytabs %}
{% load humanize %}

<div class="feed-header">
<h1>
Expand All @@ -12,10 +13,10 @@ <h1>
<div class="tabs">
<div class="tabs-tabs">
<a {% tabattrs "all-unread" %} class="no-underline" href="{% url 'all-show' 'unread' %}">
Unread{% if all_unread_count %} <span class="count">{{ all_unread_count }}</span>{% endif %}
Unread{% if all_unread_count %} <span class="count">{{ all_unread_count|intcomma }}</span>{% endif %}
</a>
<a {% tabattrs "all-fave" %} class="no-underline" href="{% url 'all-show' 'fave' %}">
Favorite{% if all_fave_count %} <span class="count">{{ all_fave_count }}</span>{% endif %}
Favorite{% if all_fave_count %} <span class="count">{{ all_fave_count|intcomma }}</span>{% endif %}
</a>
<a {% tabattrs "all-all" %} class="no-underline" href="{% url 'all-show' 'all' %}">
All
Expand Down
5 changes: 3 additions & 2 deletions yarrharr/templates/feed_header.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% load ytabs %}
{% load humanize %}

<div class="feed-header">
<h1><svg width="1em" height="1em" aria-hidden="true" class="icon"><use xlink:href="#icon-feed"></use></svg> {{ feed.title }}</h1>
Expand All @@ -7,10 +8,10 @@ <h1><svg width="1em" height="1em" aria-hidden="true" class="icon"><use xlink:hre
<div class="tabs">
<div class="tabs-tabs">
<a {% tabattrs "feed-unread" %} class="no-underline" href="{% url 'feed-show' feed.id 'unread' %}">
Unread{% if feed.unread_count %} <span class="count">{{ feed.unread_count }}</span>{% endif %}
Unread{% if feed.unread_count %} <span class="count">{{ feed.unread_count|intcomma }}</span>{% endif %}
</a>
<a {% tabattrs "feed-fave" %} class="no-underline" href="{% url 'feed-show' feed.id 'fave' %}">
Favorite{% if feed.fave_count %} <span class="count">{{ feed.fave_count }}</span>{% endif %}
Favorite{% if feed.fave_count %} <span class="count">{{ feed.fave_count|intcomma }}</span>{% endif %}
</a>
<a {% tabattrs "feed-all" %} class="no-underline" href="{% url 'feed-show' feed.id 'all' %}">
All
Expand Down
7 changes: 4 additions & 3 deletions yarrharr/templates/feed_list.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% extends "base.html" %}
{% load humanize %}

{% block title %}Feeds{% endblock %}

Expand All @@ -18,10 +19,10 @@ <h1>Feeds</h1>
{% for feed in feeds %}
<tr class="feed-list-item">
<td class="col-feed"><a class="no-underline" href="{% url "feed-show" feed.id "unread" %}">{{ feed.title }}</a></td>
<td class="col-unread">{{ feed.unread_count }}</td>
<td class="col-fave">{{ feed.fave_count }}</td>
<td class="col-unread">{{ feed.unread_count|intcomma }}</td>
<td class="col-fave">{{ feed.fave_count|intcomma }}</td>
<td class="col-site-url"><a class="no-underline" target="_blank" rel="noreferrer noopener" href="{{ feed.site_url }}">{{ feed.site_url }}</a></td>
<td class="col-changed">{{ feed.last_changed }}</td>
<td class="col-changed">{{ feed.last_changed|naturaltime }}</td>
<td class="col-edit"><a title="Edit Feed" href="{% url "feed-edit" feed.id %}"><svg width="1em" height="1em" aria-label="Edit Feed" class="icon" aria-hidden="false"><use xlink:href="#icon-edit"></use></svg></a></td>
</tr>
{% endfor %}
Expand Down
5 changes: 3 additions & 2 deletions yarrharr/templates/label_header.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% load ytabs %}
{% load humanize %}

<div class="feed-header">
<h1><svg width="1em" height="1em" aria-hidden="true" class="icon"><use xlink:href="#icon-label"></use></svg> {{ label.text }}</h1>
Expand All @@ -7,10 +8,10 @@ <h1><svg width="1em" height="1em" aria-hidden="true" class="icon"><use xlink:hre
<div class="tabs">
<div class="tabs-tabs">
<a {% tabattrs "label-unread" %} class="no-underline" href="{% url 'label-show' label.id 'unread' %}">
Unread{% if label_unread_count %} <span class="count">{{ label_unread_count }}</span>{% endif %}
Unread{% if label_unread_count %} <span class="count">{{ label_unread_count|intcomma }}</span>{% endif %}
</a>
<a {% tabattrs "label-fave" %} class="no-underline" href="{% url 'label-show' label.id 'fave' %}">
Favorite{% if label_fave_count %} <span class="count">{{ label_fave_count }}</span>{% endif %}
Favorite{% if label_fave_count %} <span class="count">{{ label_fave_count|intcomma }}</span>{% endif %}
</a>
<a {% tabattrs "label-all" %} class="no-underline" href="{% url 'label-show' label.id 'all' %}">
All
Expand Down
7 changes: 4 additions & 3 deletions yarrharr/templates/label_list.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% extends "base.html" %}
{% load humanize %}

{% block title %}Labels{% endblock %}

Expand Down Expand Up @@ -32,9 +33,9 @@ <h1>Labels</h1>
</svg>
</td>
<td><a class="no-underline" href="{% url 'label-show' label.id 'unread' %}">{{ label.text }}</a></td>
<td>{{ label.feeds.count }}</td>
<td>{{ label.unread_count }}</a></td>
<td><a href="{% url 'label-show' label.id 'fave' %}">{{ label.fave_count }}</a></td>
<td>{{ label.feeds.count|intcomma }}</td>
<td>{{ label.unread_count|intcomma }}</a></td>
<td><a href="{% url 'label-show' label.id 'fave' %}">{{ label.fave_count|intcomma }}</a></td>
<td>
<a title="Edit Label" href="{% url 'label-edit' label.id %}"
><svg
Expand Down
2 changes: 2 additions & 0 deletions yarrharr/tests/test_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ def test_read_minimal(self):
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.staticfiles",
"django.contrib.humanize",
"yarrharr",
),
"LOGGING_CONFIG": None,
Expand Down Expand Up @@ -214,6 +215,7 @@ def test_read_dev_config(self):
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.staticfiles",
"django.contrib.humanize",
"yarrharr",
),
"LOGGING_CONFIG": None,
Expand Down

0 comments on commit acaa725

Please sign in to comment.