From b770974924e82247ac002f04bc0c847b314486e0 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Tue, 26 Aug 2025 22:34:08 +0200 Subject: add settings to change unrounded corners --- docker-compose.dev.yml | 2 -- print/print.php | 12 ++++++++++-- web/index.php | 16 ++++++++++++++-- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index b08d9bf..7fe8fe0 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -24,8 +24,6 @@ services: - "php" ports: - "8080:80" - environment: - - "SERVER_NAME=localhost" volumes: - "./web:/var/www/html" - "./print:/var/www/html/print" diff --git a/print/print.php b/print/print.php index 0e1137f..e4cc759 100644 --- a/print/print.php +++ b/print/print.php @@ -8,6 +8,9 @@ if (empty($decklist)) { die('No decklist provided.'); } +$useUnroundedCorners = $_ENV['USE_UNROUNDED_CORNERS'] ?? true; +$unroundedCornerColor = $_ENV['UNROUNDED_CORNER_COLOR'] ?? '#000'; + require_once __DIR__ . '/vendor/autoload.php'; /* @@ -90,6 +93,11 @@ if (empty($images)) { * Build HTML */ +$imgBackgroundColor = ''; +if ($useUnroundedCorners) { + $imgBackgroundColor = "background-color: {$unroundedCornerColor};"; +} + $template = << @@ -103,8 +111,8 @@ $template = <<
- - +
+ +
+
+ +
+
+ +
+
+ +

Source -- cgit v1.2.3