From 7fa649ee13b6c37c99169189a721ab18a0c0417b Mon Sep 17 00:00:00 2001 From: structix Date: Thu, 4 Jul 2019 08:58:15 +0200 Subject: [PATCH] Update --- cgi-bin/uebung09/questions-show.php | 5 ++ cgi-bin/uebung09/style.css | 113 ++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+) create mode 100644 cgi-bin/uebung09/style.css diff --git a/cgi-bin/uebung09/questions-show.php b/cgi-bin/uebung09/questions-show.php index 28664ce..16800b4 100644 --- a/cgi-bin/uebung09/questions-show.php +++ b/cgi-bin/uebung09/questions-show.php @@ -3,6 +3,7 @@ require_once(__DIR__ . '/Database.php'); echo <<

Fragen anzeigen

@@ -18,6 +19,8 @@ END; $db = new Database(); $questions = $db->getQuestions(); +// +//This is ugly but does the job (I'm used to the laravel collections) $questionsobj = json_decode(json_encode($questions), false); foreach($questionsobj as $question) { @@ -30,6 +33,8 @@ foreach($questionsobj as $question) { echo(""); } + + echo <<

diff --git a/cgi-bin/uebung09/style.css b/cgi-bin/uebung09/style.css new file mode 100644 index 0000000..ba91758 --- /dev/null +++ b/cgi-bin/uebung09/style.css @@ -0,0 +1,113 @@ +body { + font-family: sans-serif; + color: #000; + text-align: center; + transition: background-color 250ms linear; + background-color: #fff; +} + +a { + color: black; +} + +.post, input, textarea { + max-width: 30em; + width: 100%; + padding: 1em; + margin: 1em auto; + background-color: #fff; + border: 1px solid black; + color: black; + text-align: justify; + box-sizing: border-box; + border-radius: 0.5em; +} + +form { + max-width: 30em; + width: 100%; + margin: 0 auto; +} + +input, textarea { + max-width: 100%; + box-sizing: border-box; +} + +.post h1 { + margin: 0; +} + +.post .meta { + font-size: 75%; + font-style: italic; + border-top: 1px dotted black; + border-bottom: 1px dotted black; + padding: 0.25em; +} + +.post a { + color: red; +} + +.post p { + margin: 0 0 0.5em; +} + +.question, .answer { + max-width: 30em; + width: 100%; + margin: 1em auto; + background-color: #fff; + color: black; + text-align: justify; + box-sizing: border-box; + display: block; +} + +.question { + /*background-color: #2e6da4; + color: white;*/ + font-weight: bold; +} + +.answer { + background-color: #eee; + cursor: pointer; + padding: 1em; +} + +.answer:hover { + background-color: #ccc; +} + +body { + font-family: sans-serif; + text-align: center; +} + +table { + border-collapse: collapse; + max-width: 100%; + margin: 0 auto; +} + +tr, td { + border: 1px solid black; + padding: 3px; +} + +.form-box { + display: flex; + flex-direction: row; +} + +.form-solution { + flex-grow: 0; + width: 0; + margin-right: 0.5em +} + +.form-answer { + flex-grow: 1 +}