<div style="margin:10px;"> {!! $entry->log !!} </div> </div> </div> @endif <div> <div style="!important;text-align:left;background:#f7f7f7;margin:5px;border-bottom:2px solid #ccc;box-shadow:0 0 8px rgba(0, 0, 0, 0.1);"> <h4 style="padding:10px;background-color:#2D8633;color:#fff;">Images</h4> <div style="padding:5px;"> @if(isset($entry->images)) <?php $images = \App\Media::getFiles("media/" . $entry['images']); $c = 0; foreach ($images as $image) { if (\App\Media::checkIfImage($image->getPath() . '/' . $image->getFilename())) { if ($c == 0) { echo '<div>'; } ?> <div style="margin:2px;width:calc(33.3333333333% - 4px);float:left;"> <a class="image" style="width:100%;width:100%;" rel="group" href="{{URL::asset('/' . $image->getPath() . '/' . $image->getFilename())}}"> <img style="width:100%;width:100%;" src="{{URL::asset('/' . $image->getPath() . '/' . $image->getFilename())}}"/> <div class="overlay"></div> </a> </div> <?php if (++$c >= 3) {
public function getImages() { $path = Input::get('path'); if (Media::checkPath('media/' . $path)) { $it = Media::getFiles('media/' . $path); $result = array(); foreach ($it as $file) { if (Media::checkIfImage($file->getPath() . '/' . $file->getFilename())) { array_push($result, $file->getPath() . '/' . $file->getFilename()); } } return response()->json($result); } return response()->json(false); }
<input type="submit" value="All" name="filter" /> <input type="submit" value="Mods" name="filter" /> <input type="submit" value="Maps" name="filter" /> <input type="submit" value="Scripts" name="filter" /> <input type="hidden" name="_token" value="{{{ csrf_token() }}}" /> </form> </div> @if($entry->isEmpty()) <h1 style="line-height:70px;font-size:23px;font-weight:100;">There's currently nothing to show here...</h1> @else @foreach ($entry as $project) <?php $images = \App\Media::getFiles("media/" . $project['images']); $header = $images->getPath() . "/" . $images->getFilename(); foreach ($images as $img) { if (\App\Media::checkIfImage($img->getPath() . "/" . $img->getFilename())) { $header = $img->getPath() . "/" . $img->getFilename(); break; } } ?> <div class="three"> <div class="panel"> <div class="panel-img"> <div style="height:200px;background:url({{URL::asset('/' . $header)}}) center center;background-size:cover;background-repeat:no-repeat;"></div> </div> <div class="panel-body" style="padding:5px;padding-bottom:5px;"> <h4><a id="{{$project->id}}">{{$project->title}}</a></h4> <p>{!!str_limit($project->desc, 55, "...")!!}</p> </div> <a href="{{ URL::route('show_projects', ['name' => $project->name]) }}"><button>View</button></a>