-
Notifications
You must be signed in to change notification settings - Fork 0
/
Mixitup-Codepen-Sample-Code.txt
157 lines (122 loc) · 2.69 KB
/
Mixitup-Codepen-Sample-Code.txt
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
########## Begin HTML ##########
<div class="controls">
<label>Filter:</label>
<button class="filter" data-filter="all">All</button>
<button class="filter" data-filter=".category-1">Category 1</button>
<button class="filter" data-filter=".category-2">Category 2</button>
<label>Sort:</label>
<button class="sort" data-sort="myorder:asc">Asc</button>
<button class="sort" data-sort="myorder:desc">Desc</button>
</div>
<div id="Container" class="container">
<div class="mix category-1" data-myorder="1"></div>
<div class="mix category-1" data-myorder="2"></div>
<div class="mix category-1" data-myorder="3"></div>
<div class="mix category-2" data-myorder="4"></div>
<div class="mix category-1" data-myorder="5"></div>
<div class="mix category-1" data-myorder="6"></div>
<div class="mix category-2" data-myorder="7"></div>
<div class="mix category-2" data-myorder="8"></div>
<div class="gap"></div>
<div class="gap"></div>
</div>
########## End HTML ##########
########## Begin CSS ##########
*{
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
body, button{
font-family: 'Helvetica Neue', arial, sans-serif;
}
.controls{
padding: 2%;
background: #333;
color: #eee;
}
label{
font-weight: 300;
margin: 0 .4em 0 0;
}
button{
display: inline-block;
padding: .4em .8em;
background: #666;
border: 0;
color: #ddd;
font-size: 16px;
font-weight: 300;
border-radius: 4px;
cursor: pointer;
}
button.active{
background: #68b8c4;
}
button:focus{
outline: 0 none;
}
button + label{
margin-left: 1em;
}
.container{
padding: 2% 2% 0;
text-align: justify;
font-size: 0.1px;
background: #68b8c4;
-webkit-backface-visibility: hidden;
}
.container:after{
content: '';
display: inline-block;
width: 100%;
}
.container .mix,
.container .gap{
display: inline-block;
width: 49%;
}
.container .mix{
text-align: left;
background: #03899c;
margin-bottom: 2%;
display: none;
}
.container .mix.category-1{
border-top: 2px solid limegreen;
}
.container .mix.category-2{
border-top: 2px solid yellow;
}
.container .mix:after{
content: attr(data-myorder);
color: white;
font-size: 16px;
display: inline-block;
vertical-align: top;
padding: 4% 6%;
font-weight: 700;
}
.container .mix:before{
content: '';
display: inline-block;
padding-top: 60%;
}
@media all and (min-width: 420px){
.container .mix,
.container .gap{
width: 32%;
}
}
@media all and (min-width: 640px){
.container .mix,
.container .gap{
width: 23.5%;
}
}
########## End CSS ##########
########## Begin JS ##########
$(function(){
$('#Container').mixItUp();
});
########## End JS ##########