Initial v3.3.6
This commit is contained in:
83
demos/filters/index.html
Normal file
83
demos/filters/index.html
Normal file
@@ -0,0 +1,83 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<link href="../reset.css" rel="stylesheet"/>
|
||||
<link href="./style.css" rel="stylesheet"/>
|
||||
|
||||
<title>MixItUp MultiFilter Demo - Filter Controls</title>
|
||||
</head>
|
||||
<body>
|
||||
<form class="controls">
|
||||
<button type="reset" class="control control-text">Reset</button>
|
||||
|
||||
<fieldset data-filter-group class="control-group">
|
||||
<label class="control-group-label">Color</label>
|
||||
|
||||
<button type="button" class="control control-color" data-filter=".green">Green</button>
|
||||
<button type="button" class="control control-color" data-filter=".blue">Blue</button>
|
||||
<button type="button" class="control control-color" data-filter=".pink">Pink</button>
|
||||
</fieldset>
|
||||
|
||||
<fieldset data-filter-group class="control-group">
|
||||
<label class="control-group-label">Shape</label>
|
||||
|
||||
<button type="button" class="control control-shape" data-filter=".square">Square</button>
|
||||
<button type="button" class="control control-shape" data-filter=".circle">Circle</button>
|
||||
<button type="button" class="control control-shape" data-filter=".triangle">Triangle</button>
|
||||
</fieldset>
|
||||
|
||||
<fieldset data-filter-group class="control-group">
|
||||
<label class="control-group-label">Size</label>
|
||||
|
||||
<button type="button" class="control control-size" data-filter=".small">Small</button>
|
||||
<button type="button" class="control control-size" data-filter=".medium">Medium</button>
|
||||
<button type="button" class="control control-size" data-filter=".large">Large</button>
|
||||
</fieldset>
|
||||
|
||||
<div class="control-group">
|
||||
<button type="button" class="control control-sort" data-sort="default:asc">Asc</button>
|
||||
<button type="button" class="control control-sort" data-sort="default:desc">Desc</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="container">
|
||||
<div class="mix green small square"></div>
|
||||
<div class="mix green medium square"></div>
|
||||
<div class="mix blue large triangle"></div>
|
||||
<div class="mix pink large circle"></div>
|
||||
<div class="mix green small circle"></div>
|
||||
<div class="mix blue medium triangle"></div>
|
||||
<div class="mix pink medium square"></div>
|
||||
<div class="mix blue medium triangle"></div>
|
||||
<div class="mix pink small circle"></div>
|
||||
<div class="mix green large triangle"></div>
|
||||
<div class="mix blue small square"></div>
|
||||
<div class="mix pink small square"></div>
|
||||
<div class="mix green large square"></div>
|
||||
<div class="mix blue large circle"></div>
|
||||
|
||||
<div class="gap"></div>
|
||||
<div class="gap"></div>
|
||||
<div class="gap"></div>
|
||||
<div class="gap"></div>
|
||||
</div>
|
||||
|
||||
<script src="../mixitup.min.js"></script>
|
||||
<script src="../mixitup-multifilter.min.js"></script>
|
||||
|
||||
<script>
|
||||
var containerEl = document.querySelector('.container');
|
||||
|
||||
var mixer = mixitup(containerEl, {
|
||||
multifilter: {
|
||||
enable: true
|
||||
},
|
||||
animation: {
|
||||
effects: 'fade translateZ(-100px)'
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
300
demos/filters/style.css
Normal file
300
demos/filters/style.css
Normal file
@@ -0,0 +1,300 @@
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
background: #f2f2f2;
|
||||
}
|
||||
|
||||
*,
|
||||
*:before,
|
||||
*:after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* Controls
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
.controls {
|
||||
padding: 1rem;
|
||||
background: #333;
|
||||
font-size: 0.1px;
|
||||
}
|
||||
|
||||
.control-group {
|
||||
display: inline-block;
|
||||
margin-left: .75rem;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.control {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 2.7rem;
|
||||
height: 2.7rem;
|
||||
background: #444;
|
||||
cursor: pointer;
|
||||
font-size: 0.1px;
|
||||
color: white;
|
||||
transition: background 150ms;
|
||||
}
|
||||
|
||||
.control-text {
|
||||
width: auto;
|
||||
font-size: .9rem;
|
||||
padding: 0 1rem;
|
||||
font-family: 'helvetica-neue', arial, sans-serif;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.control:not(.mixitup-control-active):hover {
|
||||
background: #3f3f3f;
|
||||
}
|
||||
|
||||
.control-color:after,
|
||||
.control-shape:after,
|
||||
.control-size:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.control-color:after {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
top: calc(50% - 6px);
|
||||
left: calc(50% - 6px);
|
||||
border: 2px solid currentColor;
|
||||
border-radius: 2px;
|
||||
background: currentColor;
|
||||
transition: background-color 150ms, border-color 150ms;
|
||||
}
|
||||
|
||||
.control-color[data-filter=".green"] {
|
||||
color: #91e6c7;
|
||||
}
|
||||
|
||||
.control-color[data-filter=".blue"] {
|
||||
color: #5ecdde;
|
||||
}
|
||||
|
||||
.control-color[data-filter=".pink"] {
|
||||
color: #d595aa;
|
||||
}
|
||||
|
||||
.control-shape[data-filter=".square"]:after,
|
||||
.control-shape[data-filter=".circle"]:after {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
top: calc(50% - 5px);
|
||||
left: calc(50% - 5px);
|
||||
background: white;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.control-shape[data-filter=".circle"]:after {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.control-shape[data-filter=".triangle"]:after {
|
||||
border: 6px solid transparent;
|
||||
border-bottom: 9px solid white;
|
||||
top: calc(50% - 10px);
|
||||
left: calc(50% - 6px);
|
||||
}
|
||||
|
||||
.control-size:after {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
top: calc(50% - 4px);
|
||||
left: calc(50% - 4px);
|
||||
border: 2px solid white;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.control-size[data-filter=".medium"]:after {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
top: calc(50% - 6px);
|
||||
left: calc(50% - 6px);
|
||||
}
|
||||
|
||||
.control-size[data-filter=".large"]:after {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
top: calc(50% - 8px);
|
||||
left: calc(50% - 8px);
|
||||
}
|
||||
|
||||
.control-sort:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-top: 2px solid;
|
||||
border-left: 2px solid;
|
||||
top: calc(50% - 6px);
|
||||
left: calc(50% - 6px);
|
||||
transform: translateY(2px) rotate(45deg);
|
||||
}
|
||||
|
||||
.control-sort[data-sort*=":desc"]:after {
|
||||
transform: translateY(-3px) rotate(-135deg);
|
||||
}
|
||||
|
||||
.mixitup-control-active {
|
||||
background: #393939;
|
||||
}
|
||||
|
||||
.control:first-of-type {
|
||||
border-radius: 3px 0 0 3px;
|
||||
}
|
||||
|
||||
.control:last-of-type {
|
||||
border-radius: 0 3px 3px 0;
|
||||
}
|
||||
|
||||
/* Container
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
.container {
|
||||
padding: 1rem;
|
||||
text-align: justify;
|
||||
font-size: 0.1px;
|
||||
}
|
||||
|
||||
.container:after {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Target Elements
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
.mix,
|
||||
.gap {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.mix {
|
||||
background: #fff;
|
||||
margin-bottom: 1rem;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.mix:before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
padding-top: 100%;
|
||||
}
|
||||
|
||||
.mix.green {
|
||||
color: #91e6c7;
|
||||
}
|
||||
|
||||
.mix.pink {
|
||||
color: #d595aa;
|
||||
}
|
||||
|
||||
.mix.blue {
|
||||
color: #5ecdde;
|
||||
}
|
||||
|
||||
.mix:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.mix.square:after,
|
||||
.mix.circle:after {
|
||||
width: 40%;
|
||||
height: 40%;
|
||||
top: 30%;
|
||||
left: 30%;
|
||||
background: currentColor;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.mix.circle:after {
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
.mix.triangle:after {
|
||||
font-size: 3vw;
|
||||
border: 3em solid transparent;
|
||||
border-bottom: 5em solid currentColor;
|
||||
border-top: 0;
|
||||
left: calc(50% - 3em);
|
||||
top: calc(50% - 3em);
|
||||
}
|
||||
|
||||
.mix.medium:after {
|
||||
transform: scale(.75);
|
||||
}
|
||||
|
||||
.mix.small:after {
|
||||
transform: scale(.5);
|
||||
}
|
||||
|
||||
/* Grid Breakpoints
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
/* 2 Columns */
|
||||
|
||||
.mix,
|
||||
.gap {
|
||||
width: calc(100%/2 - (((2 - 1) * 1rem) / 2));
|
||||
}
|
||||
|
||||
/* 3 Columns */
|
||||
|
||||
@media screen and (min-width: 541px) {
|
||||
.mix,
|
||||
.gap {
|
||||
width: calc(100%/3 - (((3 - 1) * 1rem) / 3));
|
||||
}
|
||||
|
||||
.mix.triangle:after {
|
||||
font-size: 2vw;
|
||||
}
|
||||
}
|
||||
|
||||
/* 4 Columns */
|
||||
|
||||
@media screen and (min-width: 961px) {
|
||||
.mix,
|
||||
.gap {
|
||||
width: calc(100%/4 - (((4 - 1) * 1rem) / 4));
|
||||
}
|
||||
|
||||
.mix.triangle:after {
|
||||
font-size: 1.5vw;
|
||||
}
|
||||
}
|
||||
|
||||
/* 5 Columns */
|
||||
|
||||
@media screen and (min-width: 1281px) {
|
||||
.mix,
|
||||
.gap {
|
||||
width: calc(100%/5 - (((5 - 1) * 1rem) / 5));
|
||||
}
|
||||
|
||||
.mix.triangle:after {
|
||||
font-size: 1.25vw;
|
||||
}
|
||||
}
|
||||
|
||||
/* 6 Columns */
|
||||
|
||||
@media screen and (min-width: 1401px) {
|
||||
.mix,
|
||||
.gap {
|
||||
width: calc(100%/6 - (((6 - 1) * 1rem) / 6));
|
||||
}
|
||||
|
||||
.mix.triangle:after {
|
||||
font-size: 1vw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user