forked from FrontendMatter/material-design-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader-layout-drawer.html
More file actions
132 lines (119 loc) · 3.37 KB
/
Copy pathheader-layout-drawer.html
File metadata and controls
132 lines (119 loc) · 3.37 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
---
title: Header layout within drawer
---
{% extends "layouts/demo.html" %}
{% block page %}
<style>
/* General */
.container {
padding: 2rem;
}
.drawer-toggler {
margin-bottom: 2rem;
}
/* Drawer */
.mdk-drawer__content {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 290px;
}
.mdk-drawer__inner > :first-child {
margin-top: 1.25rem;
}
.mdk-drawer__inner > * {
padding-left: 1.25rem;
padding-right: 1.25rem;
margin-bottom: 1.25rem;
}
/* Header */
.mdk-header {
height: auto;
}
.mdk-header__bg-front {
background-color: #E91E63;
}
.mdk-header__content {
display: flex;
flex-direction: column;
}
/* User */
.user-avatar,
.user-meta {
padding-left: 1.25rem;
padding-right: 1.25rem;
display: flex;
flex-direction: row;
align-items: center;
}
.user-avatar {
height: 120px;
}
.user-meta {
height: 70px;
}
.user-avatar img {
border-radius: 50%;
border: 2px solid #fff;
}
.user-meta a {
color: #fff;
text-decoration: none;
}
.user-meta small {
color: rgba(255,255,255,.8);
}
</style>
<div class="mdk-drawer mdk-js-drawer" opened>
<div class="mdk-drawer__content">
<!-- header-layout -->
<div class="mdk-header-layout mdk-js-header-layout" has-scrolling-region>
<!-- header -->
<div class="mdk-header mdk-js-header bg-primary"
effects="waterfall blend-background"
condenses fixed>
<div class="mdk-header__content">
<!-- user -->
<div class="user-avatar">
<a href="#">
<img src="https://api.adorable.io/avatars/70/abott@adorable.io.png" alt="avatar">
</a>
</div>
<div class="user-meta" primary>
<a href="#">
<span class="h5">Thomas Vaughn</span>
<small>thomas.vaughn@gmail.com</small>
</a>
</div>
<!-- // END user -->
</div>
</div>
<!-- // END header -->
<!-- content -->
<div class="mdk-header-layout__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>
{% for item in [1,2,3,4,5,6,7,8,9,10] %}
<h4>Sample content</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quam praesentium excepturi suscipit sequi facilis magni, ut blanditiis pariatur repellat unde similique natus nostrum iure alias nesciunt omnis eveniet ex! Vero!</p>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
<div class="container">
<button class="btn btn-primary drawer-toggler" type="button">Toggle drawer</button>
{% include '_header-layout.html' %}
</div>
{% endblock %}
{% block footer %}
<script>
document.querySelector('.drawer-toggler').addEventListener('click', function () {
document.querySelector('.mdk-drawer').mdkDrawer.toggle()
})
</script>
{% endblock %}