From 1445b48a25693e9c65c19a473d0686a88242ad66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9taireau?= Date: Sun, 10 Nov 2024 02:38:10 +0100 Subject: [PATCH 1/5] Automatically add download links to the releases --- src/_data/site.json | 16 +++--- src/_includes/downloads.njk | 57 ++++++++++++++++++ src/_layouts/release.njk | 12 ++++ src/index.html | 108 ----------------------------------- src/index.njk | 54 ++++++++++++++++++ src/news/2024-10-01-0.7.1.md | 3 +- src/news/2024-11-06-0.8.0.md | 3 +- 7 files changed, 136 insertions(+), 117 deletions(-) create mode 100644 src/_includes/downloads.njk create mode 100644 src/_layouts/release.njk delete mode 100644 src/index.html create mode 100644 src/index.njk diff --git a/src/_data/site.json b/src/_data/site.json index 9aca358..e9d4c31 100644 --- a/src/_data/site.json +++ b/src/_data/site.json @@ -1,9 +1,11 @@ { - "title": "Dangerzone", - "description": "The Dangerzone application takes potentially dangerous documents and converts them to safe PDF files", - "url": "https://dangerzone.rocks/", - "author": { - "name": "Dangerzone development team", - "email": "info@freedom.press" - } + "title": "Dangerzone", + "description": "The Dangerzone application takes potentially dangerous documents and converts them to safe PDF files", + "url": "https://dangerzone.rocks/", + "author": { + "name": "Dangerzone development team", + "email": "info@freedom.press" + }, + "github_repo": "https://github.com/freedomofpress/dangerzone", + "version": "0.8.0" } \ No newline at end of file diff --git a/src/_includes/downloads.njk b/src/_includes/downloads.njk new file mode 100644 index 0000000..730eb6c --- /dev/null +++ b/src/_includes/downloads.njk @@ -0,0 +1,57 @@ +
+

Download Dangerzone {{ version }}

+ 🔍 How to verify +
+
+
+ Apple Logo +

MacOS

+ Intel chip + Apple Silicon chip +

ℹ️ + Which one do I have? +

+
+
+ Windows Logo +

Windows

+ Download for + Windows +

+

+

+
+
+
+
+ Ubuntu Logo +

Ubuntu / Debian

+ Install +
+
+ Fedora Logo +

Fedora

+ Install +
+
+ Tails Logo +

Tails

+ Install +
+
+ Linux Logo +

Other Linux

+ Build from Source +
+
+ Qubes OS Logo +

Qubes OS (Beta)

+ Install +
+
+
\ No newline at end of file diff --git a/src/_layouts/release.njk b/src/_layouts/release.njk new file mode 100644 index 0000000..c11c0b5 --- /dev/null +++ b/src/_layouts/release.njk @@ -0,0 +1,12 @@ +--- +layout: base +--- + +
+
+

{{ title }}

+
+ {{ content | safe }} +
+{% include "../_includes/downloads.njk" %} +
\ No newline at end of file diff --git a/src/index.html b/src/index.html deleted file mode 100644 index eaedd2f..0000000 --- a/src/index.html +++ /dev/null @@ -1,108 +0,0 @@ ---- -layout: base.njk ---- - -
-
- -

Dangerzone

-

Take potentially dangerous PDFs, office documents, or images and convert them - to safe PDFs.

- - Download - - Learn More -
-
-
-
-

No Network Access

-

Sandboxes don't have network access, so if a malicious document - can compromise one, it can't phone home

-
-
-

Optional OCR

-

Dangerzone can optionally OCR the safe PDFs it creates, so it - will have a text layer again

-
-
-

Reduced File Size

-

Dangerzone compresses the safe PDF to reduce file size

-
-
-

Open Docs Safely

-

After converting, Dangerzone lets you open the safe PDF in the PDF - viewer of your choice, which allows you to open PDFs and office docs - in Dangerzone by default so you never accidentally open a dangerous document

-
-
-
-

Download Dangerzone 0.8.0

- 🔍 How to verify -
-
-
- Apple Logo -

MacOS

- Intel chip - Apple Silicon chip -

