6 Commits

Author SHA1 Message Date
NH Gooi
b0ae121363 Fix images starting with / or not 2025-11-20 13:52:46 +01:00
NH Gooi
8c22515397 Merge remote-tracking branch 'dev/dev' 2025-11-20 13:47:40 +01:00
NH Gooi
30bfd34ee3 Support for image block in own article 2025-11-19 22:09:49 +01:00
NH Gooi
d46dc081ef Remove tvgids -> statisch 2025-07-17 21:42:12 +02:00
NH Gooi
acc2260745 Menu styling tweak 2025-07-17 15:57:39 +02:00
NH Gooi
11e1a3ea54 Menu active links 2025-07-17 15:40:31 +02:00
4 changed files with 42 additions and 46 deletions

12
public/css/style.css vendored
View File

@@ -303,6 +303,18 @@ div.pp_default .pp_close:hover {
margin-left: -10px;
}
.submenu li.selected a {
color: #0f259d !important;
}
.mobile-menu .submenu li.selected a,
.mobile-menu .submenu li:hover a,
.mobile-menu .submenu li.hover a {
color: white !important;
background: linear-gradient(to right, #0f259d, #5ba8f4);
}
.top_menu_container, .menu_mobile_container {
height: 50px;
max-width: 1170px;

View File

@@ -30,39 +30,24 @@
<div class="author">{{$block->data->caption}}</div>
</blockquote>
@elseif($block->type == "image")
<?php
if(isset($block->data->image->imageWide))
$image = $block->data->image->imageWide;
else if(isset($block->data->image->crop))
$image = $block->data->image->crop;
else if(isset($block->data->image->crops) && isset($block->data->image->crops->{'16:9'}))
foreach($block->data->image->crops->{'16:9'} as $image) break;
else if(isset($block->data->image->imageHigh))
$image = $block->data->image->imageHigh;
else $image = null;
?>
@if($image)
<a class="post_image page_margin_top prettyPhoto" rel="prettyPhoto" href="{{$image}}"
title="{{$block->data->image->title}} &copy; {{$block->data->image->author}}">
<img src="{{$image}}" class="attachment-small-slider-thumb size-small-slider-thumb wp-post-image"
alt="{{$block->data->image->title}}" title="" style="display: block;">
<a class="post_image page_margin_top prettyPhoto" rel="prettyPhoto" href="/{{$block->data->url}}"
title="{{$block->data->title}} &copy; {{$block->data->title}}">
<img src="/{{ltrim($block->data->url, '/')}}" class="attachment-small-slider-thumb size-small-slider-thumb wp-post-image"
alt="{{$block->data->title}}" title="" style="display: block;">
</a>
<div class="sentence">
<?php
$sentence = [];
if (isset($block->data->image->caption) && $block->data->image->caption) {
$sentence[] = '<span class="text">' . $block->data->image->caption . '</span>';
} elseif (isset($block->data->image->title) && $block->data->image->title) {
$sentence[] = '<span class="text">' . $block->data->image->title . '</span>';
if (isset($block->data->title) && $block->data->title) {
$sentence[] = '<span class="text">' . $block->data->title . '</span>';
}
if (isset($block->data->image->author) && $block->data->image->author) {
$sentence[] = '<span class="author">' . $block->data->image->author . '</span>';
if (isset($block->data->author) && $block->data->author) {
$sentence[] = '<span class="author">' . $block->data->author . '</span>';
}
$sentence = join('<span class="separator">|</span>', $sentence);
?>
{!!$sentence!!}
</div>
@endif
@elseif($block->type == "video" || $block->type == "headerVideo")
@include('widgets/mediaplayer')
<?php

View File

@@ -1,17 +0,0 @@
@extends('layouts/full')
@section('title')
Televisieprogrammering
@endsection
@section('content')
<div class="page_body">
<p>NHGooi TV zendt iedere dag de NH Gooi Nieuwscarrousel uit. De nieuwscarrousel start steeds op het hele uur en bestaat uit reportages uit Gooi en Vechtstreek, gericht op de kijkers van NH Gooi. Daarnaast vind je op NHGooi TV achtergronden, lokale reportages, cultuur, sport en politiek. NHGooi TV brengt verhalen uit alle hoeken van Gooi &amp; Vechtstreek, met programmas die zijn gemaakt door onze redactie of in samenwerking met regionale partners. De programmering sluit aan bij onze publieke opdracht en is gericht op herkenning, betrokkenheid en actualiteit.</p>
<p>De programmering van NH Gooi TV wordt af en toe aangevuld met speciale programmas, zoals bijvoorbeeld een talkshow of een registratie van een plaatselijk muziekfestijn. Deze programmas worden aangekondigd op onze website.</p>
<p><a href="/kijk/live">Kijk hier online naar NHGooi TV</a>.</p>
</div>
@endsection

View File

@@ -1,7 +1,23 @@
<?php
function isActive($link, $checksubmenus)
function isActive($link, $submenus)
{
return false;
if(count($submenus) > 0) {
foreach ($submenus as $subitem) {
if (isActive($subitem->link, $subitem->submenu)) {
return true;
}
}
}
if($link == "#") {
return false;
}
if ($link == "/") {
return $_SERVER["REQUEST_URI"] == "/" || $_SERVER["REQUEST_URI"] == "";
}
return (substr($_SERVER["REQUEST_URI"], 0, strlen($link)) == $link);
}
function buildMenu($menu, $ismobile)
@@ -13,7 +29,7 @@ function buildMenu($menu, $ismobile)
}
$submenu = count($item->submenu) > 0;
$isactive = isActive($item->link, !$ismobile);
$isactive = isActive($item->link, $item->submenu);
$icon = "";
$isplayer = false;
$isFile = false;
@@ -52,7 +68,7 @@ function buildMenu($menu, $ismobile)
. buildMenu($item->submenu, $ismobile)
. "\t\t\t</ul>\n";
}
$result .= "\t\t</li>\n";
$result .= "\t\t</li>\n";
}
return $result;
@@ -61,7 +77,7 @@ function buildMenu($menu, $ismobile)
<nav class="d-none d-md-flex">
<div></div>
<ul class="menu d-none d-lg-block">
<li class="{{isActive('/', false) || isActive('/nieuws', false) ? "selected" : ""}}">
<li class="{{isActive('/', []) || isActive('/nieuws', []) ? "selected" : ""}}">
<a href="/" title="Nieuws">Nieuws</a>
</li>
{!! buildMenu($items, false) !!}
@@ -80,7 +96,7 @@ function buildMenu($menu, $ismobile)
<a href="javascript:void(0)"><i class="fa-solid fa-xmark"></i></a>
</div>
</li>
<li class="{{isActive('/', false) || isActive('/nieuws', false) ? "selected" : ""}}">
<li class="{{isActive('/', []) || isActive('/nieuws', []) ? "selected" : ""}}">
<a href="/" title="Nieuws">Nieuws</a>
</li>
{!! buildMenu($items, true) !!}