{"id":20011163,"url":"https://github.com/dolphiq/craft3-iconpicker","last_synced_at":"2025-05-04T20:30:56.147Z","repository":{"id":56970842,"uuid":"102602526","full_name":"Dolphiq/craft3-iconpicker","owner":"Dolphiq","description":"Craft plugin that provides a new field type that offers end users an easy way to pick an icon from a .woff or .ttf font file. You can easily use ionicons or font awesome icons or any other compatible font file.","archived":false,"fork":false,"pushed_at":"2023-03-08T22:14:12.000Z","size":131,"stargazers_count":15,"open_issues_count":10,"forks_count":11,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-26T03:03:30.687Z","etag":null,"topics":["craft3","craftcms","craftcms-plugin","font","iconpicker-field","icons","plugin"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dolphiq.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-06T11:52:46.000Z","updated_at":"2024-06-21T17:51:10.194Z","dependencies_parsed_at":"2024-06-21T17:51:08.357Z","dependency_job_id":"b69eface-0f8f-4a5b-81c6-8fb236b73603","html_url":"https://github.com/Dolphiq/craft3-iconpicker","commit_stats":{"total_commits":23,"total_committers":3,"mean_commits":7.666666666666667,"dds":0.5217391304347826,"last_synced_commit":"0a5b84537092366c9dd521476c2ab084ae8b5e46"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dolphiq%2Fcraft3-iconpicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dolphiq%2Fcraft3-iconpicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dolphiq%2Fcraft3-iconpicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dolphiq%2Fcraft3-iconpicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dolphiq","download_url":"https://codeload.github.com/Dolphiq/craft3-iconpicker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252395203,"owners_count":21740986,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["craft3","craftcms","craftcms-plugin","font","iconpicker-field","icons","plugin"],"created_at":"2024-11-13T07:24:36.178Z","updated_at":"2025-05-04T20:30:55.710Z","avatar_url":"https://github.com/Dolphiq.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Iconpicker plugin for Craft CMS 3.x\n\n## Currently the project is *DISCONTINUED*. However, feel free to fork it and continue its development!\n\nCraft plugin that provides a new field type that offers users an easy way to pick an icon from a .woff or .ttf font file.\nYou can easily use ionicons or font awesome icons\n\n**Note**: This plugin may become a paid add-on when the Craft Plugin store becomes available.\n\n## Requirements\n* Craft 3.0 (beta 20)+\n* PHP 7.0+\n* PhenX PHP Font Lib\n* One or more .ttf or .woff files\n\n## Example\n\n### Example of the field usage in the template for a cms user\n![Screenshot](resources/screenshots/field_example.png)\n\n### Example of the selection popup\n![Screenshot](resources/screenshots/popup_example.png)\n\n## Installation\n1. Install with Composer\n    \n       composer require dolphiq/iconpicker\n       \n2. Install plugin in the Craft Control Panel under Settings \u003e Plugins\n\n3. Add the plugin assets to your application by adding the following line at the begin of your template:\n        \n        {% do view.registerAssetBundle(\"plugins\\\\dolphiq\\\\iconpicker\\\\assets\\\\sharedAsset\") %}\n        \n4. Add the fonts you want to the following directory \n        \n        /vendor/dolphiq/iconpicker/src/resources-shared/fonts\n               \n5. The `Iconpicker Field` type will be available when adding a new field - Settings \u003e Fields \u003e Add new field\n\n## Creating a field with the iconpicker field type\n1. Choose the `Iconpicker Field` type\n2. When adding a new field with the `Iconpicker Field` type, you can choose which font you want to use for that field from the dropdown\n\n## Using the iconpicker field type\n1. Add the field to a field layout (for example to a section)\n2. You can now choose an icon when creating or updating a section\n\n## Usage sample in twig template\n\n### Quick example code\n        {% do view.registerAssetBundle(\"plugins\\\\dolphiq\\\\iconpicker\\\\assets\\\\sharedAsset\") %}\n        \u003chtml style=\"padding: 0; margin: 0;\"\u003e\n        \u003chead\u003e\n            \u003ctitle\u003e\u003c/title\u003e\n\n            {{ head() }}\n\n        \u003c/head\u003e\n\n        \u003cbody\u003e\n\n        {{ beginBody() }}\n\n        {% if entry.iconPickerField.icon %}\n            Hex: {{ entry.iconPickerField.icon }}\u003cbr\u003e\n            {{ entry.iconPickerField.iconSpan|raw }}\n        {% endif %}\n\n        {{ endBody() }}\n\n        \u003c/body\u003e\n        \u003c/html\u003e\n\nDisplay an icon with a custom class:\n\n    \u003cspan class='{{ entry.iconClass }} myCustomClass'\u003e{{ entry.iconChar }}\u003c/span\u003e\n\n\n##### Properties of the icon field\n1. Get the icon unicode (decimal) \n    \n       {{ entry.fieldName.icon }}\n    \n2. Get the icon unicode (hexadecimal) \n\n       {{ entry.fieldName.iconHex }}\n       \n3. Display the icon as html character `\u0026#00000`\n\n       {{ entry.fieldName.iconChar|raw }}\n       \n4. Display the icon as html character hex `\u0026#xf100` \n\n       {{ entry.fieldName.iconCharHex|raw }}\n       \n5. Display the icon as span with character and font class \n\n       {{ entry.fieldName.iconSpan|raw }}\n       \n6. Get the icon font class \n       \n       {{ entry.fieldName.iconClass }}\n       \n7. Conditional example of showing icon only when it is set\n\n       {% if entry.fieldName.icon %}\n            {{ entry.fieldName.iconSpan|raw }}\n       {% endif %}\n\n## Iconpicker Roadmap\n- Select and upload the fonts in the UI\n- Enable (name) search while picking an icon\n\n### Contributors \u0026 Developers\nLucas Weijers - Original developer\nJohan Zandstra - Minor changes\nBrought to you by [Dolphiq](Https://dolphiq.nl) info@dolphiq.nl\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdolphiq%2Fcraft3-iconpicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdolphiq%2Fcraft3-iconpicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdolphiq%2Fcraft3-iconpicker/lists"}