Skip to content

Commit

Permalink
feat(core): Icon 2.0.0
Browse files Browse the repository at this point in the history
* **core** new global function `icon()`.
* **core** add support for `tabler` icons.
* **core** add support for `bootstrap` icons.
* **shortcode** add shortcode for `[icon]`.

### BREAKING CHANGES

* use new global function `icon()`.

    docs: https://github.com/flextype-plugins/icon

affected plugins: account, accounts-admin, admin, form, form-admin, icon, themes-admin
  • Loading branch information
Awilum committed Jan 7, 2021
1 parent 7033956 commit deab68b
Show file tree
Hide file tree
Showing 12 changed files with 2,810 additions and 194 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
<a name="2.0.0"></a>
# [2.0.0](https://github.com/flextype-plugins/icon/compare/v1.7.0...v2.0.0) (2021-01-03)

### Features

* **core** new global function `icon()`.
* **core** add support for `tabler` icons.
* **core** add support for `bootstrap` icons.
* **shortcode** add shortcode for `[icon]`.

### BREAKING CHANGES

* use new global function `icon()`.

docs: https://github.com/flextype-plugins/icon

affected plugins: account, accounts-admin, admin, form, form-admin, icon, themes-admin


<a name="1.7.0"></a>
# [1.7.0](https://github.com/flextype-plugins/icon/compare/v1.6.0...v1.7.0) (2021-01-03)

Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,31 @@ This plugin currently contains 3 primary SVG icon sets:
* [Bootstrap Icons](https://icons.getbootstrap.com) - A set of 1200+ free high-quality SVG icons by [Bootstrap Team](https://getbootstrap.com/docs/5.0/about/team/)
* [Tabler Icons](https://tablericons.com/) - A set of 950+ free high-quality SVG icons by [Csaba Kissi](https://twitter.com/csaba_kissi)

### Dependencies
## Dependencies

The following dependencies need to be installed for Icon Plugin.

### System
## System

| Item | Version | Download |
|---|---|---|
| [flextype](https://github.com/flextype/flextype) | 0.9.15 | [download](https://github.com/flextype/flextype/releases) |
| [twig](https://github.com/flextype-plugins/twig) | >=2.0.0 | [download](https://github.com/flextype-plugins/twig/releases) |

### Installation
## Installation

1. Download & Install all required dependencies.
2. Create new folder `/project/plugins/icon`
3. Download Icon Plugin and unzip plugin content to the folder `/project/plugins/icon`

### Settings
## Settings

| Key | Value | Description |
|---|---|---|
| enabled | true | true or false to disable the plugin |
| priority | 1 | Icon plugin priority |

### Documentation
## Documentation

Global function `icon()`

Expand All @@ -57,7 +57,7 @@ Global function `icon()`
function icon(string $name, ?string $set = 'fontawesome|solid', ?string $class = null): string
```

#### Usage
### Usage

**Display icon in the twig templates**

Expand All @@ -76,6 +76,6 @@ function icon(string $name, ?string $set = 'fontawesome|solid', ?string $class =
echo icon('apple', 'fontawesome|brands');
```

### LICENSE
## LICENSE
[The MIT License (MIT)](https://github.com/flextype-plugins/icon/blob/master/LICENSE.txt)
Copyright (c) 2021 [Sergey Romanenko](https://github.com/Awilum)
51 changes: 0 additions & 51 deletions app/Models/Icon.php

This file was deleted.

35 changes: 0 additions & 35 deletions bootstrap.php

This file was deleted.

36 changes: 0 additions & 36 deletions composer.json

This file was deleted.

17 changes: 0 additions & 17 deletions dependencies.php

This file was deleted.

28 changes: 23 additions & 5 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,34 @@
const gulp = require('gulp');

/**
* Task: gulp fontawesome-icons
* Task: gulp fontawesome
*/
gulp.task('fontawesome-icons', function(){
return gulp.src(['node_modules/@fortawesome/fontawesome-free/svgs/**/*'])
.pipe(gulp.dest('assets/dist/fontawesome/svgs'));
gulp.task('fontawesome', function(){
return gulp.src(['node_modules/@fortawesome/fontawesome-free/svgs/**/*.svg'])
.pipe(gulp.dest('assets/dist/fontawesome/icons'));
});

/**
* Task: gulp tabler
*/
gulp.task('tabler', function(){
return gulp.src(['node_modules/@tabler/icons/icons/**/*.svg'])
.pipe(gulp.dest('assets/dist/tabler/icons'));
});

/**
* Task: gulp bootstrap
*/
gulp.task('bootstrap', function(){
return gulp.src(['node_modules/bootstrap-icons/icons/**/*.svg'])
.pipe(gulp.dest('assets/dist/bootstrap/icons'));
});

/**
* Task: gulp default
*/
gulp.task('default', gulp.series(
'fontawesome-icons'
'fontawesome',
'bootstrap',
'tabler'
));
Loading

0 comments on commit deab68b

Please sign in to comment.