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

This commit is contained in:
Ida Tiegel 2021-04-08 15:25:39 +02:00
commit d9530f8be1
10 changed files with 180 additions and 26 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,11 +9,12 @@
<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" />
<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" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/overlayscrollbars/1.13.1/css/OverlayScrollbars.css" />
<!-- CSS end -->
<!-- Header scripts -->
<script src="https://kit.fontawesome.com/57b6c8b971.js" crossorigin="anonymous"></script>
@ -22,6 +23,7 @@
<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>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/overlayscrollbars/1.13.1/js/jquery.overlayScrollbars.js"></script>
<!-- Header scripts end -->
</head>
@ -385,7 +387,7 @@
<h5>Hvad bliver der lagt vægt på når man finder vinderen?</h5>
<p>Når alle deltagerne har udviklet på livet løs, og tiden er løbet ud, bliver alle spillende uploadet og afprøvet af andre deltagere samt tilskuere. Når man skal finde en vinder, skal man kigge på forskellige ting som:</p>
<ul style="text-align: left;">
<ul class="Circle-list">
<li>Udnyttelse af tiden</li>
<li>Hvor godt virker spillet?</li>
<li>Hvor godt er designet?</li>
@ -670,15 +672,14 @@
</div>
</div>
<div id="txt"></div>
<ul>
<li>1.</li>
<li>2.</li>
<li>3.</li>
<li>4.</li>
<li>5.</li>
<li>6.</li>
</ul>
<ol class="Subject-list" type="1">
<li>Subject name</li>
<li>Subject name</li>
<li>Subject name</li>
<li>Subject name</li>
<li>Subject name</li>
<li>Subject name</li>
</ol>
</section>
@ -698,12 +699,15 @@
</footer>
<!-- Footer end -->
<!-- Body scripts -->
<script src="Javascript/OverlayScrollbar.js"></script>
<script src="Javascript/ScrollController.js"></script>
<script src="Javascript/Collapsible.js"></script>
<script src="Javascript/PasswordValidation.js"></script>
<script src="Javascript/Kalender.js"></script>
<script src="Javascript/SpinningWheel.js"></script>
<script src="Javascript/minibar.min.js"></script>
<script src="Javascript/HeaderFunctionality.js"></script>
<!-- <script src="Javascript/HeaderFunctionality.js"></script> -->
<script src="Javascript/LoginFunctionality.js"></script>
<!-- Body scripts end -->
</body>

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

@ -0,0 +1,10 @@
document.addEventListener("DOMContentLoaded", function() {
//The first argument are the elements to which the plugin shall be initialized
//The second argument has to be at least a empty object or a object with your desired options
OverlayScrollbars(document.querySelectorAll('body'), { });
});
$(function() {
//The passed argument has to be at least a empty object or a object with your desired options
$('body').overlayScrollbars({ });
});

View File

@ -0,0 +1,21 @@
/* When the user scrolls down, hide the navbar. When the user scrolls up, show the navbar */
$(document).ready(function() {
var instance = $('body').overlayScrollbars();
var prevScrollpos = instance.scroll().position.y;
console.log(prevScrollpos);
window.onscroll = function() {
var currentScrollPos = instance.scroll().position.y;
console.log(currentScrollPos);
if (prevScrollpos > currentScrollPos) {
$("#header").css({"top" : "0"});
} else {
$("#header").css({"top" : "-50px"});
}
prevScrollpos = currentScrollPos;
}
});

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

@ -868,4 +868,27 @@ image_gruppenavn{
border: double;
border-color: rgb(0, 113, 185);
border-radius: 15px;
}
.Collapse-Button:hover {
border-color: rgb(52, 152, 219);
}
ul.Circle-list {
display: inline-block;
text-align: initial;
}
ul.Circle-list li:before {
content: "\2022"; /* Unicode for a bullet */
color: rgb(0, 113, 185);
font-weight: bold;
display: inline-block; /* Needed to add space between the bullet and the text */
width: 1em; /* Also needed for space (tweak if needed) */
margin-left: -1em; /* Also needed for space (tweak if needed) */
}
ol.Subject-list {
list-style-type: decimal;
color: red;
}

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_"
}