Skip to content
Snippets Groups Projects
Commit 5253cd89 authored by Muhammad Haidar Akita Tresnadi's avatar Muhammad Haidar Akita Tresnadi
Browse files

Merge branch 'Haidar' into 'main'

feat: add responsive css

See merge request if3110-2023-01-j/if-3110-2023-01-j!50
parents 5314092d 74526c45
Branches
Tags
No related merge requests found
......@@ -38,6 +38,7 @@ if (isset($_GET['sort'])) {
if (isset($_GET['page'])) {
$page = $_GET['page'];
$params['page'] = $page;
$_SESSION['page'] = $page;
}
if (isset($_SESSION['isAdmin']) && $_SESSION['isAdmin'] === '1'){
......
......@@ -5,6 +5,11 @@ if (!isset($_SESSION['isAdmin']) || $_SESSION['isAdmin'] !== '1') {
header('Location: /error/403.php/?haha=go+away+you+hackers');
exit();
}
if (!isset($_SESSION['page'])){
$_SESSION['page'] = '1';
}
?>
<!DOCTYPE html>
......@@ -24,7 +29,8 @@ if (!isset($_SESSION['isAdmin']) || $_SESSION['isAdmin'] !== '1') {
<body>
<?php include "../dashboard/index.php" ?>
<h1>Add User</h1>
<?php echo '<a href="../Hall-of-Fame?page=' . $_SESSION['page'] . '"><button class="back">Back</button></a>'; ?>
<div id="form">
<form class="form-grid" id="userForm">
......@@ -85,7 +91,7 @@ if (!isset($_SESSION['isAdmin']) || $_SESSION['isAdmin'] !== '1') {
</div>
<div class="form-group">
<input type="submit" value="Add User">
<input type="submit" value="Submit">
</div>
</form>
......
......@@ -193,6 +193,34 @@ tr:nth-child(even) {
transition: background-color 0.3s;
}
@media (max-width: 768px) {
.search-box {
width: 50%;
margin: 0 auto 10px auto;
}
.search-button {
margin-right: 0;
}
.head-container h1 {
margin-left: 0;
}
.body-container {
margin: 0;
}
.pagination-container {
width: 100%;
margin-left: 0;
position: absolute;
left: 10px;
display: flex;
justify-content: center;
}
}
......
body {
background-color: white;
background-image: url('../img/basic-wallpaper5.jpeg');
text-align: center;
font-family: Arial, sans-serif;
background-size: cover;
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center center;
}
.back {
background-color: #007BFF;
color: #fff;
border: none;
padding: 10px 20px;
border-radius: 3px;
font-size: 18px;
cursor: pointer;
margin-top: 21px;
}
#form {
font-family: Arial, sans-serif;
padding: 0;
display: flex;
justify-content: center;
justify-content: center;
align-items: center;
margin-bottom: 20px;
max-width: 40%;
margin-left: 400px;
}
.center-content {
background-color: #ffffff;
margin: 50px auto 20px auto;
max-width: 80%;
padding: 20px;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
text-align: center;
border-radius: 5px;
}
h1 {
......@@ -28,13 +37,18 @@ h1 {
.form-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 40px;
grid-template-columns: 1fr;
gap: 20px;
}
.form-group {
margin-right: 10px;
}
label {
display: block;
margin-bottom: 5px;
margin-bottom: 10px;
font-weight: bold;
color: #007BFF;
}
......@@ -44,13 +58,12 @@ input[type="email"],
input[type="password"],
input[type="checkbox"] {
width: 100%;
max-width: 300px;
padding: 8px;
border: 3px solid #ccc;
border-radius: 3px;
font-size: 16px;
color: #333;
margin-bottom: 8px;
margin-bottom: 15px;
}
input[type="submit"] {
......@@ -68,3 +81,18 @@ input[type="submit"] {
margin-bottom: 20px;
text-align: center;
}
@media (min-width: 768px) {
#form {
max-width: 40%;
margin-left: 400px;
margin-top: 50px;
}
.form-grid {
grid-template-columns: repeat(2, 1fr);
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment