Compare commits

...

9 Commits

Author SHA1 Message Date
Christophe HENRY 5cfe0fabee Adds Lazarus/omarpolo to the style sample 2023-08-01 22:31:03 +02:00
Christophe HENRY a73614ffcc Merge branch 'dev' 2023-08-01 22:24:46 +02:00
Christophe HENRY 61ba2a9502 Merge branch 'master' into dev 2023-08-01 22:21:49 +02:00
Christophe HENRY 511abab032 Fixes a bug on CSS when hosted on filesystem root 2023-08-01 22:14:29 +02:00
Lazarus 4eb97465a0 Add a cool arrow to gmi links! 2023-08-01 22:04:12 +02:00
Christophe HENRY 8626aaf3e5 Moves omarpolo.css into Lazarus' directory 2023-08-01 22:02:03 +02:00
Lazarus fa8538cd92 Add style from Omar Polo's site 2023-08-01 21:57:01 +02:00
Lazarus 6ba8cceb3d Fix getCss() calls
Make ->getCss a method call instead of a property access so that it won't return null always.
2023-08-01 21:56:28 +02:00
Christophe HENRY 536c8101c5 Updates CHANGELOG and index.gmi 2022-08-23 10:50:17 +02:00
5 changed files with 134 additions and 3 deletions

View File

@ -4,6 +4,12 @@ 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.5.1] - 2023-08-01
* Adds style from Omar Polo's site, thanks to <lazarus at sdfeu.org>
* Fix getCss() calls, thanks to <lazarus at sdfeu.org>
* Fixes a bug on CSS when hosted on filesystem root
* Fix typo in the English documentation about Apache
## [1.5.0] - 2022-08-23
* Adds the Lagrange style, thanks to Eric <ortie10 at gmx.fr>
* Adds circumlunar css

View File

@ -4,6 +4,7 @@
=> index.gmi|default,base.css default/base.css
=> index.gmi|default,circumlunar.css default/circumlunar.css
=> index.gmi|lagrange,lagrange.css lagrange/lagrange.css
=> index.gmi|lazarus,omarpolo.css lazarus/omarpolo.css
=> index.gmi|default,terminal.css default/terminal.css
=> index.gmi|default,black_wide.css default/black_wide.css
=> index.gmi|default,simple.css default/simple.css

123
css/lazarus/omarpolo.css Normal file
View File

@ -0,0 +1,123 @@
@import "base.css";
/* style from Omar Polo: https://gmid.omarpolo.com/style.css */
body {
font-family: monospace;
font-size: 14px;
max-width: 780px;
margin: 0 auto;
padding: 10px;
padding-bottom: 80px;
}
h1::before {
content: "# ";
}
h2 {
margin-top: 40px;
}
h2::before {
content: "## ";
}
h3::before {
content: "### ";
}
#gmi a::before {
content: "=> ";
}
blockquote {
margin: 0;
padding: 0;
}
blockquote::before {
content: "> ";
}
blockquote p {
font-style: italic;
display: inline;
}
p.link::before {
content: "→ ";
}
strong::before { content: "*" }
strong::after { content: "*" }
hr {
border: 0;
height: 1px;
background-color: #222;
width: 100%;
display: block;
margin: 2em auto;
}
ul.link-list {
list-style: disclosure-closed;
}
img {
border-radius: 5px;
}
pre {
overflow: auto;
padding: 1rem;
background-color: #f0f0f0;
border-radius: 3px;
}
pre.banner {
display: flex;
flex-direction: row;
justify-content: center;
}
code, kbd {
color: #9d109d;
}
img {
display: block;
margin: 0 auto;
max-width: 100%;
}
@media (prefers-color-scheme: dark) {
body {
background-color: #222;
color: white;
}
a {
color: aqua;
}
hr {
background-color: #ddd;
}
pre {
background-color: #353535;
}
code, kbd {
color: #ff4cff;
}
}
@media (max-width: 400px) {
pre.banner { font-size: 9px; }
}
@media (max-width: 500px) {
pre.banner { font-size: 10px; }
}

View File

@ -1,6 +1,6 @@
```
__ __ __ ______
|\ \ |\ \ |\ \ /\ \ v1.5.0
|\ \ |\ \ |\ \ /\ \ v1.5.1
| ▓▓ | ▓▓_| ▓▓_ ______ ____ | ▓▓▓▓▓▓\
| ▓▓__| ▓▓ ▓▓ \ |\ \ \| ▓▓ __\▓▓/\ \| \ \
| ▓▓ ▓▓\▓▓▓▓▓▓ | ▓▓▓▓▓▓\▓▓▓▓\ ▓▓| \ ▓▓▓▓▓▓\ ▓▓▓▓▓▓\▓▓▓▓\

View File

@ -26,7 +26,7 @@ if (empty($url)) {
http_response_code(403);
} else {
$gt_html = new \htmgem\GemTextTranslate_html(file_get_contents("index.gmi"), true, "$php_self?url=", $php_self_dir);
if (empty($gt_html->getCss)) $gt_html->addCss($php_self_dir.DEFAULT_CSS);
if (empty($gt_html->getCss())) $gt_html->addCss($php_self_dir.DEFAULT_CSS);
// No URL Rewritting assumed
echo \htmgem\html\getHtmlWithMenu($gt_html, $scheme, $domain, $php_self, "$php_self?url=");
@ -66,7 +66,7 @@ if ($go404) {
http_response_code(404);
$page404 = \htmgem\html\get404GmiPage($url);
$gt_html = new \htmgem\GemTextTranslate_html($page404);
if (empty($gt_html->getCss)) $gt_html->addCss($php_self_dir."/css/htmgem.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);
else
@ -122,6 +122,7 @@ if (empty($style)) {
$gt_html->addCss($php_self_dir.DEFAULT_CSS);
} else {
$style = preg_replace("/,/", "/", $style);
if ("/" == $php_self_dir) $php_self_dir = ""; # dirname() never use a final slash except for the root
$gt_html->addCss("$php_self_dir/css/$style");
}