docs: add home showcase
This commit is contained in:
parent
9447282a76
commit
a51f27b692
5 changed files with 77 additions and 17 deletions
1
resources/docs/showcase
Symbolic link
1
resources/docs/showcase
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../app/
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
"doc": "docs"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node scripts/build-css && mkdocs build && rsync -a site_misc/ site/"
|
||||
"build": "node scripts/build-css && mkdocs build && rsync -a --copy-links site_misc/ site/"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
|
|
|
|||
|
|
@ -32,25 +32,52 @@ pre, code {
|
|||
position: relative;
|
||||
padding: 10em 0 8em;
|
||||
}
|
||||
#jumbotron .bg {
|
||||
position: absolute;
|
||||
top:0px;left:0px;right:0px;bottom:0px;
|
||||
background-size: cover;
|
||||
z-index: -1;
|
||||
opacity: 0.5;
|
||||
/* filter: blur(5px); */
|
||||
|
||||
}
|
||||
|
||||
#jumbotron-img {
|
||||
/* width: 50%; */
|
||||
display: block;
|
||||
#jumbotron-showcase {
|
||||
margin: -4em auto 1em;
|
||||
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.5);
|
||||
z-index: 1;
|
||||
border-radius: 3px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
image-rendering: crisp-edges;
|
||||
-webkit-image-rendering: crisp-edges;
|
||||
|
||||
#jumbotron-img {
|
||||
display: block;
|
||||
z-index: 2;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.icon-play {
|
||||
$size:80px;
|
||||
position: absolute;
|
||||
z-index: 3;
|
||||
top:50%;left:50%;
|
||||
margin-left:-$size/2;
|
||||
margin-top:-$size/2;
|
||||
width: $size;
|
||||
height: $size;
|
||||
border-bottom:$size/2 solid transparent;
|
||||
border-top:$size/2 solid transparent;
|
||||
border-left:$size solid #fff;
|
||||
opacity: 0.75;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
#showcase-frame {
|
||||
z-index: 1;
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
top: 0; left: 0;
|
||||
width:100%;
|
||||
height: 100%;
|
||||
border: 0;
|
||||
// transition: opacity 0.5s;
|
||||
&.show {
|
||||
z-index: 4;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#jumbotron + #main {
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@
|
|||
|
||||
<div class="col-right">
|
||||
{% if page.is_homepage %}
|
||||
<img src="{{ config.extra.screenshot|url }}" id="jumbotron-img"/>
|
||||
{% include 'home.html' %}
|
||||
{% endif %}
|
||||
|
||||
{% block content %}
|
||||
|
|
|
|||
32
resources/theme/home.html
Normal file
32
resources/theme/home.html
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<div id="jumbotron-showcase">
|
||||
<iframe id="showcase-frame" allowfullscreen></iframe>
|
||||
<div class="icon-play"></div>
|
||||
<img src="{{ config.extra.screenshot|url }}" id="jumbotron-img"/>
|
||||
</div>
|
||||
<script>
|
||||
var frame = document.getElementById('showcase-frame'),
|
||||
play = document.getElementById('jumbotron-img')
|
||||
|
||||
play.onclick = function(){
|
||||
frame.src = "/showcase/client/"
|
||||
frame.classList.add('show')
|
||||
function load(){
|
||||
var ipc = frame.contentWindow.ipc
|
||||
if (!ipc) return setTimeout(load, 250)
|
||||
// frame.contentWindow.error = function(){}
|
||||
var request = new XMLHttpRequest()
|
||||
request.open('GET', '/showcase/examples/ardour.json', true);
|
||||
request.onload = function() {
|
||||
if (this.status >= 200 && this.status < 400) {
|
||||
var session = JSON.parse(this.response)
|
||||
session.default = 1
|
||||
ipc.trigger('connected')
|
||||
ipc.trigger('sessionOpen', {session: session})
|
||||
}
|
||||
}
|
||||
request.send()
|
||||
}
|
||||
load()
|
||||
}
|
||||
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue