mirror of
https://github.com/MathiasDPX/blog.git
synced 2025-05-10 07:33: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
|
import os
|
||||||
from flask import Flask, render_template, request, send_file, make_response
|
from flask import Flask, render_template, request, send_file, make_response
|
||||||
from feedgen.feed import FeedGenerator
|
from feedgen.feed import FeedGenerator
|
||||||
|
from flask_moment import Moment
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
from routes.editor import editor_routes
|
from routes.editor import editor_routes
|
||||||
from routes.scrapbook import sp_routes
|
from routes.scrapbook import sp_routes
|
||||||
|
@ -10,6 +11,8 @@ from classes import *
|
||||||
load_dotenv()
|
load_dotenv()
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
moment = Moment(app)
|
||||||
|
|
||||||
app.register_blueprint(editor_routes)
|
app.register_blueprint(editor_routes)
|
||||||
app.register_blueprint(sp_routes)
|
app.register_blueprint(sp_routes)
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
flask
|
flask
|
||||||
feedgen
|
feedgen
|
||||||
requests
|
requests
|
||||||
|
Flask-Moment
|
||||||
python-dotenv
|
python-dotenv
|
|
@ -36,6 +36,10 @@ h6.chapter a:hover::before {
|
||||||
margin-bottom: 0.75em;
|
margin-bottom: 0.75em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
summary > small {
|
||||||
|
font-size: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
time {
|
time {
|
||||||
font-family: "Montserrat", sans-serif;
|
font-family: "Montserrat", sans-serif;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='base.css') }}">
|
<link rel="stylesheet" href="{{ url_for('static', filename='base.css') }}">
|
||||||
<link rel="icon" type="image/png" href="{{ url_for('static', filename='favicon.png') }}" />
|
<link rel="icon" type="image/png" href="{{ url_for('static', filename='favicon.png') }}" />
|
||||||
{% block head %}{% endblock %}
|
{% block head %}{% endblock %}
|
||||||
|
{{ moment.include_moment() }}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="wrap">
|
<div id="wrap">
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
{% else%}
|
{% else%}
|
||||||
<details id="{{ post.id }}">
|
<details id="{{ post.id }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<summary>{{ post.postedAt | formatDate }}</summary>
|
<summary>{{ moment(post.postedAt).format('DD/MM/YYYY @ HH[h]mm') }}</summary>
|
||||||
<div>{{ post.text | formatContent |safe }}</div>
|
<div>{{ post.text | formatContent |safe }}</div>
|
||||||
</details>
|
</details>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue