From ec6feec81ebab89dc6779027649b1ce517042d22 Mon Sep 17 00:00:00 2001 From: mjfernez Date: Mon, 1 Nov 2021 23:56:07 -0400 Subject: 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 --- view_functions.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'view_functions.py') 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, -- cgit v1.2.3