Compare commits
3 Commits
master
...
fix-style-
Author | SHA1 | Date | |
---|---|---|---|
|
b7b3a1781a | ||
442232a990 | |||
5af1cae80a |
|
@ -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
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
/* style from Omar Polo: https://gmid.omarpolo.com/style.css */
|
||||
body {
|
||||
background-color: white;
|
||||
font-family: monospace;
|
||||
font-size: 14px;
|
||||
max-width: 780px;
|
||||
|
@ -15,7 +16,7 @@ h1::before {
|
|||
}
|
||||
|
||||
h2 {
|
||||
margin-top: 40px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
h2::before {
|
||||
|
@ -48,6 +49,10 @@ p.link::before {
|
|||
content: "→ ";
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
strong::before { content: "*" }
|
||||
strong::after { content: "*" }
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
```
|
||||
__ __ __ ______
|
||||
|\ \ |\ \ |\ \ /\ \ v1.5.0+
|
||||
|\ \ |\ \ |\ \ /\ \ v1.5.1+
|
||||
| ▓▓ | ▓▓_| ▓▓_ ______ ____ | ▓▓▓▓▓▓\
|
||||
| ▓▓__| ▓▓ ▓▓ \ |\ \ \| ▓▓ __\▓▓/\ \| \ \
|
||||
| ▓▓ ▓▓\▓▓▓▓▓▓ | ▓▓▓▓▓▓\▓▓▓▓\ ▓▓| \ ▓▓▓▓▓▓\ ▓▓▓▓▓▓\▓▓▓▓\
|
||||
|
|
14
index.php
14
index.php
|
@ -12,6 +12,12 @@ $domain = $_SERVER['HTTP_HOST'];
|
|||
$php_self = $_SERVER['PHP_SELF']; // by default: /htmgem/index.php
|
||||
$php_self_dir = dirname($php_self);
|
||||
$url = @$_REQUEST["url"];
|
||||
|
||||
if(isset($_REQUEST['style']))
|
||||
$style = htmlspecialchars($_REQUEST['style']);
|
||||
else
|
||||
$style = "";
|
||||
|
||||
$urlRewriting = @$_REQUEST["rw"]=="1";
|
||||
|
||||
/**
|
||||
|
@ -66,7 +72,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.DEFAULT_CSS);
|
||||
if ($urlRewriting)
|
||||
echo \htmgem\html\getHtmlWithMenu($gt_html, $scheme, $domain, $url);
|
||||
else
|
||||
|
@ -82,8 +88,6 @@ $fileContents = @file_get_contents($filePath);
|
|||
|
||||
/* CSS and special style management
|
||||
*/
|
||||
|
||||
$style = @$_REQUEST['style'];
|
||||
if ("source" == $style) {
|
||||
$basename = basename($filePath);
|
||||
header("Cache-Control: public");
|
||||
|
@ -123,12 +127,10 @@ if (empty($style)) {
|
|||
} 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");
|
||||
$gt_html->addCss($php_self_dir."/css/$style");
|
||||
}
|
||||
|
||||
if ($urlRewriting)
|
||||
echo \htmgem\html\getHtmlWithMenu($gt_html, $scheme, $domain, $url);
|
||||
else
|
||||
echo \htmgem\html\getHtmlWithMenu($gt_html, $scheme, $domain, $url, "$php_self?url=");
|
||||
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue
Block a user