Skip to content

Commit

Permalink
Update ru icons & README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
JaJuMa committed Jun 16, 2023
1 parent ee60fa5 commit dab382c
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 5 deletions.
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Hyvä Flags extension by [JaJuMa](https://www.jajuma.de/de/jajuma-shop/online-sh

The module includes:
* Square Flag Icons (1:1 ratio)
* Rectangle Flag Icons (4:3 ratio) &
* Rectangle Flag Icons (3:2 + 4:3 ratio)
* Official Flag Sizes &
* Circle Flag Icons


Expand Down Expand Up @@ -38,11 +39,13 @@ composer require jajuma/hyva-flags

### How to use country & language flag icons in Hyvä Themes in view models

JaJuMa "Hyvä Flags" module provides 3 view models:
JaJuMa "Hyvä Flags" module provides 5 view models:

* `Flagicons11`
* `Flagicons32`
* `Flagicons43`
* `FlagiconsCircle`
* `FlagiconsOfficial`

Require one of the view models in your template:

Expand All @@ -51,13 +54,21 @@ Require one of the view models in your template:
$flagicons11 = $viewModels->require(\Jajuma\HyvaFlags\ViewModel\Flagicons11::class);
```
```
/** @var \Jajuma\HyvaFlags\ViewModel\Flagicons32 $flagicons32 */
$flagicons32 = $viewModels->require(\Jajuma\HyvaFlags\ViewModel\Flagicons32::class);
```
```
/** @var \Jajuma\HyvaFlags\ViewModel\Flagicons43 $flagicons43 */
$flagicons43 = $viewModels->require(\Jajuma\HyvaFlags\ViewModel\Flagicons43::class);
```
```
/** @var \Jajuma\HyvaFlags\ViewModel\FlagiconsCircle $flagiconscircle */
$flagiconscircle = $viewModels->require(\Jajuma\HyvaFlags\ViewModel\FlagiconsCircle::class);
```
```
/** @var \Jajuma\HyvaFlags\ViewModel\FlagiconsOfficial $flagiconsofficial */
$flagiconsofficial = $viewModels->require(\Jajuma\HyvaFlags\ViewModel\FlagiconsOfficial::class);
```

Then render the icons like this:
```
Expand Down Expand Up @@ -104,8 +115,10 @@ The code is licensed under the [MIT License (MIT)](https://github.com/JaJuMa/Hyv
## Credits

Credits for the SVG icons:
* Square & Rectangle Format: [@lipis](https://github.com/lipis/flag-icons)
* Square & Rectangle Format 4:3: [@lipis](https://github.com/lipis/flag-icons)
* Rectangle Format 3:2: [@catamphetamine](https://github.com/catamphetamine/country-flag-icons)
* Circle format: [@HatScripts](https://github.com/HatScripts/circle-flag)
* Official sizes: [@hampusborgos](https://github.com/hampusborgos/country-flags)

## Other [Magento 2 Extensions](ttps://www.jajuma.de/en/jajuma-develop/magento-extensions) by [JaJuMa](https://www.jajuma.de/)

Expand Down
22 changes: 22 additions & 0 deletions view/frontend/web/svg/3x2/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
(The MIT License)

Copyright (c) 2020 @catamphetamine <purecatamphetamine@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Loading

0 comments on commit dab382c

Please sign in to comment.