Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Commit

Permalink
En masse ting
Browse files Browse the repository at this point in the history
Tilføjet Vestegnen og byerne nord for København.

Burde fikse det her WordPress/gutenberg#17718
  • Loading branch information
jensz12 committed Mar 11, 2020
1 parent 3c5d883 commit 4dc9efe
Show file tree
Hide file tree
Showing 10 changed files with 99 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .htaccess
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://dev.justeat.jensz12.com/$1 [R,L]
RewriteRule ^(.*)$ https://justeat.jensz12.com/$1 [R,L]

RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/
RewriteCond %{REQUEST_FILENAME} !-f
Expand Down
8 changes: 6 additions & 2 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ body {
background-attachment: fixed;
height: 100%;
font-family: 'Roboto', sans-serif;
@supports (-webkit-touch-callout: inherit) {
background-attachment: scroll;
}
}

.img {
margin: 30px;
}
Expand All @@ -22,7 +26,7 @@ body {
margin-top: 70px;
}
a:link, a:visited {
color: #ffffff;
color: rgb(102, 102, 102);
text-decoration: none;
}
a:hover, a:active {
Expand Down Expand Up @@ -163,4 +167,4 @@ a:hover, a:active {
.navbar-expand .navbar-nav .show .dropdown-menu .dropdown-item.active {
color: #ffffff;
background-color: #e30227;
}
}
62 changes: 56 additions & 6 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
$rests[] = $rest;
}

$service->title = 'DEVELOPMENT: Parkeringsguide - Hillerød';
$service->title = 'Parkeringsguide - Hillerød';
$service->rests = $rests;
$service->render('views/parkering.php');
});
Expand All @@ -62,7 +62,7 @@
$rests[] = $rest;
}

$service->title = 'DEVELOPMENT: Parkeringsguide - Odense';
$service->title = 'Parkeringsguide - Odense';
$service->rests = $rests;
$service->render('views/parkering.php');
});
Expand All @@ -87,7 +87,57 @@
$rests[] = $rest;
}

$service->title = 'DEVELOPMENT: Parkeringsguide - CPH';
$service->title = 'Parkeringsguide - København, Frederiksberg & Tårnby';
$service->rests = $rests;
$service->render('views/parkering.php');
});

$klein->respond('GET', '/parkering/nord', function($request, $response, $service) {

$mysqli = new mysqli('localhost' , 'jensz12_je_nord' , '4k[A}1riR1Nw' , 'jensz12_je_nord');
$mysqli->set_charset('utf8');

if ($mysqli->connect_errno)
die('Der kunne ikke oprettes forbindelse til databasen. Prøv igen om lidt');

$sql = 'SELECT * FROM rest ORDER BY navn ASC';
$result = $mysqli->query($sql);

$rests = [];

while ($rest = $result->fetch_assoc()) {
$rest['under_rests'] = get_under_rests($mysqli, $rest['id']);
$rest['under_rests_lowercase'] = array_map('mb_strtolower', $under_rests);

$rests[] = $rest;
}

$service->title = 'Parkeringsguide - Nord for København';
$service->rests = $rests;
$service->render('views/parkering.php');
});

$klein->respond('GET', '/parkering/vestegnen', function($request, $response, $service) {

$mysqli = new mysqli('localhost' , 'jensz12_vest' , '0H%[4)Xn(n&t' , 'jensz12_je_vest');
$mysqli->set_charset('utf8');

if ($mysqli->connect_errno)
die('Der kunne ikke oprettes forbindelse til databasen. Prøv igen om lidt');

$sql = 'SELECT * FROM rest ORDER BY navn ASC';
$result = $mysqli->query($sql);

$rests = [];

while ($rest = $result->fetch_assoc()) {
$rest['under_rests'] = get_under_rests($mysqli, $rest['id']);
$rest['under_rests_lowercase'] = array_map('mb_strtolower', $under_rests);

$rests[] = $rest;
}

$service->title = 'Parkeringsguide - Vestegnen';
$service->rests = $rests;
$service->render('views/parkering.php');
});
Expand All @@ -112,7 +162,7 @@
$rests[] = $rest;
}

$service->title = 'DEVELOPMENT: Parkeringsguide - Roskilde';
$service->title = 'Parkeringsguide - Roskilde';
$service->rests = $rests;
$service->render('views/parkering.php');
});
Expand All @@ -137,7 +187,7 @@
$rests[] = $rest;
}

$service->title = 'DEVELOPMENT: Parkeringsguide - Aarhus';
$service->title = 'Parkeringsguide - Aarhus';
$service->rests = $rests;
$service->render('views/parkering.php');
});
Expand All @@ -162,7 +212,7 @@
$rests[] = $rest;
}

