Commit 9823e9cb authored by Abraão Barbosa's avatar Abraão Barbosa
Browse files

inicio de refatoracao no css

parent 0cedb1ec
...@@ -17,7 +17,11 @@ class CampusController extends Controller ...@@ -17,7 +17,11 @@ class CampusController extends Controller
*/ */
public function index() public function index()
{ {
return view('campus.index', ['index_menu' => MenuItemsAdmin::CAMPUS]); $campus = Campus::all();
return view('campus.index', [
'index_menu' => MenuItemsAdmin::CAMPUS,
'campus' => $campus
]);
} }
/** /**
...@@ -27,7 +31,10 @@ class CampusController extends Controller ...@@ -27,7 +31,10 @@ class CampusController extends Controller
*/ */
public function create() public function create()
{ {
return view('campus.create', ['unidades' => Unidade::all()]); return view('campus.create', [
'unidades' => Unidade::all(),
'index_menu' => MenuItemsAdmin::CAMPUS,
]);
} }
/** /**
......
...@@ -4,6 +4,8 @@ namespace App\Models; ...@@ -4,6 +4,8 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\ValidationException;
class Campus extends Model class Campus extends Model
{ {
...@@ -40,4 +42,22 @@ class Campus extends Model ...@@ -40,4 +42,22 @@ class Campus extends Model
{ {
return $this->name; return $this->name;
} }
public static function validator($attributes, $rule_password = false) {
$rules = [
'name' => ['required', ]
];
$messages = [
// 'unique' => "O :attribute já está registrado no sistema",
'required' => "O :attribute precisa ser preenchido",
];
try {
return Validator::make($attributes, $rules, $messages);
} catch(ValidationException $exception) {
}
}
} }
This diff is collapsed.
This diff is collapsed.
...@@ -198,9 +198,9 @@ h2 { ...@@ -198,9 +198,9 @@ h2 {
font-family: Arial; font-family: Arial;
font-weight: bold; font-weight: bold;
text-align: left; text-align: left;
} }
h3 { h3 {
margin-top: -10px; margin-top: -10px;
margin-bottom: -10px; margin-bottom: -10px;
font-size: 22px; font-size: 22px;
...@@ -208,7 +208,7 @@ h2 { ...@@ -208,7 +208,7 @@ h2 {
font-family: Arial; font-family: Arial;
font-weight: bold; font-weight: bold;
text-align: left; text-align: left;
} }
/* Stylo de formatação das barras divs sub e infe. */ /* Stylo de formatação das barras divs sub e infe. */
.stylo { .stylo {
...@@ -216,4 +216,4 @@ h2 { ...@@ -216,4 +216,4 @@ h2 {
background: -webkit-gradient(linear, left top, right top, from(#ed1c24), to(#1b3e70)) no-repeat; background: -webkit-gradient(linear, left top, right top, from(#ed1c24), to(#1b3e70)) no-repeat;
background: -moz-linear-gradient(left, #ed1c24, #1b3e70); background: -moz-linear-gradient(left, #ed1c24, #1b3e70);
filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=1, StartColorStr='#ED1C24', EndColorStr='#1B3E70'); filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=1, StartColorStr='#ED1C24', EndColorStr='#1B3E70');
} }
\ No newline at end of file
...@@ -5,19 +5,9 @@ ...@@ -5,19 +5,9 @@
width: 100%; width: 100%;
padding: 18px 6% 10px 6%; padding: 18px 6% 10px 6%;
margin: 0 0 30px 0; margin: 0 0 30px 0;
/*background: #e6e7e8;
border-radius: 5px;
*/
border-bottom: 1px solid #dee2e6!important; border-bottom: 1px solid #dee2e6!important;
}
.bd-placeholder-img {
font-size: 1.125rem;
text-anchor: middle;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
} }
header{ header{
background-color: #DFDFDF; background-color: #DFDFDF;
margin-bottom: 30px; margin-bottom: 30px;
...@@ -50,13 +40,8 @@ nav{ ...@@ -50,13 +40,8 @@ nav{
border: 1px solid #dee2e6!important; border: 1px solid #dee2e6!important;
} }
nav ul li{
}
nav ul li a{ nav ul li a{
color: #17223b; color: #17223b;
font-size: large; font-size: large;
} }
......
/* content que contem o formulário e o quadro de avisos */
.content {
position: relative;
top: 0px;
width: 100%;
padding: 18px 6% 60px 6%;
}
.titulo {
font-size: 32px;
color: #000000;
font-family: Arial, sans-serif;
font-weight: bold;
text-align: center;
}
#bordcab {
padding: 18px 6% 20px 6%;
margin: 0 0 35px 0;
background: #e6e7e8;
/*
border-width: medium;
border-style: solid;
border-color: rgb(105, 105, 105);
*/
width: 100%;
height: 100%;
border-radius: 0px 0px 20px 20px;
}
#bord {
background-color: #e6e7e8;
width: 100%;
height: 100%;
border-radius: 20px;
padding: 50px;
margin: 1em auto 1em auto;
}
/* Buttons PAD */
.btn-pad-dimensao {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: #eeeeee;
border-radius: 1em;
width: 150px;
margin: 0.2em;
padding: 0.2em;
-webkit-box-shadow: 0px 0px 2px 0px rgba(50, 50, 50, 0);
-moz-box-shadow: 0px 0px 2px 0px rgba(50, 50, 50, 0);
box-shadow: 0px 0px 2px 0px rgba(50, 50, 50, 0);
}
.btn-pad-dimensao i {
font-size: 2em;
color: #000000 !important;
}
.btn-pad-dimensao h2 {
margin-top: 0.3em;
color: #000000 !important;
}
.btn-pad-dimensao:hover {
background: #dddddd;
}
/*form-add-new-dimencao*/
.form-add-new-dimencao{
background: #e6e7e8;
border-radius: .5em;
padding: 1em;
}
.form-add-new-dimencao input[type="text"]{
}
\ No newline at end of file
/* content que contem o preview do perfil */
.content {
position: relative;
top: 0px;
width: 100%;
padding: 18px 6% 10px 6%;
margin: 0 0 30px 0;
border-bottom: 1px solid #dee2e6!important;
}
header{
background-color: #DFDFDF;
margin-bottom: 30px;
}
header .header-left-side{
width: 60vw;
font-family: 'Electrolize', sans-serif;
background: linear-gradient(110deg, #F7F7F7 60%, #DFDFDF 60%);
padding-left: 15vh;
}
header .header-right-side{
padding-right: 15vh;
}
.main-container{
display: flex;
flex-direction: row;
}
main{
min-height: 70vh;
}
nav{
margin-left: 13vh;
margin-right: 1em;
border-radius: .5em;
border: 1px solid #dee2e6!important;
}
nav ul li a{
color: #17223b;
font-size: large;
}
nav ul .active{
background-color: #DFDFDF!important;
color: #17223b!important;
font-weight: bold;
}
nav .content-user-info{
font-weight: bold;
}
@media (min-width: 768px) {
.bd-placeholder-img-lg {
font-size: 3.5rem;
}
}
\ No newline at end of file
/*
.logo-upe{
position: relative;
top: 0px;
width: 88%;
padding: 18px 6% 60px 6%;
margin: 100px 420px 100px 100px;
}
/* formatando texto da div de stylos */
h2 {
margin-top: -10px;
font-size: 16px;
color: #ffffff;
font-family: Arial;
font-weight: bold;
text-align: left;
}
h3 {
margin-top: -10px;
margin-bottom: -10px;
font-size: 22px;
color: #ffffff;
font-family: Arial;
font-weight: bold;
text-align: left;
}
/* content que contem o formulário e o quadro de avisos */
.content {
position: relative;
top: 0px;
width: 68%;
padding: 18px 6% 60px 6%;
margin: 0 0 35px 0;
background: #e6e7e8;
border-radius: 5px;
}
/* formatando o cabeçalho dos formulários */
h1 {
font-size: 22px;
color: #000000;
padding: 10px 0;
font-family: Arial, sans-serif;
font-weight: bold;
text-align: center;
padding-bottom: 30px;
}
h1:after {
content: " ";
display: block;
width: 100%;
height: 2px;
margin-top: 10px;
background: -webkit-linear-gradient(left, rgba(147, 184, 189, 0) 0%, rgba(147, 184, 189, 0.8) 20%, rgba(147, 184, 189, 1) 53%, rgba(147, 184, 189, 0.8) 79%, rgba(147, 184, 189, 0) 100%);
background: linear-gradient(left, rgba(147, 184, 189, 0) 0%, rgba(147, 184, 189, 0.8) 20%, rgba(147, 184, 189, 1) 53%, rgba(147, 184, 189, 0.8) 79%, rgba(147, 184, 189, 0) 100%);
}
p {
margin-bottom: 15px;
}
p:first-child {
margin: 0px;
}
label {
color: #405c60;
position: relative;
}
/* Icons e sua formatação */
.icon-list {
padding-left: 0;
list-style: none;
}
.icon-list li {
display: flex;
align-items: flex-start;
margin-bottom: 0.25rem;
}
.icon-list li::before {
display: block;
flex-shrink: 0;
width: 1.5em;
height: 1.5em;
margin-right: 0.5rem;
content: "";
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23212529' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zM4.5 7.5a.5.5 0 0 0 0 1h5.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3a.5.5 0 0 0 0-.708l-3-3a.5.5 0 1 0-.708.708L10.293 7.5H4.5z'/%3E%3C/svg%3E")
no-repeat center center / 100% auto;
}
/* formatando o login */
.form-signin {
width: 100%;
max-width: 330px;
padding: 15px;
margin: auto;
}
.form-signin .checkbox {
font-weight: 400;
}
.form-signin .form-floating:focus-within {
z-index: 2;
}
.form-signin input[type="email"] {
margin-bottom: -1px;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.form-signin input[type="password"] {
margin-bottom: 10px;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
/* Stylo de formatação das barras divs sub e infe. */
.stylo {
margin-top: 0px;
background: -webkit-gradient(linear, left top, right top, from(#ed1c24), to(#1b3e70)) no-repeat;
background: -moz-linear-gradient(left, #ed1c24, #1b3e70);
filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=1, StartColorStr='#ED1C24', EndColorStr='#1B3E70');
}
.container {
background-color: #24141c;
color: #cccccc;
font-family: "Nunito", sans-serif;
width: 70%;
border-radius: 7px;
padding: 5%;
margin: 5% auto;
}
.flex {
display: flex;
justify-content: space-around;
&2 {
border-right: 0.1px solid rgba(178, 170, 171, 0.185);
}
&_content {
padding: 5% 10%;
flex: 1;
h2 {
font-weight: 600;
}
h4 {
font-weight: 400;
}
span {
font-weight: 200;
}
h4 {
margin: 0;
}
ul {
padding-inline-start: 7%;
margin: 20% 0;
li {
font-weight: 200;
}
}
button {
outline: none;
border: none;
background: #aa2b33;
color: #ffffff;
width: 100%;
height: 50px;
border-radius: 5px;
font-family: "Nunito", sans-serif;
cursor: pointer;
}
&:nth-of-type(1) {
button {
background: transparent;
border: 1px solid #aa2b33;
color: #aa2b33;
}
}
}
}
@media screen and (max-width: 540px) {
.flex {
flex-direction: column;
&2{
border: none;
}
}
}
/* Formatando Texto Corpo pagina */
body {
font-family: "Lato", Arial, sans-serif;
font-size: 14px;
line-height: 1.8;
font-weight: normal;
background: #f8f9fd;
color: #000;
}
/* Formatação Texto Hs */
h1,
h4,
h5,
.h1,
.h4,
.h5 {
line-height: 1.5;
font-weight: 400;
font-family: "Lato", Arial, sans-serif;
color: #000;
}
/* Container INFORMAÇÕES */
.bg-primary {
background: #cad2d6 !important;
}
.ftco-section {
padding: 7em 0;
}
/* Container LOGIN */
.login-wrap {
position: relative;
width: 100%;
overflow: hidden;
background: #fff;
border-radius: 5px;
-webkit-box-shadow: 0px 10px 34px -15px rgba(0, 0, 0, 0.24);
-moz-box-shadow: 0px 10px 34px -15px rgba(0, 0, 0, 0.24);
box-shadow: 0px 10px 34px -15px rgba(0, 0, 0, 0.24);
}
/* Formatando Container INFORMAÇÕES */
.half {
width: 100%;
}
@media (min-width: 992px) {
.half {
width: 50%;
}
}
/* Formatando Container LOGIN */
.form-group {
position: relative;
z-index: 0;
margin-bottom: 20px !important;
}
.form-group a {
color: #fff;
}
/* Formatando campus do Formulario */
.form-control {
height: 48px;
background: #fff;
color: #000;
font-size: 16px;
-webkit-box-shadow: none;
box-shadow: none;
border-radius: 0;
border: none;
padding: 0;
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.form-control::-webkit-input-placeholder {
/* Chrome/Opera/Safari */
color: rgba(0, 0, 0, 0.2) !important;
}
.form-control::-moz-placeholder {
/* Firefox 19+ */
color: rgba(0, 0, 0, 0.2) !important;
}
.form-control:-ms-input-placeholder {
/* IE 10+ */
color: rgba(0, 0, 0, 0.2) !important;
}
.form-control:-moz-placeholder {
/* Firefox 18- */
color: rgba(0, 0, 0, 0.2) !important;
}
.form-control:focus,
.form-control:active {
outline: none !important;
-webkit-box-shadow: none;
box-shadow: none;
border-color: #17223b;
}
/* Formatando Botao Visualizar Senha */
.field-icon {
position: absolute;
top: 50%;
right: 0;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
color: rgba(0, 0, 0, 0.3);
margin-top: 20px;
}
/* Criando o checkbox customizado */
.checkbox-wrap {
display: block;
position: relative;
padding-left: 30px;
margin-bottom: 12px;
cursor: pointer;
font-size: 14px;
font-weight: 400;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
/* Esconde a caixa de seleção padrão do navegador */
.checkbox-wrap input {
position: absolute;
opacity: 0;
cursor: pointer;
height: 0;
width: 0;
}
/* Criando o checkbox customizado */
.checkmark {
position: absolute;
top: 0;
left: 0;
}
/* Criando CheckBox LEMBRAR-ME (hidden when not checked) */
.checkmark:after {
content: "\f0c8";
font-family: "FontAwesome";
position: absolute;
color: #17223b;
font-size: 20px;
margin-top: -4px;
-webkit-transition: 0.3s;
-o-transition: 0.3s;
transition: 0.3s;
}
/* Mostrar CheckBox LEMBRAR-ME checado */
.checkbox-wrap input:checked ~ .checkmark:after {
display: block;
content: "\f14a";
font-family: "FontAwesome";
color: #17223b;
}
/* Stylo CheckBox LEMBRAR-ME */
.checkbox-primary {
color: gray;
}
.checkbox-primary input:checked ~ .checkmark:after {
color: #17223b;
}
/* Botao ENTRAR */
.btn {
cursor: pointer;
-webkit-box-shadow: none !important;
box-shadow: none !important;
font-size: 15px;
padding: 10px 20px;
}
.btn:hover,
.btn:active,
.btn:focus {
outline: none;
}
.btn.btn-secondary {
background: #17223b !important;
border: 1px solid #17223b !important;
color: #fff !important;
}
/* formatando texto da div de stylos */
h2 {
margin-top: -10px;
font-size: 16px;
color: #ffffff;
font-family: Arial;
font-weight: bold;
text-align: left;
}
h3 {
margin-top: -10px;
margin-bottom: -10px;
font-size: 22px;
color: #ffffff;
font-family: Arial;
font-weight: bold;
text-align: left;
}
/* Stylo de formatação das barras divs sub e infe. */
.stylo {
margin-top: 0px;
background: -webkit-gradient(linear, left top, right top, from(#ed1c24), to(#1b3e70)) no-repeat;
background: -moz-linear-gradient(left, #ed1c24, #1b3e70);
filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=1, StartColorStr='#ED1C24', EndColorStr='#1B3E70');
}
\ No newline at end of file
@extends('layouts.main') @extends('layouts.main')
@section('title', 'Campus - Create') @section('title', 'Campus')
@section('header')
@include('layouts.header', [
'user' => Auth::user(),
])
@endsection
@section('nav')
@include('layouts.navigation', [
'index_menu' => $index_menu,
])
@endsection
@section('body') @section('body')
<form action="{{route('campus_store')}}" method="post"> <form action="{{ route('campus_store') }}" method="post">
@csrf @csrf
@method('POST') @method('POST')
<input type="text" name="name" id="name" placeholder="Nome"> <input type="text" name="name" id="name" placeholder="Nome">
<select name="unidade_id" id="unidade_id"> <select name="unidade_id" id="unidade_id">
<option value="" disabled selected hidden> selecione... </option> <option value="" disabled selected hidden> selecione... </option>
@foreach($unidades as $unidade) @foreach ($unidades as $unidade)
<option value="{{ $unidade->id }}"> {{ $unidade->name }} </option> <option value="{{ $unidade->id }}"> {{ $unidade->name }} </option>
@endforeach @endforeach
</select> </select>
......
...@@ -12,5 +12,10 @@ ...@@ -12,5 +12,10 @@
]) ])
@endsection @endsection
@section('body') @section('body')
@include('components.buttons.btn-create', [
'route' => route('campus_create'),
'css' => '',
'text' => 'Novo Campus',
'id' => ''
])
@endsection @endsection
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css" <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css"
integrity="sha384-DyZ88mC6Up2uqS4h/KRgHuoeGwBcD4Ng9SiP4dIRy0EXTlnuz47vAwmeGwVChigm" crossorigin="anonymous" /> integrity="sha384-DyZ88mC6Up2uqS4h/KRgHuoeGwBcD4Ng9SiP4dIRy0EXTlnuz47vAwmeGwVChigm" crossorigin="anonymous" />
<link rel="stylesheet" href="{{ asset('css/styles.css') }}">
<link rel="stylesheet" href="{{ asset('css/dashboard.css') }}"> <link rel="stylesheet" href="{{ asset('css/dashboard.css') }}">
<link rel="stylesheet" href="{{ asset('css/forms.css') }}"> <link rel="stylesheet" href="{{ asset('css/forms.css') }}">
</head> </head>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment