From 065c4feb424046599f22960e0fa19898ad9cd6f7 Mon Sep 17 00:00:00 2001 From: Noah Loomans Date: Fri, 26 May 2017 18:48:12 +0200 Subject: Only set opacity to 0 when requesting index. --- views/error.jade | 12 ++++++------ views/index.jade | 3 +++ views/layout.jade | 5 ++++- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/views/error.jade b/views/error.jade index e31ac76..51ec12c 100644 --- a/views/error.jade +++ b/views/error.jade @@ -1,6 +1,6 @@ -doctype html -html - body - h1= message - h2= error.status - pre #{error.stack} +extends layout + +block content + h1= message + h2= error.status + pre #{error.stack} diff --git a/views/index.jade b/views/index.jade index 0608505..e7005c7 100644 --- a/views/index.jade +++ b/views/index.jade @@ -1,5 +1,8 @@ extends layout +block variables + - var bodyStyle = 'opacity: 0;'; + block head link(rel='stylesheet', href='/stylesheets/style.css') link(rel='stylesheet', href='/stylesheets/print.css', media='print') diff --git a/views/layout.jade b/views/layout.jade index e537ebf..db12477 100644 --- a/views/layout.jade +++ b/views/layout.jade @@ -1,3 +1,6 @@ +block variables + - var bodyStyle = ''; + doctype html html head @@ -15,7 +18,7 @@ html link(rel="icon", type="image/png", href="/favicon-16x16.png", sizes="16x16") link(rel="mask-icon", href="/safari-pinned-tab.svg", color="#f44336") block head - body(style='opacity: 0;') + body(style=bodyStyle) block content script. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');ga('create', 'UA-83684754-1', 'auto');ga('send', 'pageview'); -- cgit v1.1