Files
ionic-framework/ionic/components/app/test/testing/layout.html
2015-04-25 11:27:36 -05:00

161 lines
2.6 KiB
HTML

<style>
body * {
display: block;
box-sizing: border-box;
}
body {
box-sizing: border-box;
margin: 0;
padding: 0;
background: maroon;
position: relative;
}
navview {
position: absolute;
background: gray;
height: 100vh;
width: 100%;
display:flex;
flex-direction: column;
top: 0;
left: 0;
}
toolbars {
background: blue;
position: relative;
width: 100%;
min-height: 50px;
overflow: hidden;
}
toolbar {
background: green;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
tabs {
background: red;
display: flex;
justify-content: center;
}
tab {
background: blue;
color: white;
height: 50px;
padding: 0 20px;
border: 1px solid white;
text-align: center;
display: flex;
align-items: center;
justify-content:center;
}
view-container {
background: yellow;
width: 100%;
height: 100%;
}
view {
position: absolute;
background: orange;
width: 100%;
height: 100%;
}
.entering {
box-shadow: 0px 0px 5px 5px black;
}
.entering-1 {
transform: translateX(20%);
}
.entering-2 {
transform: translateX(40%);
}
</style>
<navview>
<toolbars>
<toolbar>
Level 1, View 1 Toolbar
</toolbar>
<toolbar class="entering entering-1">
Level 1, View 2 Toolbar
</toolbar>
</toolbars>
<view-container>
<view>
Level 1, View 1 Content
<div id="holder1"></div>
</view>
<view class="entering entering-1">
Level 1, View 2 Content
<div id="holder2"></div>
</view>
<navview class="entering entering-2">
<toolbars>
<toolbar style="background:red">
Level 3, View 1 Toolbar
</toolbar>
<toolbar class="entering entering-1" style="background:red">
Level 3, View 2 Toolbar
</toolbar>
</toolbars>
<view-container>
<view style="background:blue">
Level 3, View 1 Content
</view>
<view class="entering entering-1" style="background:blue">
Level 3, View 2 Content
</view>
</view-container>
</navview>
</view-container>
</navview>
<script>
var btn = document.createElement('button');
btn.textContent = 'Button!'
btn.addEventListener('click', function() {
alert('CLICK!')
});
var holder1 = document.getElementById('holder1');
var holder2 = document.getElementById('holder2');
holder1.appendChild(btn);
setTimeout(function(){
holder1.removeChild(btn);
holder2.appendChild(btn);
}, 2000);
</script>