Skip to content

Commit

Permalink
Routing, include, views
Browse files Browse the repository at this point in the history
  • Loading branch information
pasierbpiotr committed May 28, 2023
1 parent bdc9456 commit f462048
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 47 deletions.
12 changes: 0 additions & 12 deletions app/Http/Controllers/Welcome_Page.php

This file was deleted.

20 changes: 20 additions & 0 deletions resources/views/Login.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8" />
<title>Transportation Platform</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous"></script>
</head>

<body>
@include('include.headerBeforeLogin')

<footer style="background-color: #e9ecef; text-align: center;">
Developed by Piotr Pasierb - XXX&copy;
</footer>
</body>

</html>
35 changes: 1 addition & 34 deletions resources/views/Welcome_Page.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,7 @@
</head>

<body>
<header>
<nav class="navbar navbar-expand-lg bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="#">Transportation Platform</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
Dropdown
</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="#">Action</a></li>
<li><a class="dropdown-item" href="#">Another action</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#">Something else here</a></li>
</ul>
</li>
<div class="d-grid gap-2 d-md-flex justify-content-md-end">
<button class="btn btn-primary me-md-2" type="button">Login</button>
</div>
</ul>
</div>
</div>
</nav>
</header>
@include('include.headerBeforeLogin')
<div>
<h1>Welcome to our page!</h1>
<p>We are XXX and support the work of transportation companies.</p>

This comment has been minimized.

Copy link
@mb-dir

mb-dir Jun 5, 2023

this XXX looks a little bit sus ( ͡° ͜ʖ ͡°)

Expand Down
34 changes: 34 additions & 0 deletions resources/views/include/headerAfterLogin.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<header>
<nav class="navbar navbar-expand-lg bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="#">Transportation Platform</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
Dropdown
</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="#">Action</a></li>
<li><a class="dropdown-item" href="#">Another action</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#">Something else here</a></li>
</ul>
</li>
<div class="d-grid gap-2 d-md-flex justify-content-md-end">
<button class="btn btn-primary me-md-2" type="button">Login</button>
</div>
</ul>
</div>
</div>
</nav>
</header>
15 changes: 15 additions & 0 deletions resources/views/include/headerBeforeLogin.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<header>
<nav class="navbar navbar-expand-lg bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="{{route('start')}}">Transportation Platform</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<div class="d-grid gap-2 d-md-flex justify-content-md-end">
<a href="{{route('login')}}"><button class="btn btn-primary me-md-2" type="button">Login</button></a>
</div>
</div>
</div>
</nav>
</header>
9 changes: 8 additions & 1 deletion routes/web.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

use App\Http\Controllers\Welcome_Page;
use Illuminate\Support\Facades\Route;

/*
Expand All @@ -13,4 +14,10 @@
|
*/

Route::get('/Welcome_Page', 'App\Http\Controllers\Welcome_Page@index');
Route::get('/Welcome_Page', function() {
return view('Welcome_Page');
})->name('start');

Route::get('/Login', function() {
return view('Login');
})->name('login');

This comment has been minimized.

Copy link
@mb-dir

mb-dir Jun 5, 2023

lets keep the naming convention, so Welcome_Page => welcome-page, you can also check it

1 comment on commit f462048

@mb-dir
Copy link

@mb-dir mb-dir commented on f462048 Jun 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No jest wszystko w porządku, jest dobrze, dobrze robią, dobrze wszystko jest w porządku. Jest git pozdrawiam całą Boguchwałe, dobrych chłopaków i niech sie to trzyma. Dobry przekaz leci

Please sign in to comment.