Skip to content

Commit deab68b

Browse files
committed
feat(core): Icon 2.0.0
* **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
1 parent 7033956 commit deab68b

File tree

12 files changed

+2810
-194
lines changed

12 files changed

+2810
-194
lines changed

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
<a name="2.0.0"></a>
2+
# [2.0.0](https://github.com/flextype-plugins/icon/compare/v1.7.0...v2.0.0) (2021-01-03)
3+
4+
### Features
5+
6+
* **core** new global function `icon()`.
7+
* **core** add support for `tabler` icons.
8+
* **core** add support for `bootstrap` icons.
9+
* **shortcode** add shortcode for `[icon]`.
10+
11+
### BREAKING CHANGES
12+
13+
* use new global function `icon()`.
14+
15+
docs: https://github.com/flextype-plugins/icon
16+
17+
affected plugins: account, accounts-admin, admin, form, form-admin, icon, themes-admin
18+
19+
120
<a name="1.7.0"></a>
221
# [1.7.0](https://github.com/flextype-plugins/icon/compare/v1.6.0...v1.7.0) (2021-01-03)
322

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,31 @@ This plugin currently contains 3 primary SVG icon sets:
1111
* [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/)
1212
* [Tabler Icons](https://tablericons.com/) - A set of 950+ free high-quality SVG icons by [Csaba Kissi](https://twitter.com/csaba_kissi)
1313

14-
### Dependencies
14+
## Dependencies
1515

1616
The following dependencies need to be installed for Icon Plugin.
1717

18-
### System
18+
## System
1919

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

25-
### Installation
25+
## Installation
2626

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

31-
### Settings
31+
## Settings
3232

3333
| Key | Value | Description |
3434
|---|---|---|
3535
| enabled | true | true or false to disable the plugin |
3636
| priority | 1 | Icon plugin priority |
3737

38-
### Documentation
38+
## Documentation
3939

4040
Global function `icon()`
4141

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

60-
#### Usage
60+
### Usage
6161

6262
**Display icon in the twig templates**
6363

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

79-
### LICENSE
79+
## LICENSE
8080
[The MIT License (MIT)](https://github.com/flextype-plugins/icon/blob/master/LICENSE.txt)
8181
Copyright (c) 2021 [Sergey Romanenko](https://github.com/Awilum)

app/Models/Icon.php

Lines changed: 0 additions & 51 deletions
This file was deleted.

bootstrap.php

Lines changed: 0 additions & 35 deletions
This file was deleted.

composer.json

Lines changed: 0 additions & 36 deletions
This file was deleted.

dependencies.php

Lines changed: 0 additions & 17 deletions
This file was deleted.

gulpfile.js

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,34 @@
11
const gulp = require('gulp');
22

33
/**
4-
* Task: gulp fontawesome-icons
4+
* Task: gulp fontawesome
55
*/
6-
gulp.task('fontawesome-icons', function(){
7-
return gulp.src(['node_modules/@fortawesome/fontawesome-free/svgs/**/*'])
8-
.pipe(gulp.dest('assets/dist/fontawesome/svgs'));
6+
gulp.task('fontawesome', function(){
7+
return gulp.src(['node_modules/@fortawesome/fontawesome-free/svgs/**/*.svg'])
8+
.pipe(gulp.dest('assets/dist/fontawesome/icons'));
9+
});
10+
11+
/**
12+
* Task: gulp tabler
13+
*/
14+
gulp.task('tabler', function(){
15+
return gulp.src(['node_modules/@tabler/icons/icons/**/*.svg'])
16+
.pipe(gulp.dest('assets/dist/tabler/icons'));
17+
});
18+
19+
/**
20+
* Task: gulp bootstrap
21+
*/
22+
gulp.task('bootstrap', function(){
23+
return gulp.src(['node_modules/bootstrap-icons/icons/**/*.svg'])
24+
.pipe(gulp.dest('assets/dist/bootstrap/icons'));
925
});
1026

1127
/**
1228
* Task: gulp default
1329
*/
1430
gulp.task('default', gulp.series(
15-
'fontawesome-icons'
31+
'fontawesome',
32+
'bootstrap',
33+
'tabler'
1634
));

0 commit comments

Comments
 (0)