Update
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
require_once(__DIR__ . '/Database.php');
|
||||
|
||||
echo <<<END
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<h1>Fragen anzeigen</h1>
|
||||
<table>
|
||||
<tr>
|
||||
@@ -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("</tr>");
|
||||
}
|
||||
|
||||
|
||||
|
||||
echo <<<END
|
||||
</table>
|
||||
<br><br>
|
||||
|
113
cgi-bin/uebung09/style.css
Normal file
113
cgi-bin/uebung09/style.css
Normal file
@@ -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
|
||||
}
|
Reference in New Issue
Block a user