-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: adrolli <[email protected]>
- Loading branch information
Showing
51 changed files
with
1,554 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,9 @@ jobs: | |
- builder | ||
- core | ||
- expiry | ||
- flags | ||
- jobs | ||
- locate | ||
- login-link | ||
- notifications | ||
- passkey | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
return [ | ||
'navigation_sort' => 2001, | ||
|
||
// API configuration | ||
|
||
]; |
28 changes: 28 additions & 0 deletions
28
database/migrations/2024_07_10_123207_create_areas_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class extends Migration | ||
{ | ||
public function up(): void | ||
{ | ||
Schema::create('areas', function (Blueprint $table) { | ||
$table->id(); | ||
$table->string('title'); | ||
$table->string('slug'); | ||
$table->enum('area_type', ['continent', 'sub-continent', 'union', 'other']); | ||
$table->text('description'); | ||
$table->json('nutrition'); | ||
$table->boolean('tropical'); | ||
$table->softDeletes(); | ||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
public function down(): void | ||
{ | ||
Schema::dropIfExists('areas'); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
* text=auto | ||
|
||
/.github export-ignore | ||
/bin export-ignore | ||
/config/generation.php export-ignore | ||
/dist export-ignore | ||
/tests export-ignore | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
CHANGELOG.md export-ignore | ||
phpunit.xml.dist export-ignore | ||
README.md export-ignore | ||
UPGRADE.md export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
name: Coding Standards | ||
|
||
on: [push] | ||
|
||
jobs: | ||
lint: | ||
uses: laravel/.github/.github/workflows/coding-standards.yml@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: true | ||
matrix: | ||
php: [8.2, 8.3] | ||
laravel: [11] | ||
|
||
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: dom, curl, libxml, mbstring, zip | ||
coverage: none | ||
|
||
- name: Install dependencies | ||
run: | | ||
composer require "illuminate/contracts=^${{ matrix.laravel }}" --prefer-dist --no-interaction --no-update | ||
composer update --prefer-dist --no-interaction --no-progress | ||
- name: Execute tests | ||
run: vendor/bin/phpunit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
node_modules/ | ||
vendor/ | ||
.phpunit.result.cache | ||
composer.lock | ||
phpunit.xml | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Changelog | ||
|
||
This changelog follows [the Keep a Changelog standard](https://keepachangelog.com). | ||
|
||
## [Unreleased](https://github.com/mooxphp/flags/compare/1.0.0...main) | ||
|
||
## 1.0.0 (20??-??-??) | ||
|
||
Initial release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) Blade Developer | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# Moox Flags | ||
|
||
<a href="https://github.com/mooxphp/flags/actions?query=workflow%3ATests"> | ||
<img src="https://github.com/blade-ui-kit/flags/workflows/Tests/badge.svg" alt="Tests"> | ||
</a> | ||
<a href="https://packagist.org/packages/moox/flags"> | ||
<img src="https://img.shields.io/packagist/v/moox/flags" alt="Latest Stable Version"> | ||
</a> | ||
<a href="https://packagist.org/packages/moox/flags"> | ||
<img src="https://img.shields.io/packagist/dt/moox/flags" alt="Total Downloads"> | ||
</a> | ||
|
||
> 5. `Blade Developer` with your name | ||
> | ||
> Then, make sure [the implementation](./src) is correct, that you set up [icon generation](https://github.com/blade-ui-kit/blade-icons#generating-icons) and that [your tests](./tests) pass. And remove this quote block from your readme. When you've published your package on Packagist, make sure to send it in to [the Blade Icons package list](https://github.com/blade-ui-kit/blade-icons#icon-packages). | ||
A package to easily make use of beautiful stylable country and language flags in your Laravel Blade views. | ||
|
||
For a full list of available icons see [the SVG directory](resources/svg). | ||
|
||
## Requirements | ||
|
||
- PHP 8.2 or higher | ||
- Laravel 10.0 or higher | ||
|
||
## Installation | ||
|
||
```bash | ||
composer require moox/flags | ||
``` | ||
|
||
## Updating | ||
|
||
Please refer to [`the upgrade guide`](UPGRADE.md) when updating the library. | ||
|
||
## Blade Icons | ||
|
||
Moox Flags uses Blade Icons under the hood. Please refer to [the Blade Icons readme](https://github.com/blade-ui-kit/blade-icons) for additional functionality. We also recommend to [enable icon caching](https://github.com/blade-ui-kit/blade-icons#caching) with this library. | ||
|
||
## Configuration | ||
|
||
Moox Flags also offers the ability to use features from Blade Icons like default classes, default attributes, etc. If you'd like to configure these, publish the `flags.php` config file: | ||
|
||
```bash | ||
php artisan vendor:publish --tag=flags-config | ||
``` | ||
|
||
## Usage | ||
|
||
Icons can be used as self-closing Blade components which will be compiled to SVG icons: | ||
|
||
```blade | ||
<x-heroicon-o-adjustments/> | ||
``` | ||
|
||
You can also pass classes to your icon components: | ||
|
||
```blade | ||
<x-heroicon-o-adjustments class="w-6 h-6 text-gray-500"/> | ||
``` | ||
|
||
And even use inline styles: | ||
|
||
```blade | ||
<x-heroicon-o-adjustments style="color: #555"/> | ||
``` | ||
|
||
The solid icons can be referenced like this: | ||
|
||
```blade | ||
<x-heroicon-s-adjustments/> | ||
``` | ||
|
||
### Raw SVG Icons | ||
|
||
If you want to use the raw SVG icons as assets, you can publish them using: | ||
|
||
```bash | ||
php artisan vendor:publish --tag=flags --force | ||
``` | ||
|
||
Then use them in your views like: | ||
|
||
```blade | ||
<img src="{{ asset('vendor/flags/o-adjustments.svg') }}" width="10" height="10"/> | ||
``` | ||
|
||
## Changelog | ||
|
||
Check out the [CHANGELOG](CHANGELOG.md) in this repository for all the recent changes. | ||
|
||
## Maintainers | ||
|
||
Moox Flags is developed and maintained by Blade Developer. | ||
|
||
## License | ||
|
||
Moox Flags is open-sourced software licensed under [the MIT license](LICENSE.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"name": "moox/flags", | ||
"description": "A package to easily make use of beautiful stylable country and language flags in your Laravel Blade views and Filament resources.", | ||
"keywords": [ | ||
"Blade", | ||
"Icons", | ||
"Country Flags", | ||
"Language Flags", | ||
"Flags", | ||
"SVG", | ||
"Laravel" | ||
], | ||
"homepage": "https://github.com/mooxphp/flags", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Moox Devs" | ||
} | ||
], | ||
"require": { | ||
"php": "~8.2.0|~8.3.0", | ||
"blade-ui-kit/blade-icons": "^1.6", | ||
"illuminate/support": "^11.0" | ||
}, | ||
"require-dev": { | ||
"orchestra/testbench": "^9.0", | ||
"phpunit/phpunit": "^10.0" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Moox\\Flags\\": "src" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Tests\\": "tests" | ||
} | ||
}, | ||
"extra": { | ||
"laravel": { | ||
"providers": [ | ||
"Moox\\Flags\\FlagsServiceProvider" | ||
] | ||
} | ||
}, | ||
"config": { | ||
"sort-packages": true | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true | ||
} |
Oops, something went wrong.