@gobistories/gobi-web-integration
Version:
This library will let you put your Gobi stories on your site.
93 lines (80 loc) • 2.12 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Gobi - Web Integration test</title>
<script type="text/javascript" src="/dist/run-config.js"></script>
<style>
body {
width: 100vw;
height: 100vh;
margin: 0;
background-color: #DDDDFF;
font-family: sans-serif;
}
.screen {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
h5 {
margin-bottom: 8px;
}
p {
font-size: 14px;
}
button {
margin-top: 14px;
}
.overlay {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-color: white;
text-align: center;
}
.overlay.fixed {
position: fixed;
top: 100%;
left: 50%;
transform: translate(-50%, -100%);
width: 100%;
min-height: 33vh;
box-shadow: rgba(0, 0, 0, 0.3) 0 30px 70px 0;
z-index: 2147483631;
}
.overlay.absolute {
position: absolute;
top: 16px;
left: 16px;
width: 160px;
height: 160px;
border-radius: 10px;
padding: 1rem;
}
</style>
<script type="text/javascript" src="../index.js?v=d85e77"></script></head>
<body>
<div class="screen">
<div class="gobi-stories" data-gobi-stories="demo01 demo02 demo03 demo04" data-gobi-size="100px"
data-gobi-animated-bubble="false"></div>
</div>
<div class="overlay fixed">
<h5>Fixed overlay with higher z-index</h5>
<p>Should be clickable when a story is open.</p>
<button type="button" onClick="alert('Clicked fixed overlay.')">Click Me</button>
</div>
<div class="overlay absolute">
<h5>Absolute overlay with lower z-index</h5>
<p>Should not be clickable when a story is open.</p>
<button type="button" onClick="alert('Clicked absolute overlay.')">Click Me</button>
</div>
<script>
gobi.discover({ apiBaseUrl: runConfig.apiBaseUrl });
</script>
</body>
</html>