$service->title = 'DEVELOPMENT: Parkeringsguide - Aalborg';
$service->title = 'Parkeringsguide - Aalborg';
$service->rests = $rests;
$service->render('views/parkering.php');
});
Expand Down
22 changes: 1 addition & 21 deletions js/sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,6 @@ const filesToCache = [
'/img/logo/512.png',
'/img/logo/1024.png',
'/img/logo/je.png',
'/rest/kastet.png',
'/rest/jamesrobertson.png',
'/rest/carlsjr.png',
'/rest/aalborgstreetfood.jpg',
'/rest/grillen.png',
'/rest/esaan.png',
'/rest/amor.PNG',
'/rest/jensens.png',
'/rest/thien-nhi.png',
'/rest/bogo.png',
'/rest/bollywood.jpg',
'/rest/falafel.png',
'/rest/grill-sandwich.png',
'/rest/highway66.png',
'/rest/katjas.png',
'/rest/southindian.png',
'/rest/bk.svg',
'/rest/sunset.svg',
'/img/andet/je-back.jpg',
'/img/andet/je-bg.png',
'/img/andet/back.jpg'
];

// Install
Expand All @@ -45,6 +24,7 @@ self.addEventListener('install', function(e) {
);
});


// Activate
self.addEventListener('activate', function(e) {
console.log('Just Eat service worker activation');
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
"sizes": "512x512",
"type": "image/png"
}]
}
}
4 changes: 4 additions & 0 deletions views/404.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<div class="jumbotron">
<h1>404</h1>
<h2>Siden blev ikke fundet</h2>
</div>
24 changes: 22 additions & 2 deletions views/front.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,31 @@
<img src="/img/byer/cph.png" class="card-img-top" alt="København">
<div class="card-body">
<h5 class="card-title">København</h5>
<p class="card-text">Dækker København, Frederiksberg & Tårnby</p>
<p class="card-text">Dækker København, Frederiksberg, Tårnby & Kastrup</p>
<a href="/parkering/cph" class="btn btn-dark"><i class="fal fa-parking fa-fw"></i> Parkering</a>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="card">
<img src="/img/byer/cph.png" class="card-img-top" alt="København">
<div class="card-body">
<h5 class="card-title">Vestegnen</h5>
<p class="card-text">Dækker Rødovre, Hvidovre, Glostrup, Brøndby, Høje-Taastrup, Greve & Ishøj</p>
<a href="/parkering/vestegnen" class="btn btn-dark"><i class="fal fa-parking fa-fw"></i> Parkering</a>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="card">
<img src="/img/byer/cph.png" class="card-img-top" alt="København">
<div class="card-body">
<h5 class="card-title">Nord for København</h5>
<p class="card-text">Dækker Gentofte, Lyngby-Taarbæk, Gladsaxe, Herlev, Rudersdal & Hørsholm</p>
<a href="/parkering/nord" class="btn btn-dark"><i class="fal fa-parking fa-fw"></i> Parkering</a>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="card">
<img src="/img/byer/odense.png" class="card-img-top" alt="Odense">
Expand All @@ -56,4 +76,4 @@
</div>
</div>
</div>
</div>
</div>
8 changes: 0 additions & 8 deletions views/info.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@
<li>Knappen til at åbne tankdækslet, sidder ved døren til føresæddet, nede ved gulvet</li>
<li>Dæktrykket på fordækkene skal være 2.3 bar / 33 PSI. Dæktrykket på bagdækkene skal være 2.2 bar / 32 PSI.</li>
</ul>
<h3>Nummerplader</h3>
<ul>
<li>Aab01: BX 29 407</li>
<li>Aab02: BS 95 015</li>
<li>Aab03: BT 88 896</li>
<li>Aab04: BT 88 841</li>
<li>Aab05: CE Resten kommer snart</li>
</ul>
</div>
<div class="jumbotron">
<h2>Just Eat Dresscode</h2>
Expand Down
6 changes: 6 additions & 0 deletions views/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@
<li class="nav-item">
<a class="nav-link" href="/parkering/cph"><i class="fal fa-parking fa-fw"></i> København</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/parkering/nord"><i class="fal fa-parking fa-fw"></i> Nord for København</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/parkering/vestegnen"><i class="fal fa-parking fa-fw"></i> Vestegnen</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/parkering/odense"><i class="fal fa-parking fa-fw"></i> Odense</a>
</li>
Expand Down
3 changes: 2 additions & 1 deletion views/parkering.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<input type="text" autofocus class="form-control" id="rest-find" aria-describedby="" placeholder="Indtast navn">
</div>


<div class="row">
<?php foreach ($this->rests as $rest): ?>
<div class="col-sm-6 rest" data-search="<?php echo mb_strtolower($rest['navn']).' '.implode(' ', $rest['under_rests_lowercase']); ?>">
Expand All @@ -19,4 +20,4 @@
</div>
</div>
<?php endforeach; ?>
</div>
</div>

0 comments on commit 4dc9efe

Please sign in to comment.