Skip to content

Commit

Permalink
feat: responsive design
Browse files Browse the repository at this point in the history
  • Loading branch information
T1Il committed Aug 24, 2023
1 parent 62b9a88 commit be176a7
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 7 deletions.
33 changes: 31 additions & 2 deletions assets/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ body {
border-radius: 5px;
padding: 20px;
margin-top: 20px;
min-width: 1000px;
width: 70%;
max-width: 1200px;
border: 5px solid #0e53dd;
Expand All @@ -108,6 +107,7 @@ body {
font-weight: bold;
color: #e3eaf7;
margin-bottom: 10px;
overflow-wrap: anywhere;
}

.box-text {
Expand All @@ -116,6 +116,7 @@ body {
width: 90%;
margin-left: auto;
margin-right: auto;
overflow-wrap: anywhere;
}

.divider {
Expand Down Expand Up @@ -164,7 +165,6 @@ body {
padding: 20px;
margin-top: 20px;
width: 100%;
min-width: 300px;
}

.input-box .box-title {
Expand Down Expand Up @@ -221,4 +221,33 @@ body {
text-transform: uppercase;
margin: 10px 10px;
color: red;
}

@media (max-width: 600px) {
.container {
padding: 10px;
}

.user-info-box, .big-box, .input-box {
width: 100%;
border: none;
}

.box-title {
font-size: 20px;
}

.box-text, .reason-input {
width: 100%;
font-size: 14px;
}

.button-container {
flex-direction: column;
align-items: center;
}

.accept-button, .reject-button, .delete-button, .submit-button {
margin: 5px 0;
}
}
4 changes: 2 additions & 2 deletions case.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ function getContrastColor($hexColor)
class="accent">Everyone-Ping:</span> <span class="<?php echo $request->pingsEveryone() ? "warning-ping" : "normal-ping"; ?>"><?php echo $request->pingsEveryone() ? "Ja" : "Nein"; ?></span>
</div>
<div class="user-status <?php echo testInput($sta[0]); ?>"><span
class="accent">Status:</span><span class="unprocessed"><?php echo testInput($sta[0]); ?></span> </div>
class="accent">Status: </span><span class="unprocessed"><?php echo testInput($sta[0]); ?></span> </div>
<div class="user-status" <?php echo testInput($sta[0]); ?>><span class="accent">Nutzer-Status: </span><?php echo $as->isBlocked() ? "blockiert " : "nicht blockiert "; ?>
<?php if(!$as->isModerator()) { ?><button onclick="window.location.href='user.php?block_user=<?php echo $as->getDiscordId(); ?>&from=<?php echo $request->getRequestId();?>';"
class="<?php echo $as->isBlocked() ? "reject" : "accept"; ?>-button offset"><?php echo $as->isBlocked() ? "Freigeben" : "Blockieren"; ?>
Expand All @@ -167,7 +167,7 @@ class="<?php echo $as->isBlocked() ? "reject" : "accept"; ?>-button offset"><?ph
<div class="big-box">
<div class="box-title"><?php echo $request->getTitle(); ?></div>
<div class="divider accent"></div>
<div class="box-text"><?php echo nl2br(wordwrap($request->getDescription(), 200, "<br>", true)); ?></div>
<div class="box-text"><?php echo nl2br($request->getDescription()); ?></div>
<?php
if ($request->hasURL()) {
?>
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.debug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
environment:
MYSQL_ROOT_PASSWORD: test
MYSQL_DATABASE: test
devmarkt:
devmarkt3:
container_name: bivieh_devmarkt_dev
build:
context: .
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@

$request = new DevmarktRequest($request['req_id']);
if($request->getApplicant()->inBotGuild()) {
$uRS .= "<a href=case.php?req_id=" . htmlentities($request->getRequestId()) . ">" . htmlentities($request->getTitle()) . "</a><br> ";
$uRS .= "<a href=case.php?req_id=" . htmlentities($request->getRequestId()) . ">" . htmlentities($request->getApplicant()->getUsername()) . htmlentities($request->getTitle()) . "</a><br> ";
} else {
$uRS .= "<a style='color: grey;' href=case.php?req_id=" . htmlentities($request->getRequestId()) . ">" . htmlentities($request->getTitle()) . "</a><br> ";
}
Expand Down
5 changes: 4 additions & 1 deletion login.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
<?php

use Wohali\OAuth2\Client\Provider\Discord;

require_once 'pdo.php';
require_once 'vendor/autoload.php';
require_once 'php/login.inc.php';

try {
$provider = new \Wohali\OAuth2\Client\Provider\Discord([
$provider = new Discord([
'clientId' => getenv("BOT_CLIENT_ID"),
'clientSecret' => getenv("BOT_CLIENT_SECRET"),
'redirectUri' => getenv("BOT_REDIRECT_URI"),
Expand Down

0 comments on commit be176a7

Please sign in to comment.