Vacatures en beelden toegevoegd

This commit is contained in:
2021-10-05 20:06:01 +02:00
parent 6408a4e417
commit d1b10e558d
8 changed files with 144 additions and 6 deletions

View File

@@ -27,7 +27,7 @@ class Kernel extends ConsoleKernel
*/
protected function schedule(Schedule $schedule)
{
$this->API_URL = env('API_URL', 'http://api.6fm.nl/');
$this->API_URL = env('API_URL', 'https://api-dev.nhgooi.nl/');
// Update latest news (3 items)
$schedule->call(function() {
@@ -55,6 +55,11 @@ class Kernel extends ConsoleKernel
$schedule->call(function() {
Storage::disk('local')->put('blogs.json', file_get_contents($this->API_URL . 'blog/overzicht'));
})->everyMinute();
// Update featured images
$schedule->call(function() {
Storage::disk('local')->put('beelden.json', file_get_contents($this->API_URL . 'beelden/overzicht'));
})->everyMinute();
}
/**

View File

@@ -81,6 +81,9 @@ class Controller extends BaseController
View::composer('widgets.regioagenda', function($view) {
$view->with('data', $this->getDataFromFileAndConvert('regioagenda.json', [], '\Model\CalendarEvent'));
});
View::composer('widgets.beelden', function($view) {
$view->with('data', $this->getDataFromFileAndConvert('beelden.json', ['items'], '\Model\NewsItem'));
});
View::composer('widgets.menu', function($view) {
$view->with('news', $this->getDataFromFileAndConvert('laatste_nieuws.json', ['news'], '\Model\NewsItem'))
->with('popular', $this->getDataFromFileAndConvert('populair_nieuws.json', [], '\Model\NewsItem', 3))

View File

@@ -0,0 +1,42 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use \Model\JobOpening;
class JobsController extends Controller
{
private static function TimestampToDateTime($timestamp) {
$result = new \DateTime;
$result->setTimestamp($timestamp);
return $result;
}
public function show(Request $request, $id)
{
parent::registerView($request, 'nieuws', $id);
$apiResult = $this->API('vacatures/details/' . $id);
$jobsItem = new \Model\JobOpening($apiResult->item);
return view('jobsitem', ['job' => $jobsItem, 'metadata' => $jobsItem->metadata]);
}
public function overview(Request $request)
{
return $this->listJobs($request, 'overzicht');
}
private function listJobs(Request $request, $url, $title = null)
{
$page = (int)$request->get('pagina', 1);
$apiResult = $this->API('vacatures/' . $url . '?pagina=' . (int)max(1, $page));
$jobs = [];
foreach($apiResult->jobs as $jobsItem)
{
$jobs[] = new \Model\JobOpening($jobsItem);
}
return view('jobslist', ['title' => $title, 'jobs' => $jobs]);
//return view($request->ajax() ? 'partial/jobslist_small' : ($title == null ? 'home' : 'jobslist'), ['title' => $title, 'jobs' => $jobs, 'searchURL' => 'vacatures/zoeken']);
}
}

View File

@@ -0,0 +1,22 @@
@extends('layouts.sidebar')
@section('title')
NH Gooi App
@endsection
@section('content')
<p>Download de NH Gooi app via de App Store of Google Play</b>.
<div class="row page_margin_top">
<div class="column col_1_2" style="margin-left: 0">
<div class="animate fadeIn" data-anim-type="fadeIn"><div class="icon_box icon_position_top no_border"><a class="" href="https://play.google.com/store/apps/details?id=nl.rtvnoordholland.android&amp;hl=nl&amp;gl=US&amp;pcampaignid=pcampaignidMKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1"><div class="image_wrapper"><img data-lazyloaded="1" data-src="https://nhmedia.nl/wp-content/uploads/2021/08/googleplay4.jpg" class="scale-with-grid litespeed-loaded" alt="googleplay4" width="318" height="100" src="https://nhmedia.nl/wp-content/uploads/2021/08/googleplay4.jpg" data-was-processed="true"><noscript><img src="https://nhmedia.nl/wp-content/uploads/2021/08/googleplay4.jpg" class="scale-with-grid" alt="googleplay4" width="318" height="100"/></noscript></div><div class="desc_wrapper"></div></a></div></div>
</div>
<div class="column col_1_2" style="margin-left: 0">
<div class="animate fadeIn" data-anim-type="fadeIn"><div class="icon_box icon_position_top no_border"><a class="" href="https://apps.apple.com/us/app/nh-nieuws/id421385561?ign-itsct=apps_box&amp;ign-itscg=30200"><div class="image_wrapper"><img data-lazyloaded="1" data-src="https://nhmedia.nl/wp-content/uploads/2021/08/apple4.jpg" class="scale-with-grid litespeed-loaded" alt="apple4" width="318" height="100" src="https://nhmedia.nl/wp-content/uploads/2021/08/apple4.jpg" data-was-processed="true"><noscript><img src="https://nhmedia.nl/wp-content/uploads/2021/08/apple4.jpg" class="scale-with-grid" alt="apple4" width="318" height="100"/></noscript></div><div class="desc_wrapper"></div></a></div></div>
</div>
</div>
@endsection

View File

@@ -4,15 +4,16 @@
{{$job->title}}
@endsection
@section('breadcrumb')
<ul class="bread_crumb">
<li><a title="Nieuws" href="{{route('nieuws')}}">Nieuws</a></li>
<li><a title="Vacatures" href="{{route('vacatures')}}">Vacatures</a></li>
<li class="separator icon_small_arrow right_gray">&nbsp;</li>
<li class="separator icon_small_arrow right_gray">&nbsp;</li>
<li>Details</li>
<li>{{$job->title}}</li>
</ul>
@endsection
@section('content')
<div class="row">
@@ -59,6 +60,11 @@
<div class="text">
{!!$job->content!!}
<hr />
<h4>Interesse?</h4>
<p>Mail een korte introductie met motivatie naar meebouwen@nhgooi.nl en we nemen contact met je op voor een vrijblijvend kennismakingsgesprek.</p>
<a class="read_more" href="mailto:meebouwen@nhgooi.nl?subject=Reactie op vacature voor {{$job->title}}" title="Mail direct je reactie op deze vacature."><span class="arrow"></span><span>Reageer nu!</span></a>
</div>
{{--

View File

@@ -37,11 +37,12 @@ als vrijwilligers die op professioneel niveau werken. </p>
<h2><a href="{{$job->url}}" title="{{$job->title}}">{!!$job->title!!}</a></h2>
<div class="clearfix"></div>
@if(count($job->images))
<a href="{{$url}}" title="{{$job->title}}" class="fixed-height">
<a href="{{$job->url}}" title="{{$job->title}}" class="fixed-height">
<img src='{{$imgBase . $job->images[0]->url}}' alt='{{$job->images[0]->title}}'>
</a>
@endif
@else
<p>{!! Formatter::excerpt($job->content, 200) !!}</p>
@endif
<a class="read_more" href="{{$job->url}}" title="Bekijk vacature"><span class="arrow"></span><span>Bekijk vacature</span></a>
<span class="clearfix"></span>
</div>
@@ -54,4 +55,9 @@ als vrijwilligers die op professioneel niveau werken. </p>
</ul><!--/.row-->
@endif
<hr />
<h4>Niet wat je zoekt?</h4>
<p>Staan in de lijst hierboven geen interessante vacatures voor je, maar lijkt het je wel leuk om (als vrijwilliger) mee te bouwen aan NH Gooi? Mail dan een korte introductie met motivatie naar meebouwen@nhgooi.nl en we nemen contact met je op voor een vrijblijvend kennismakingsgesprek.</p>
<a class="read_more" href="mailto:meebouwen@nhgooi.nl?subject=Open sollicitatie" title="Mail direct je reactie op deze vacature."><span class="arrow"></span><span>Reageer nu!</span></a>
@endsection

View File

@@ -19,6 +19,8 @@
<div class="column column_1_3">
@include('widgets.banners')
@include('widgets.beelden')
@include('widgets.nustraks')
</div>
</div>

View File

@@ -0,0 +1,52 @@
<?php
if($data && count($data)):
shuffle($data);
$img = $data[0];
?>
<h4 class="page_margin_top box_header"><span class="fa fa-camera"></span> &nbsp; Beelden uit 't Gooi</h4>
<div class='featured'>
<p>
<img src="images/logo.png" alt="{{$img->images[0]->title}}" title="{{$img->images[0]->title}}" />
<b>{{ $img->title }}</b>
{{ $img->images[0]->title }}
</p>
<p class='bouwmee'><a href="mailto:beelden@nhgooi.nl">Uw foto hier? Mail naar beelden@nhgooi.nl!</a></p>
</div>
<style>
.featured {
padding-top: 10px;
padding-left: 0;
padding-right: 0;
}
.featured img {
width: 100%;
}
.featured p, .featured a {
font-size: 90%;
padding-top: 0;
padding-bottom: 0;
color: #3A3A3A;
text-align: center;
}
.featured .bouwmee {
color: #3333CC;
}
</style>
@push('scripts')
<script>
$(function() {
$('.featured img')
.load(function() {
$('.featured').slideDown();
})
.attr('src', '{{$imgBase . $img->images[0]->url}}');
});
</script>
@endpush
<?php
endif;
?>