@extends('welcome') @section('title', 'Projetos | JMA') @section('meta') @endsection @section('css') @endsection @section('body')

@if(!empty($project)) @php $count = count($project); $row = 1; $row_photo = 1; $col = 6; @endphp @foreach($project as $p) @if(!empty($p['url'])) @php if($count == 2){ if($row == 1 && $row_photo <= 2){ $col = 6; }else if($row == 2 && $row_photo == 1){ $col = 4; }else if($row == 2 && $row_photo == 2){ $col = 4; }else if($row == 2 && $row_photo == 3){ $col = 4; }else if($row == 3){ $col = 6; } }else if($count > 2){ if($row == 1 && $row_photo <= 2){ $col = 6; }else if($row == 2 && $row_photo == 1){ $col = 4; }else if($row == 2 && $row_photo == 2){ $col = 4; }else if($row == 2 && $row_photo == 3){ $col = 4; }else if($row == 3){ $col = 12; } }else if($count == 1){ if($row == 1 && $row_photo == 1){ $col = 12; }else if($row == 1 && $row_photo == 2){ $col = 6; }else if($row == 2 && $row_photo == 1){ $col = 12; }else if($row == 2 && $row_photo == 2){ $col = 4; }else if($row == 2 && $row_photo == 3){ $col = 4; }else if($row == 3 && $row_photo == 2){ $col = 6; }else if($row == 3){ $col = 12; } } @endphp

{{$p['name']}}

{{$p['year']}}

@php $count --; if($row == 1 && $row_photo == 2){ $row = 2; $row_photo = 0; }else if($row == 2 && $row_photo == 3){ $row = 3; $row_photo = 0; }else if($row == 3 && $count == 1){ $row = 3; $row_photo = 1; }else if($row == 3){ $row = 1; $row_photo = 0; } $row_photo ++; @endphp
@endif @endforeach @endif
@endsection @section('js') @endsection