mirror of
https://github.com/iconify/iconify.git
synced 2024-12-14 22:46:06 +00:00
244 lines
5.7 KiB
HTML
244 lines
5.7 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>Iconify Demo: Usage</title>
|
|
<style>
|
|
html,
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
background: #fff;
|
|
color: #000;
|
|
}
|
|
body {
|
|
padding: 8px;
|
|
font-size: 16px;
|
|
line-height: 24px;
|
|
}
|
|
p {
|
|
margin: 0;
|
|
padding: 8px;
|
|
}
|
|
p:nth-child(2n) {
|
|
background-color: #f8f8f8;
|
|
}
|
|
:where(p:hover) .iconify {
|
|
color: green;
|
|
}
|
|
.iconify:hover {
|
|
color: red;
|
|
}
|
|
</style>
|
|
<script>
|
|
IconifyPreload = [
|
|
{
|
|
prefix: 'test',
|
|
icons: {
|
|
icon: {
|
|
body: '<mask id="coffee-mask" x="0" y="0" width="16" height="16"><g fill="white"><path d="M5-2c0 2-2 2-2 4s2 2 2 4-2 2-2 4 2 2 2 4M8.5-2c0 2-2 2-2 4s2 2 2 4-2 2-2 4 2 2 2 4M12-2c0 2-2 2-2 4s2 2 2 4-2 2-2 4 2 2 2 4" stroke="white" stroke-width="1" fill="none"><animateMotion path="M0 0v-8" calcMode="linear" dur="3s" repeatCount="indefinite" /></path></g><rect y="4" width="16" height="12" fill="black" /><path d="M2 5H13C14.1046 5 15 5.89543 15 7V8C15 9.10457 14.1046 10 13 10H12V14C12 15.1046 11.1046 16 10 16H4C2.89543 16 2 15.1046 2 14V5Z" fill="white" /><path d="M12 6H13C13.5523 6 14 6.44772 14 7V8C14 8.55228 13.5523 9 13 9H12V6Z" fill="black" /></mask><rect mask="url(#coffee-mask)" width="16" height="16" fill="currentColor" />',
|
|
},
|
|
},
|
|
},
|
|
];
|
|
</script>
|
|
<script src="../dist/iconify.min.js"></script>
|
|
</head>
|
|
<body>
|
|
<p>
|
|
This is a simple HTML page with few icons.<br />
|
|
There are 2 entries for each sample: one as inline SVG, one using
|
|
style.
|
|
</p>
|
|
<p>
|
|
Icons that behave like images:
|
|
<span class="iconify" data-icon="bi:house-door"></span>
|
|
<span
|
|
class="iconify"
|
|
data-icon="bi:house-door"
|
|
data-mode="style"
|
|
></span>
|
|
<i class="iconify" data-icon="cif:ee"></i>
|
|
<i class="iconify" data-icon="cif:ee" data-mode="style"></i>
|
|
</p>
|
|
<p>
|
|
Icon that behaves like an glyph (aligned to bottom of this text):
|
|
<span class="iconify-inline" data-icon="bi:house-door"></span>
|
|
<span
|
|
class="iconify-inline"
|
|
data-icon="bi:house-door"
|
|
data-mode="style"
|
|
></span>
|
|
<i class="iconify-inline" data-icon="cif:ee"></i>
|
|
<i class="iconify-inline" data-icon="cif:ee" data-mode="style"></i>
|
|
</p>
|
|
<p>
|
|
Changing icon color:
|
|
<span
|
|
class="iconify-inline"
|
|
style="color: red"
|
|
data-icon="bi:house-door"
|
|
></span>
|
|
<span
|
|
class="iconify-inline"
|
|
style="color: red"
|
|
data-icon="bi:house-door"
|
|
data-mode="style"
|
|
></span>
|
|
</p>
|
|
<p>
|
|
Big icon (showing various ways to do it):
|
|
<span
|
|
class="iconify-inline"
|
|
data-icon="bi:person-lines-fill"
|
|
style="font-size: 2em"
|
|
></span>
|
|
<span
|
|
class="iconify-inline"
|
|
data-icon="bi:person-lines-fill"
|
|
style="font-size: 2em"
|
|
data-mode="style"
|
|
></span>
|
|
<span
|
|
class="iconify-inline"
|
|
data-icon="bi:person-lines-fill"
|
|
data-height="2em"
|
|
></span>
|
|
<span
|
|
class="iconify-inline"
|
|
data-icon="bi:person-lines-fill"
|
|
data-height="2em"
|
|
data-mode="style"
|
|
></span>
|
|
<span
|
|
class="iconify-inline"
|
|
data-icon="bi:person-lines-fill"
|
|
data-height="unset"
|
|
style="height: 32px"
|
|
></span>
|
|
<br />
|
|
Icons above should be aligned differently because they have
|
|
different font-size. Vertical alignment is relative to font size.
|
|
</p>
|
|
<p>
|
|
Big icon (showing various ways to do it):
|
|
<span
|
|
class="iconify"
|
|
data-icon="bi:person-lines-fill"
|
|
style="font-size: 2em"
|
|
></span>
|
|
<span
|
|
class="iconify"
|
|
data-icon="bi:person-lines-fill"
|
|
style="font-size: 2em"
|
|
data-mode="style"
|
|
></span>
|
|
<span
|
|
class="iconify"
|
|
data-icon="bi:person-lines-fill"
|
|
data-height="2em"
|
|
></span>
|
|
<span
|
|
class="iconify"
|
|
data-icon="bi:person-lines-fill"
|
|
data-height="2em"
|
|
data-mode="style"
|
|
></span>
|
|
<span
|
|
class="iconify"
|
|
data-icon="bi:person-lines-fill"
|
|
data-width="none"
|
|
style="height: 32px"
|
|
></span>
|
|
<br />
|
|
Icons above should be aligned identically because they are not using
|
|
inline mode.
|
|
</p>
|
|
<p>
|
|
Rotation:
|
|
<span class="iconify-inline" data-icon="bi:image"></span>
|
|
<span
|
|
class="iconify-inline"
|
|
data-icon="bi:image"
|
|
data-mode="style"
|
|
></span>
|
|
<span
|
|
class="iconify-inline"
|
|
data-icon="bi:image"
|
|
data-rotate="1"
|
|
></span>
|
|
<span
|
|
class="iconify-inline"
|
|
data-icon="bi:image"
|
|
data-rotate="1"
|
|
data-mode="style"
|
|
></span>
|
|
<span
|
|
class="iconify-inline"
|
|
data-icon="bi:image"
|
|
data-rotate="180deg"
|
|
></span>
|
|
<span
|
|
class="iconify-inline"
|
|
data-icon="bi:image"
|
|
data-rotate="180deg"
|
|
data-mode="style"
|
|
></span>
|
|
<span
|
|
class="iconify-inline"
|
|
data-icon="bi:image"
|
|
data-rotate="75%"
|
|
></span>
|
|
<span
|
|
class="iconify-inline"
|
|
data-icon="bi:image"
|
|
data-rotate="75%"
|
|
data-mode="style"
|
|
></span>
|
|
</p>
|
|
<p>
|
|
Flip:
|
|
<span class="iconify-inline" data-icon="test:icon"></span>
|
|
<span
|
|
class="iconify-inline"
|
|
data-icon="test:icon"
|
|
data-mode="style"
|
|
></span>
|
|
<span
|
|
class="iconify-inline"
|
|
data-icon="test:icon"
|
|
data-flip="horizontal"
|
|
></span>
|
|
<span
|
|
class="iconify-inline"
|
|
data-icon="test:icon"
|
|
data-flip="horizontal"
|
|
data-mode="style"
|
|
></span>
|
|
<span
|
|
class="iconify-inline"
|
|
data-icon="test:icon"
|
|
data-flip="vertical"
|
|
></span>
|
|
<span
|
|
class="iconify-inline"
|
|
data-icon="test:icon"
|
|
data-flip="vertical"
|
|
data-mode="style"
|
|
></span>
|
|
<span
|
|
class="iconify-inline"
|
|
data-icon="test:icon"
|
|
data-flip="horizontal,vertical"
|
|
></span>
|
|
<span
|
|
class="iconify-inline"
|
|
data-icon="test:icon"
|
|
data-flip="horizontal,vertical"
|
|
data-mode="style"
|
|
></span>
|
|
</p>
|
|
</body>
|
|
</html>
|