ℹ️ - Which one do I have? -

-
-
- Windows Logo -

Windows

- Download for - Windows -

-

-

-
-
-
-
- Ubuntu Logo -

Ubuntu / Debian

- Install -
-
- Fedora Logo -

Fedora

- Install -
-
- Tails Logo -

Tails

- Install -
-
- Linux Logo -

Other Linux

- Build from Source -
-
- Qubes OS Logo -

Qubes OS (Beta)

- Install -
-
-
-
-

How It Works

-
-

Dangerzone works like this: You give it a document that you don't know - if you can trust (for example, an email attachment). Inside of a sandbox, - Dangerzone converts the document to a PDF (if it isn't already one), and - then converts the PDF into raw pixel data: a huge list of of RGB color - values for each page. Then, Dangerzone takes this pixel data and converts - it back into a PDF.

-

Learn more

-
-
diff --git a/src/index.njk b/src/index.njk new file mode 100644 index 0000000..9715c11 --- /dev/null +++ b/src/index.njk @@ -0,0 +1,54 @@ +--- +layout: base.njk +--- + +
+
+ +

Dangerzone

+

Take potentially dangerous PDFs, office documents, or images and convert them + to safe PDFs.

+ + Download + + Learn More +
+
+
+
+

No Network Access

+

Sandboxes don't have network access, so if a malicious document + can compromise one, it can't phone home

+
+
+

Optional OCR

+

Dangerzone can optionally OCR the safe PDFs it creates, so it + will have a text layer again

+
+
+

Reduced File Size

+

Dangerzone compresses the safe PDF to reduce file size

+
+
+

Open Docs Safely

+

After converting, Dangerzone lets you open the safe PDF in the PDF + viewer of your choice, which allows you to open PDFs and office docs + in Dangerzone by default so you never accidentally open a dangerous document

+
+
+ +{% set version = site.version %} +{% include "./_includes/downloads.njk" %} + +
+

How It Works

+
+

Dangerzone works like this: You give it a document that you don't know + if you can trust (for example, an email attachment). Inside of a sandbox, + Dangerzone converts the document to a PDF (if it isn't already one), and + then converts the PDF into raw pixel data: a huge list of of RGB color + values for each page. Then, Dangerzone takes this pixel data and converts + it back into a PDF.

+

Learn more

+
+
\ No newline at end of file diff --git a/src/news/2024-10-01-0.7.1.md b/src/news/2024-10-01-0.7.1.md index 82f2bea..fd7da4c 100644 --- a/src/news/2024-10-01-0.7.1.md +++ b/src/news/2024-10-01-0.7.1.md @@ -1,6 +1,7 @@ --- -layout: post +layout: release title: Dangerzone 0.7.1 is out +version: 0.7.1 date: 2024-10-01 --- diff --git a/src/news/2024-11-06-0.8.0.md b/src/news/2024-11-06-0.8.0.md index 87fd1fd..1390762 100644 --- a/src/news/2024-11-06-0.8.0.md +++ b/src/news/2024-11-06-0.8.0.md @@ -1,6 +1,7 @@ --- -layout: post +layout: release title: Dangerzone 0.8.0 is out +version: 0.8.0 date: 2024-11-06 --- From 9843cee80862c012572dfc3733d7e22c990a4777 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9taireau?= Date: Wed, 27 Nov 2024 12:05:42 +0100 Subject: [PATCH 2/5] Use the "post" layout by default Fixes #49 --- src/_layouts/release.njk | 12 ------------ src/news/2024-08-22-welcome.md | 1 - src/news/2024-09-23-gvisor.md | 1 - src/news/2024-10-01-0.7.1.md | 1 - src/news/2024-11-06-0.8.0.md | 1 - src/news/news.json | 3 +++ 6 files changed, 3 insertions(+), 16 deletions(-) delete mode 100644 src/_layouts/release.njk create mode 100644 src/news/news.json diff --git a/src/_layouts/release.njk b/src/_layouts/release.njk deleted file mode 100644 index c11c0b5..0000000 --- a/src/_layouts/release.njk +++ /dev/null @@ -1,12 +0,0 @@ ---- -layout: base ---- - -
-
-

{{ title }}

-
- {{ content | safe }} -
-{% include "../_includes/downloads.njk" %} -
\ No newline at end of file diff --git a/src/news/2024-08-22-welcome.md b/src/news/2024-08-22-welcome.md index 8ca2bad..c029e26 100644 --- a/src/news/2024-08-22-welcome.md +++ b/src/news/2024-08-22-welcome.md @@ -1,5 +1,4 @@ --- -layout: post title: Welcome to the Dangerzone date: 2024-08-22 --- diff --git a/src/news/2024-09-23-gvisor.md b/src/news/2024-09-23-gvisor.md index a274e07..17d048f 100644 --- a/src/news/2024-09-23-gvisor.md +++ b/src/news/2024-09-23-gvisor.md @@ -1,5 +1,4 @@ --- -layout: post title: "Safe Ride into the Dangerzone: Reducing attack surface with gVisor" date: 2024-09-23 --- diff --git a/src/news/2024-10-01-0.7.1.md b/src/news/2024-10-01-0.7.1.md index fd7da4c..1ec055e 100644 --- a/src/news/2024-10-01-0.7.1.md +++ b/src/news/2024-10-01-0.7.1.md @@ -1,5 +1,4 @@ --- -layout: release title: Dangerzone 0.7.1 is out version: 0.7.1 date: 2024-10-01 diff --git a/src/news/2024-11-06-0.8.0.md b/src/news/2024-11-06-0.8.0.md index 1390762..c7e59e2 100644 --- a/src/news/2024-11-06-0.8.0.md +++ b/src/news/2024-11-06-0.8.0.md @@ -1,5 +1,4 @@ --- -layout: release title: Dangerzone 0.8.0 is out version: 0.8.0 date: 2024-11-06 diff --git a/src/news/news.json b/src/news/news.json new file mode 100644 index 0000000..047dc27 --- /dev/null +++ b/src/news/news.json @@ -0,0 +1,3 @@ +{ + "layout": "post.njk" +} \ No newline at end of file From b03896c381af65eab66d7fae97e9518c2edf3f6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9taireau?= Date: Wed, 27 Nov 2024 12:06:54 +0100 Subject: [PATCH 3/5] Always use the latest version, by looking at the latest version released --- eleventy.config.js | 73 ++++++++++++++++++++++++------------------- src/_data/site.json | 3 +- src/_layouts/post.njk | 3 ++ src/index.njk | 6 ++-- 4 files changed, 48 insertions(+), 37 deletions(-) diff --git a/eleventy.config.js b/eleventy.config.js index b2da867..dde00d1 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -1,36 +1,43 @@ const pluginRss = require("@11ty/eleventy-plugin-rss"); const markdownIt = require("markdown-it"); -module.exports = function(eleventyConfig) { - eleventyConfig.addPassthroughCopy("src/assets"); - eleventyConfig.addPassthroughCopy("src/favicon.ico"); - eleventyConfig.addPlugin(pluginRss); - - eleventyConfig.setFrontMatterParsingOptions({ - excerpt: true, - }); - - eleventyConfig.addFilter("md", function (content = "") { - return markdownIt({ html: true }).render(content); - }); - - eleventyConfig.addFilter("dateIso", date => { - return date.toISOString(); - }); - - eleventyConfig.addFilter("dateReadable", date => { - return date.toDateString(); - }); - - eleventyConfig.addCollection("posts", function(collection) { - return collection.getFilteredByGlob("src/news/*.md"); - }); - - return { - dir: { - input: "src", - output: "dist", - includes: "_layouts" - } - }; -} \ No newline at end of file +module.exports = function (eleventyConfig) { + eleventyConfig.addPassthroughCopy("src/assets"); + eleventyConfig.addPassthroughCopy("src/favicon.ico"); + eleventyConfig.addPlugin(pluginRss); + + eleventyConfig.setFrontMatterParsingOptions({ + excerpt: true, + }); + + eleventyConfig.addFilter("md", function (content = "") { + return markdownIt({ html: true }).render(content); + }); + + eleventyConfig.addFilter("dateIso", (date) => { + return date.toISOString(); + }); + + eleventyConfig.addFilter("dateReadable", (date) => { + return date.toDateString(); + }); + + eleventyConfig.addCollection("posts", function (collection) { + return collection.getFilteredByGlob("src/news/*.md"); + }); + + eleventyConfig.addFilter("getLatestVersion", function (collection) { + // Find the latest known version from the collection + return collection?.reduce((latest, item) => { + return !latest || item.data.version > latest ? item.data.version : latest; + }, null); + }); + + return { + dir: { + input: "src", + output: "dist", + includes: "_layouts", + }, + }; +}; diff --git a/src/_data/site.json b/src/_data/site.json index e9d4c31..a30d8dd 100644 --- a/src/_data/site.json +++ b/src/_data/site.json @@ -6,6 +6,5 @@ "name": "Dangerzone development team", "email": "info@freedom.press" }, - "github_repo": "https://github.com/freedomofpress/dangerzone", - "version": "0.8.0" + "github_repo": "https://github.com/freedomofpress/dangerzone" } \ No newline at end of file diff --git a/src/_layouts/post.njk b/src/_layouts/post.njk index ec37b58..d9f71b2 100644 --- a/src/_layouts/post.njk +++ b/src/_layouts/post.njk @@ -8,4 +8,7 @@ layout: base
{{ content | safe }} +{% if version %} + {% include "../_includes/downloads.njk" %} +{% endif %} \ No newline at end of file diff --git a/src/index.njk b/src/index.njk index 9715c11..859beb4 100644 --- a/src/index.njk +++ b/src/index.njk @@ -37,8 +37,10 @@ layout: base.njk -{% set version = site.version %} -{% include "./_includes/downloads.njk" %} +{% set version = collections.posts | getLatestVersion %} +{% if version %} + {% include "./_includes/downloads.njk" %} +{% endif %}

How It Works

From 200d7e28e4fb0b2fcba3993f61e91bd968a42489 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9taireau?= Date: Mon, 9 Dec 2024 14:42:11 +0100 Subject: [PATCH 4/5] Warn users when they're viewing old versions --- src/_layouts/post.njk | 6 +- src/assets/css/style.css | 576 +++++++++++++++++++-------------------- 2 files changed, 292 insertions(+), 290 deletions(-) diff --git a/src/_layouts/post.njk b/src/_layouts/post.njk index d9f71b2..abc3b15 100644 --- a/src/_layouts/post.njk +++ b/src/_layouts/post.njk @@ -6,9 +6,13 @@ layout: base

{{ title }}

+ {% set latest = collections.posts | getLatestVersion %} + {% if version and latest > version %} +

You're currently reading the release announcement for version {{ version }}, but a newer version ({{ latest }}) is now available.

+ {% endif %} {{ content | safe }}
{% if version %} {% include "../_includes/downloads.njk" %} {% endif %} - \ No newline at end of file + diff --git a/src/assets/css/style.css b/src/assets/css/style.css index 32e8902..e74f47e 100644 --- a/src/assets/css/style.css +++ b/src/assets/css/style.css @@ -1,307 +1,299 @@ * { - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - box-sizing: border-box; - transition: .1s; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + transition: 0.1s; } .clearfix:after { - content: "."; - display: block; - clear: both; - visibility: hidden; - line-height: 0; - height: 0; + content: "."; + display: block; + clear: both; + visibility: hidden; + line-height: 0; + height: 0; } ::selection { - background-color: #f97b25; - color: #fff; + background-color: #f97b25; + color: #fff; } - html { - font-family: sans-serif; - min-width: 320px; - /*narrowest iPhone width*/ + font-family: sans-serif; + min-width: 320px; + /*narrowest iPhone width*/ } body { - background-color: #592a00; + background-color: #592a00; } main { - - background-color: white; + background-color: white; } h1 { - font-size: 4rem; - line-height: 5.25rem; - margin-bottom: 1rem; + font-size: 4rem; + line-height: 5.25rem; + margin-bottom: 1rem; } h2 { - text-transform: uppercase; - color: #592a00; - font-size: 2.5rem; - text-align: center; - margin-bottom: 1.5rem; - margin-top: 1.5rem; + text-transform: uppercase; + color: #592a00; + font-size: 2.5rem; + text-align: center; + margin-bottom: 1.5rem; + margin-top: 1.5rem; } p { - font-size: 1rem; - line-height: 1.5rem; + font-size: 1rem; + line-height: 1.5rem; } a { - line-height: 1.5rem; - color: #592a00; + line-height: 1.5rem; + color: #592a00; } .button { - border: 1px solid rgba(0, 0, 0, 0.1); - padding: .625rem 1rem; - color: #592a00; - border-radius: 3px; - font-size: .875rem; - text-decoration: none; - background-color: #fff; - display: inline-block; + border: 1px solid rgba(0, 0, 0, 0.1); + padding: 0.625rem 1rem; + color: #592a00; + border-radius: 3px; + font-size: 0.875rem; + text-decoration: none; + background-color: #fff; + display: inline-block; } .buttonPrimary { - border: 3px solid #000; - padding: .625rem 1rem; - background-color: #592a00; - border-radius: 3px; - font-size: 1rem; - font-weight: bold; - color: #ffffff; - text-decoration: none; - margin: 0 .5rem 0 0; + border: 3px solid #000; + padding: 0.625rem 1rem; + background-color: #592a00; + border-radius: 3px; + font-size: 1rem; + font-weight: bold; + color: #ffffff; + text-decoration: none; + margin: 0 0.5rem 0 0; } .buttonPrimary:hover { - background-color: #592a00; - color: #ffffff; - box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15); + background-color: #592a00; + color: #ffffff; + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15); } .button:hover { - background-color: #fafafa; - box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15); + background-color: #fafafa; + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15); } .wrapper { - max-width: 1280px; - margin: 0 auto; - padding: 3rem; + max-width: 1280px; + margin: 0 auto; + padding: 3rem; } .youtube-embed { - width: 100%; - min-height: 340px; - max-width: 600px; + width: 100%; + min-height: 340px; + max-width: 600px; } - /*HEADER*/ - header nav { - float: right; - font-size: .75rem; - padding:1.5rem; + float: right; + font-size: 0.75rem; + padding: 1.5rem; } - header ul li { - display: inline; - margin: 0 0.5rem 0 0; + display: inline; + margin: 0 0.5rem 0 0; } -.index-header, .index-header a { - color: #ffffff; +.index-header, +.index-header a { + color: #ffffff; } - /*INTRO*/ #intro { - text-align: center; - color: #ffffff; - padding: 4.5rem 0 6rem 0; - min-height: 100vh; - /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#fcfcfc+0,f2f2f2+100 */ - background: #592a00; - /* Old browsers */ - background: -moz-linear-gradient(top, #592a00 0%, #f97b25 100%); - /* FF3.6-15 */ - background: -webkit-linear-gradient(top, #592a00 0%, #f97b25 100%); - /* Chrome10-25,Safari5.1-6 */ - background: linear-gradient(to bottom, #592a00 0%, #f97b25 100%); - /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfcfc', endColorstr='#f2f2f2', GradientType=0); - /* IE6-9 */ + text-align: center; + color: #ffffff; + padding: 4.5rem 0 6rem 0; + min-height: 100vh; + /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#fcfcfc+0,f2f2f2+100 */ + background: #592a00; + /* Old browsers */ + background: -moz-linear-gradient(top, #592a00 0%, #f97b25 100%); + /* FF3.6-15 */ + background: -webkit-linear-gradient(top, #592a00 0%, #f97b25 100%); + /* Chrome10-25,Safari5.1-6 */ + background: linear-gradient(to bottom, #592a00 0%, #f97b25 100%); + /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfcfc', endColorstr='#f2f2f2', GradientType=0); + /* IE6-9 */ } #intro img { - width: 8rem; - margin-bottom: 1rem; + width: 8rem; + margin-bottom: 1rem; } #intro .secondary { - font-size: .875rem; - margin-bottom: 1rem; + font-size: 0.875rem; + margin-bottom: 1rem; } #intro p:last-of-type { - margin: 0 0 3rem 0 + margin: 0 0 3rem 0; } - - /*DOWNLOADS*/ #downloads { - text-align: center; - border-bottom: 1px solid rgba(0, 0, 0, 0.1); + text-align: center; + border-bottom: 1px solid rgba(0, 0, 0, 0.1); } #downloads img { - max-height: 6rem; - margin-bottom: 2rem; + max-height: 6rem; + margin-bottom: 2rem; } .os-download-container { - display: flex; - flex-wrap: wrap; - justify-content: center; + display: flex; + flex-wrap: wrap; + justify-content: center; } .osPrimary { - width: 50%; - min-width: 360px; - border-bottom: 1px solid rgba(0, 0, 0, 0.1); - padding-top: 3rem; - padding-bottom: 2rem; + width: 50%; + min-width: 360px; + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + padding-top: 3rem; + padding-bottom: 2rem; } .osSecondary { - width: 20%; - min-width: 200px; - padding-top: 3rem; - padding-bottom: 2rem; + width: 20%; + min-width: 200px; + padding-top: 3rem; + padding-bottom: 2rem; } #downloads p { - margin-bottom: 1rem; + margin-bottom: 1rem; } .title { - font-size: 1.5rem; - margin-bottom: 3rem; - line-height: 2.25rem; + font-size: 1.5rem; + margin-bottom: 3rem; + line-height: 2.25rem; } #downloads .osPrimary .title { - margin-bottom: 2rem; + margin-bottom: 2rem; } #downloads p.code { - font-family: "Courier New", Courier, monospace; - margin-bottom: .5rem; - font-size: .875rem; - line-height: 1.25rem; + font-family: "Courier New", Courier, monospace; + margin-bottom: 0.5rem; + font-size: 0.875rem; + line-height: 1.25rem; } .code:last-of-type { - margin-bottom: 0; + margin-bottom: 0; } .sig { - font-size: .75rem; - line-height: 1.25rem; - overflow: hidden; - text-overflow: ellipsis; - margin-bottom: .5rem; + font-size: 0.75rem; + line-height: 1.25rem; + overflow: hidden; + text-overflow: ellipsis; + margin-bottom: 0.5rem; } /*SCREENSHOTS*/ .screenshots { - display: flex; - flex-wrap: wrap; + display: flex; + flex-wrap: wrap; } .screenshots .adjacent { - width: 50%; - padding: 5px; + width: 50%; + padding: 5px; } @media screen and (max-width: 960px) { - .screenshots .adjacent { - width: 100%; - } + .screenshots .adjacent { + width: 100%; + } } /* Homepage blocks: News (section at bottom), Features (call-outs) */ #news { - text-align: center; + text-align: center; } #news img { - display: block; - height: 1rem; - margin: 2rem auto 1rem auto; + display: block; + height: 1rem; + margin: 2rem auto 1rem auto; } #news p { - font-size: 1.25rem; - line-height: 1.75rem; - margin: 0 0 1rem 0; + font-size: 1.25rem; + line-height: 1.75rem; + margin: 0 0 1rem 0; } #news { - clear: left; + clear: left; } #news ul { - list-style: none; - margin: 0; - padding: 0; + list-style: none; + margin: 0; + padding: 0; } #news ul li { - margin: 0 0 20px 0; - padding: 0; + margin: 0 0 20px 0; + padding: 0; } #features { - display: flex; - background-color: #592a00; - color: #ffffff; + display: flex; + background-color: #592a00; + color: #ffffff; } #features.wrapper { - width: auto; - max-width: none; + width: auto; + max-width: none; } #features .feature .title { - margin-bottom: 1rem; + margin-bottom: 1rem; } - @media (max-width: 768px) { - #features { - display: block; - } - .feature { - border-left: none; - } + #features { + display: block; + } + .feature { + border-left: none; + } } .article p { @@ -309,59 +301,61 @@ header ul li { margin: 0.7rem 0; } -.article b, .article strong { +.article b, +.article strong { font-weight: bold; } -.article i, .article em { +.article i, +.article em { font-style: italic; } .article img { - width:100%; + width: 100%; max-width: 800px; } .feature { - flex: 1; - padding: 1rem; - border-left: 1px #ea7321 solid; + flex: 1; + padding: 1rem; + border-left: 1px #ea7321 solid; } .feature:first-of-type { - border-left: none; + border-left: none; } /*FOOTER*/ footer { - font-size: .75rem; - padding: 1rem; - border-top: 1px solid rgba(0, 0, 0, 0.1); - color: #ffffff; - display: flex; + font-size: 0.75rem; + padding: 1rem; + border-top: 1px solid rgba(0, 0, 0, 0.1); + color: #ffffff; + display: flex; } footer p { - font-size: .75rem; - line-height: 1.25rem; - overflow: hidden; - text-overflow: ellipsis; - margin-bottom: .5rem; + font-size: 0.75rem; + line-height: 1.25rem; + overflow: hidden; + text-overflow: ellipsis; + margin-bottom: 0.5rem; } footer a { - line-height: inherit; - color: #ffffff + line-height: inherit; + color: #ffffff; } footer ul li { - display: inline; - line-height: 1.5rem; - margin: 0 .5rem 0 0; + display: inline; + line-height: 1.5rem; + margin: 0 0.5rem 0 0; } footer .wrapper { - padding: 0; + padding: 0; } footer .onion { @@ -370,191 +364,195 @@ footer .onion { footer .onion img { vertical-align: middle; - margin-right: .5rem; + margin-right: 0.5rem; } @media only screen and (max-width: 960px) { - .wrapper { - width: 100%; - } + .wrapper { + width: 100%; + } } @media only screen and (max-width: 768px) { - .osPrimary, - .osSecondary { - width: 100%; - float: none; - border-bottom: 1px solid rgba(0, 0, 0, 0.1); - } + .osPrimary, + .osSecondary { + width: 100%; + float: none; + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + } - .osSecondary:last-of-type { - border-bottom: none; - padding-bottom: 0; - } + .osSecondary:last-of-type { + border-bottom: none; + padding-bottom: 0; + } - .osSecondary { - padding: 3rem; - } + .osSecondary { + padding: 3rem; + } } @media only screen and (max-width: 480px) { + h1 { + font-size: 2.75rem; + line-height: 3rem; + } - h1 { - font-size: 2.75rem; - line-height: 3rem; - } + .wrapper { + padding: 3rem 2rem; + } - .wrapper { - padding: 3rem 2rem; - } + .osPrimary { + padding: 2rem 2rem 3rem 2rem; + } - .osPrimary { - padding: 2rem 2rem 3rem 2rem; - } - - .osSecondary { - padding: 2rem; - } + .osSecondary { + padding: 2rem; + } } .cpu-arch-info { - padding-top: 0.5rem; - color: grey; - font-size: small; + padding-top: 0.5rem; + color: grey; + font-size: small; } /* Restore numbering for ordered lists */ ol { - list-style-type: decimal; - margin-left: 1.5em; - padding-left: 1.5em; + list-style-type: decimal; + margin-left: 1.5em; + padding-left: 1.5em; } .post-time { - font-weight: bold; - margin-bottom: 1.5em; + font-weight: bold; + margin-bottom: 1.5em; } .post-title { - text-align: left; + text-align: left; } .rss-link { - display: inline-flex; - align-items: center; - margin-left: 10px; - vertical-align: middle; + display: inline-flex; + align-items: center; + margin-left: 10px; + vertical-align: middle; } .rss-link svg { - width: 20px; - height: 20px; - color: #f26522; /* Standard RSS orange color */ - transition: color 0.3s ease; + width: 20px; + height: 20px; + color: #f26522; /* Standard RSS orange color */ + transition: color 0.3s ease; } .rss-link:hover svg { - color: #e34e0d; /* Slightly darker orange on hover */ + color: #e34e0d; /* Slightly darker orange on hover */ } -blockquote { - color: #555; - padding: 1rem 2rem; - margin: 2rem 0; - border-left: 5px solid #0077cc; - background-color: #f9f9f9; - box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */ - border-radius: 5px; - position: relative; +blockquote, +p.info { + color: #555; + padding: 1rem 2rem; + margin: 2rem 0; + border-left: 5px solid #0077cc; + background-color: #f9f9f9; + box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */ + border-radius: 5px; + position: relative; } -ul, ol { - margin-top: 1rem; - margin-bottom: 1rem; - padding-left: 1rem; - font-style: normal; - font-weight: 400; +ul, +ol { + margin-top: 1rem; + margin-bottom: 1rem; + padding-left: 1rem; + font-style: normal; + font-weight: 400; } /* Unordered list style */ ul li { - list-style-type: disc; - margin-bottom: 0.5rem; - line-height: 1.5rem; + list-style-type: disc; + margin-bottom: 0.5rem; + line-height: 1.5rem; } /* Ordered list style */ ol li { - list-style-type: decimal; - margin-bottom: 0.25rem; + list-style-type: decimal; + margin-bottom: 0.25rem; } /* Table styling inspired by PicoCSS, https://picocss.com/, MIT License */ table { - width: 100%; - border-collapse: collapse; /* Remove spacing between table cells */ - border-spacing: 0; - text-indent: 0; + width: 100%; + border-collapse: collapse; /* Remove spacing between table cells */ + border-spacing: 0; + text-indent: 0; } -td, th { - padding: 0.5rem 1rem; - border-bottom: 1px solid #e7eaf0; - background-color: #fff; - color: #373c44; - font-weight: 400; - text-align: left; +td, +th { + padding: 0.5rem 1rem; + border-bottom: 1px solid #e7eaf0; + background-color: #fff; + color: #373c44; + font-weight: 400; + text-align: left; } -tfoot td, tfoot th { - border-top: 1px solid #e7eaf0; - border-bottom: none; +tfoot td, +tfoot th { + border-top: 1px solid #e7eaf0; + border-bottom: none; } table.striped tbody tr:nth-child(odd) td { - background-color: rgba(111, 120, 135, 0.04); + background-color: rgba(111, 120, 135, 0.04); } -pre, code { - font-size: 0.875em; - font-family: monospace; - background-color: #f3f5f7; - color: #333; - border-radius: 0.25rem; - padding: 0.375rem; +pre, +code { + font-size: 0.875em; + font-family: monospace; + background-color: #f3f5f7; + color: #333; + border-radius: 0.25rem; + padding: 0.375rem; } pre { - display: block; - padding: 1rem; - overflow-x: auto; - background-color: #f3f5f7; + display: block; + padding: 1rem; + overflow-x: auto; + background-color: #f3f5f7; } pre code { - display: block; - padding: 0; - background: none; + display: block; + padding: 0; + background: none; } figure img { - width: 100%; - max-width: 800px; - display: block; - margin-left: auto; - margin-right: auto; + width: 100%; + max-width: 800px; + display: block; + margin-left: auto; + margin-right: auto; } figure { - margin: 2rem 0 2rem 0; + margin: 2rem 0 2rem 0; } figure figcaption { - text-align: center; - font-style: italic; - font-size: 0.875em; + text-align: center; + font-style: italic; + font-size: 0.875em; } strong { - font-weight: bold; -} \ No newline at end of file + font-weight: bold; +} From 85774ddf92367db899c43bec4702b6f86275617d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9taireau?= Date: Mon, 9 Dec 2024 14:46:47 +0100 Subject: [PATCH 5/5] Remove unnecessary `p` and `br` elements --- src/_includes/downloads.njk | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/_includes/downloads.njk b/src/_includes/downloads.njk index 730eb6c..2cb45f4 100644 --- a/src/_includes/downloads.njk +++ b/src/_includes/downloads.njk @@ -1,7 +1,6 @@

Download Dangerzone {{ version }}

🔍 How to verify -
Apple Logo @@ -21,7 +20,6 @@ href="https://github.com/freedomofpress/dangerzone/releases/download/v{{ version }}/Dangerzone-{{ version }}.msi">Download for Windows

-

@@ -54,4 +52,4 @@ Install -
\ No newline at end of file +