Skip to content

Instantly share code, notes, and snippets.

@XanderStrike
Last active December 1, 2018 06:43
Show Gist options
  • Select an option

  • Save XanderStrike/be976a916ceea017955e7c12d8aa229d to your computer and use it in GitHub Desktop.

Select an option

Save XanderStrike/be976a916ceea017955e7c12d8aa229d to your computer and use it in GitHub Desktop.
stupid simple plex server index page
<!DOCTYPE html>
<html>
<head>
<title>Example Server</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" type="image/png" href="/public/img/favicon.png">
</head>
<body>
<div id="header">
<a href="https://requests.example.com" class="framelink">requests</a> |
<a href="https://couch.example.com" class="framelink">couch</a> |
<a href="https://sick.example.com" class="framelink">sick</a> |
<a href="https://gazelleui.example.com" class="framelink">gazelleui</a> |
<a href="https://manual.example.com" class="framelink">manual</a> |
<a href="https://tautulli.example.com" class="framelink">tautulli</a> |
<a href="https://example.com:3308">filebrowser</a> |
<a href="https://portainer.example.com/" class="framelink">portainer</a> |
<a href="https://plex.tv/web" class="framelink active">plex</a>
<span style="float:right">Announcement!</span>
</div>
<iframe class="frame" style="" src="https://plex.tv"></iframe>
<style>
a, a:hover, a:visited {
color: black;
}
a:hover {
text-decoration: none;
color: black;
}
.header {
height: 20px;
}
.frame {
width: 100%;
height: calc(100vh - 20px);
}
.active {
background-color: black;
color: white;
}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<script>
$('.framelink').on('click', function(e) {
e.preventDefault();
$('.frame').attr('src', $(this).attr('href'));
$('.framelink').removeClass('active');
$(this).addClass('active');
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment