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 /view_functions.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 'view_functions.py')
-rw-r--r-- | view_functions.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/view_functions.py b/view_functions.py index f86952d..1131778 100644 --- a/view_functions.py +++ b/view_functions.py @@ -3,6 +3,7 @@ view_functions.py - defines functions called by views to display the correct dat about files and paths. """ import os +from time import strftime, strptime, ctime from siteconfig import siteconfig @@ -18,6 +19,9 @@ def default_context(): } +def file_last_modified(path): + return ctime(os.stat(path).st_ctime) + def index_dir(path): """ index_dir - Given a directory at `path`, list it's contents, |