Site responsive

HTML && CSS completed.
Responsive.
master
NoNameGuy 2017-08-16 09:24:26 +01:00
parent 789dc61be0
commit d3ec33f61b
14 changed files with 706 additions and 752 deletions

376
laravel/composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,56 +1,43 @@
/* Remove the navbar's default margin-bottom and rounded borders */
.navbar {
margin-bottom: 0;
border-radius: 0;
}
/* Set height of the grid so .sidenav can be 100% (adjust as needed) */
.row.content {height: 900px}
/* Set gray background color and 100% height */
.sidenav {
padding-top: 20px;
background-color: #f1f1f1;
height: 100%;
}
/* Set black background color, white text and some padding */
footer {
background-color: #555;
color: white;
padding: 15px;
}
/* On small screens, set height to 'auto' for sidenav and grid */
@media screen and (max-width: 767px) {
.sidenav {
height: auto;
padding: 15px;
}
.row.content {height:auto;}
}
.center {
text-align: center;
body {
background-color: #555555;
color: white;
}
#map {
height: 700px;
width: 400px;
@media (max-width: 1200px) {
body {
padding-left: 0px;
padding-right: 0px;
}
}
h2{
text-align: center;
}
footer {
background-color: #262626;
color: white;
position: fixed;
bottom: 0;
width: 100%;
text-align: center;
}
@media (min-width: 768px) {
.navbar-nav.navbar-center{
position: fixed;
left: 50%;
transform: translatex(-50%);
color: white;
}
}
#map{
width: 85%;
height: 650px;
}
#ui-id-1, #ui-id-2 {
list-style-type: none;
width: 400px;
margin-top: 5px;
padding: 8px 12px;
background-color: #fff;
border: 1px solid #ccc;
border: 1px solid rgba(0, 0, 0, 0.2);
border-radius: 8px 8px 8px 8px;
font-size: 18px;
color: #111;
background-color: #F1F1F1;
}
#mapUP{
width: 85%;
height: 650px;
}

View File

@ -1,10 +1,6 @@
@include('header')
<div class="col-sm-8 text-left">
<h1 class="center">Preço dos Combustíveis</h1>
<hr>
<div class="panel panel-default">
<div class="panel-heading center">Login</div>
<div class="col-lg-12 text-left" style="background-color:grey">
<h1 style="text-align:center">Login</h1>
<div class="panel-body">
<form class="form-horizontal" role="form" method="POST" action="{{ route('login') }}">
{{ csrf_field() }}
@ -75,6 +71,5 @@
</div>
</form>
</div>
</div>
</div>
@include('footer')

View File

