mirror of
https://github.com/ivuorinen/rss-audio-player.git
synced 2026-02-14 18:51:21 +00:00
RSSAudioPlayer 1.0
Quick system to play your (currently my) favourite podcast feeds and stuff.
This commit is contained in:
34
templates/footer.php
Normal file
34
templates/footer.php
Normal file
@@ -0,0 +1,34 @@
|
||||
|
||||
<footer id="bottom" class="row">
|
||||
<div class="large-12 columns">
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="large-3 columns">
|
||||
<p>RSSAudioPlayer <?php echo $this->version; ?></p>
|
||||
</div>
|
||||
<div class="large-7 columns">
|
||||
<ul class="inline-list right">
|
||||
<li>Components used in making this</li>
|
||||
<li><a href="http://foundation.zurb.com">ZURB's Foundation Framework</a></li>
|
||||
<li><a href="http://simplepie.org">SimplePIE</a></li>
|
||||
<li><a href="http://kolber.github.io/audiojs/">audio.js</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="<?php echo $this->baseurl; ?>/assets/audiojs/audio.min.js"></script>
|
||||
<script>
|
||||
document.write(
|
||||
'<script src=//cdnjs.cloudflare.com/ajax/libs'
|
||||
+ '/foundation/4.1.6/js/vendor/'
|
||||
+ ('__proto__' in {} ? 'zepto' : 'jquery')
|
||||
+ '.js><\/script>'
|
||||
);
|
||||
</script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/foundation/4.1.6/js/foundation.min.js"></script>
|
||||
<script src="<?php echo $this->baseurl; ?>/assets/scripts.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
23
templates/header.php
Normal file
23
templates/header.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<!--[if IE 8]><html class="no-js lt-ie9" lang="en"><![endif]-->
|
||||
<!--[if gt IE 8]><html class="no-js" lang="en"><![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<!-- Set the viewport width to device width for mobile -->
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title>RSS Audio Player</title>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/foundation/4.1.6/css/normalize.min.css">
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/foundation/4.1.6/css/foundation.min.css">
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/foundation/4.1.6/js/vendor/custom.modernizr.min.js"></script>
|
||||
<link rel="stylesheet" href="<?php echo $this->baseurl; ?>/assets/style.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="row">
|
||||
<div class="large-12 columns">
|
||||
<div class="panel">
|
||||
<h1><a href="<?php echo $this->baseurl; ?>">RSS Audio Player</a></h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
26
templates/list.php
Normal file
26
templates/list.php
Normal file
@@ -0,0 +1,26 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="large-12 columns">
|
||||
<div class="panel">
|
||||
|
||||
<h2>Our known feeds</h2>
|
||||
<ul class="inline-list feeds-list">
|
||||
|
||||
<?php
|
||||
|
||||
foreach ($this->feeds as $key => $url) {
|
||||
$title = $this->getFeedTitle($key);
|
||||
echo "\t\t\t\t" . $this->lst(
|
||||
$this->lnk(
|
||||
$this->baseurl . '/show/' . $key, // Our link
|
||||
$title
|
||||
)
|
||||
). "\n";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
48
templates/show.php
Normal file
48
templates/show.php
Normal file
@@ -0,0 +1,48 @@
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="large-12 columns">
|
||||
<div class="panel">
|
||||
|
||||
<h2><a title="<?php
|
||||
echo $data['feed']->get_link();
|
||||
?>" href="<?php
|
||||
echo $data['feed']->get_link();
|
||||
?>" target="_blank"><?php
|
||||
echo $data['feed']->get_title();
|
||||
?></a></h2>
|
||||
<header>
|
||||
<p><?php echo $data['feed']->get_description(); ?></p>
|
||||
</header>
|
||||
|
||||
<?php
|
||||
$items = $data['feed']->get_items();
|
||||
|
||||
if (! empty($items)) {
|
||||
|
||||
echo '<audio></audio>'."\n";
|
||||
echo '<ol>' . "\n";
|
||||
|
||||
foreach ($items as $item) {
|
||||
|
||||
if (($enclosure = $item->get_enclosure())) {
|
||||
$link = $enclosure->get_link();
|
||||
} else {
|
||||
$link = null;
|
||||
}
|
||||
|
||||
echo "\t\t\t\t<li>"
|
||||
. '<a href="'. $item->get_permalink() .'" '
|
||||
. ' data-src="'. $link .'"'
|
||||
. '>'
|
||||
. $item->get_title()
|
||||
. '</a>'
|
||||
."</li>\n";
|
||||
}
|
||||
|
||||
echo '</ol>' . "\n";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user