mirror of
https://github.com/AzuraCast/AzuraCast.git
synced 2024-06-14 13:16:37 +00:00
277 lines
8.2 KiB
PHTML
277 lines
8.2 KiB
PHTML
<?php
|
|
$this->layout()->manual = TRUE;
|
|
$this->layout()->hide_title = true;
|
|
$this->render_mode = 'homepage';
|
|
?>
|
|
|
|
<? $this->placeholder('content_top')->captureStart(); ?>
|
|
<div id="home_header">
|
|
<div class="container">
|
|
<? if ($this->special_event): ?>
|
|
<div class="well">
|
|
<div class="special_event">
|
|
<?
|
|
if ($this->auth->isLoggedIn())
|
|
{
|
|
$user = $this->auth->getLoggedInUser();
|
|
$chat_username = $user->name;
|
|
}
|
|
else
|
|
{
|
|
$chat_username = 'PVL_'.mt_rand(0, 10000);
|
|
}
|
|
|
|
$skin = \PVL\Customization::get('theme');
|
|
if ($skin == 'dark')
|
|
$chat_skin = 'css/black.css';
|
|
else
|
|
$chat_skin = 'css/pvl_light.css';
|
|
|
|
$special_event_embed = trim(\Entity\Settings::getSetting('special_event_embed_code'));
|
|
$special_chat_embed = trim(\Entity\Settings::getSetting('special_event_chat_code'));
|
|
?>
|
|
|
|
<script type="text/javascript">
|
|
var PVL_ChatUser = '<?=$chat_username ?>';
|
|
var PVL_ChatSkin = '<?=$skin ?>';
|
|
</script>
|
|
|
|
<div class="row-fluid">
|
|
<? if (empty($special_chat_embed)): ?>
|
|
<div class="span12"><?=$special_event_embed ?></div>
|
|
<? else: ?>
|
|
<div class="span7"><?=$special_event_embed ?></div>
|
|
<div class="span5"><?=$special_chat_embed ?></div>
|
|
<? endif; ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<? else: ?>
|
|
<div class="well carousel slide" id="rotator" data-interval="5000">
|
|
<ol class="carousel-indicators">
|
|
<? for($i = 0; $i < count($this->network_news); $i++): ?>
|
|
<li data-target="#rotator" data-slide-to="<?=$i ?>" <? if ($i == 0): ?>class="active"<? endif; ?>></li>
|
|
<? endfor; ?>
|
|
</ol>
|
|
<div class="carousel-inner">
|
|
<? foreach($this->network_news as $i => $article): ?>
|
|
<div class="item <? if ($i == 0): ?>active<? endif; ?>">
|
|
<a href="<?=$article['url'] ?>"><img src="<?=$article['image'] ?>" alt="Article Image"></a>
|
|
<div class="carousel-caption">
|
|
<a href="<?=$article['url'] ?>">
|
|
<h4><?=$article['title'] ?></h4>
|
|
<p><?=$article['description'] ?> <small>Read more »</small></p>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<? endforeach; ?>
|
|
</div>
|
|
|
|
<a class="carousel-control left" href="#rotator" data-slide="prev">‹</a>
|
|
<a class="carousel-control right" href="#rotator" data-slide="next">›</a>
|
|
</div>
|
|
<? endif; ?>
|
|
</div>
|
|
</div>
|
|
<? $this->placeholder('content_top')->captureEnd(); ?>
|
|
|
|
<div class="row-fluid">
|
|
<div class="span8">
|
|
<?
|
|
$cat = $this->categories['audio'];
|
|
$station_cols = \DF\Utilities::columns($cat['stations'], 2);
|
|
?>
|
|
<h2><i class="<?=$cat['icon'] ?>"></i> <?=$cat['name'] ?> <small><span id="nowplaying-listeners-audio"></span></small></h2>
|
|
|
|
<div class="well">
|
|
<div class="row-fluid">
|
|
<div class="span6">
|
|
<?
|
|
$this->stations = $station_cols[0];
|
|
echo $this->renderCommon('station');
|
|
?>
|
|
</div>
|
|
<div class="span6">
|
|
<?
|
|
$this->stations = $station_cols[1];
|
|
echo $this->renderCommon('station');
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="span4">
|
|
<?
|
|
$cat = $this->categories['video'];
|
|
?>
|
|
<h2><i class="<?=$cat['icon'] ?>"></i> <?=$cat['name'] ?> <small><span id="nowplaying-listeners-video"></span></small></h2>
|
|
|
|
<div class="well">
|
|
<?
|
|
$this->stations = $cat['stations'];
|
|
echo $this->renderCommon('station');
|
|
?>
|
|
</div>
|
|
|
|
<div id="secondary-rotator">
|
|
<div class="well carousel slide" data-interval="5000">
|
|
<div class="carousel-inner">
|
|
<? foreach($this->rotators as $i => $record): ?>
|
|
<div class="item <? if ($i == 0): ?>active<? endif; ?>">
|
|
<a href="<?=$record['web_url'] ?>"><img src="<?=\DF\Url::content($record['image_url']) ?>" title="<?=$record['description'] ?>"></a>
|
|
</div>
|
|
<? endforeach; ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h2><i class="icon-rss"></i> Shows</h2>
|
|
|
|
<div class="well">
|
|
<div class="row-fluid">
|
|
<?
|
|
$podcast_cols = \DF\Utilities::columns($this->podcasts, 3, true);
|
|
|
|
foreach($podcast_cols as $podcasts):
|
|
?>
|
|
<div class="span4">
|
|
<ul class="media-list">
|
|
<? foreach($podcasts as $podcast_info): ?>
|
|
<?
|
|
$podcast = $podcast_info['record'];
|
|
$episodes = $podcast_info['episodes'];
|
|
$ep = $episodes[0];
|
|
?>
|
|
<li class="media podcast">
|
|
<div class="media-object pull-left">
|
|
<a href="<?=$this->routeFromHere(array('action' => 'podcast', 'id' => $podcast->id)) ?>">
|
|
<img class="station-image" src="<?=\DF\Url::content($podcast->image_url) ?>" style="width: 40px;">
|
|
<div class="station-play-button">
|
|
<i class="icon-rss"></i>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
<div class="media-body">
|
|
<div class="station-info">
|
|
<h4><?=$podcast->name ?> <a href="<?=$this->routeFromHere(array('action' => 'podcast', 'id' => $podcast->id)) ?>" title="Click for more information."><i class="icon-info-sign"></i> </a><br>
|
|
<span class="genre-info"><small>
|
|
<?=$podcast->description ?>
|
|
<?
|
|
if (count($podcast->stations) > 0)
|
|
{
|
|
$station_links = array();
|
|
foreach($podcast->stations as $station)
|
|
{
|
|
$station_link = '<a href="#" class="btn-play-station" data-station="station_'.$station->short_name.'">'.$station->name.'</a>';
|
|
$station_links[] = $station_link;
|
|
}
|
|
echo '<br><i class="icon-star"></i> Airs on '.implode(', ', $station_links);
|
|
}
|
|
?>
|
|
</small></span>
|
|
</h4>
|
|
|
|
<small>Newest Episode (<?=date('F j, Y', $ep['timestamp']) ?>):</small><br>
|
|
<a href="<?=$ep['web_url'] ?>" target="_blank"><b><?=$ep['title'] ?></b></a>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<? endforeach; ?>
|
|
</ul>
|
|
</div>
|
|
<?
|
|
endforeach;
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
<?
|
|
$dates = array();
|
|
$num_cols = 3;
|
|
for($i = 0; $i <= $num_cols-1; $i++)
|
|
{
|
|
$day_timestamp = time()+(86400*$i);
|
|
$day_date = date('Y-m-d', $day_timestamp);
|
|
|
|
$dates[] = array(
|
|
'timestamp' => $day_timestamp,
|
|
'is_today' => ($day_date == date('Y-m-d')),
|
|
'events' => $this->events_by_day[$day_date],
|
|
);
|
|
}
|
|
?>
|
|
|
|
<div class="row-fluid">
|
|
<div class="span4">
|
|
<h2><i class="icon-group"></i> Ponyville Live! Presents</h2>
|
|
|
|
<?
|
|
echo $this->renderHere('index_conventions');
|
|
?>
|
|
</div>
|
|
<div class="span8">
|
|
<?
|
|
$tz_info = \PVL\Timezone::getInfo();
|
|
?>
|
|
<h2><i class="icon-calendar"></i> Upcoming Shows & Events <small><i class="icon-time"></i> Times listed in <a href="<?=$this->route(array('controller' => 'account', 'action' => 'timezone')) ?>" class="fancybox fancybox.ajax"><?=$tz_info['abbr'] ?></a></small></h2>
|
|
|
|
<div class="well no-margin">
|
|
<div class="row-fluid">
|
|
<? foreach($dates as $date_row): ?>
|
|
<div class="span<?=(12 / $num_cols) ?>">
|
|
<h3><? if ($date_row['is_today']): ?>Today<? else: ?><?=date('l', $date_row['timestamp']) ?><? endif; ?><br><small><?=date('F j, Y', $date_row['timestamp']) ?></small></h3>
|
|
<ul class="unstyled nopadding">
|
|
<? foreach((array)$date_row['events'] as $event): ?>
|
|
<li class="clearfix">
|
|
<img class="pull-left" src="<?=$event['image_url'] ?>" style="width: 32px; margin-right: 5px; margin-top: 5px;">
|
|
<h5><?=\Entity\Schedule::formatName($event['title']) ?><br><small>
|
|
<? if ($event['status'] == "now"): ?>
|
|
<b>Right now</b>
|
|
<? else: ?>
|
|
<?=date('g:ia', $event['start_time']) ?>
|
|
<? endif; ?>
|
|
on
|
|
<? if ($event['station']): ?>
|
|
<?=$event['station']['name'] ?>
|
|
<? else: ?>
|
|
Ponyville Live!
|
|
<? endif; ?>
|
|
</small></h5>
|
|
</li>
|
|
<? endforeach; ?>
|
|
</ul>
|
|
</div>
|
|
<? endforeach; ?>
|
|
</div>
|
|
|
|
<div class="buttons">
|
|
<?=$this->button(array(
|
|
'type' => 'small',
|
|
'class' => 'btn-primary',
|
|
'href' => $this->route(array('controller' => 'events', 'action' => 'schedule')),
|
|
'icon' => 'icon-calendar',
|
|
'text' => 'View Full Station Schedules',
|
|
)) ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?=$this->renderHere('player_skeleton', TRUE) ?>
|
|
|
|
<script type="text/javascript">
|
|
$(function() {
|
|
|
|
$('.btn-play-station').click(function(e) {
|
|
e.preventDefault();
|
|
|
|
var station_id = $(this).data('station');
|
|
playStation(station_id);
|
|
|
|
return false;
|
|
});
|
|
|
|
});
|
|
</script>
|