diff --git a/Dockerrun.aws.json.production b/Dockerrun.aws.json.production index 656ab55..80bdc44 100644 --- a/Dockerrun.aws.json.production +++ b/Dockerrun.aws.json.production @@ -30,10 +30,13 @@ }, { "name": "server", - "image": "offen/offen@sha256:fe55ba1c183eb8bb4dd19143e6fe1133d6d3b9115c94cc2150620b27adef18fc", + "image": "offen/offen@sha256:4c0d2d5db9bc749d21ad8659008658bf25318074b7c813b0a694e64816df750d", "essential": true, "memory": 256, - "command": ["serve"] + "command": ["serve"], + "environment": [ + { "name": "OFFEN_SERVER_REVERSEPROXY", "value": "1" } + ] }, { "name": "logspout", diff --git a/Dockerrun.aws.json.staging b/Dockerrun.aws.json.staging index eca188f..729b0ec 100644 --- a/Dockerrun.aws.json.staging +++ b/Dockerrun.aws.json.staging @@ -23,10 +23,13 @@ }, { "name": "server", - "image": "offen/offen@sha256:fe55ba1c183eb8bb4dd19143e6fe1133d6d3b9115c94cc2150620b27adef18fc", + "image": "offen/offen@sha256:4c0d2d5db9bc749d21ad8659008658bf25318074b7c813b0a694e64816df750d", "essential": true, "memory": 256, - "command": ["serve"] + "command": ["serve"], + "environment": [ + { "name": "OFFEN_SERVER_REVERSEPROXY", "value": "1" } + ] } ] } diff --git a/build/nginx.conf b/build/nginx.conf index 63cf5fb..10b7d0e 100644 --- a/build/nginx.conf +++ b/build/nginx.conf @@ -28,15 +28,10 @@ http { autoindex on; root /www/data; expires $expires; - proxy_hide_header Content-Security-Policy; add_header Content-Security-Policy $csp; - proxy_hide_header Strict-Transport-Security; add_header Strict-Transport-Security 'max-age=604800; includeSubDomains'; - proxy_hide_header Referrer-Policy; add_header Referrer-Policy 'origin-when-cross-origin'; - proxy_hide_header X-Content-Type-Options; add_header X-Content-Type-Options 'nosniff'; - proxy_hide_header X-XSS-Protection; add_header X-XSS-Protection '1; mode=block'; location /api/ { diff --git a/docker-compose.yml b/docker-compose.yml index 8939bc8..269b060 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,7 +12,7 @@ services: - server server: - image: offen/offen@sha256:fe55ba1c183eb8bb4dd19143e6fe1133d6d3b9115c94cc2150620b27adef18fc + image: offen/offen@sha256:4c0d2d5db9bc749d21ad8659008658bf25318074b7c813b0a694e64816df750d command: serve volumes: - ./bootstrap.yml:/bootstrap.yml @@ -23,6 +23,7 @@ services: OFFEN_APP_DISABLESECURECOOKIE: '1' OFFEN_DATABASE_CONNECTIONSTRING: /data/offen.db OFFEN_SERVER_PORT: 8080 + OFFEN_SERVER_REVERSEPROXY: '1' OFFEN_SECRETS_COOKIEEXCHANGE: 8jeKYbbnywoYIZznu4HffQ== OFFEN_SECRETS_EMAILSALT: eypctS7SVKM1Ureb61db5Q== depends_on: diff --git a/homepage/content/pages/404.md b/homepage/content/pages/404.md index 42dfbc5..86f36df 100644 --- a/homepage/content/pages/404.md +++ b/homepage/content/pages/404.md @@ -1,5 +1,5 @@ Title: Page not found | offen -description: offen is a free and open source analytics software for websites and web applications that allows respectful handling of data. +description: This link isn’t working. save_as: 404.html href: /404.html no_stats: true diff --git a/homepage/content/pages/about.md b/homepage/content/pages/about.md index 7d00d76..a0b157a 100644 --- a/homepage/content/pages/about.md +++ b/homepage/content/pages/about.md @@ -1,5 +1,5 @@ Title: About | offen -description: offen is a free and open source analytics software for websites and web applications that allows respectful handling of data. +description: Who we are, who supports us and how you can can get in touch. save_as: about/index.html href: /about/ @@ -24,4 +24,4 @@ We are happy to work with [NLnet Foundation][nlnet-foundation]{: target="_blank" *Feel free to contact us with any kind of feedback.* From criticism and praise to contributions or support, everything is welcome. Get in touch. -[hioffen@posteo.de](mailto:hioffen@posteo.de) [[GPG Key]](/theme/74B041E23DB29D552644CEB1B18C633D6967FE3F.asc){: target="_blank"} +[hioffen@posteo.de](mailto:hioffen@posteo.de) [[GPG Key]](/theme/74B041E23DB29D552644CEB1B18C633D6967FE3F.asc){: target="_blank"} diff --git a/homepage/content/pages/deep-dive.md b/homepage/content/pages/deep-dive.md index cabeda6..f6159ef 100644 --- a/homepage/content/pages/deep-dive.md +++ b/homepage/content/pages/deep-dive.md @@ -1,7 +1,8 @@ Title: Deep dive | offen -description: offen is a free and open source analytics software for websites and web applications that allows respectful handling of data. +description: What do users know about their data? How can they access it? Do operators benefit from a careful handling of user data? Does offen work in accordance with GDPR? save_as: deep-dive/index.html href: /deep-dive/ +sitemap_priority: 0.7 ## Deep dive diff --git a/homepage/content/pages/index.md b/homepage/content/pages/index.md index dabaf9e..3442702 100644 --- a/homepage/content/pages/index.md +++ b/homepage/content/pages/index.md @@ -1,8 +1,9 @@ Title: Transparent web analytics for everyone | offen -description: offen is a free and open source analytics software for websites and web applications that allows respectful handling of data. +description: offen is a free and open source analytics software for websites and web applications. Users can access their data while the operators treat it with respect. save_as: index.html href: / template: index +sitemap_priority: 1.0 ## Summary diff --git a/homepage/content/pages/legal-notice.md b/homepage/content/pages/legal-notice.md index 2630936..6717c79 100644 --- a/homepage/content/pages/legal-notice.md +++ b/homepage/content/pages/legal-notice.md @@ -1,7 +1,8 @@ Title: Legal Notice | offen -description: offen is a free and open source analytics software for websites and web applications that allows respectful handling of data. +description: Information in accordance with Section 5 TMG save_as: legal-notice/index.html href: /legal-notice/ +exclude_from_sitemap: true ## Legal Notice diff --git a/homepage/content/pages/opt-out.md b/homepage/content/pages/opt-out.md index 5bdf07e..4d167e8 100644 --- a/homepage/content/pages/opt-out.md +++ b/homepage/content/pages/opt-out.md @@ -1,5 +1,5 @@ Title: Opt-out | offen -description: offen is a free and open source analytics software for websites and web applications that allows respectful handling of data. +description: Prevent offen from aggregating the actions you have taken on participating websites. save_as: opt-out/index.html exclude_from_sitemap: true diff --git a/homepage/content/pages/status.md b/homepage/content/pages/status.md index b7964c8..48277e8 100644 --- a/homepage/content/pages/status.md +++ b/homepage/content/pages/status.md @@ -1,8 +1,9 @@ -Title: Status | offen -description: offen is a free and open source analytics software for websites and web applications that allows respectful handling of data. +Title: Project status | offen +description: How much headway has been made on individual tasks leading up to a stable version. save_as: status/index.html href: /status/ + ## Project status ### September 2019 diff --git a/homepage/requirements.txt b/homepage/requirements.txt index a62e2d6..575200b 100644 --- a/homepage/requirements.txt +++ b/homepage/requirements.txt @@ -2,3 +2,4 @@ pelican==4.0.1 markdown==3.1.1 webassets==0.12.1 cssmin==0.2.0 +libsass==0.19.3 diff --git a/homepage/theme/static/css/style.css b/homepage/theme/static/css/style.scss similarity index 82% rename from homepage/theme/static/css/style.css rename to homepage/theme/static/css/style.scss index 0e95044..8ec4c68 100644 --- a/homepage/theme/static/css/style.css +++ b/homepage/theme/static/css/style.scss @@ -3,15 +3,13 @@ /* --------------------------------------------------- ROOTS ----------------------------------------------------*/ -:root { ---yellow-mid: #F7BF08; ---yellow-bright: #fde28c; ---mint-mid: #BBD9D3; ---black-mid: #39352A; ---grey-mid: #898989; ---grey-bright: #D5D5D5; ---white: #FFF; -} +$yellow-mid: #F7BF08; +$yellow-bright: #fde28c; +$mint-mid: #BBD9D3; +$black-mid: #39352A; +$grey-mid: #898989; +$grey-bright: #D5D5D5; +$white: #FFF; /* --------------------------------------------------- @@ -34,28 +32,28 @@ LAYOUT & SPACER z-index: 1; top: 0; right: 0; - background-color: var(--yellow-mid); + background-color: $yellow-mid; } .intro { width: 100%; margin: 70px 0 0 0; - background-color: var(--yellow-mid); + background-color: $yellow-mid; } .feature { width: 100%; } .cta-top { width: 100%; - color: var(--yellow-mid); + color: $yellow-mid; } .content { width: 100%; margin: 70px 0 0 0; - background-color: var(--white); + background-color: $white; } .content-index { width: 100%; - background-color: var(--white); + background-color: $white; } .cta-bottom, .outro { @@ -64,8 +62,8 @@ LAYOUT & SPACER .footer { width: 100%; min-height: 300px; - color: var(--grey-mid); - background-color: var(--black-mid); + color: $grey-mid; + background-color: $black-mid; } .spacer-intro { width: 430px; @@ -76,13 +74,13 @@ LAYOUT & SPACER } /* Desktop Styles */ @media only screen and (min-width: 961px) { + .container-full { + padding: 60px 0 120px 0; + } .container-reader { width: 600px; margin: 0 auto; - padding: 60px 20px 120px 20px; - } - .container-full { - padding: 60px 80px 120px 80px; + padding: 60px 0 120px 0; } .footer { padding: 40px 40px 0 40px; @@ -90,11 +88,9 @@ LAYOUT & SPACER } /* Mobile Styles */ @media only screen and (min-width: 600px) and (max-width: 960px) { - .container-reader, - .container-full { + .container-reader { width: 600px; margin: 0 auto; - padding: 60px 20px 120px 20px; } } @media only screen and (max-width: 960px) { @@ -131,11 +127,17 @@ CARDS .card-deck, .card, .footer-card-deck { + display: -webkit-box; + display: -ms-flexbox; display: flex; } .card { - max-width: 300px; - color: var(--black-mid); + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + width: 280px; + color: $black-mid; } .card h2, .card p { @@ -151,15 +153,22 @@ CARDS /* Mobile Styles */ @media only screen and (max-width: 960px) { .card-deck, - .card, .footer-card-deck { + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; flex-direction: column; } + .card-deck { + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + } .card { - align-self: center; + margin: 0 auto; } .card:nth-child(2) { - margin: 100px 0 100px 0; + margin: 100px auto 100px auto; } .footer-card { text-align: center; @@ -169,18 +178,22 @@ CARDS @media only screen and (min-width: 961px) { .card-deck, .footer-card-deck { + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -ms-flex-direction: row; flex-direction: row; } - .card { - flex-direction: column; - } .card-deck { - justify-content: space-evenly; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; } .card:nth-child(2) { - margin: 0 40px 0 40px; + margin: 0 50px 0 50px; } .footer-card-deck { + -webkit-box-pack: justify; + -ms-flex-pack: justify; justify-content: space-between; } .footer-card:nth-child(1), @@ -199,25 +212,25 @@ CARDS TYPO ----------------------------------------------------*/ body { - background-color: var(--white); font-family: "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.5; font-weight: 400; word-wrap: break-word; - color: var(--grey-mid); + color: $grey-mid; + background-color: $black-mid; // overscroll color } h1, h2 { font-weight: 700; line-height: 1.3; - color: var(--black-mid); + color: $black-mid; } h3, h4 { font-size: 14px; font-weight: 400; - color: var(--black-mid); + color: $black-mid; } h3 { margin: 0 0 20px 0; @@ -226,7 +239,7 @@ p + h3 { margin: 60px 0 20px 0; } h4 { - color: var(--grey-mid); + color: $grey-mid; } /* Desktop Styles */ @media only screen and (min-width: 481px) { @@ -257,7 +270,7 @@ LINKS a, a:hover, a:focus { - color: var(--grey-mid); + color: $grey-mid; text-decoration: none; } p a, @@ -268,7 +281,7 @@ p a:focus { ol li p a, ol li p a:hover, ol li p a:focus { -color: var(--grey-bright); +color: $grey-bright; } @@ -276,7 +289,7 @@ color: var(--grey-bright); TYPO ELEMENTS ----------------------------------------------------*/ h1 + p { - color: var(--black-mid); + color: $black-mid; } .bg h2 { margin: 0 0 10px 0; @@ -294,11 +307,11 @@ h1 + p { } #bg-cta-top h2, #bg-cta-top p { - color: var(--white); + color: $white; } #bg-outro h2, #bg-outro p { - color: var(--black-mid); + color: $black-mid; } strong, h1 + p strong, @@ -307,16 +320,16 @@ h1 + p strong, } .container-reader h2 { margin: 0 0 20px 0; - color: var(--grey-bright); + color: $grey-bright; } strong, h3 strong { text-decoration: none; font-weight: 400; - color: var(--black-mid); + color: $black-mid; } .cta-top strong { - color: var(--white); + color: $white; } .content-index p, .content p { @@ -325,32 +338,32 @@ h3 strong { hr { height: 0; margin: 80px 0 20px 0; - border-top: 1px solid var(--grey-bright); + border-top: 1px solid $grey-bright; } blockquote { margin: 0; padding: 0 0 0 20px; font-style: italic; - border-left: 1px solid var(--grey-bright); + border-left: 1px solid $grey-bright; } ol { padding-inline-start: 20px; } em { - background: linear-gradient(transparent 66%, var(--yellow-bright) 66%); + background: linear-gradient(transparent 66%, $yellow-bright 66%); font-style: normal; } .footer-card h3 strong { font-weight: 700; - color: var(--yellow-mid); + color: $yellow-mid; } .footer h3, .footer h4 { - color: var(--yellow-mid); + color: $yellow-mid; margin: 0 0 2px 0; } .footnote { - color: var(--grey-bright); + color: $grey-bright; } /* reposition for fixed menu */ .footnote li { @@ -379,8 +392,8 @@ BUTTONS .btn-color-yellow:hover, .btn-color-yellow:active { font-weight: 700; - color: var(--yellow-mid); - border: solid var(--yellow-mid) 5px; + color: $yellow-mid; + border: solid $yellow-mid 5px; } .btn-color-black, .btn-color-black:visited, @@ -388,8 +401,8 @@ BUTTONS .btn-color-black:hover, .btn-color-black:active { font-weight: 700; - color: var(--black-mid); - border: solid var(--black-mid) 5px; + color: $black-mid; + border: solid $black-mid 5px; } .btn-color-white, .btn-color-white:visited, @@ -397,8 +410,8 @@ BUTTONS .btn-color-white:hover, .btn-color-white:active { font-weight: 700; - color: var(--white); - border: solid var(--white) 5px; + color: $white; + border: solid $white 5px; } @@ -442,12 +455,12 @@ nav ul li a:visited { line-height: 70px; text-decoration: none; font-weight: 700; - background: var(--yellow-mid); - color: var(--black-mid); + background: $yellow-mid; + color: $black-mid; } nav ul li a:hover, nav ul li a:visited:hover { - color: var(--black-mid); + color: $black-mid; } nav ul li a:not(:only-child):after, nav ul li a:visited:not(:only-child):after { @@ -471,7 +484,7 @@ nav ul li ul li a { position: absolute; top: 0; right: 0; - background: var(--yellow-mid); + background: $yellow-mid; height: 70px; width: 70px; } @@ -531,7 +544,7 @@ nav ul li ul li a { border-radius: 1px; height: 2px; width: 25px; - background: var(--black-mid); + background: $black-mid; position: absolute; display: block; content: ''; diff --git a/homepage/theme/templates/base.html b/homepage/theme/templates/base.html index e83e59e..1bafbee 100644 --- a/homepage/theme/templates/base.html +++ b/homepage/theme/templates/base.html @@ -19,7 +19,7 @@ - {% assets filters="cssmin", output="css/style.min.css", "css/normalize.css", "css/fonts.css", "css/style.css" %} + {% assets filters="libsass,cssmin", output="css/style.min.css", "css/normalize.css", "css/fonts.css", "css/style.scss" %} {% endassets %} {% if OFFEN_ACCOUNT_ID and not page.no_stats %} diff --git a/homepage/theme/templates/sitemap.html b/homepage/theme/templates/sitemap.html index 0a6716a..59d1001 100644 --- a/homepage/theme/templates/sitemap.html +++ b/homepage/theme/templates/sitemap.html @@ -4,7 +4,7 @@ {% if not page.exclude_from_sitemap %} {{ SITEURL }}{{ page.href }} - {{ page.sitemap_priority or 1.0 }} + {{ page.sitemap_priority or 0.5 }} {% endif %} {% endfor %} diff --git a/nginx.conf b/nginx.conf index 15e78b3..c8f0b3f 100644 --- a/nginx.conf +++ b/nginx.conf @@ -25,18 +25,12 @@ http { server { listen 80; expires $expires; - proxy_hide_header Content-Security-Policy; add_header Content-Security-Policy $csp; - proxy_hide_header Strict-Transport-Security; add_header Strict-Transport-Security 'max-age=604800; includeSubDomains'; - proxy_hide_header Referrer-Policy; add_header Referrer-Policy 'origin-when-cross-origin'; - proxy_hide_header X-Content-Type-Options; add_header X-Content-Type-Options 'nosniff'; - proxy_hide_header X-XSS-Protection; add_header X-XSS-Protection '1; mode=block'; - location /api/ { proxy_pass http://server; proxy_redirect off;