From def61909c2423b19b063a5807cc399a41de39974 Mon Sep 17 00:00:00 2001 From: Lizzy Hunt Date: Sun, 10 Mar 2024 16:45:26 -0600 Subject: fruitvote --- html/public/css/style.css | 97 ++++++++++++++++++++++++++++++ html/public/fruitvote/GoPage.php | 18 +++++- html/public/fruitvote/health.php | 7 +++ html/public/fruitvote/stats.php | 7 +++ html/public/img/fruitvote/apricot.jpg | Bin 0 -> 24200 bytes html/public/img/fruitvote/avocado.jpg | Bin 0 -> 33382 bytes html/public/img/fruitvote/banana.png | Bin 0 -> 346610 bytes html/public/img/fruitvote/blackberry.jpg | Bin 0 -> 126739 bytes html/public/img/fruitvote/blueberry.jpg | Bin 0 -> 24181 bytes html/public/img/fruitvote/cherry.jpg | Bin 0 -> 23236 bytes html/public/img/fruitvote/coconut.jpg | Bin 0 -> 130435 bytes html/public/img/fruitvote/cranberry.jpg | Bin 0 -> 131508 bytes html/public/img/fruitvote/dock-april.png | Bin 0 -> 500834 bytes html/public/img/fruitvote/fig.jpg | Bin 0 -> 32905 bytes html/public/img/fruitvote/grape.jpg | Bin 0 -> 23839 bytes html/public/img/fruitvote/guava.jpg | Bin 0 -> 36517 bytes html/public/img/fruitvote/honeydew.jpeg | Bin 0 -> 281636 bytes html/public/img/fruitvote/kiwi.jpg | Bin 0 -> 19700 bytes html/public/img/fruitvote/lemon.jpg | Bin 0 -> 130118 bytes html/public/img/fruitvote/lime.jpg | Bin 0 -> 43473 bytes html/public/img/fruitvote/mango.jpg | Bin 0 -> 43318 bytes html/public/img/fruitvote/melon.jpg | Bin 0 -> 128804 bytes html/public/img/fruitvote/nectarine.jpg | Bin 0 -> 29788 bytes html/public/img/fruitvote/orange.jpg | Bin 0 -> 62043 bytes html/public/img/fruitvote/peach.jpg | Bin 0 -> 21383 bytes html/public/img/fruitvote/pear.jpg | Bin 0 -> 30339 bytes html/public/img/fruitvote/persimmon.jpg | Bin 0 -> 62875 bytes html/public/img/fruitvote/pineapple.jpg | Bin 0 -> 65826 bytes html/public/img/fruitvote/plum.jpg | Bin 0 -> 60167 bytes html/public/img/fruitvote/pomegranate.jpg | Bin 0 -> 92033 bytes html/public/img/fruitvote/pumpkin.jpg | Bin 0 -> 113972 bytes html/public/img/fruitvote/raspberry.jpg | Bin 0 -> 175080 bytes html/public/img/fruitvote/strawberry.jpg | Bin 0 -> 55318 bytes html/public/img/fruitvote/tomato.jpg | Bin 0 -> 11422 bytes html/public/img/fruitvote/versus.gif | Bin 0 -> 37777 bytes html/public/img/fruitvote/watermelon.jpg | Bin 0 -> 50510 bytes 36 files changed, 127 insertions(+), 2 deletions(-) create mode 100644 html/public/fruitvote/health.php create mode 100644 html/public/fruitvote/stats.php create mode 100644 html/public/img/fruitvote/apricot.jpg create mode 100644 html/public/img/fruitvote/avocado.jpg create mode 100644 html/public/img/fruitvote/banana.png create mode 100644 html/public/img/fruitvote/blackberry.jpg create mode 100644 html/public/img/fruitvote/blueberry.jpg create mode 100644 html/public/img/fruitvote/cherry.jpg create mode 100644 html/public/img/fruitvote/coconut.jpg create mode 100644 html/public/img/fruitvote/cranberry.jpg create mode 100644 html/public/img/fruitvote/dock-april.png create mode 100644 html/public/img/fruitvote/fig.jpg create mode 100644 html/public/img/fruitvote/grape.jpg create mode 100644 html/public/img/fruitvote/guava.jpg create mode 100644 html/public/img/fruitvote/honeydew.jpeg create mode 100644 html/public/img/fruitvote/kiwi.jpg create mode 100644 html/public/img/fruitvote/lemon.jpg create mode 100644 html/public/img/fruitvote/lime.jpg create mode 100644 html/public/img/fruitvote/mango.jpg create mode 100644 html/public/img/fruitvote/melon.jpg create mode 100644 html/public/img/fruitvote/nectarine.jpg create mode 100644 html/public/img/fruitvote/orange.jpg create mode 100644 html/public/img/fruitvote/peach.jpg create mode 100644 html/public/img/fruitvote/pear.jpg create mode 100644 html/public/img/fruitvote/persimmon.jpg create mode 100644 html/public/img/fruitvote/pineapple.jpg create mode 100644 html/public/img/fruitvote/plum.jpg create mode 100644 html/public/img/fruitvote/pomegranate.jpg create mode 100644 html/public/img/fruitvote/pumpkin.jpg create mode 100644 html/public/img/fruitvote/raspberry.jpg create mode 100644 html/public/img/fruitvote/strawberry.jpg create mode 100644 html/public/img/fruitvote/tomato.jpg create mode 100644 html/public/img/fruitvote/versus.gif create mode 100644 html/public/img/fruitvote/watermelon.jpg (limited to 'html/public') diff --git a/html/public/css/style.css b/html/public/css/style.css index a4f243f..95829c3 100644 --- a/html/public/css/style.css +++ b/html/public/css/style.css @@ -75,3 +75,100 @@ p { li { margin-left: 20px; } + +.fruitvote { + display: flex; + flex-direction: row; + margin-top: 20px; + gap: 2rem; + max-width: 800px; +} + +.contestant { + display: flex; + flex: 1; + flex-direction: column; + align-items: stretch; + border: 2px solid #ff69b4; + border-radius: 10px; + padding: 0.5rem; +} + +.contestant div { + display: flex; + flex-direction: column; + justify-content: space-between; + border-radius: 10px; + height: 100%; + transition: background-color 0.3s ease; + padding: 1rem; +} + +.contestant > input { + visibility: hidden; + position: absolute; +} + +.contestant div:hover { + background-color: #ff69b4; + color: #2a2a2a; + + cursor: pointer; +} + +.contestant > input:checked + div { + background-color: #ff69b4; + color: #2a2a2a; + + cursor: pointer; +} + +.contestant div img { + width: auto; + height: auto; + max-width: 100%; + max-height: 100%; + + border-radius: 10px; +} + +.versus { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 20px; +} + +table { + width: auto; /* Adjust based on content, not full width */ + border-collapse: collapse; + background-color: #383838; /* Darker background for contrast */ +} + +th, +td { + padding: 12px 20px; /* Good padding for readability */ + border: 1px solid #f4c2c2; /* Soft pink borders */ + color: #f4c2c2; /* Soft pink text */ + text-align: left; +} + +thead th { + background-color: #ff69b4; /* Brighter pink for header */ + color: white; /* White text for contrast */ + font-family: "Comic Sans MS", "Chalkboard SE", sans-serif; +} + +tbody tr:nth-child(odd) { + background-color: #2f2f2f; /* Slightly lighter background for every other row for readability */ +} + +tbody tr { + transition: background-color 0.3s ease; +} + +tbody tr:hover { + background-color: #ff47da; /* Change to a lighter pink on hover for interactivity */ + color: #2a2a2a; /* Dark text for contrast */ +} diff --git a/html/public/fruitvote/GoPage.php b/html/public/fruitvote/GoPage.php index 864c1f7..7e03c35 100644 --- a/html/public/fruitvote/GoPage.php +++ b/html/public/fruitvote/GoPage.php @@ -4,7 +4,7 @@ class GoPage { private $socket; private $template; - public function __construct($page, $socket = "/home/simponic/fruitvote/http.sock", $template = "../template.html") { + public function __construct($page, $socket = "/home/lizzy/fruitvote/http.sock", $template = "../template.html") { $this->page = $page; $this->socket = $socket; $this->template = $template; @@ -24,9 +24,23 @@ class GoPage { curl_setopt($ch, CURLOPT_UNIX_SOCKET_PATH, $this->socket); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + // forward query params + $query = $_SERVER['QUERY_STRING']; + if ($query) { + curl_setopt($ch, CURLOPT_URL, $url."?".$query); + } + + //forward post data + if ($_SERVER['REQUEST_METHOD'] === 'POST') { + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_POSTFIELDS, file_get_contents('php://input')); + } + + $output = curl_exec($ch); curl_close($ch); - // todo: get headers / cookies, forward back response + + return $output; } diff --git a/html/public/fruitvote/health.php b/html/public/fruitvote/health.php new file mode 100644 index 0000000..8cea676 --- /dev/null +++ b/html/public/fruitvote/health.php @@ -0,0 +1,7 @@ +render(); +?> diff --git a/html/public/fruitvote/stats.php b/html/public/fruitvote/stats.php new file mode 100644 index 0000000..5147723 --- /dev/null +++ b/html/public/fruitvote/stats.php @@ -0,0 +1,7 @@ +render(); +?> diff --git a/html/public/img/fruitvote/apricot.jpg b/html/public/img/fruitvote/apricot.jpg new file mode 100644 index 0000000..5ffc321 Binary files /dev/null and b/html/public/img/fruitvote/apricot.jpg differ diff --git a/html/public/img/fruitvote/avocado.jpg b/html/public/img/fruitvote/avocado.jpg new file mode 100644 index 0000000..a0eb21c Binary files /dev/null and b/html/public/img/fruitvote/avocado.jpg differ diff --git a/html/public/img/fruitvote/banana.png b/html/public/img/fruitvote/banana.png new file mode 100644 index 0000000..6e69d77 Binary files /dev/null and b/html/public/img/fruitvote/banana.png differ diff --git a/html/public/img/fruitvote/blackberry.jpg b/html/public/img/fruitvote/blackberry.jpg new file mode 100644 index 0000000..e097829 Binary files /dev/null and b/html/public/img/fruitvote/blackberry.jpg differ diff --git a/html/public/img/fruitvote/blueberry.jpg b/html/public/img/fruitvote/blueberry.jpg new file mode 100644 index 0000000..9794493 Binary files /dev/null and b/html/public/img/fruitvote/blueberry.jpg differ diff --git a/html/public/img/fruitvote/cherry.jpg b/html/public/img/fruitvote/cherry.jpg new file mode 100644 index 0000000..277c17c Binary files /dev/null and b/html/public/img/fruitvote/cherry.jpg differ diff --git a/html/public/img/fruitvote/coconut.jpg b/html/public/img/fruitvote/coconut.jpg new file mode 100644 index 0000000..76044f4 Binary files /dev/null and b/html/public/img/fruitvote/coconut.jpg differ diff --git a/html/public/img/fruitvote/cranberry.jpg b/html/public/img/fruitvote/cranberry.jpg new file mode 100644 index 0000000..fe8513a Binary files /dev/null and b/html/public/img/fruitvote/cranberry.jpg differ diff --git a/html/public/img/fruitvote/dock-april.png b/html/public/img/fruitvote/dock-april.png new file mode 100644 index 0000000..1cd82d2 Binary files /dev/null and b/html/public/img/fruitvote/dock-april.png differ diff --git a/html/public/img/fruitvote/fig.jpg b/html/public/img/fruitvote/fig.jpg new file mode 100644 index 0000000..643a49b Binary files /dev/null and b/html/public/img/fruitvote/fig.jpg differ diff --git a/html/public/img/fruitvote/grape.jpg b/html/public/img/fruitvote/grape.jpg new file mode 100644 index 0000000..ce341d4 Binary files /dev/null and b/html/public/img/fruitvote/grape.jpg differ diff --git a/html/public/img/fruitvote/guava.jpg b/html/public/img/fruitvote/guava.jpg new file mode 100644 index 0000000..953ed0b Binary files /dev/null and b/html/public/img/fruitvote/guava.jpg differ diff --git a/html/public/img/fruitvote/honeydew.jpeg b/html/public/img/fruitvote/honeydew.jpeg new file mode 100644 index 0000000..1e796e5 Binary files /dev/null and b/html/public/img/fruitvote/honeydew.jpeg differ diff --git a/html/public/img/fruitvote/kiwi.jpg b/html/public/img/fruitvote/kiwi.jpg new file mode 100644 index 0000000..6b048d5 Binary files /dev/null and b/html/public/img/fruitvote/kiwi.jpg differ diff --git a/html/public/img/fruitvote/lemon.jpg b/html/public/img/fruitvote/lemon.jpg new file mode 100644 index 0000000..9623514 Binary files /dev/null and b/html/public/img/fruitvote/lemon.jpg differ diff --git a/html/public/img/fruitvote/lime.jpg b/html/public/img/fruitvote/lime.jpg new file mode 100644 index 0000000..10302fa Binary files /dev/null and b/html/public/img/fruitvote/lime.jpg differ diff --git a/html/public/img/fruitvote/mango.jpg b/html/public/img/fruitvote/mango.jpg new file mode 100644 index 0000000..a9eb35e Binary files /dev/null and b/html/public/img/fruitvote/mango.jpg differ diff --git a/html/public/img/fruitvote/melon.jpg b/html/public/img/fruitvote/melon.jpg new file mode 100644 index 0000000..dc45f27 Binary files /dev/null and b/html/public/img/fruitvote/melon.jpg differ diff --git a/html/public/img/fruitvote/nectarine.jpg b/html/public/img/fruitvote/nectarine.jpg new file mode 100644 index 0000000..24fddbe Binary files /dev/null and b/html/public/img/fruitvote/nectarine.jpg differ diff --git a/html/public/img/fruitvote/orange.jpg b/html/public/img/fruitvote/orange.jpg new file mode 100644 index 0000000..1bb12a1 Binary files /dev/null and b/html/public/img/fruitvote/orange.jpg differ diff --git a/html/public/img/fruitvote/peach.jpg b/html/public/img/fruitvote/peach.jpg new file mode 100644 index 0000000..9690ca6 Binary files /dev/null and b/html/public/img/fruitvote/peach.jpg differ diff --git a/html/public/img/fruitvote/pear.jpg b/html/public/img/fruitvote/pear.jpg new file mode 100644 index 0000000..22c2a01 Binary files /dev/null and b/html/public/img/fruitvote/pear.jpg differ diff --git a/html/public/img/fruitvote/persimmon.jpg b/html/public/img/fruitvote/persimmon.jpg new file mode 100644 index 0000000..6af3afe Binary files /dev/null and b/html/public/img/fruitvote/persimmon.jpg differ diff --git a/html/public/img/fruitvote/pineapple.jpg b/html/public/img/fruitvote/pineapple.jpg new file mode 100644 index 0000000..bbeeeb2 Binary files /dev/null and b/html/public/img/fruitvote/pineapple.jpg differ diff --git a/html/public/img/fruitvote/plum.jpg b/html/public/img/fruitvote/plum.jpg new file mode 100644 index 0000000..61a8893 Binary files /dev/null and b/html/public/img/fruitvote/plum.jpg differ diff --git a/html/public/img/fruitvote/pomegranate.jpg b/html/public/img/fruitvote/pomegranate.jpg new file mode 100644 index 0000000..5be6859 Binary files /dev/null and b/html/public/img/fruitvote/pomegranate.jpg differ diff --git a/html/public/img/fruitvote/pumpkin.jpg b/html/public/img/fruitvote/pumpkin.jpg new file mode 100644 index 0000000..8a20485 Binary files /dev/null and b/html/public/img/fruitvote/pumpkin.jpg differ diff --git a/html/public/img/fruitvote/raspberry.jpg b/html/public/img/fruitvote/raspberry.jpg new file mode 100644 index 0000000..07a33b2 Binary files /dev/null and b/html/public/img/fruitvote/raspberry.jpg differ diff --git a/html/public/img/fruitvote/strawberry.jpg b/html/public/img/fruitvote/strawberry.jpg new file mode 100644 index 0000000..22ee16b Binary files /dev/null and b/html/public/img/fruitvote/strawberry.jpg differ diff --git a/html/public/img/fruitvote/tomato.jpg b/html/public/img/fruitvote/tomato.jpg new file mode 100644 index 0000000..846fb08 Binary files /dev/null and b/html/public/img/fruitvote/tomato.jpg differ diff --git a/html/public/img/fruitvote/versus.gif b/html/public/img/fruitvote/versus.gif new file mode 100644 index 0000000..6d45ee6 Binary files /dev/null and b/html/public/img/fruitvote/versus.gif differ diff --git a/html/public/img/fruitvote/watermelon.jpg b/html/public/img/fruitvote/watermelon.jpg new file mode 100644 index 0000000..1db28d9 Binary files /dev/null and b/html/public/img/fruitvote/watermelon.jpg differ -- cgit v1.3