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 /templates | |
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 'templates')
-rw-r--r-- | templates/base.html | 10 | ||||
-rw-r--r-- | templates/index.html | 8 |
2 files changed, 11 insertions, 7 deletions
diff --git a/templates/base.html b/templates/base.html index 7c6fb17..5ca253a 100644 --- a/templates/base.html +++ b/templates/base.html @@ -3,6 +3,7 @@ <title>{{ domain }}/{{ title }}</title> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> + <meta name="viewport" content="width=device-width, initial-scale=1.0"/> {% block css%} <link rel="stylesheet" type="text/css" href="/static/main.css"> {% endblock %} @@ -16,7 +17,7 @@ <b> <a href="/site/{{ dir }}">{{ dir }}/</a> |</b> {% endfor %} <!-- Add icons here --> - <a href="/feed.xml"> + <a href="/feed.xml"target="_blank" rel="noopener noreferrer"> <img src="https://icons.getbootstrap.com/assets/icons/rss-fill.svg"> </a> </div> @@ -24,11 +25,14 @@ <div class="content"> {% block content %} {% endblock %} - <h3>{{ errors }}</h3> + <h3 class="center">{{ errors }}</h3> {% if parent_dir != '/site/' %} - <h3><a href="{{ parent_dir }}">Go up to parent folder ({{ parent_dir }})</a></h3> + <h3 class="center"><a href="{{ parent_dir }}">Go up to parent folder ({{ parent_dir }})</a></h3> {% endif %} </div> + {% if last_update %} + <p>Last update: {{ last_update }}</p> + {% endif %} <div class="license">{% include 'site/license.html' %}</div> </center></body> </html> diff --git a/templates/index.html b/templates/index.html index 714db1c..c8356fe 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,19 +1,19 @@ {% extends 'base.html' %} {% block content %} - +<center> {% if description %} {% include cur_path + '/.description' %} {% endif %} {% if dirs %} -<h3>Topics</h3> +<h3 class="center">Topics</h3> {% for d in dirs %} <li><a href="{{ cur_dir }}{{ d }}">{{ d }}</a></li> {% endfor %} {% endif %} {% if files %} -<h3>File Listing</h3> +<h3 class="center">File Listing</h3> {% for f in files %} <li><a href="{{ cur_dir }}{{ f }}">{{ f.rstrip('!') }}</a></li> {% endfor %} @@ -24,5 +24,5 @@ <li><a href="{{ l.split(',')[1] }}" target="_blank" rel="noopener noreferrer">{{l.split(',')[0]}}</a></li> {% endfor %} {% endif %} - +</center> {% endblock %} |