-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmaterial-design-cards.html
202 lines (174 loc) · 3.85 KB
/
material-design-cards.html
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<!DOCTYPE html>
<html>
<head>
<title>Material Design Cards Sampler</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style type="text/css">
/* https://s3.amazonaws.com/infinum.web.production/repository_items/files/000/000/431/original/2.png The top two cards are what are featured*/
/* -----------Smartphone View----------- */
@media only screen and (max-width : 480px) {
.card {
width: 100%;
}
}
/* -----------Desktop View----------- */
@media only screen and (min-width : 481px) {
.card {
width: 40%;
}
}
/* -----------Universal Views----------- */
html, body {
height: 100%;
margin: 0 auto;
background-color: rgba(189, 195, 199,1.0);
font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial;
}
.card {
/*height: 40%; Height cannot be used due to the fact that it scales based on content */
padding-bottom: 13%; /*by using padding-bottom the positioning allows for content to be rendered consistanly */
background: #fff;
margin: 5%;
position: relative; /* the container needs to be needs to be relative if the contents will be absolute */
float: left;
overflow: hidden;
border-radius: 2px;
box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
font-size: 0.9em;
transition: width .2s linear;
}
.content {
position: absolute; /* needs to be absolute so the parent container does not use it in sizing calculations */
/* margin: 2%; */
display: flex;
flex-direction: column;
height: 40%;
}
.content p {
margin: 1em;
}
.image {
width:100%;
height: 19vh;
background-image: url('http://skanditra.se/wp-content/uploads/2014/07/Holiday1.jpg');
}
.image h2 {
margin: -46px 15px;
font-size: 203%;
color: white;
}
.scrim {
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
}
.buttons {
display: flex;
justify-content: flex-end;
align-content: flex-end;
align-self: flex-end;
margin-right: 1em;
}
.flat-button {
border: none;
border-radius: 2px;
display: inline-block;
height: 36px;
line-height: 36px;
outline: 0;
/* padding: 0 2rem;
*/ text-transform: uppercase;
box-shadow: none;
background-color: transparent;
}
.menu {
float: right;
width: 50px;
height: 50px;
border-radius: 50%;
}
</style>
</head>
<body>
<div class='card'>
<div class='image'>
<div class='scrim'>
</div>
<div class='menu'>
</div>
<h2>
Number 1 Title
</h2>
</div>
<div class='content'>
<p>
I am a description that is scraped from the first main block of text through the link!
</p>
<div class='buttons material-buttons'>
<button class='flat-button'>
Learn More
</button>
</div>
</div>
</div>
<div class='card'>
<div class='image'>
<div class='scrim'>
</div>
<h2>
Number 2 Title
</h2>
</div>
<div class='content'>
<p>
I am a description that is scraped from the first main block of text through the link!
</p>
<div class='buttons material-buttons'>
<button class='flat-button'>
Learn More
</button>
</div>
</div>
</div>
<div class='card'>
<div class='image'>
<div class='scrim'>
</div>
<h2>
Number 3 Title
</h2>
</div>
<div class='content'>
<p>
I am a description that is scraped from the first main block of text through the link!
</p>
<div class='buttons material-buttons'>
<button class='flat-button'>
Learn More
</button>
</div>
</div>
</div>
<div class='card'>
<div class='image'>
<div class='scrim'>
</div>
<h2>
Number 4 Title
</h2>
</div>
<div class='content'>
<p>
I am a description that is scraped from the first main block of text through the link!
</p>
<div class='buttons material-buttons'>
<button class='flat-button'>
Learn More
</button>
</div>
</div>
</div>
</body>
<script>
</script>
</html>