-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simple plugin to draw a big green button to start a playlist.
- Loading branch information
1 parent
3c6a647
commit ba31143
Showing
3 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
.button{ | ||
width:400px; /*same as the height*/ | ||
height:400px; /*same as the width*/ | ||
display: block; | ||
/* | ||
background-color:#ff0000; | ||
*/ | ||
background-color: #58aa00; | ||
border:1px solid #58aa00; /*same colour as the background*/ | ||
color:#fff; | ||
|
||
font-size:500%; | ||
text-align: center; | ||
text-shadow: 2px 2px #555; | ||
|
||
/*set the border-radius at half the size of the width and height*/ | ||
-webkit-border-radius: 50%; | ||
-moz-border-radius: 50%; | ||
border-radius: 50%; | ||
/*give the button a small drop shadow*/ | ||
-webkit-box-shadow: 0 0 10px rgba(0,0,0, .75); | ||
-moz-box-shadow: 0 0 10px rgba(0,0,0, .75); | ||
box-shadow: 2px 2px 15px rgba(0,0,0, .75); | ||
} | ||
.button:hover{ | ||
background:#490; | ||
border:1px solid #490; | ||
/*reduce the size of the shadow to give a pushed effect*/ | ||
-webkit-box-shadow: 0px 0px 5px rgba(0,0,0, .75); | ||
-moz-box-shadow: 0px 0px 5px rgba(0,0,0, .75); | ||
box-shadow: 0px 0px 5px rgba(0,0,0, .75); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
$playlists = Array(); | ||
foreach(scandir($playlistDirectory) as $pFile) | ||
if ($pFile != "." && $pFile != "..") | ||
$playlists[$pFile] = $pFile; | ||
?> | ||
|
||
<script> | ||
function StartPlaylist() | ||
{ | ||
var Playlist = $("#PlaylistSelect").val(); | ||
var Repeat = $("#Repeat").is(':checked')?'checked':'unchecked'; | ||
var xmlhttp=new XMLHttpRequest(); | ||
var url = "fppxml.php?command=startPlaylist&playList=" + Playlist + "&repeat=" + Repeat ; | ||
xmlhttp.open("GET",url,true); | ||
xmlhttp.setRequestHeader('Content-Type', 'text/xml'); | ||
xmlhttp.send(); | ||
} | ||
</script> | ||
|
||
<div id="start" class="settings"> | ||
<fieldset> | ||
<legend>Big Green Button</legend> | ||
|
||
<p>Playlist: <?php PrintSettingSelect("Playlist", "PlaylistSelect", "disabled", $playlists, "big-green-button"); ?> Repeat: <?php PrintSettingCheckbox("Repeat", "Repeat", "1", "0", "big-green-button"); ?></p> | ||
|
||
<p><input class="button" onClick="StartPlaylist();" type="submit" value="Start" /></p> | ||
|
||
</fieldset> | ||
</div> | ||
|
||
<br /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
$pages = Array( | ||
'name' => "Big Green Button", | ||
'type' => "status", | ||
'page' => "plugin_setup.php", | ||
); | ||
|
||
?> | ||
|
||
<li><a href="<?php echo preg_replace('/.*\/plugins\/(.*)/', 'plugin.php?plugin=$1&page=plugin_setup.php', dirname(__FILE__)); ?>">Big Green Button</a></li> |