File: D:/HostingSpaces/SBogers10/zuiderbos.komma.pro/app/views/layouts/pages/calender.blade.php
@extends('layouts.master', ['view' => 'calenderPage'])
@section('editable_content')
<div class="image-wrapper">
@include('layouts.partials.navigation')
@if(isset($page->content))
<div class="content-placeholder">
{{-- Make extra block for the creative backgrounds in this design :p --}}
<div class="grey-block"></div>
<div class="grid-row">
<span class="right-icon styling"></span>
{{-- Impression block --}}
<div class="page-impression grid-col">
{{-- Quote --}}
<div class="quote">
<p>‘{{$page->content->translation->name}}’</p>
</div>
{{-- Image --}}
@if($page->content->images->count() != 0)
<img alt="{{$page->translation->name}}"
src="{{$page->content->images->first()->medium_image_url}}"/>
@endif
<span class="left-icon styling"></span>
</div>
{{-- Main content block --}}
<div class="grid-col main">
<div class="main-placeholder">
{{-- Return link --}}
<div class="return-link">
<?php
$pageParent = $page->getParent();
$pageParentCodeName = $pageParent->code_name;
if (\Illuminate\Support\Str::endsWith($pageParentCodeName, '-actual')) {
$pageParentCodeName .= '-news';
}
?>
<a href="/{{$links->{$pageParentCodeName}->route}}">
{{ KommaLang::get('returnTo') }} ‘{{$links->{$pageParentCodeName}->name}}’
</a>
</div>
<div class="content">
<h1>{{$page->translation->name}}</h1>
</div>
<a class="button" target="_blank" href="{{$page->school->documents()->where('code_name', 'activity-'.$page->school->type )->first()->file->path}}">
{{ KommaLang::get('downloadActivityCalender') }}
</a>
</div>
{{-- Calender overview --}}
@include('layouts.partials.calender.overview')
<div class="main-placeholder">
{{-- Relevant pages --}}
@include('layouts.partials.relevantPages')
</div>
</div>
</div>
</div>
@endif
</div>
@endsection
@section('extra-js')
<script>
$(function () {
resizeMyPage();
$(window).resize(
$.throttle(100, resizeMyPage)
);
});
function resizeMyPage() {
// Main content must be at least 200px higher then the impression block
$('.content-placeholder .main').css('min-height', $('.calenderPage .page-impression').height() + 200);
// Resizing for the grey block on (default)pages
var greyHeight = $('.content-placeholder .main').height() - $('.calenderPage .page-impression').height() + 100;
var greyWidth = ($('.content-placeholder').width() - $('.calenderPage .content-placeholder>.grid-row').width()) / 2 + $('.calenderPage .page-impression').width();
$('.grey-block').height(greyHeight).width(greyWidth);
}
</script>
@endsection