Picture at nietslecht-button

This commit is contained in:
Marijn Jansen
2017-01-30 13:21:12 +01:00
parent b30ef0d0cf
commit 578ad34020
2 changed files with 14 additions and 6 deletions

View File

@@ -71,7 +71,16 @@
width: 95%; width: 95%;
} }
.nietslecht { .nietslecht-text {
font-family: Impact, Anton, sans-serif; font-family: Impact, Anton, sans-serif;
text-shadow: -1.5px 0 1px black, 0 1.5px 1px black, 1px 0 1.5px black, 0 -1.5px 1px black; text-shadow: -1px 0 1px black, 0 1px 1px black, 1px 0 1px black, 0 -1px 1px black;
}
.nietslecht {
}
.nietslecht img {
vertical-align: middle;
height: 24px;
width: 24px;
} }

View File

@@ -26,13 +26,12 @@ echo("
<input type="hidden" id="newcomment-textarea" name="postID" value="<?= $postID ?>"> <input type="hidden" id="newcomment-textarea" name="postID" value="<?= $postID ?>">
<textarea id="newcomment" name="newcomment-content" placeholder="Laat een reactie achter..."></textarea> <br> <textarea id="newcomment" name="newcomment-content" placeholder="Laat een reactie achter..."></textarea> <br>
<button onclick="postComment('reaction')" name="button" value="reaction">Reageer!</button> <button onclick="postComment('reaction')" name="button" value="reaction">Reageer!</button>
<!-- TODO: if/else op "niet slecht." button voor like/unlike--> <button onclick="postComment('nietslecht')" name="button" value="nietslecht" class="nietslecht">
<button onclick="postComment('nietslecht')" name="button" value="nietslecht">
<?php <?php
if (checkNietSlecht($postID, $_SESSION["userID"])) { if (checkNietSlecht($postID, $_SESSION["userID"])) {
echo 'Trek <span class="nietslecht">"Niet slecht."</span> terug'; echo 'Trek <span class="nietslecht-text">"Niet slecht."</span> terug';
} else { } else {
echo 'Vind ik <span class="nietslecht">"Niet slecht."</span>'; echo '<img src="img/nietslecht_small.png" /> <span class="nietslecht-text">"Niet slecht."</span>';
} }
?> ?>
</button> </button>