diff options
author | Daniel Weipert <code@drogueronin.de> | 2023-12-04 13:51:44 +0100 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2023-12-04 14:02:50 +0100 |
commit | 72b5f69559975356211daf8053d37ad658ab9553 (patch) | |
tree | 138bea6dbf37dfdb711709deb284d06fee1b54ee | |
parent | 2eb16671d6b200281cda3551e8f9d18a3b235766 (diff) |
add CSS env variable
-rw-r--r-- | Justfile | 8 | ||||
-rw-r--r-- | index.php | 3 | ||||
-rw-r--r-- | test/index.gmi | 3 |
3 files changed, 13 insertions, 1 deletions
@@ -1,5 +1,11 @@ +set export + +CSS := "body { + color: green; +}" + test: - GEMINI_HOST=localhost php -S localhost:8080 -t test test/index.php + GEMINI_HOST=localhost CSS=$CSS php -S localhost:8080 -t test test/index.php server: @@ -119,6 +119,9 @@ $content = ob_get_clean(); <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title><?php echo $title; ?></title> + <?php if (! empty($_ENV['CSS'])): ?> + <style><?php echo $_ENV['CSS']; ?></style> + <?php endif; ?> </head> <body> <?php echo $content; ?> diff --git a/test/index.gmi b/test/index.gmi new file mode 100644 index 0000000..efe70a6 --- /dev/null +++ b/test/index.gmi @@ -0,0 +1,3 @@ +# Test + +Test |