From b5083aaabd4103dea8fbb81125b106b9cce965a0 Mon Sep 17 00:00:00 2001 From: Christophe HENRY Date: Thu, 28 Jul 2022 21:50:52 +0200 Subject: [PATCH 1/4] Fixes a bug about null by ref variable --- lib-htmgem.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib-htmgem.inc.php b/lib-htmgem.inc.php index dea91a6..2c31405 100644 --- a/lib-htmgem.inc.php +++ b/lib-htmgem.inc.php @@ -319,6 +319,7 @@ class GemtextTranslate_html { protected static function spacesCompress(&$text) { # Replaces several spaces (0x20) by only one + if (empty($text)) $text = ""; $text = preg_replace("/ +/", " ", $text); } From d68b403f338909634d5d5fe6766847ca645913bc Mon Sep 17 00:00:00 2001 From: Christophe HENRY Date: Fri, 29 Jul 2022 09:58:07 +0200 Subject: [PATCH 2/4] Fixes bug about CSS not applied correctly The default CSS was loaded anyway, in addition to the custom css. --- index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 2f85b0f..c8d2a6a 100644 --- a/index.php +++ b/index.php @@ -128,11 +128,12 @@ if ("none" == $style) { # Warning, using htmhem.php?url=… will make $localCss not found # as the path is relative to htmgem.php and not / ! $gt_html->addCss($localCss); + } else { // No local style + $gt_html->addCss($php_self_dir."/css/htmgem.css"); } } else { #TODO: regex check for $style $gt_html->addCss("$php_self_dir/css/$style.css"); } -if (empty($gt_html->getCss)) $gt_html->addCss($php_self_dir."/css/htmgem.css"); if ($urlRewriting) echo \htmgem\html\getHtmlWithMenu($gt_html, $scheme, $domain, $url); From ddac76e5faa0bf85d36ef746832382a31e58efb3 Mon Sep 17 00:00:00 2001 From: Christophe HENRY Date: Thu, 28 Jul 2022 23:29:14 +0200 Subject: [PATCH 3/4] Adds link to /htmgem on the icon of the menu --- css/htmgem.css | 8 ++++++++ css/terminal.css | 8 ++++++++ lib-html.inc.php | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/css/htmgem.css b/css/htmgem.css index 8949208..1e1b443 100644 --- a/css/htmgem.css +++ b/css/htmgem.css @@ -25,6 +25,14 @@ blockquote { color: #000; } +.menu a.logo { + color: #000; +} + +.menu a.logo:hover { + color: blue; +} + .menu hr { color: white; } diff --git a/css/terminal.css b/css/terminal.css index 24e19b7..e45cd27 100644 --- a/css/terminal.css +++ b/css/terminal.css @@ -29,6 +29,14 @@ pre { padding: 1rem; } +.menu a { + margin: 0; +} + +.menu a:before { + content: ""; +} + a { margin: -1.35rem; color: #090; diff --git a/lib-html.inc.php b/lib-html.inc.php index ca98040..d9a2f7e 100644 --- a/lib-html.inc.php +++ b/lib-html.inc.php @@ -55,7 +55,7 @@ function getMenu(string $scheme, string $domain, string $path, string $prefix=nu } $linkList [] = $lastLink."\n"; // The last part holds no link $output = "\n"; return $output; From e479114cf05fcb5aaadcf03b85d5e40da810100d Mon Sep 17 00:00:00 2001 From: Christophe HENRY Date: Tue, 2 Aug 2022 11:43:00 +0200 Subject: [PATCH 4/4] v1.4.1 * Adds link to /htmgem on the icon of the menu * Fixes bug about CSS not applied correctly * Fixes a bug about null by ref variable --- CHANGELOG.gmi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.gmi b/CHANGELOG.gmi index 53e17f9..3a01c10 100644 --- a/CHANGELOG.gmi +++ b/CHANGELOG.gmi @@ -4,6 +4,11 @@ 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.4.1] - 2022-08-02 +* Adds link to /htmgem on the icon of the menu +* Fixes bug about CSS not applied correctly +* Fixes a bug about null by ref variable + ## [1.4.0] - 2021-04-11 * Adds the breadcrumbs at the top and the bottom of the page. * Adds the text icon H͜͡m.