adjusts /scrapbook time to the user's time

This commit is contained in:
Mathias DUPEUX 2025-04-15 20:10:34 +02:00
parent 15515f1bc2
commit 2366bd3189
5 changed files with 10 additions and 1 deletions

View file

@ -3,6 +3,7 @@ import re
import os
from flask import Flask, render_template, request, send_file, make_response
from feedgen.feed import FeedGenerator
from flask_moment import Moment
from dotenv import load_dotenv
from routes.editor import editor_routes
from routes.scrapbook import sp_routes
@ -10,6 +11,8 @@ from classes import *
load_dotenv()
app = Flask(__name__)
moment = Moment(app)
app.register_blueprint(editor_routes)
app.register_blueprint(sp_routes)

View file

@ -1,4 +1,5 @@
flask
feedgen
requests
Flask-Moment
python-dotenv

View file

@ -36,6 +36,10 @@ h6.chapter a:hover::before {
margin-bottom: 0.75em;
}
summary > small {
font-size: 0.5em;
}
time {
font-family: "Montserrat", sans-serif;
font-weight: bold;

View file

@ -6,6 +6,7 @@
<link rel="stylesheet" href="{{ url_for('static', filename='base.css') }}">
<link rel="icon" type="image/png" href="{{ url_for('static', filename='favicon.png') }}" />
{% block head %}{% endblock %}
{{ moment.include_moment() }}
</head>
<body>
<div id="wrap">

View file

@ -18,7 +18,7 @@
{% else%}
<details id="{{ post.id }}">
{% endif %}
<summary>{{ post.postedAt | formatDate }}</summary>
<summary>{{ moment(post.postedAt).format('DD/MM/YYYY @ HH[h]mm') }}</summary>
<div>{{ post.text | formatContent |safe }}</div>
</details>
{% endfor %}