system-uicons/src/index.html

391 lines
11 KiB
HTML
Raw Normal View History

2020-05-25 12:01:32 +02:00
<!DOCTYPE html>
<html lang="en">
<head>
2020-05-25 16:10:26 +02:00
<title>System UIcons</title>
2020-05-25 12:01:32 +02:00
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
2020-05-25 15:07:46 +02:00
<link
href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;700&display=swap"
rel="stylesheet"
/>
2020-05-25 12:44:09 +02:00
<script
src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.3.5/dist/alpine.min.js"
defer
></script>
2020-05-25 12:01:32 +02:00
</head>
2020-05-25 15:07:46 +02:00
<body
2020-05-25 15:59:48 +02:00
class="bg-white font-mono leading-normal tracking-normal"
2020-05-25 15:07:46 +02:00
x-data="loadIcons()"
>
2020-05-25 15:59:48 +02:00
<div class="bg-white px-8 py-4">
<input
onFocus="this.select()"
autofocus="autofocus"
x-ref="searchField"
x-model="search"
x-on:keydown.window.prevent.slash="$refs.searchField.focus()"
placeholder="Search 420 System UIcons"
type="text"
2020-05-25 16:32:37 +02:00
name="search"
value=""
2020-05-25 15:59:48 +02:00
autocapitalize="off"
autocomplete="off"
autocorrect="off"
spellcheck="false"
class="flex flex-1 w-full py-4 focus:outline-none placeholder-gray-400 appearance-none text-black focus:text-black tracking-tighter text-xl lg:text-3xl xl:text-5xl"
/>
<div
2020-05-26 04:50:53 +02:00
class="flex flex-col space-y-4 md:space-y-0 md:flex-row border-t border-gray-300 bg-white pt-4"
2020-05-25 15:59:48 +02:00
>
<label class="inline-flex items-center">
<input
type="radio"
2020-05-26 03:33:49 +02:00
class="form-radio text-green-600"
2020-05-25 15:59:48 +02:00
name="clickType"
value="copy"
checked
/>
<span class="ml-2">Copy SVG Code</span>
</label>
2020-05-26 04:50:53 +02:00
<label class="inline-flex items-center md:ml-6">
<input
type="radio"
class="form-radio text-green-600"
name="clickType"
value="link"
/>
<span class="ml-2">&lt;img/&gt; Link</span>
</label>
<label class="inline-flex items-center md:ml-6">
2020-05-25 15:59:48 +02:00
<input
type="radio"
2020-05-26 03:33:49 +02:00
class="form-radio text-green-600"
2020-05-25 15:59:48 +02:00
name="clickType"
value="download"
/>
<span class="ml-2">Download SVGs</span>
</label>
<button
2020-05-26 04:50:53 +02:00
class="flex flex-row items-center ml-auto p-3 rounded bg-black text-white hover:bg-gray-900 w-full md:w-auto"
2020-05-25 15:59:48 +02:00
>
2020-05-26 03:33:49 +02:00
<span class="mr-4">
<svg
height="21"
viewBox="0 0 21 21"
width="21"
xmlns="http://www.w3.org/2000/svg"
>
<g
fill="none"
fill-rule="evenodd"
stroke="currentcolor"
stroke-linecap="round"
stroke-linejoin="round"
transform="translate(4 3)"
>
<path
d="m9.221 4.716.165 5.821-5.792-.135"
transform="matrix(-.70710678 .70710678 .70710678 .70710678 5.685139 -2.354861)"
/>
<path d="m6.5.5v11" />
<path d="m.5 14.5h12" />
</g>
</svg>
</span>
2020-05-25 15:59:48 +02:00
Download All SVGs
</button>
</div>
</div>
2020-05-25 15:07:46 +02:00
<div
class="p-8 grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 xl:grid-cols-7 gap-4"
>
<template x-for="item in filteredIcons" :key="item">
<a
2020-05-25 15:59:48 +02:00
href="#"
2020-05-25 16:39:19 +02:00
class="flex flex-col items-center justify-center text-gray-700 rounded shadow hover:shadow-xl bg-white cursor-pointer transition duration-150 ease-in-out h-48"
2020-05-25 15:07:46 +02:00
>
<p
class="text-xs leading-none text-center mt-8"
x-text="item.icon_name"
></p>
2020-05-26 04:50:53 +02:00
<span class="hidden" x-text="item.icon_keywords"></span>
2020-05-25 15:07:46 +02:00
</a>
</template>
2020-05-25 12:01:32 +02:00
</div>
2020-05-25 16:34:08 +02:00
<footer class="py-8 mx-8 border-t border-gray-300 text-gray-600">
2020-05-25 15:59:48 +02:00
Project by
<a
href="https://twitter.com/CoreyGinnivan"
2020-05-25 16:10:26 +02:00
rel="noreferrer"
2020-05-25 15:59:48 +02:00
target="_blank"
2020-05-25 16:34:08 +02:00
class="text-black hover:underline"
2020-05-25 15:59:48 +02:00
>Corey Ginnivan</a
>
</footer>
2020-05-25 12:44:09 +02:00
<script>
var sourceData = [
{
id: "1",
2020-05-25 15:07:46 +02:00
icon_name: "Cog",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "cog, settings",
2020-05-25 12:44:09 +02:00
},
{
id: "2",
2020-05-25 15:07:46 +02:00
icon_name: "User",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "user, people, person, avatar",
2020-05-25 12:44:09 +02:00
},
{
id: "3",
2020-05-25 15:07:46 +02:00
icon_name: "Heart",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "heart, love, beating",
2020-05-25 12:44:09 +02:00
},
{
id: "4",
2020-05-25 15:07:46 +02:00
icon_name: "Filter",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "filter, filtering",
2020-05-25 12:44:09 +02:00
},
{
id: "5",
2020-05-25 15:07:46 +02:00
icon_name: "Add",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "add, plus",
2020-05-25 12:44:09 +02:00
},
{
id: "6",
2020-05-25 15:07:46 +02:00
icon_name: "Minus",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "minus, negative",
2020-05-25 12:44:09 +02:00
},
{
id: "7",
2020-05-25 15:07:46 +02:00
icon_name: "Remove",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 12:44:09 +02:00
},
{
id: "8",
2020-05-25 15:07:46 +02:00
icon_name: "Email",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 12:44:09 +02:00
},
{
id: "9",
2020-05-25 15:07:46 +02:00
icon_name: "Battery",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 12:44:09 +02:00
},
{
id: "10",
2020-05-25 15:07:46 +02:00
icon_name: "Battery - Empty",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 12:44:09 +02:00
},
{
id: "11",
2020-05-25 15:07:46 +02:00
icon_name: "Battery - Half",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 12:44:09 +02:00
},
{
id: "12",
2020-05-25 15:07:46 +02:00
icon_name: "Battery - Full",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 12:44:09 +02:00
},
{
id: "13",
2020-05-25 15:07:46 +02:00
icon_name: "Dashboard",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 12:44:09 +02:00
},
{
id: "14",
2020-05-25 15:07:46 +02:00
icon_name: "External",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 12:44:09 +02:00
},
{
id: "15",
2020-05-25 15:07:46 +02:00
icon_name: "Send",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 12:44:09 +02:00
},
{
id: "16",
2020-05-25 15:07:46 +02:00
icon_name: "Favourite",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 12:44:09 +02:00
},
{
id: "17",
2020-05-25 15:07:46 +02:00
icon_name: "News",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 12:44:09 +02:00
},
{
id: "18",
2020-05-25 15:07:46 +02:00
icon_name: "Copy",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 12:44:09 +02:00
},
{
id: "19",
2020-05-25 15:07:46 +02:00
icon_name: "Duplicate",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 12:44:09 +02:00
},
{
id: "20",
2020-05-25 15:07:46 +02:00
icon_name: "3D",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 12:44:09 +02:00
},
{
id: "21",
2020-05-25 15:07:46 +02:00
icon_name: "Cog",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 12:44:09 +02:00
},
{
id: "22",
2020-05-25 15:07:46 +02:00
icon_name: "User",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 12:44:09 +02:00
},
{
id: "23",
2020-05-25 15:07:46 +02:00
icon_name: "Heart",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 12:44:09 +02:00
},
{
id: "24",
2020-05-25 15:07:46 +02:00
icon_name: "Filter",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 15:07:46 +02:00
},
{
id: "25",
icon_name: "Add",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 15:07:46 +02:00
},
{
id: "26",
icon_name: "Minus",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 15:07:46 +02:00
},
{
id: "27",
icon_name: "Remove",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 15:07:46 +02:00
},
{
id: "28",
icon_name: "Email",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 15:07:46 +02:00
},
{
id: "29",
icon_name: "Battery",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 15:07:46 +02:00
},
{
id: "30",
icon_name: "Battery - Empty",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 15:07:46 +02:00
},
{
id: "31",
icon_name: "Battery - Half",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 15:07:46 +02:00
},
{
id: "32",
icon_name: "Battery - Full",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 15:07:46 +02:00
},
{
id: "33",
icon_name: "Dashboard",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 15:07:46 +02:00
},
{
id: "34",
icon_name: "External",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 15:07:46 +02:00
},
{
id: "35",
icon_name: "Send",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 15:07:46 +02:00
},
{
id: "36",
icon_name: "Favourite",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 15:07:46 +02:00
},
{
id: "37",
icon_name: "News",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 15:07:46 +02:00
},
{
id: "38",
icon_name: "Copy",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 15:07:46 +02:00
},
{
id: "39",
icon_name: "Duplicate",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 15:07:46 +02:00
},
{
id: "40",
icon_name: "3D",
2020-05-26 04:50:53 +02:00
icon_path: "https://randomuser.me/api/portraits/men/1.jpg",
icon_keywords: "copy",
2020-05-25 12:44:09 +02:00
},
];
2020-05-25 15:07:46 +02:00
function loadIcons() {
2020-05-25 12:44:09 +02:00
return {
search: "",
myForData: sourceData,
2020-05-25 15:07:46 +02:00
get filteredIcons() {
2020-05-25 12:44:09 +02:00
if (this.search === "") {
return this.myForData;
}
return this.myForData.filter((item) => {
2020-05-26 04:50:53 +02:00
return item.icon_keywords
2020-05-25 12:44:09 +02:00
.toLowerCase()
.includes(this.search.toLowerCase());
});
},
};
}
</script>
2020-05-25 12:01:32 +02:00
</body>
</html>