Studiocam link in menu

This commit is contained in:
2020-06-27 15:00:59 +02:00
parent 9eb57ac02e
commit 094270b283
2 changed files with 18 additions and 11 deletions

View File

@@ -236,18 +236,18 @@
<label>Luister NH Gooi Radio</label> <label>Luister NH Gooi Radio</label>
</a> </a>
</li> </li>
<li class="watch-studio">
<a href='{{route('kijk.studio')}}' title="Kijk live mee in de radiostudio van NH Gooi">
<span class="fa fa-camera"></span>
<label>Studiocam</label>
</a>
</li>
<li class="watch-live"> <li class="watch-live">
<a href='{{route('kijk.live')}}' title="Kijk live naar NH Gooi TV"> <a href='{{route('kijk.live')}}' title="Kijk live naar NH Gooi TV">
<span class="fa fa-camera"></span> <span class="fa fa-tv"></span>
<label>Kijk NH Gooi TV</label> <label>Kijk NH Gooi TV</label>
</a> </a>
</li> </li>
<li class="watch-studio">
<a href='{{route('kijk.studio')}}' title="Kijk live mee in de radiostudio van NH Gooi">
<span class="fa fa-video"></span>
<label>Studiocam</label>
</a>
</li>
</ul> </ul>
</div> </div>
</div> </div>
@@ -435,7 +435,7 @@
title: $(".now-playing-header .title"), title: $(".now-playing-header .title"),
artist: $(".now-playing-header .artist"), artist: $(".now-playing-header .artist"),
controls: $(".now-playing-header .controls"), controls: $(".now-playing-header .controls"),
studiocam: $(".now-playing-header .watch-studio"), studiocam: $(".now-playing-header .watch-studio, li.watch-studio"),
programLink: $(".now-playing-header .program-link a"), programLink: $(".now-playing-header .program-link a"),
programLabel: $(".now-playing-header .program-link a > label"), programLabel: $(".now-playing-header .program-link a > label"),
first: true first: true

View File

@@ -2,6 +2,7 @@
"Radio" => array( "Radio" => array(
"" => "/gids", "" => "/gids",
"Luister live" => "/luister/live", "Luister live" => "/luister/live",
"Kijk in de studio" => "/kijk/studio",
"Regionieuws" => "/luister/regionieuws", "Regionieuws" => "/luister/regionieuws",
"Programmagids" => "/gids", "Programmagids" => "/gids",
"Programma gemist" => "/gemist/programma", "Programma gemist" => "/gemist/programma",
@@ -38,13 +39,19 @@ function buildMenu($menu, $ismobile) {
if($title == "") { continue; } if($title == "") { continue; }
$submenu = is_array($link); $submenu = is_array($link);
$isactive = isActive($link, !$ismobile); $isactive = isActive($link, !$ismobile);
$isplayer = !$submenu && substr($link, 0, 8) == '/luister'; $icon = "";
$isplayer = false;
$liClass = "";
if(!$submenu && substr($link, 0, 8) == '/luister') { $icon = "headphones"; $isplayer = true; }
if(!$submenu && $link == '/kijk/live') { $icon = "tv"; }
if(!$submenu && $link == '/kijk/studio') { $liClass = "watch-studio"; $icon = "video"; }
$submenulink = $submenu && isset($link[""]) ? $link[""] : "#"; $submenulink = $submenu && isset($link[""]) ? $link[""] : "#";
$target = substr($submenu ? $submenulink : $link, 0, 4) == "http" ? "target='_blank'" : ""; $target = substr($submenu ? $submenulink : $link, 0, 4) == "http" ? "target='_blank'" : "";
if($isplayer) { $icon = "<span class='fas fa-headphones'></span>&nbsp;"; } if($icon) { $icon = "<span class='fas fa-$icon'></span>&nbsp;"; }
else { $icon = ""; } else { $icon = ""; }
$result .= $result .=
"<li class=\"" . ($submenu ? "submenu" : "") . ($isactive ? " selected" : "") . "\"> "<li class=\"" . ($submenu ? "submenu" : "") . ($isactive ? " selected" : "") . ($liClass ? " $liClass" : "") . "\">
<a href=\"" . ($submenu ? $submenulink : $link) . "\" class=\"" . ($isplayer ? "player" : "") . "\" title=\"{$title}\" {$target}>{$icon}{$title}</a>"; <a href=\"" . ($submenu ? $submenulink : $link) . "\" class=\"" . ($isplayer ? "player" : "") . "\" title=\"{$title}\" {$target}>{$icon}{$title}</a>";
if($submenu) { if($submenu) {
$result .= "\t\t\t<ul>\n" $result .= "\t\t\t<ul>\n"