Skip to content

Instantly share code, notes, and snippets.

@sp90
Created July 19, 2019 09:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sp90/06923abe8f1acedd3fa440c63b07b3dc to your computer and use it in GitHub Desktop.
Save sp90/06923abe8f1acedd3fa440c63b07b3dc to your computer and use it in GitHub Desktop.
Simple karma testing client.html styling
<!DOCTYPE html>
<!--
The entry point for client. This file is loaded just once when the client is captured.
It contains socket.io and all the communication logic.
-->
<html>
<head>
<!-- %X_UA_COMPATIBLE% -->
<title>Karma</title>
<link href="favicon.ico" rel="icon" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
/>
<style type="text/css">
iframe {
height: 100%;
width: 100%;
border: 0;
}
html,
body {
height: 100%;
padding: 0;
margin: 0;
font-family: sans-serif;
}
.idle {
font-size: 10px;
color: #fff;
}
.idle:after {
content: '';
}
#banner {
display: flex;
align-items: center;
flex-direction: row-reverse;
justify-content: flex-end;
background: #aaa;
}
#banner:after {
content: '';
display: block;
width: 15px;
height: 15px;
border-radius: 50%;
background: #ddd;
margin-left: 20px;
}
#banner.online:after {
background: #1ed760;
}
#banner.executing:after {
background: #f99;
}
h1 {
font-size: 14px;
font-weight: 200;
color: #fff;
margin: 0;
padding: 8px 10px;
flex: 1 0;
}
ul {
margin: 0;
list-style: none;
position: fixed;
bottom: 0;
left: 0;
padding: 5px;
background: #ccc;
width: 100%;
}
li {
padding: 5px 12px;
float: left;
}
li:before {
content: '-';
display: inline-block;
padding: 0 5px;
}
.btn-debug {
float: right;
}
.offline .btn-debug {
display: none;
}
.btn-debug {
font-size: 12px;
display: block;
color: #fff;
border-right: 1px solid #fff;
border-left: 1px solid #fff;
height: 100%;
padding: 9px 20px;
text-decoration: none;
background: transparent;
transition: background 200ms ease;
}
.btn-debug:hover {
background: rgba(255, 255, 255, 0.1);
}
</style>
</head>
<body>
<div id="banner" class="offline">
<a href="#" onclick="window.open('debug.html%X_UA_COMPATIBLE_URL%')" class="btn-debug"
>DEBUG</a
>
<h1 id="title">Karma - starting</h1>
</div>
<ul id="browsers"></ul>
<iframe id="context" src="about:blank" width="100%" height="100%"></iframe>
<script src="socket.io/socket.io.js"></script>
<script src="karma.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment