From c040ba14a32b6579b1adfb0c466efcca60ddcc27 Mon Sep 17 00:00:00 2001 From: Christophe HENRY Date: Thu, 11 Mar 2021 21:01:18 +0100 Subject: [PATCH 01/10] Removes ^ at the beginning of lines in tutogemtext --- tutogemtext.gmi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tutogemtext.gmi b/tutogemtext.gmi index 3d6da3c..a0d6f1c 100644 --- a/tutogemtext.gmi +++ b/tutogemtext.gmi @@ -43,10 +43,10 @@ Les blocs préformatés sont des lignes encadrées par un ``` sur une ligne avan Il ne peut exister qu’un lien par ligne. Et la ligne est dédiée à ça ! Voici par exemple un lien vers le site centralisant pour le moment les informations sur Gemini : -^=​> gemini://gemini.circumlunar.space/docs/specification.gmi Spécifications de Gemini -=> gemini://gemini.circumlunar.space/docs/specification.gmi Spécifications de Gemini +​=> gemini:/​/gemini.circumlunar.space/docs/specification.gmi Spécifications de Gemini +=> gemini:/​/gemini.circumlunar.space/docs/specification.gmi Spécifications de Gemini -^=​> https://gemini.circumlunar.space/docs/specification.gmi +​=> https:/​/gemini.circumlunar.space/docs/specification.gmi => https://gemini.circumlunar.space/docs/specification.gmi # Décoration du texte From 9b357ce3d8462c4e314664e66c46f6d78358f595 Mon Sep 17 00:00:00 2001 From: Christophe HENRY Date: Fri, 12 Mar 2021 00:02:16 +0100 Subject: [PATCH 02/10] Removes unuseful .gitignore --- .gitignore | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 1377554..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.swp From c45101732bb1d973f7a5517df033a1a3d9d083a8 Mon Sep 17 00:00:00 2001 From: Christophe HENRY Date: Fri, 12 Mar 2021 00:48:57 +0100 Subject: [PATCH 03/10] Links CHANGELOG and COPYING into index.gmi & edits --- CHANGELOG.gmi | 4 ++-- COPYING => COPYING.gmi | 4 +++- css/index.gmi | 2 +- index.gmi | 4 +++- 4 files changed, 9 insertions(+), 5 deletions(-) rename COPYING => COPYING.gmi (99%) diff --git a/CHANGELOG.gmi b/CHANGELOG.gmi index e1d3551..84c2bba 100644 --- a/CHANGELOG.gmi +++ b/CHANGELOG.gmi @@ -1,8 +1,8 @@ # Changelog All notable changes to this project will be documented in this file. -The format is based on [Keep a Changelog](https:/​/keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https:/​/semver.org/spec/v2.0.0.html). +=> https://keepachangelog.com/en/1.0.0/ The format is based on keep a Changelog. +=> https://semver.org/spec/v2.0.0.html And this project adheres to Semantic Versioning. ## [1.0.0] - 2021-03-10 * Improves presentation and installation page. diff --git a/COPYING b/COPYING.gmi similarity index 99% rename from COPYING rename to COPYING.gmi index be3f7b2..e10ac3e 100644 --- a/COPYING +++ b/COPYING.gmi @@ -1,3 +1,4 @@ +^^^ GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 @@ -51,7 +52,8 @@ code of the modified version. published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under -this license. +t//his license. + The precise terms and conditions for copying, distribution and modification follow. diff --git a/css/index.gmi b/css/index.gmi index 1169988..d5b4741 100644 --- a/css/index.gmi +++ b/css/index.gmi @@ -7,7 +7,7 @@ => index.gmi|simple simple.css => index.gmi|htmgem htmgem.css => index.gmi|terminal terminal.css -=> index.gmi|pre pre.css +=> index.gmi|pre code source préformaté Simple ligne de texte diff --git a/index.gmi b/index.gmi index 20a8074..c0068e7 100644 --- a/index.gmi +++ b/index.gmi @@ -15,9 +15,11 @@ Gemini est un nouveau protocole internet qui : ``` => https://gemini.circumlunar.space/ -=> https://framagit.org/Sbgodin/htmgem Page du projet de HtmGem : code source, rapports de bug, commentaires… +=> https://framagit.org/Sbgodin/htmgem Code source, rapports de bug, commentaires… => https://gmi.sbgodin.fr/htmgem Page principale de HtmGem via le web => gemini://gmi.sbgodin.fr/htmgem Page principale de HtmGem via Gemini +=> CHANGELOG.gmi Journal des modifications (//changelog//) +=> COPYING.gmi GNU Affero General Public License (AGPLv3) ———————————————————— ———————————————————— From cdbc9614de3c843f1472095fc200cf79fed7004b Mon Sep 17 00:00:00 2001 From: Christophe HENRY Date: Fri, 12 Mar 2021 20:25:22 +0100 Subject: [PATCH 04/10] Adds link to download htmgem-master.zip --- index.gmi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.gmi b/index.gmi index c0068e7..8357e22 100644 --- a/index.gmi +++ b/index.gmi @@ -15,9 +15,12 @@ Gemini est un nouveau protocole internet qui : ``` => https://gemini.circumlunar.space/ +=> https://framagit.org/Sbgodin/htmgem/-/archive/master/htmgem-master.zip Téléchargez htmgem-master.zip pour l’installer => https://framagit.org/Sbgodin/htmgem Code source, rapports de bug, commentaires… + => https://gmi.sbgodin.fr/htmgem Page principale de HtmGem via le web => gemini://gmi.sbgodin.fr/htmgem Page principale de HtmGem via Gemini + => CHANGELOG.gmi Journal des modifications (//changelog//) => COPYING.gmi GNU Affero General Public License (AGPLv3) From 212c503bfbad7f7ab787192d01ec99f9351360cc Mon Sep 17 00:00:00 2001 From: Christophe HENRY Date: Fri, 12 Mar 2021 23:30:49 +0000 Subject: [PATCH 05/10] Forces download when using "source" as a style --- index.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 1a05672..d666e75 100644 --- a/index.php +++ b/index.php @@ -301,7 +301,14 @@ $page_title = @$matches[1]; **/ if ("source" == $style) { - echo $fileContents; + $basename = basename($filePath); + header("Cache-Control: public"); + header("Content-Disposition: attachment; filename=$basename"); + header("Content-Type: text/plain"); + header("Content-Transfer-Encoding: binary"); + header('Content-Length: ' . filesize($filePath)); + readfile($filePath); + exit(); } elseif ("pre" == $style) { $fileContents = htmlspecialchars($fileContents, ENT_HTML5|ENT_NOQUOTES, "UTF-8", false); echo << Date: Sat, 13 Mar 2021 00:16:04 +0000 Subject: [PATCH 06/10] Adds a warning about using styles with Gemini client --- index.gmi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.gmi b/index.gmi index 8357e22..ba08644 100644 --- a/index.gmi +++ b/index.gmi @@ -77,7 +77,7 @@ L’installation est terminée 🥳 La suite du texte donne des informations com Par défaut, le style est incorporé dans chaque page récupérée par le navigateur web. Le même style est utilisé pour toutes les pages, //htmgem/css/htmgem.css//, sauf lorsqu’un fichier ayant le même nom que la page mais avec l’extension **.css** existe dans le même répertoire. Dans ce cas, il est utilisé. -Lorsque l’option css est activé dans la configuration (voir //rewrite// plus haut) d’autres comportements sont possibles : +Lorsque l’option css est activé dans la configuration (voir //rewrite// plus haut) d’autres comportements sont possibles. **Attention**, cela ne fonctionnera pas avec un client Gemini puisque HtmGem n’est accessible que via un navigateur web. * &style=**htmgem** : Utilise le style par défaut, mais en tant que fichier externe. * &style=**none** : La page HTML est envoyée sans style. * &style=**** : Le fichier htmgem/css/.css est utilisé en tant que style externe. From bf1c16922b04978e1035abfe1f807a9cf23713fa Mon Sep 17 00:00:00 2001 From: Christophe HENRY Date: Sat, 13 Mar 2021 10:45:54 +0000 Subject: [PATCH 07/10] Fixes 404 page text decoration, adds reload message --- index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index d666e75..e30f66c 100644 --- a/index.php +++ b/index.php @@ -69,9 +69,9 @@ if (empty($fileContents)) { $text404 = << $url 🔄 +=> $url Recharger 🔄 => / EOF; From d36f56c4efe47a06217a5f8192789e2a1ad455c9 Mon Sep 17 00:00:00 2001 From: Christophe HENRY Date: Sat, 13 Mar 2021 19:17:17 +0100 Subject: [PATCH 08/10] Lowers h2 size and removes background color of pre --- css/htmgem.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/css/htmgem.css b/css/htmgem.css index 5306393..501a508 100644 --- a/css/htmgem.css +++ b/css/htmgem.css @@ -38,7 +38,7 @@ h1, h2, h3 { } h1 { font-size: 2rem; } -h2 { font-size: 1.8rem; } +h2 { font-size: 1.6rem; } h3 { font-size: 1.2rem; } blockquote { @@ -95,7 +95,6 @@ a.mailto:before { } pre { - background-color: #eee; margin: 0 -1rem; padding: 1rem; overflow-x: auto; From b1ac194e59757c575cb3b6cb9cc0ede2aa0f38c9 Mon Sep 17 00:00:00 2001 From: Christophe HENRY Date: Sat, 13 Mar 2021 20:09:56 +0000 Subject: [PATCH 09/10] Removes padding of pre --- css/htmgem.css | 1 - 1 file changed, 1 deletion(-) diff --git a/css/htmgem.css b/css/htmgem.css index 501a508..9486fdf 100644 --- a/css/htmgem.css +++ b/css/htmgem.css @@ -96,7 +96,6 @@ a.mailto:before { pre { margin: 0 -1rem; - padding: 1rem; overflow-x: auto; } From 1e4c4f8f156727b464389fda69f9c7f54e71a576 Mon Sep 17 00:00:00 2001 From: Christophe HENRY Date: Sun, 14 Mar 2021 11:10:38 +0100 Subject: [PATCH 10/10] v1.1.0 * File download when using "source" as a style. * Improves the regex. * Fixes 404 page text decoration, adds reload message. * Links to download htmgem-master.zip. * Links CHANGELOG and COPYING into index.gmi. * Styles improvement, creation of raw.css. * Rewording of texts. --- CHANGELOG.gmi | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.gmi b/CHANGELOG.gmi index 84c2bba..490d094 100644 --- a/CHANGELOG.gmi +++ b/CHANGELOG.gmi @@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file. => https://keepachangelog.com/en/1.0.0/ The format is based on keep a Changelog. => https://semver.org/spec/v2.0.0.html And this project adheres to Semantic Versioning. +## [1.1.0] - 2021-03-14 +* File download when using "source" as a style. +* Improves the regex. +* Fixes 404 page text decoration, adds reload message. +* Links to download htmgem-master.zip. +* Links CHANGELOG and COPYING into index.gmi. +* Styles improvement, creation of raw.css. +* Rewording of texts. + ## [1.0.0] - 2021-03-10 * Improves presentation and installation page. * Adds stylesheets and download of pages source code.