Merge remote-tracking branch 'origin/main' into main

This commit is contained in:
Kraken 2021-04-08 15:22:50 +02:00
commit c4fefcda81
7 changed files with 111 additions and 15 deletions

8
Backend/test.php Normal file
View File

@ -0,0 +1,8 @@
<?php
use Backend\Models\AdminUser;
require_once ('Database/databaseMigration.php');
AdminUser::firstOrCreate([
'user_name' => 'admin', 'password' => password_hash('admin123',PASSWORD_DEFAULT)
]);

View File

@ -10,16 +10,19 @@
<!-- Default page settings end -->
<!-- CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css" integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">
<link rel="stylesheet" href="../Styles/Index.css" />
<link rel="stylesheet" href="../Styles/AdminPage.css" />
<link rel="stylesheet" href="../Styles/minibar.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.2/css/all.min.css" integrity="sha512-HK5fgLBL+xu6dm/Ii3z4xhlSUyZgTT9tuc/hSrtw6uzJOvgRr2a9jyxxT1ely+B+xFAmJKVSTbpM/CuL7qxO8w==" crossorigin="anonymous" />
<!-- CSS end -->
<!-- Header scripts -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/moment@2.29.1/moment.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/inputmask@5.0.5/dist/jquery.inputmask.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.6.0/dist/umd/popper.min.js" integrity="sha384-KsvD1yqQ1/1+IA7gi3P0tyJcT3vR+NdBTt13hSJ2lnve8agRGXTTyNaBYmCR/Nwi" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/js/bootstrap.min.js" integrity="sha384-nsg8ua9HAw1y0W1btsyWgBklPnCUAFLuTMS2G72MMONqmOymq585AcH49TLBQObG" crossorigin="anonymous"></script>
<!-- Header scripts end -->
@ -49,11 +52,21 @@
<div>
<form id="createGameJam" method="POST">
<label for="nameOfGameJam">Indtast navn på Game Jam:</label>
<input type="text" name="newGameJam" id="nameOfGameJam">
<!-- <label for="nameOfGameJam">Indtast navn på Game Jam:</label>
<input type="text" name="newGameJam" id="nameOfGameJam"> -->
<div class="FormField">
<input type="text" class="FormFieldInput" placeholder="Gamejam title" name="newGameJam" id="GamejamTitle" required>
<label for="GamejamTitle" class="FormFieldLabel">
Gamejam title
</label>
</div>
<br />
<div class="FormField">
<input type="date" class="FormFieldInput"
</div>
<label for="startDate">Start dato:</label>
<input type="date" name="startDate" id="startDate">
@ -65,7 +78,7 @@
<br />
<label for="startTime">Start tidspunkt:</label>
<input type="time" name="startTime" id="startTime" min="00:00" max="24:00" value="00:00" pattern="[0-9]{2}:[0-9]{2}">
<input type="text" name="startTime" id="startTime" placeholder="12:00">
<br />
@ -90,12 +103,17 @@
<button type="button" id="testTime">Test</button>
</form>
</div>
<!--Opret game jam slut-->
<!-- Opret game jam slut -->
<!-- Body scripts -->
<script src="../Javascript/minibar.min.js"></script>
<script src="../Javascript/AddEvent.js"></script>
<script src="../Javascript/AddGameJam.js"></script>
<script>
$(document).ready(function() {
$('#startTime').inputmask('99:99');
});
</script>
<!-- Body scripts end -->
</body>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="da-DK">
<html lang="en">
<head>
<!-- Default page settings -->
@ -9,7 +9,7 @@
<link rel="shortcut icon" href="Images/UFO.png" />
<!-- Default page settings end -->
<!-- CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css" integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">
<link rel="stylesheet" href="Styles/Index.css" />
<link rel="stylesheet" href="Styles/SpinningWheel.css" />
<link rel="stylesheet" href="Styles/minibar.min.css" />

View File

@ -21,13 +21,13 @@ $(document).ready(function () {
// Populate select with options from the database
axios.get('/Backend/Controllers/GameJam/GetGameJam.php')
.then(function(res) {
let resArr = res.data;
let resArr = res.data.data;
for(let i = 0; i < res.data.data.length; i++)
{
arr.push({
id: res.data.data[i].id,
Gamejam: res.data.data[i].name
id: resArr[i].id,
Gamejam: resArr[i].name
});
}

View File

@ -1,6 +1,7 @@
body{
body {
text-align: center;
}
.HeaderPanel {
position: fixed;
overflow: hidden;
@ -42,6 +43,10 @@ body{
position: center;
}
#createGameJam input:focus-visible {
outline: none;
}
#startTime {
border-radius: 15px;
color: #474747;
@ -82,8 +87,6 @@ body{
border: double;
}
#description {
background-color: rgb(18, 18, 18);
color: rgba(255, 255, 255, .55);
@ -99,4 +102,65 @@ body{
background-color: rgb(18, 18, 18);
border: double;
}
/*Create Game Jam end*/
/*Create Game Jam end*/
.FormField {
position: relative;
padding: 15px 0 0;
margin-top: 10px;
}
.FormFieldInput {
font-family: inherit;
width: 100%;
border: 0;
border-bottom: 2px solid #9b9b9b;
outline: 0;
font-size: 1.3rem;
color: #fff;
padding: 7px 0;
background: transparent;
transition: border-color 0.2s;
}
.FormFieldInput::placeholder {
color: transparent;
}
.FormFieldInput:placeholder-shown ~ .FormFieldLabel {
font-size: 1.3rem;
cursor: text;
top: 20px;
}
.FormFieldLabel {
position: absolute;
top: 0;
display: block;
transition: 0.2s;
font-size: 1rem;
color: #9b9b9b;
}
.FormFieldInput:focus {
padding-bottom: 6px;
font-weight: 700;
border-width: 3px;
border-image: linear-gradient(to right, #11998e, #38ef7d);
border-image-slice: 1;
}
.FormFieldInput:focus ~ .FormFieldLabel {
position: absolute;
top: 0;
display: block;
transition: 0.2s;
font-size: 1rem;
color: #11998e;
font-weight: 700;
}
.FormFieldInput:required,
.FormFieldInput:invalid {
box-shadow: none;
}

View File

@ -6,4 +6,3 @@ $con = json_decode(file_get_contents('config/database.json', true), true);
$capsule->addConnection($con);
$capsule->setAsGlobal();
$capsule->bootEloquent();
$capsule->Connection()->getPdo();

7
config/database.json Normal file
View File

@ -0,0 +1,7 @@
{
"driver":"mysql",
"host":"localhost",
"database":"testdb",
"username":"root",
"password":"V#_xWL6_"
}