mirror of
https://github.com/feathericons/feather.git
synced 2023-08-10 21:13:24 +03:00
Add search to home page (#197)
This commit is contained in:
parent
5d6740d0d3
commit
f642639f0c
3
_data/tags.yml
Normal file
3
_data/tags.yml
Normal file
@ -0,0 +1,3 @@
|
||||
bell: notification
|
||||
bell-off: notification-off
|
||||
check: tick
|
@ -1,3 +1,4 @@
|
||||
{% assign tags = site.data.tags[include.icon.basename] | split: ", " | join " " %}
|
||||
<li>
|
||||
<a
|
||||
href="{{ include.icon.path }}"
|
||||
@ -5,6 +6,7 @@
|
||||
download
|
||||
onclick="ga('send', 'event', 'download', 'click', '{{ include.icon.basename }}');">
|
||||
<span class="svg flex-none lh-none">{% include_relative {{ include.icon.path }} %}</span>
|
||||
<span class="ml3 lh-copy f6 f5-ns tc black-60 ellipse">{{ include.icon.basename }}</span>
|
||||
<span class="icon-name ml3 lh-copy f6 f5-ns tc black-60 ellipse">{{ include.icon.basename }}</span>
|
||||
<span class="icon-tags dn">{{tags}}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -1,4 +1,9 @@
|
||||
<div class="w-80 mw8 center">
|
||||
<div class="w-80 mw8 center" id="js-icons">
|
||||
<input
|
||||
type="search"
|
||||
class="search fuzzy-search input-reset w-100 mb3 pv3 ph3 ph4-ns rubik f5 lh-copy bg-white br1 ba b--black-20"
|
||||
placeholder="Search"
|
||||
/>
|
||||
<ul class="icon-grid mv0 pl0 list">
|
||||
{% for file in site.static_files %}
|
||||
{% if file.path contains 'dist/icons/' %}
|
||||
|
@ -45,5 +45,12 @@ links:
|
||||
{% include icons.html %}
|
||||
{% include footer.html links=page.links %}
|
||||
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/list.js/1.5.0/list.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var list = new List('js-icons', {
|
||||
valueNames: [ 'icon-name', 'icon-tags' ]
|
||||
})
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user