aboutsummaryrefslogtreecommitdiffstats
path: root/views.py
diff options
context:
space:
mode:
authormjfernez <mjf@mjfer.net>2021-11-01 23:56:07 -0400
committermjfernez <mjf@mjfer.net>2021-11-01 23:56:07 -0400
commitec6feec81ebab89dc6779027649b1ce517042d22 (patch)
tree629e14f3a77032ea955533c553137812768c39fa /views.py
parent7c16beb6538ccf024b552d475a26b9345bf550ec (diff)
downloadezcms-ec6feec81ebab89dc6779027649b1ce517042d22.tar.gz
Optimize mobile CSS. Add last update time default
This commit optimizes the mobile and web css to be responsive on zoom (in supported browsers) and responsive on mobile screens. This is a minimal optimization and lot can be done to improve it, particularly for wider screen devices like tablets This also adds the last update time to all views (except home). Function logic was moved to view functions to support this and rss_generator was changed to depend on it
Diffstat (limited to 'views.py')
-rw-r--r--views.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/views.py b/views.py
index 7a6f273..aed9f17 100644
--- a/views.py
+++ b/views.py
@@ -7,7 +7,7 @@ from flask import request, send_from_directory, abort
from flask import render_template, render_template_string, make_response
from siteconfig import siteconfig
from server import app, cache
-from view_functions import default_context, index_dir, is_hidden_path
+from view_functions import *
# bit of a hack.
# Brackets don't play nicely with Jinja so instead of using .format,
@@ -56,6 +56,7 @@ def render_file(path):
{
'title': path.split('.')[0].upper(),
'parent_dir': '/site/' + '/'.join(path.split('/')[:-1]),
+ 'last_update': file_last_modified(abs_path),
}
)
if os.path.isfile(abs_path):