1
0
Fork 0
mirror of https://codeberg.org/Reuh/feather.git synced 2025-10-27 10:09:32 +00:00

feat: improve image centering in default css

This commit is contained in:
Étienne Fildadut 2025-10-11 21:15:26 +02:00
parent 174486ced8
commit ae0c10eb6d
3 changed files with 25 additions and 15 deletions

View file

@ -6,7 +6,7 @@ start with pictures/gif each time
### Navigating feeds
Directories, sorting/searching by date/title (a.k.a. using a file manager)
Directories, sorting/searching by date/title (a.k.a. using a file manager), flattening nested dirs, etc.
### Reading an article
@ -37,12 +37,12 @@ After changing the configuration, you can call `feather regenerate` to regenerat
`feather clear-data`
### Theoretical use-cases
#### Processing with scripts
### Layer other things on top
#### Syncthing
#### Processing with scripts
## Installation
### Docker
@ -65,9 +65,14 @@ You need Python 3.12 or newer. Then pip it up, as the kids say.
## TODO
before publishing:
- [ ] Write documentation
- [ ] Use inotify for real-time article mark-as-read action
- [ ] Share the fun somewhere
- [ ] Get article attachments
- [ ] Test with FreshRSS
"i'll look into it later":
- [ ] Get article attachments
- [ ] Use inotify for real-time article mark-as-read action
- [ ] Partial sync (using since_id for ttrss and start_time for googlereader)

View file

@ -4,7 +4,7 @@
# - setting environment variables for the values you want to overwrite (the environment variable name for each value can be found in the comments below).
[server]
# Server API to use. Either "googlereader" for the Google Reader API (FreshRSS, Miniflux, etc.) or "ttrss" for the TinyTiny-RSS API.
# (Required) Server API to use. Either "googlereader" for the Google Reader API (FreshRSS, Miniflux, etc.) or "ttrss" for the TinyTiny-RSS API.
# The Google Reader API do not support nested categories.
api = "googlereader"
# (Required) URL of your server's Google Reader API endpoint
@ -64,9 +64,12 @@ article_template = '''
<meta name="viewport" content="width=device-width" />
<title>{{ title }}</title>
</head>
<body style="background-color:black; color:white;">
<style>a{color:palevioletred; text-decoration:none;}</style>
<article style="max-width:60rem; margin:auto; text-align:justify;">
<body style="background-color:black; color:white; overflow-x:hidden;">
<style>
a {color:palevioletred; text-decoration:none;}
.feather-content img {display:block; margin-left:50%; transform:translateX(-50%); max-width:100vw;}
</style>
<article style="max-width:min(60rem,100%); margin:auto;">
<p style="display:flex; flex-direction:row; justify-content:space-between;">
<span>{{ published }}</span>
<span>
@ -74,7 +77,7 @@ article_template = '''
<a href="{{ feed_url }}">
{% endif %}
{% if feed_icon_url %}
<img style="height:1em;" src="{{ feed_icon_url }}">
<img style="height:1em; vertical-align:middle;" src="{{ feed_icon_url }}">
{% endif %}
{{ feed_title }}
{% if feed_url %}
@ -85,10 +88,12 @@ article_template = '''
<h1><a href="{{ article_url }}">{{ title }}</a></h1>
<h3>{{ author }}</h3>
{% if content %}
<div>{{ content | safe }}</div>
<div class="feather-content">{{ content | safe }}</div>
{% else %}
<img src="{{ image_url }}">
<div>{{ summary | safe }}</div>
<div class="feather-content">
<img src="{{ image_url }}">
{{ summary | safe }}
</div>
{% endif %}
</article>
</body>

View file

@ -47,7 +47,7 @@ class Config:
self.html_root: Path = Path(get_config("directories", "reader"))
self.json_root: Path = Path(get_config("directories", "data"))
self.server_api: str = str(get_config("server", "api"))
self.server_api: str = str(get_config("server", "api", False))
if self.server_api not in ("googlereader", "ttrss"):
raise ConfigurationError(
f"server.api must be either ttrss or googlereader, not {self.server_api}"