@ -1,74 +1,71 @@
@include('header')
<div class="col-sm-8 text-left">
<h1 class="center">Preço dos Combustíveis</h1>
<hr>
<div class="col-lg-12" style="background-color: grey">
<div class="panel panel-default">
<div class="panel-heading center">Registar</div>
<div class="panel-body">
<form class="form-horizontal" role="form" method="POST" action="{{ route('register') }}">
{{ csrf_field() }}
<h1 style="text-align:center">Registar</h1>
<div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}">
<label for="name" class="col-md-4 control-label">Nome</label>
<div class="panel-body">
<form class="form-horizontal" role="form" method="POST" action="{{ route('register') }}">
{{ csrf_field() }}
<div class="col-md-6">
<input id="name" type="text" class="form-control" name="name" value="{{ old('name') }}" required autofocus>
<div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}">
<label for="name" class="col-lg-4 control-label">Nome</label>
@if ($errors->has('name'))
<span class="help-block">
<strong>{{ $errors->first('name') }}</strong>
</span>
@endif
</div>
</div>
<div class="col-lg-6">
<input id="name" type="text" class="form-control" name="name" value="{{ old('name') }}" required autofocus>
<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
<label for="email" class="col-md-4 control-label">E-Mail</label>
<div class="col-md-6">
<input id="email" type="email" class="form-control" name="email" value="{{ old('email') }}" required>
@if ($errors->has('email'))
<span class="help-block">
<strong>{{ $errors->first('email') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}">
<label for="password" class="col-md-4 control-label">Password</label>
<div class="col-md-6">
<input id="password" type="password" class="form-control" name="password" required>
@if ($errors->has('password'))
<span class="help-block">
<strong>{{ $errors->first('password') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group">
<label for="password-confirm" class="col-md-4 control-label">Confirmar Password</label>
<div class="col-md-6">
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" required>
</div>
</div>
<div class="form-group">
<div class="col-md-6 col-md-offset-4">
<button type="submit" class="btn btn-primary">
Registar
</button>
</div>
</div>
</form>
</div>
@if ($errors->has('name'))
<span class="help-block">
<strong>{{ $errors->first('name') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
<label for="email" class="col-lg-4 control-label">E-Mail</label>
<div class="col-lg-6">
<input id="email" type="email" class="form-control" name="email" value="{{ old('email') }}" required>
@if ($errors->has('email'))
<span class="help-block">
<strong>{{ $errors->first('email') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}">
<label for="password" class="col-lg-4 control-label">Password</label>
<div class="col-lg-6">
<input id="password" type="password" class="form-control" name="password" required>
@if ($errors->has('password'))
<span class="help-block">
<strong>{{ $errors->first('password') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group">
<label for="password-confirm" class="col-lg-4 control-label">Confirmar Password</label>
<div class="col-lg-6">
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" required>
</div>
</div>
<div class="form-group">
<div class="col-lg-6 col-lg-offset-4">
<button type="submit" class="btn btn-success">
Registar
</button>
</div>
</div>
</form>
</div>
</div>
@include('footer')

View File

@ -1,14 +0,0 @@
@include('header')
<div class="col-sm-8 text-left">
<h1 class="center">Preço dos Combustíveis</h1>
<hr>
<div class="col-sm-6">
</div>
</div>
@include('footer')

View File

@ -1,14 +1,12 @@
<div class="col-sm-2 sidenav">
</div>
</div>
</div>
<footer class="container-fluid text-center">
<p>GeoComb - Combustíveis ao Mais Baixo Preço - © 2017</p>
</footer>
<footer class="footer navbar-nav navbar-center">
<div class="container">
<p>GeoComb - Combustíveis ao Mais Baixo Preço - © 2017</p>
</div>
</footer>
</body>
</body>
<script src="{{asset('js/javascript.js')}}"></script>
<script src="{{asset('js/javascript.js')}}"></script>
</html>

View File

@ -1,80 +1,86 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>!GeoComb!</title>
<title>GeoComb</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link href="{{ URL::asset('css/style.css') }}" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<link rel="stylesheet" type="text/css" href="{{asset('css/style.css') }}">
<script src="{{asset('js/bootstrap3-typeahead.js')}}"></script>
</head>
<body><nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{{route('home')}}"><img src="../../files/gasico.png" style="heihgt: 25px; width: 25px; float: left">GeoComb</img></a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li class="active"><a href="{{route('home')}}">Home</a></li>
<li><a href="#">About</a></li>
@if (Auth::user())
<li><a href="{{route('planRoute')}}">My Area</a></li>
@endif
</ul>
<ul class="nav navbar-nav navbar-right">
@if (Auth::guest())
<li><a href="{{ route('login') }}">Login</a></li>
<li><a href="{{ route('register') }}">Registar</a></li>
@else
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
{{ Auth::user()->name }} <span class="caret"></span>
</a>
<body>
<ul class="dropdown-menu" role="menu">
<li>
<a href="{{ route('logout') }}"
onclick="event.preventDefault();
document.getElementById('logout-form').submit();">
Logout
</a>
{{--
<li><a href="{{route('users.view', [Auth::user()->id])}}"><i class="fa fa-btn fa-user"></i>My Profile</a></li>
<li><a href="{{route('advertisements.create')}}"><i class="fa fa-btn fa-plus"></i>Create Advertisement</a></li>
<li><a href="{{route('bids.list')}}"><i class="fa fa-btn fa-credit-card"></i>My Bids</a></li>
@if (Auth::user()->admin)
<li><a href="{{route('admin.list')}}"><i class="fa fa-btn fa-briefcase"></i>Admin Page</a></li>
@endif
<li><a href="{{ url('/logout') }}"><i class="fa fa-btn fa-sign-out"></i>Logout</a></li>
--}}
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
{{ csrf_field() }}
</form>
</li>
</ul>
</li>
@endif
<!-- Fixed navbar-->
<div class="navbar navbar-inverse navbar-static-top">
<div class="container">
<nav class="navbar navbar-main">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
</ul>
</div>
</div>
</nav>
<div class="navbar-collapse collapse">
<div class="container-fluid text-center">
<div class="row content">
<div class="col-sm-2 sidenav">
<ul class="nav navbar-nav navbar-left">
<a class="navbar-brand" href="{{route('home')}}"><img src="../../files/gasico.png" style="heihgt: 35px; width: 35px;"></img></a>
<li><a href="{{route('home')}}"><h4>GeoComb</h4></a></li>
</ul>
</div>
<ul class="nav navbar-nav navbar-center">
<li><h2>Preço dos Combustíveis</h2></li>
</ul>
<ul class="nav navbar-nav navbar-right">
@if (Auth::user())
<li><a href="{{route('planRoute')}}"><h4>My Area</h4></a></li>
@endif
@if (Auth::guest())
<li><a href="{{ route('login') }}"><h4>Login</h4></a></li>
<li><a href="{{ route('register') }}"><h4>Registar</h4></a></li>
@else
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
{{ Auth::user()->name }} <span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="{{ route('logout') }}" onclick="event.preventDefault();
document.getElementById('logout-form').submit();">
Logout
</a>
{{--
<li><a href="{{route('users.view', [Auth::user()->id])}}"><i class="fa fa-btn fa-user"></i>My Profile</a></li>
<li><a href="{{route('advertisements.create')}}"><i class="fa fa-btn fa-plus"></i>Create Advertisement</a></li>
<li><a href="{{route('bids.list')}}"><i class="fa fa-btn fa-credit-card"></i>My Bids</a></li>
@if (Auth::user()->admin)
<li><a href="{{route('admin.list')}}"><i class="fa fa-btn fa-briefcase"></i>Admin Page</a></li>
@endif
<li><a href="{{ url('/logout') }}"><i class="fa fa-btn fa-sign-out"></i>Logout</a></li>
--}}
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
{{ csrf_field() }}
</form>
</li>
</ul>
</li>
@endif
</ul>
</div><!--/.nav-collapse -->
</nav>
</div>
</div>

View File

@ -1,113 +1,140 @@
@include('header')
<form method="POST" action="{{ route('home') }}" style="display: none;" >
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<input type="text" id = "latitude" name="latitude" value="{{$centerMapCoordinates->latitude}}" />
<input type="text" id = "longitude" name="longitude" value="{{$centerMapCoordinates->longitude}}" />
<button type="submit" id="landingHiddenSubmit">submit</button>
</form>
<br><br>
<div class="container-fluid" style="background-color: grey">
<h2 class="center">Pesquisar Postos:</h2>
<br><br><br>
<div class="col-sm-8 text-left">
<h1 class="center">Preço dos Combustíveis</h1>
<div class="row">
<!--<a href="{{action('LandingController@getJsonOpenMaps')}}">Fetch data station</a>-->
<hr>
<h2 class="center">Pesquisar Postos:</h2>
<br><br><br>
<div class="row">
<!--Div esquerda-->
<div class="col-sm-6">
<div id="map" style="width: 500px;height: 500px;"></div>
</div>
<!--Div direita-->
<div class="col-sm-6">
@if(!isset($stations))
<br>
<form method="post" action="{{route('home')}}">
{{csrf_field()}}
<div class="form-group">
<label for="district">Distrito(s): </label>
<input class="form-control" id="district" name="district" type="text" @if(Auth::user() && isset($location)) value="$location" @endif>
</div>
<br>
<div class="checkbox" id="landingFuelType">
<div class="form-group">
<label style="font-weight:bold">Tipo de Combustível (Escolha 1): </label>
</div>
@if($fuels)
@foreach($fuels as $fuel)
<label><input type="checkbox" name="fuelType" value="{{$fuel->name}}">{{$fuel->name}}</label><br>
@endforeach
@endif
<div class="col-sm-4">
<label><input type="checkbox" name="fuelType" value="diesel">Gasóleo</label><br>
<label><input type="checkbox" name="fuelType" value="diesel_simple">Gasóleo Simples</label><br>
<label><input type="checkbox" name="fuelType" value="diesel_colored">Gasóleo Colorido</label><br>
<label><input type="checkbox" name="fuelType" value="diesel_special">Gasóleo Especial</label><br>
<br><br>
<label><input type="checkbox" name="fuelType" value="petrol_95">Gasolina 95</label><br>
<label><input type="checkbox" name="fuelType" value="petrol_simple_95">Gasolina Simples 95</label><br>
<label><input type="checkbox" name="fuelType" value="petrol_special_95">Gasolina Especial 95</label><br>
<br><br>
</div>
<div class="col-sm-8">
<label><input type="checkbox" name="fuelType" value="gas_natural_compressed_kg">GNC KG</label><br>
<label><input type="checkbox" name="fuelType" value="gas_natural_compressed_m3">GNC M3</label><br>
<label><input type="checkbox" name="fuelType" value="gas_natural_liquified">GNL</label><br>
<label><input type="checkbox" name="fuelType" value="gpl">GPL</label><br>
<br><br>
<label><input type="checkbox" name="fuelType" value="petrol_98">Gasolina 98</label><br>
<label><input type="checkbox" name="fuelType" value="petrol_simple_98">Gasolina Simples 98</label><br>
<label><input type="checkbox" name="fuelType" value="petrol_special_98">Gasolina Especial 98</label><br>
<br><br>
</div>
<!--DIV ESQUERDA-->
<div class="col-lg-6">
<div class="center-block" id="map"></div>
</div>
<div class="form-group">
<label for="brand">Marca (Opcional): </label>
<input class="form-control" id="brand" name="brand" type="text">
<!--Div direita-->
<div class="col-lg-6">
<div class="container-fluid">
@if(!isset($stations))
<br>
<form method="post" action="{{route('home')}}">
{{csrf_field()}}
<div class="col-lg-6">
<div class="form-group">
<label for="district">Distrito(s): </label>
<input class="form-control" id="district" name="district" type="text" @if(Auth::user() && isset($location)) value="$location" @endif>
</div>
</div>
<br><br><br><br><br>
<div class="row">
<div class="checkbox-inline" id="landingFuelType">
<div class="form-group" style="text-align:center">
<label style="font-weight:bold">Tipo de Combustível (Escolha 1): </label>
</div>
@if($fuels)
@foreach($fuels as $fuel)
<label><input type="checkbox" name="fuelType" value="{{$fuel->name}}">{{$fuel->name}}</label><br>
@endforeach
@endif
<div class="col-lg-6">
<label class="checkbox-inline"><input type="checkbox" name="fuelType" value="diesel">Gasóleo</label><br>
<label class="checkbox-inline"><input type="checkbox" name="fuelType" value="diesel_simple">Gasóleo Simples</label><br>
<label class="checkbox-inline"><input type="checkbox" name="fuelType" value="diesel_colored">Gasóleo Colorido</label><br>
<label class="checkbox-inline"><input type="checkbox" name="fuelType" value="diesel_special">Gasóleo Especial</label><br>
<br><br>
<label class="checkbox-inline"><input type="checkbox" name="fuelType" value="petrol_95">Gasolina 95</label><br>
<label class="checkbox-inline"><input type="checkbox" name="fuelType" value="petrol_simple_95">Gasolina Simples 95</label><br>
<label class="checkbox-inline"><input type="checkbox" name="fuelType" value="petrol_special_95">Gasolina Especial 95</label><br>
<br><br>
</div>
<div class="col-lg-6">
<label class="checkbox-inline"><input type="checkbox" name="fuelType" value="gas_natural_compressed_kg">GNC KG</label><br>
<label class="checkbox-inline"><input type="checkbox" name="fuelType" value="gas_natural_compressed_m3">GNC M3</label><br>
<label class="checkbox-inline"><input type="checkbox" name="fuelType" value="gas_natural_liquified">GNL</label><br>
<label class="checkbox-inline"><input type="checkbox" name="fuelType" value="gpl">GPL</label><br>
<br><br>
<label class="checkbox-inline"><input type="checkbox" name="fuelType" value="petrol_98">Gasolina 98</label><br>
<label class="checkbox-inline"><input type="checkbox" name="fuelType" value="petrol_simple_98">Gasolina Simples 98</label><br>
<label class="checkbox-inline"><input type="checkbox" name="fuelType" value="petrol_special_98">Gasolina Especial 98</label><br>
<br><br>
</div>
</div>
</div>
<div class="form-group">
<div class="col-lg-6">
<br>
<label for="brand">Marca (Opcional): </label>
<input class="form-control" id="brand" name="brand" type="text">
<br><br>
<button class="btn btn-success btn-lg" id="landingSearch" type="submit">Pesquisar</button>
<button class="btn btn-danger btn-lg" id="clearSearch" type="submit">Limpar Pesquisa</button>
<br><br>
</div>
</div>
</form>
@else
<form method="post" action="{{route('home')}}">
{{csrf_field()}}
<input type="hidden" name="district" value="">
<input type="hidden" name="brand" value="">
<button class="btn btn-success" id="landingBack">Back</button>
</form>
<h3 class="text-center">Mais baratas ()</h3>
<div class="form-group">
@foreach($stations as $key=>$station)
<div class="well well-lg">
<label for="nome">Nome: </label>
{{$station->stationName}}<br>
<label for="nome">Marca: </label>
{{$station->stationBrand}}<br>
<label for="nome">Preço: </label>
{{$station->fuelPrice}}
<!--<button type="button" class="btn btn-link" style="float:right">Detalhes</button>-->
<img src="../../files/{{$key+1}}.jpg" style="float:right"></img>
<br>
<label for="nome">Serviços: </label>
{{$station->services}}<br>
</div>
@endforeach
</div>
@endif
</div>
<button class="btn btn-success" id="landingSearch" type="submit">Search</button>
</form>
@else
<form method="post" action="{{route('home')}}">
{{csrf_field()}}
<input type="hidden" name="district" value="">
<input type="hidden" name="brand" value="">
<button class="btn btn-success" id="landingBack">Back</button>
</form>
<h3 class="text-center">Mais baratas ()</h3>
<div class="form-group">
@foreach($stations as $key=>$station)
<div class="well well-lg">
<label for="nome">Nome: </label>
{{$station->stationName}}<br>
<label for="nome">Marca: </label>
{{$station->stationBrand}}<br>
<label for="nome">Preço: </label>
{{$station->fuelPrice}}
<!--<button type="button" class="btn btn-link" style="float:right">Detalhes</button>-->
<img src="../../files/{{$key+1}}.jpg" style="float:right"></img>
<br>
<label for="nome">Serviços: </label>
{{$station->services}}<br>
</div>
</div>
<br><br><br><br>
</div>
@endforeach
</div>
@endif
</div>
</div>
</div>
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDsZDCiU1k6mSuywRRL88xxXY-81RMEU7s&callback=initMap" >
</script>
<script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDsZDCiU1k6mSuywRRL88xxXY-81RMEU7s&callback=initMap" ></script>
@include('footer')

View File

@ -1,14 +0,0 @@
@include('header')
<div class="col-sm-8 text-left">
<h1 class="center">Login</h1>
<form method="POST" action="{{url('/login')}}" autocomplete="on">
{{ csrf_field() }}
<input type="email" name="email" placeholder="Email"><br>
<input type="password" name="password" placeholder="Password"><br>
<a href="{{action('Auth\LoginController@login')}}"><button name="Login">Login</button></a>
</form>
</div>
@include('footer')

View File

@ -1,5 +1,5 @@
@include('header')
<div class="col-sm-8 text-center">
<div class="col-lg-12 text-center">
<h1 class="center">Welcome, {{$name}}</h1>
<br><br>
@ -9,53 +9,66 @@
<a id="info" type="button" class="btn btn-info btn-lg" href="{{route('manageInfo')}}">Gerir Info</a>
</div>
<br><br>
<br><br>
<div class="row">
<div class="col-lg-12" id="divInfo" style="background-color: grey">
<div class="col-lg-6">
<div id="divInfo">
<div class="col-sm-6">
<form method="POST" action="{{route('postInfo', Auth::user()->id)}}">
<div class="form-group">
{{ csrf_field() }}
<label>Nome: </label>
<input class="form-control" id="txtName" name="name" type="text"
value="@if(isset($user)){{$user->name}}@endif">
</div>
<div class="form-group">
<label>Email: </label>
<input class="form-control" id="txtEmail" name="email" type="text"
value="@if(isset($user)){{$user->email}}@endif">
</div>
<button type="submit" class="btn btn-success">Guardar Alterações</a>
</form>
</div>
<form id="form-change-password" role="form" method="POST" action="{{ route('editPass') }}" novalidate class="form-horizontal">
<div class="col-sm-6">
<div class="form-group">
<label for="current-password" class="col-sm-4 control-label">Password Antiga: </label>
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<input type="password" class="form-control" id="current-password" name="current-password" placeholder="Password">
{{ csrf_field() }}
<label>Nome: </label>
<input class="form-control" id="txtName" name="name" type="text"
value="@if(isset($user)){{$user->name}}@endif">
</div>
<div class="form-group">
<label for="password" class="col-sm-4 control-label">Password Nova: </label>
<input type="password" class="form-control" id="password" name="password" placeholder="Nova Password">
<label>Email: </label>
<input class="form-control" id="txtEmail" name="email" type="text"
value="@if(isset($user)){{$user->email}}@endif">
</div>
<div class="form-group">
<label for="password_confirmation" class="col-sm-4 control-label">Confirmar Password</label>
<input type="password" class="form-control" id="password_confirmation" name="password_confirmation" placeholder="Confirmar Password">
</div>
<button type="submit" class="btn btn-success">Guardar Alterações</a>
<button type="submit" class="btn btn-danger">Alterar Password</a>
</form>
</div>
</form>
</div>
<form id="form-change-password" role="form" method="POST" action="{{ route('editPass') }}" novalidate class="form-horizontal">
<div class="col-lg-6">
<div class="form-group">
<label for="current-password" class="col-sm-4 control-label">Password Antiga: </label>
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<input type="password" class="form-control" id="current-password" name="current-password" placeholder="Password">
</div>
<div class="form-group">
<label for="password" class="col-sm-4 control-label">Password Nova: </label>
<input type="password" class="form-control" id="password" name="password" placeholder="Nova Password">
</div>
<div class="form-group">
<label for="password_confirmation" class="col-sm-4 control-label">Confirmar Password</label>
<input type="password" class="form-control" id="password_confirmation" name="password_confirmation" placeholder="Confirmar Password">
</div>
<button type="submit" class="btn btn-danger">Alterar Password</a>
</div>
</form>
</div>
</div>
</div>
@include('footer')

View File

@ -1,6 +1,6 @@
@include('header')
<div class="col-sm-8 text-center">
<h1 class="center">Welcome, {{$name}}</h1>
<div class="col-lg-12 text-center">
<h1 class="center">Bem-Vindo, {{$name}}</h1>
<br><br>
<div class="btn-group">
@ -9,77 +9,94 @@
<a id="info" type="button" class="btn btn-info btn-lg" href="{{route('manageInfo')}}">Gerir Info</a>
</div>
<br><br>
<br><br>
<div id="divVeiculos">
<div class="col-sm-6">
<div class="list-group" id="vehicleList">
@if($vehicles)
<ul>
@foreach($vehicles as $vehicle)
<li class="list-group-item {{Auth::user()->preferredVehicle==$vehicle->vehicle_id ? 'active': ''}}"
value="{{$vehicle->vehicle_id}}">{{$vehicle->brand}} - {{$vehicle->model}}
<a class="btn btn-success" href="{{ route('editVehicle',$vehicle->vehicle_id)}}">Editar</a>
<a class="btn btn-danger" href="{{ route('removeVehicle',$vehicle->vehicle_id)}}">Remover</a>
</li>
@endforeach
</ul>
@endif
</div>
</div>
<div class="row">
<div class="col-sm-6 text-left">
@if(Request::url() == 'http://geocomb.app/userpage/vehicles')
<form method="POST" action="{{ route('addvehicle') }}">
@else
<form method="POST" action="{{ route('postEditVehicle',$selectedVehicle->id) }}">
@endif
{{ csrf_field() }}
<div class="col-lg-12" id="divVeiculos" style="background-color: grey">
<div class="form-group">
<label for="brand">Marca: </label>
<input class="form-control" id="txtBrand" name="brand" type="text"
value="@if(isset($selectedVehicle)){{$selectedVehicle->brand}}@endif">
</div>
<br><br>
<div class="form-group">
<label for="model">Modelo: </label>
<input class="form-control" id="txtModel" name="model" type="text"
value="@if(isset($selectedVehicle)){{$selectedVehicle->model}}@endif">
</div>
<div class="col-lg-6">
<div class="form-group">
<label for="fuel">Tipo de Combustível: </label>
@if(isset($allFuels))
@foreach($allFuels as $fuel)
<label>{{$fuel->name}}<input type="checkbox" name="upFuelType[]" value="{{$fuel->name}}"
@if(isset($vehicleFuels))
@foreach($vehicleFuels as $vFuel)
@if($fuel->name==$vFuel->name) checked @endif
@endforeach @endif ></label>
@endforeach
@endif
</div>
<div class="list-group" id="vehicleList">
@if($vehicles)
<div class="form-group">
<label for="consumption">Consumo(L/100): </label>
<input class="form-control" id="txtConsumption" type="number" name="consumption" step="0.1"
value="@if(isset($selectedVehicle)){{$selectedVehicle->consumption}}@endif">
</div>
<div class="form-group">
<label for="favoriteVehicle">Preferred Vehicle </label>
<input type="checkbox" name="favoriteVehicle">
</div>
<div class="center">
<ul>
@foreach($vehicles as $vehicle)
<button type="submit" class="btn btn-primary btn-lg">Guardar</button>
<li class="list-group-item {{Auth::user()->preferredVehicle==$vehicle->vehicle_id ? 'active': ''}}"
value="{{$vehicle->vehicle_id}}">{{$vehicle->brand}} - {{$vehicle->model}}
<a class="btn btn-success" href="{{ route('editVehicle',$vehicle->vehicle_id)}}">Editar</a>
<a class="btn btn-danger" href="{{ route('removeVehicle',$vehicle->vehicle_id)}}">Remover</a>
</li>
@endforeach
</ul>
@endif
</div>
</form>
</div>
</div>
</div>
<div class="col-lg-6">
<div class="container-fluid">
@if(Request::url() == 'http://geocomb.app/userpage/vehicles')
<form method="POST" action="{{ route('addvehicle') }}">
@else
<form method="POST" action="{{ route('postEditVehicle',$selectedVehicle->id) }}">
@endif
{{ csrf_field() }}
<div class="form-group">
<label for="brand">Marca: </label>
<input class="form-control" id="txtBrand" name="brand" type="text"
value="@if(isset($selectedVehicle)){{$selectedVehicle->brand}}@endif">
</div>
<div class="form-group">
<label for="model">Modelo: </label>
<input class="form-control" id="txtModel" name="model" type="text"
value="@if(isset($selectedVehicle)){{$selectedVehicle->model}}@endif">
</div>
<div class="form-group">
<label for="fuel">Tipo de Combustível: </label>
@if(isset($allFuels))
@foreach($allFuels as $fuel)
<label>{{$fuel->name}}<input type="checkbox" name="upFuelType[]" value="{{$fuel->name}}"
@if(isset($vehicleFuels))
@foreach($vehicleFuels as $vFuel)
@if($fuel->name==$vFuel->name) checked @endif
@endforeach @endif ></label>
@endforeach
@endif
</div>
<div class="form-group">
<label for="consumption">Consumo(L/100): </label>
<input class="form-control" id="txtConsumption" type="number" name="consumption" step="0.1"
value="@if(isset($selectedVehicle)){{$selectedVehicle->consumption}}@endif">
</div>
<div class="form-group">
<label for="favoriteVehicle">Preferred Vehicle </label>
<input type="checkbox" name="favoriteVehicle">
</div>
<div class="center">
<button type="submit" class="btn btn-primary btn-lg">Guardar</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
@include('footer')

View File

@ -1,6 +1,6 @@
@include('header')
<div class="col-sm-8 text-center">
<h1 class="center">Welcome, {{$name}}</h1>
<div class="col-lg-12 text-center">
<h1 class="center">Bem-Vindo, {{$name}}</h1>
<br><br>
<div class="btn-group">
@ -11,63 +11,91 @@
<br><br>
<div id="divPercurso">
<div id="mapUP" class="col-sm-6" style="width: 300px;height: 500px;"></div>
<!--<script>
function initMap() {
var centerPortugal = {lat: 39.676944, lng: -8.1425};
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 7,
center: centerPortugal
});
}
</script>
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDsZDCiU1k6mSuywRRL88xxXY-81RMEU7s&callback=initMap">
</script>
-->
<div class="col-sm-6 text-left">
<div class="row">
<form method="post" action="{{route('selectVehicle')}}">
{{csrf_field()}}
<select name="upSelectVehicle" onchange="this.form.submit()" >
@if(isset($vehicles))
@foreach($vehicles as $vehicle)
<option value="{{$vehicle->vehicleId}}" @if(isset($vehicleData) && $vehicle->vehicleId==$vehicleData->id ) selected @endif>{{$vehicle->brand}} {{$vehicle->model}}</option>
@endforeach
@endif
</select>
</form>
<div class="form-group">
<label for="inputdefault">Inicio: </label>
<input class="form-control" id="upOrigin" name="upOrigin" type="text">
</div>
<div class="col-lg-12" id="divPercurso" style="background-color: grey">
<div class="form-group">
<label for="inputdefault">Destino: </label>
<input class="form-control" id="upDestination" name="upDestination" type="text">
</div>
<br><br>
<div class="col-lg-6">
<div class="center-block" id="mapUP"></div>
<br><br>
</div>
<div class="col-lg-6">
<div class="container-fluid">
<form method="post" action="{{route('selectVehicle')}}">
{{csrf_field()}}
<div class="col-lg-6">
<label for="inputdefault">Veiculos:</label>
<select name="upSelectVehicle" onchange="this.form.submit()" >
@if(isset($vehicles))
@foreach($vehicles as $vehicle)
<option value="{{$vehicle->vehicleId}}" @if(isset($vehicleData) && $vehicle->vehicleId==$vehicleData->id ) selected @endif>{{$vehicle->brand}} {{$vehicle->model}}</option>
@endforeach
@endif
</select>
</div>
</form>
<br><br>
<div class="col-lg-6">
<div class="form-group">
<label for="inputdefault">Inicio: </label>
<input class="form-control" id="upOrigin" name="upOrigin" type="text">
</div>
<div class="form-group">
<label for="inputdefault">Destino: </label>
<input class="form-control" id="upDestination" name="upDestination" type="text">
</div>
</div>
<div class="col-lg-6">
<label>Autonomia (km):<input type="number" name="upAutonomyKm" id="upAutonomyKm"></label><br>
<p>Ou</p>
<label>Autonomia (l):<input type="number" name="upAutonomyL" id="upAutonomyL"></label>
<label>Consumo (l/km):<input type="number" name="upConsumption" id="upConsumption" value="@if(isset($vehicleData)){{$vehicleData->consumption}}@endif"></label>
</div>
</div>
</div>
<div class="col-lg-6 center">
<br>
<button id="upSearch" class="btn btn-primary btn-lg">Pesquisar</button>
<button id="cleanSearch" class="btn btn-danger btn-lg">Limpar Pesquisa</button>
</div>
</div>
<label>Autonomia (km):<input type="number" name="upAutonomyKm" id="upAutonomyKm"></label><br>
<p>Ou</p>
<label>Autonomia (l):<input type="number" name="upAutonomyL" id="upAutonomyL"></label>
<label>Consumo (l/km):<input type="number" name="upConsumption" id="upConsumption" value="@if(isset($vehicleData)){{$vehicleData->consumption}}@endif"></label>
<br><br>
<div class="center">
<button id="upSearch" class="btn btn-primary btn-lg">Pesquisar</button>
</div>
</div>
</div>
</div>
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDsZDCiU1k6mSuywRRL88xxXY-81RMEU7s&callback=initMapUP" >
</script>
<script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDsZDCiU1k6mSuywRRL88xxXY-81RMEU7s&callback=initMapUP" ></script>
@include('footer')

View File

@ -1,15 +0,0 @@
@include('header')
<div class="col-sm-8 text-left">
<h1 class="center">Register</h1>
<form method="POST" action="{{url('/register')}}" autocomplete="on">
{{ csrf_field() }}
<input type="text" name="name" placeholder="Name"><br>
<input type="email" name="email" placeholder="Email"><br>
<input type="password" name="password" placeholder="Password"><br>
<a href="{{action('Auth\RegisterController@register')}}"><button name="Register">Register</button></a>
</form>
</div>
@include('footer')

View File

@ -1,95 +0,0 @@
<!DOCTYPE html>
<html lang="{{ config('app.locale') }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Laravel</title>
<!-- Fonts -->
<link href="https://fonts.googleapis.com/css?family=Raleway:100,600" rel="stylesheet" type="text/css">
<!-- Styles -->
<style>
html, body {
background-color: #fff;
color: #636b6f;
font-family: 'Raleway', sans-serif;
font-weight: 100;
height: 100vh;
margin: 0;
}
.full-height {
height: 100vh;
}
.flex-center {
align-items: center;
display: flex;
justify-content: center;
}
.position-ref {
position: relative;
}
.top-right {
position: absolute;
right: 10px;
top: 18px;
}
.content {
text-align: center;
}
.title {
font-size: 84px;
}
.links > a {
color: #636b6f;
padding: 0 25px;
font-size: 12px;
font-weight: 600;
letter-spacing: .1rem;
text-decoration: none;
text-transform: uppercase;
}
.m-b-md {
margin-bottom: 30px;
}
</style>
</head>
<body>
<div class="flex-center position-ref full-height">
@if (Route::has('login'))
<div class="top-right links">
@if (Auth::check())
<a href="{{ url('/home') }}">Home</a>
@else
<a href="{{ url('/login') }}">Login</a>
<a href="{{ url('/register') }}">Register</a>
@endif
</div>
@endif
<div class="content">
<div class="title m-b-md">
Laravel
</div>
<div class="links">
<a href="https://laravel.com/docs">Documentation</a>
<a href="https://laracasts.com">Laracasts</a>
<a href="https://laravel-news.com">News</a>
<a href="https://forge.laravel.com">Forge</a>
<a href="https://github.com/laravel/laravel">GitHub</a>
</div>
</div>
</div>
</body>
</html>