diff options
author | mjfernez <mjf@mjfer.net> | 2021-11-01 23:56:07 -0400 |
---|---|---|
committer | mjfernez <mjf@mjfer.net> | 2021-11-01 23:56:07 -0400 |
commit | ec6feec81ebab89dc6779027649b1ce517042d22 (patch) | |
tree | 629e14f3a77032ea955533c553137812768c39fa /views.py | |
parent | 7c16beb6538ccf024b552d475a26b9345bf550ec (diff) | |
download | ezcms-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.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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): |