Slight style changes, piwik is now matomo

This commit is contained in:
Evert Prants 2018-01-27 12:19:06 +02:00
parent 57605c7424
commit 4df05ad316
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
4 changed files with 33 additions and 12 deletions

View File

@ -85,3 +85,9 @@
[logger] [logger]
write=true write=true
file="/var/log/icynet.log" file="/var/log/icynet.log"
# Matomo tracking
#[matomo]
# site_id=
# site_domain="icynet.eu"
# track_url="//analytics.icynet.eu/"

View File

@ -53,8 +53,8 @@ app.use((req, res, next) => {
}) })
// Add Piwik tracker if configured // Add Piwik tracker if configured
if (config.piwik && config.piwik.site_id) { if (config.matomo && config.matomo.site_id) {
res.locals.piwik = config.piwik res.locals.matomo = config.matomo
} }
next() next()

View File

@ -69,8 +69,6 @@ a
margin: 0 margin: 0
display: inline-block display: inline-block
list-style-type: none list-style-type: none
&.floating
float: right
li li
font-size: 30px font-size: 30px
@ -98,6 +96,13 @@ a
cursor: pointer cursor: pointer
color: green color: green
.list
display: flex
flex-direction: row
.floating
margin-left: auto
input[type=checkbox] input[type=checkbox]
display: none display: none
@ -154,12 +159,13 @@ section
.wrapper .wrapper
overflow: hidden overflow: hidden
min-height: 100vh min-height: 100vh
width: 100%
.document .document
overflow: hidden overflow: hidden
min-height: 100vh; min-height: 100vh
padding: 50px; padding: 50px
background-color: #fff; background-color: #fff
.tos .tos
display: inline-block display: inline-block
@ -182,6 +188,7 @@ input:not([type="submit"])
border-radius: 5px border-radius: 5px
border: 1px solid #c1c1c1 border: 1px solid #c1c1c1
background-color: #f5f5f5 background-color: #f5f5f5
color: #000
box-shadow: inset 2px 2px 5px #ddd box-shadow: inset 2px 2px 5px #ddd
transition: border 0.1s linear transition: border 0.1s linear
@ -189,6 +196,7 @@ button, .button, input[type="submit"]
display: block display: block
padding: 5px 10px padding: 5px 10px
background-color: #fbfbfb background-color: #fbfbfb
color: #000
border: 1px solid #c1c1c1 border: 1px solid #c1c1c1
border-radius: 5px border-radius: 5px
font-size: 120% font-size: 120%
@ -197,6 +205,9 @@ button, .button, input[type="submit"]
&.active &.active
background-color: #ddd background-color: #ddd
input[disabled]
color: #959595
.button .button
display: inline-block display: inline-block
margin-right: 5px margin-right: 5px
@ -617,7 +628,6 @@ noscript
text-transform: none text-transform: none
.floating .floating
float: none !important
border-top: 2px solid #00a1b5 border-top: 2px solid #00a1b5
#navlogo #navlogo
@ -649,7 +659,7 @@ noscript
float: initial !important float: initial !important
display: block !important display: block !important
border: 0 !important border: 0 !important
width: 300px !important width: auto !important
margin: auto margin: auto
.dialog .dialog
width: 100vw !important width: 100vw !important

View File

@ -3,16 +3,18 @@ html
head head
meta(charset="utf8") meta(charset="utf8")
meta(name="viewport", content="width=device-width, initial-scale=1") meta(name="viewport", content="width=device-width, initial-scale=1")
if piwik if matomo
script(type="text/javascript"). script(type="text/javascript").
var _paq = _paq || []; var _paq = _paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */ /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["setCookieDomain", "*.#{matomo.site_domain}"]);
_paq.push(["setDomains", ["*.#{matomo.site_domain}"]]);
_paq.push(['trackPageView']); _paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']); _paq.push(['enableLinkTracking']);
(function() { (function() {
var u="#{piwik.track_url}"; var u="#{matomo.track_url}";
_paq.push(['setTrackerUrl', u+'piwik.php']); _paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', '#{piwik.site_id}']); _paq.push(['setSiteId', '#{matomo.site_id}']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s); g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})(); })();
@ -47,6 +49,9 @@ html
noscript noscript
h2 This site requires JavaScript to work properly! h2 This site requires JavaScript to work properly!
p Please consider enabling JavaScript for the full experience. p Please consider enabling JavaScript for the full experience.
if matomo
p
img(src="#{matomo.track_url}piwik.php?idsite=1&rec=1" style="border:0;" alt="")
block banner block banner
.banner .banner
.logo .logo