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 --- views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'views.py') 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): -- cgit v1.2.3