Add time to feed display
This commit is contained in:
parent
3023fbfb60
commit
56b8cef868
4 changed files with 136 additions and 134 deletions
|
|
@ -1,5 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
|
@ -7,6 +8,7 @@
|
|||
<title>🦉 Bubo Reader</title>
|
||||
<link rel="stylesheet" href="/style.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>🦉 Bubo Reader</h1>
|
||||
|
||||
|
|
@ -21,13 +23,8 @@
|
|||
<ul>
|
||||
{% for item in feed.items %}
|
||||
<li>
|
||||
{{ item.timestamp | formatDate }} -
|
||||
<a
|
||||
href="{{ item.link }}"
|
||||
target="_blank"
|
||||
rel="noopener norefferer nofollow"
|
||||
>{{ item.title }}</a
|
||||
>
|
||||
{{ item.timestamp | formatDate }} @ {{ item.timestamp | formatTime }}—
|
||||
<a href="{{ item.link }}" target="_blank" rel="noopener norefferer nofollow">{{ item.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
|
@ -47,10 +44,10 @@
|
|||
<p>Last updated {{ now }}.</p>
|
||||
<p>
|
||||
Powered by
|
||||
<a href="https://github.com/georgemandis/bubo-rss"
|
||||
>Bubo Reader (v{{ info.version }})</a
|
||||
>, a project by <a href="https://george.mand.is">George Mandis</a>. ❤️
|
||||
<a href="https://github.com/georgemandis/bubo-rss">Bubo Reader (v{{ info.version }})</a>, a project by <a
|
||||
href="https://george.mand.is">George Mandis</a>. ❤️
|
||||
<a href="{{ info.funding.url }}">Sponsor on GitHub</a>
|
||||
</p>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
"scripts": {
|
||||
"clean": "rm -rf dist",
|
||||
"build": "bun src/index.ts",
|
||||
"check": "biome check --write ./src ./eslint.config.js"
|
||||
"check": "biome check --write ./{src,config,public} ./eslint.config.js"
|
||||
},
|
||||
"author": {
|
||||
"name": "George Mandis",
|
||||
|
|
|
|||
|
|
@ -17,6 +17,11 @@ env.addFilter("formatDate", (dateString): string => {
|
|||
return !Number.isNaN(date.getTime()) ? date.toLocaleDateString() : dateString;
|
||||
});
|
||||
|
||||
env.addFilter("formatTime", (dateString): string => {
|
||||
const date: Date = new Date(Number.parseInt(dateString));
|
||||
return !Number.isNaN(date.getTime()) ? date.toLocaleTimeString() : dateString;
|
||||
});
|
||||
|
||||
env.addGlobal("now", new Date().toUTCString());
|
||||
|
||||
// load the template
|
||||
|
|
|
|||
Loading…
Reference in a new issue