Skip to content

Instantly share code, notes, and snippets.

@johnmales
Created April 24, 2018 07:55
Show Gist options
  • Save johnmales/cbe4b3012e8de8f8d80ef8633da764b2 to your computer and use it in GitHub Desktop.
Save johnmales/cbe4b3012e8de8f8d80ef8633da764b2 to your computer and use it in GitHub Desktop.
Display Two Nightscout Instances Side By Side
Place this in the "pretty obvious to everyone but me camp":
The index.html file here will display two side by side views of nightscout sites, for exmaple of two different people.
Replace "NAME1" with the name of the left hand nightscout site
Replace "NAME2" with the name of the right hand nightscout site
Replace "https://1st-nightscout-site.com" with the website for the left hand nightscout site
Replace "https://2nd-nightscout-site.com" with the website for the right hand nightscout site
Point your web browser to where you are hosting the index.html site and you will see a side-by-side view of two nightscout sites.
You should be able to display two aribtrary pages in this manner as well, not tested.
<!DOCTYPE html>
<html>
<body>
<style> html,body{
height: 100%;
}
iframe{
width:49%;
height:90%
}
</style>
<p style="margin:0em;font-family:sans-serif;font-weight:bold;font-size:4vw;text-align: left; width:49%; display: inline-block;">NAME1</p>
<p style="margin:0em;font-family:sans-serif;font-weight:bold;font-size:4vw;text-align: right; width:50%; display: inline-block;">NAME2</p>
<iframe src="https://1st-nightscout-site.com" height="100%" width="49%"></iframe>
<iframe src="https://2nd-nightscout-site.com" height="100%" width="49%"></iframe>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment