Skip to content

Instantly share code, notes, and snippets.

@tom--
Last active December 14, 2015 13:49
Show Gist options
  • Select an option

  • Save tom--/5096197 to your computer and use it in GitHub Desktop.

Select an option

Save tom--/5096197 to your computer and use it in GitHub Desktop.
Example of styling the text in a Spinitron "now playing" iframe. Description is in a comment below.
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Spinitron Playlists</title>
</head>
<body>
<p class="recentsong">
<span class="songpart"><b>Wave Guidance Allows Three</b></span>
<span class="artistpart">by <b><a target="_top" href="/public/index.php?station=wzbc&amp;dbdetail=a&amp;dbid=83733">The Swifter</a></b></span>
<span class="diskpart">from <b><a target="_top" href="/public/index.php?station=wzbc&amp;dbdetail=d&amp;dbid=190343">The Swifter</a></b></span>
<span class="labelpart">(<b><a target="_top" href="/public/index.php?station=wzbc&amp;dbdetail=l&amp;dbid=30332">The Wormhole</a></b>)</span>
<span class="spunpart">spun
<span class="djpart">by <span><a target="_top" href="/public/index.php?station=wzbc&amp;djuid=169">Saul</a></span></span>
<span class="timepart">at <span>9:10pm</span></span>
<span class="playlistpart">on
<a target="_top" href="/public/index.php?station=wzbc&amp;plid=23621"><span class="showname">Fat's Superhead & the 68 Year Old Man </span>
<span class="datepart">(Tue Mar 5th)</span></a>
</span>
</span>
</p>
</body>
</html>
body {
color: #bbb;
background: black;
font-family: sans-serif;
font-size: 12px;
line-height: 16px;
}
p.recentsong b {
font-weight: bold;
color: white;
}
p.recentsong a {
color: #ff8000;
}
p.recentsong span.songpart {
font-style: italic;
}
p.recentsong span.labelpart,
p.recentsong span.djpart,
p.recentsong span.datepart{
display: none;
}
@tom--

tom-- commented Mar 6, 2013

Copy link
Copy Markdown
Author

The nowplaying.html file above is an example of a page from http://spinitron.com/public/newestsong.php?station=wzbc which you could use as the src url of an <iframe>. But you probably want to style it differently. styles.css demonstrates some style rules you could use with the html.

Admin users can save a stylesheet in Spinitron (Admin menu: CSS Stylesheet) or anyone may keep a stylesheet on some other server. To use a stylesheet stored in Spinitron, add &css=true to the iframe's src url:

http://spinitron.com/public/newestsong.php?station=wzbc&css=true

If it is elsewhere then add instead &stylesheet= followed by the url-encoed url to the stylesheet:

http://spinitron.com/public/newestsong.php?station=wzbc&stylesheet=http%3A%2F%2Fexample.com%2Fstyles.css

in which http%3A%2F%2Fexample.com%2Fstyles.css is just an example, it is the url-encoded value for http://example.com/styles.css.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment