mirror of
https://github.com/MathiasDPX/blog.git
synced 2025-05-09 15:13:09 +00:00
adjusts /scrapbook time to the user's time
This commit is contained in:
parent
15515f1bc2
commit
2366bd3189
5 changed files with 10 additions and 1 deletions
3
main.py
3
main.py
|
@ -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)
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
flask
|
||||
feedgen
|
||||
requests
|
||||
Flask-Moment
|
||||
python-dotenv
|
|
@ -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;
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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 %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue