forked from FrontendMatter/material-design-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdrawer-layout-push.html
More file actions
65 lines (58 loc) · 1.61 KB
/
Copy pathdrawer-layout-push.html
File metadata and controls
65 lines (58 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
title: Push drawer layout
---
{% extends "layouts/demo.html" %}
{% block page %}
<style>
.container {
padding: 2rem;
}
button {
margin-bottom: 2rem;
}
[position=left] .mdk-drawer__content {
border-right: 1px solid #eee;
}
.mdk-drawer__inner {
height: 100%;
overflow-y: auto;
text-align: initial;
}
.mdk-drawer__inner > :first-child {
margin-top: 1.25rem;
}
.mdk-drawer__inner > * {
padding-left: 1.25rem;
padding-right: 1.25rem;
margin-bottom: 1.25rem;
}
</style>
<div class="mdk-drawer-layout mdk-js-drawer-layout" push>
<!-- content -->
<div class="mdk-drawer-layout__content">
<div class="container">
<button class="btn btn-primary" type="button">Toggle drawer</button>
{% include '_drawer-layout.html' %}
<hr>
{% include '_sample-content.html' %}
</div>
</div>
<!-- drawer -->
<div class="mdk-drawer mdk-js-drawer">
<div class="mdk-drawer__content">
<div class="mdk-drawer__inner">
<h4>Hello World</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eum nisi, aspernatur esse ea velit, possimus quod labore doloremque perspiciatis veniam amet fuga incidunt, beatae saepe assumenda quia laudantium ut qui!</p>
</div>
</div>
</div>
</div>
<!-- // END drawer-layout -->
{% endblock %}
{% block footer %}
<script>
document.querySelector('button').addEventListener('click', function () {
document.querySelector('.mdk-drawer').mdkDrawer.toggle()
})
</script>
{% endblock %}