From f171c9ff5a09529b4cfc13a7ea8ce1936aca62ea Mon Sep 17 00:00:00 2001 From: Adam Pardyl Date: Sun, 23 Jun 2019 19:34:29 +0200 Subject: [PATCH] Resource versioning, page preview spinner --- src/main/resources/application.properties | 6 +++ src/main/resources/static/style.css | 1 + src/main/resources/templates/layout.html | 14 +++---- .../resources/templates/preview_page.html | 41 +++++++++++++------ 4 files changed, 42 insertions(+), 20 deletions(-) diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 3eb9164..721aca3 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -17,6 +17,12 @@ mordor.mail.from=mordor@ksi.ii.uj.edu.pl # Site settings mordor.site.address=http://127.0.0.1:8080 spring.mvc.static-path-pattern=/static/** +spring.resources.cache.cachecontrol.max-age=365d +spring.resources.chain.html-application-cache=true +spring.resources.chain.enabled=true +spring.resources.chain.strategy.content.enabled=true +spring.resources.chain.strategy.content.paths=/** +spring.mvc.favicon.enabled=false mordor.root_path=/home/adam mordor.secret=CHANGE_THIS_FOR_PRODUCTION mordor.allow_user_registration=true diff --git a/src/main/resources/static/style.css b/src/main/resources/static/style.css index 88b7c68..41a5418 100644 --- a/src/main/resources/static/style.css +++ b/src/main/resources/static/style.css @@ -46,4 +46,5 @@ code.hljs { width: 100%; border: none; outline: none; + overflow: hidden; } diff --git a/src/main/resources/templates/layout.html b/src/main/resources/templates/layout.html index a83c282..a68d8aa 100644 --- a/src/main/resources/templates/layout.html +++ b/src/main/resources/templates/layout.html @@ -10,14 +10,14 @@ - + - - - - - - + + + + + + diff --git a/src/main/resources/templates/preview_page.html b/src/main/resources/templates/preview_page.html index 0368b06..f467090 100644 --- a/src/main/resources/templates/preview_page.html +++ b/src/main/resources/templates/preview_page.html @@ -1,6 +1,6 @@ + layout:decorate="~{layout}" xmlns:th="http://www.w3.org/1999/xhtml"> Mordor @@ -14,26 +14,41 @@ +
-
-            
-        
+
+
+
+ Loading... +
+
+ +