Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
gammamatrix authored Mar 5, 2024
1 parent 7773ab4 commit 3562c95
Show file tree
Hide file tree
Showing 24 changed files with 535 additions and 252 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
echo "TIMESTAMP_START=$(date +'%s')" >> $GITHUB_OUTPUT
- name: "Slack notification: IN PROGRESS"
id: slack
uses: slackapi/slack-github-action@v1.24.0
uses: slackapi/slack-github-action@v1.25.0
with:
channel-id: 'C068A06PV43'
payload: |
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
echo "DATE_END=$(date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_OUTPUT
echo "DURATION_PHRASE=$(($(date +'%s')-$TIMESTAMP_START)) seconds" >> $GITHUB_OUTPUT
- name: "Slack notification: Done"
uses: slackapi/slack-github-action@v1.24.0
uses: slackapi/slack-github-action@v1.25.0
with:
channel-id: 'C068A06PV43'
update-ts: ${{ steps.slack.outputs.ts }}
Expand Down Expand Up @@ -194,7 +194,7 @@ jobs:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
- name: "Send a notification for failures"
if: ${{ failure() }}
uses: slackapi/slack-github-action@v1.24.0
uses: slackapi/slack-github-action@v1.25.0
with:
channel-id: 'C068A06PV43'
update-ts: ${{ steps.slack.outputs.ts }}
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ By default, the following libraries are loaded.

- `favicon`: `/favicon.ico`
- [Nunito](https://fonts.google.com/specimen/Nunito): Loaded from Google Fonts.
- [Bootstrap: 5.3.2](https://getbootstrap.com/docs/5.3/)
- [FontAwesome: 6.4.2](https://fontawesome.com/search?o=r&m=free)
- [Bootstrap: v5.3.3](https://getbootstrap.com/docs/5.3/)
- [FontAwesome: v6.5.1](https://fontawesome.com/search?o=r&m=free)
- [CKEditor 5: v41.1.0](https://github.com/ckeditor/ckeditor5)
- [Vue 3 - https://unpkg.com/vue@3](https://vuejs.org/)
- `/vendor/playground-blade.js` A small library to be loaded for Blade UI usage. Needs to be published.

Expand Down
7 changes: 3 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"gammamatrix",
"laravel",
"playground",
"playground",
"playground-blade"
],
"homepage": "https://github.com/gammamatrix/playground-blade/wiki",
Expand All @@ -20,11 +19,11 @@
],
"require": {
"php": "^8.1",
"gammamatrix/playground": "dev-develop|dev-master|^73.0"
"gammamatrix/playground": "dev-develop|dev-master|dev-feature/*|^73.0"
},
"require-dev": {
"gammamatrix/playground-auth": "dev-develop|dev-master|^73.0",
"gammamatrix/playground-test": "dev-develop|dev-master|^73.0",
"gammamatrix/playground-auth": "dev-develop|dev-master|dev-feature/*|^73.0",
"gammamatrix/playground-test": "dev-develop|dev-master|dev-feature/*|^73.0",
"tomasvotruba/bladestan": "^0.4.1"
},
"minimum-stability": "dev",
Expand Down
193 changes: 160 additions & 33 deletions config/playground-blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,73 +13,192 @@
'themes' => [
'default' => [
'bsTheme' => '',
'editor' => '',
// 'editor' => '',
'enable' => (bool) env('PLAYGROUND_BLADE_THEME_DEFAULT_ENABLE', true),
'label' => 'Default Theme',
'key' => 'default',
'icon' => '',
'icon' => 'fa-solid fa-square',
'provider' => 'bootstrap',
'session' => true,
'head' => [
'comment' => [
'asset' => 'comment',
'comment' => 'head: using the default theme',
],
// 'bootstrap-root' => [
// 'rel' => 'stylesheet',
// 'asset' => 'stylesheet',
// 'href' => '/vendor/bootstrap-root-0001.css',
// 'version' => '5.3.3',
// 'always' => true,
// ],
'anta' => [
'asset' => 'font',
'href' => 'https://fonts.googleapis.com/css2?family=Anta&display=swap',
'rel' => 'stylesheet',
'always' => true,
],
'font-headers' => [
'asset' => 'style',
'style' => 'h1, h2, h3, h4, h5, h6 {font-family: Anta, sans-serif;}',
'always' => true,
],
],
'body' => [
'comment' => [
'asset' => 'comment',
'comment' => 'body: using the default theme',
],
],
],
'blue' => [
'bsTheme' => 'blue',
// 'editor' => '',
'enable' => (bool) env('PLAYGROUND_BLADE_THEME_DEFAULT_ENABLE', true),
'label' => 'Blue Theme',
'key' => 'blue',
'icon' => 'fa-solid fa-circle',
'provider' => 'bootstrap',
'session' => true,
'head' => [
'comment' => [
'asset' => 'comment',
'comment' => 'head: using the blue theme',
],
'bootstrap-root' => [
'rel' => 'stylesheet',
'asset' => 'stylesheet',
'href' => '/vendor/bootstrap-root-blue.css',
'version' => '5.3.3',
'always' => true,
],
'anta' => [
'asset' => 'font',
'href' => 'https://fonts.googleapis.com/css2?family=Lobster&display=swap',
'rel' => 'stylesheet',
'always' => true,
],
'font-headers' => [
'asset' => 'style',
'style' => 'h1, h2, h3, h4, h5, h6 {font-family: Lobster, sans-serif;}',
'always' => true,
],
],
'body' => [
'comment' => [
'asset' => 'comment',
'comment' => 'body: using the default theme',
],
],
],
'dark' => [
'bsTheme' => 'dark',
'editor' => '/vendor/ckeditor-dark.css',
// 'editor' => '/vendor/ckeditor-dark.css',
'enable' => (bool) env('PLAYGROUND_BLADE_THEME_DARK_ENABLE', true),
'label' => 'Dark Theme',
'key' => 'dark',
'icon' => 'fa-solid fa-moon',
'provider' => 'bootstrap',
'session' => true,
'head' => [
'ckeditor-dark' => [
'rel' => 'stylesheet',
'asset' => 'stylesheet',
'href' => '/vendor/ckeditor-dark.css',
'version' => '41.1.0',
'always' => true,
],
],
],
'light' => [
'bsTheme' => 'light',
'editor' => '/vendor/ckeditor-light.css',
'enable' => (bool) env('PLAYGROUND_BLADE_THEME_LIGHT_ENABLE', true),
'label' => 'Light Theme',
'key' => 'light',
'icon' => 'fa-solid fa-sun',
'provider' => 'bootstrap',
'session' => true,
'head' => [
'ckeditor-light' => [
'rel' => 'stylesheet',
'asset' => 'stylesheet',
'href' => '/vendor/ckeditor-light.css',
'version' => '41.1.0',
'always' => true,
],
],
],
'bootstrap-dark' => [
'bsTheme' => 'dark',
'editor' => '/vendor/ckeditor-bootstrap.css',
'enable' => false,
'label' => 'CkEditor Unified Bootstrap Theme under Dark',
'label' => 'CKEditor Unified Bootstrap Theme under Dark',
'key' => 'bootstrap-dark',
'icon' => 'fa-brands fa-bootstrap',
'provider' => 'bootstrap',
'session' => true,
'head' => [
'ckeditor-light' => [
'rel' => 'stylesheet',
'asset' => 'stylesheet',
'href' => '/vendor/ckeditor-bootstrap.css',
'version' => '41.1.0',
'always' => true,
],
],
],
'bootstrap-light' => [
'bsTheme' => 'light',
'editor' => '/vendor/ckeditor-bootstrap.css',
'enable' => false,
'label' => 'CkEditor Unified Bootstrap Theme under Light',
'label' => 'CKEditor Unified Bootstrap Theme under Light',
'key' => 'bootstrap-light',
'icon' => 'fa-brands fa-bootstrap',
'provider' => 'bootstrap',
'session' => true,
'head' => [
'ckeditor-light' => [
'rel' => 'stylesheet',
'asset' => 'stylesheet',
'href' => '/vendor/ckeditor-bootstrap.css',
'version' => '41.1.0',
'always' => true,
],
],
],
'lark-dark' => [
'bsTheme' => 'dark',
'editor' => '/vendor/ckeditor-lark.css',
'enable' => false,
'label' => 'CkEditor Lark Theme under Dark',
'label' => 'CKEditor Lark Theme under Dark',
'key' => 'lark-dark',
'icon' => 'fa-solid fa-dove fa-moon',
'provider' => 'bootstrap',
'session' => true,
'head' => [
'ckeditor-light' => [
'rel' => 'stylesheet',
'asset' => 'stylesheet',
'href' => '/vendor/ckeditor-lark.css',
'version' => '41.1.0',
'always' => true,
],
],
],
'lark-light' => [
'bsTheme' => 'light',
'editor' => '/vendor/ckeditor-lark.css',
'enable' => false,
'label' => 'CkEditor Lark Theme under Light',
'label' => 'CKEditor Lark Theme under Light',
'key' => 'lark-light',
'icon' => 'fa-solid fa-dove fa-sun',
'provider' => 'bootstrap',
'session' => true,
'head' => [
'ckeditor-light' => [
'rel' => 'stylesheet',
'asset' => 'stylesheet',
'href' => '/vendor/ckeditor-lark.css',
'version' => '41.1.0',
'always' => true,
],
],
],
],
/*
Expand All @@ -103,12 +222,15 @@
'rel' => 'icon',
'always' => true,
],
// 'gstatic' => [
// 'asset' => 'font',
// 'version' => '',
// 'integrity' => '',
// 'href' => 'https://fonts.gstatic.com/',
// ],
'preconnect-googleapis' => [
'asset' => 'link',
'href' => 'https://fonts.googleapis.com/',
],
'preconnect-gstatic' => [
'asset' => 'link',
'crossorigin' => '',
'href' => 'https://fonts.gstatic.com/',
],
'nunito' => [
'asset' => 'font',
'href' => 'https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap',
Expand All @@ -119,25 +241,30 @@
'asset' => 'script',
'crossorigin' => 'anonymous',
'integrity' => '',
'src' => 'https://cdn.ckeditor.com/ckeditor5/34.2.0/classic/ckeditor.js',
'version' => '34.2.0',
'src' => 'https://cdn.ckeditor.com/ckeditor5/41.1.0/classic/ckeditor.js',
'version' => '41.1.0',
],
'ckeditor-style' => [
'asset' => 'style',
'style' => '.ck-editor__editable_inline, .editor__editable {min-height: 200px;}',
'version' => '41.1.0',
],
'bootstrap-css' => [
'rel' => 'stylesheet',
'asset' => 'stylesheet',
'crossorigin' => 'anonymous',
'integrity' => 'sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN',
'href' => 'https://cdn.jsdelivr.net/npm/[email protected].2/dist/css/bootstrap.min.css',
'version' => '5.3.2',
'integrity' => 'sha512-jnSuA4Ss2PkkikSOLtYs8BlYIeeIK1h99ty4YfvRPAlzr377vr3CXDb7sb7eEEBYjDtcYj+AjBH3FLv5uSJuXg==',
'href' => 'https://cdn.jsdelivr.net/npm/[email protected].3/dist/css/bootstrap.min.css',
'version' => '5.3.3',
'always' => true,
],
'fontawesome-css' => [
'rel' => 'stylesheet',
'asset' => 'font',
'crossorigin' => 'anonymous',
'integrity' => 'sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbuBusANI9QpRohGBreCFkKxLhei6S9CQXFEbbKuqLg0DA==',
'href' => 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css',
'version' => '6.4.2',
'integrity' => 'sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA==',
'href' => 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css',
'version' => '6.5.1',
'always' => true,
],
'vue' => [
Expand All @@ -148,7 +275,7 @@
'version' => '',
'always' => true,
],
'body-nunito' => [
'font-body' => [
'asset' => 'style',
'style' => 'body {font-family: Nunito, sans-serif;}',
'always' => true,
Expand All @@ -158,9 +285,9 @@
'bootstrap' => [
'asset' => 'script',
'crossorigin' => 'anonymous',
'integrity' => 'sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL',
'src' => 'https://cdn.jsdelivr.net/npm/[email protected].2/dist/js/bootstrap.bundle.min.js',
'version' => '5.3.2',
'integrity' => 'sha512-7Pi/otdlbbCR+LnW+F7PwFcSDJOuUJB3OxtEHbg4vSMvzvJjde4Po1v4BR9Gdc9aXNUNFVUY+SK51wWT8WF0Gg==',
'src' => 'https://cdn.jsdelivr.net/npm/[email protected].3/dist/js/bootstrap.bundle.min.js',
'version' => '5.3.3',
'always' => true,
],
'playground-blade' => [
Expand All @@ -184,9 +311,9 @@
'asset' => 'script',
'referrerpolicy' => 'no-referrer',
'crossorigin' => 'anonymous',
'integrity' => 'sha512-uKQ39gEGiyUJl4AI6L+ekBdGKpGw4xJ55+xyJG7YFlJokPNYegn9KwQ3P8A7aFQAUtUsAQHep+d/lrGqrbPIDQ==',
'src' => 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/js/all.min.js',
'version' => '6.4.2',
'integrity' => 'sha512-GWzVrcGlo0TxTRvz9ttioyYJ+Wwk9Ck0G81D+eO63BaqHaJ3YZX9wuqjwgfcV/MrB2PhaVX9DkYVhbFpStnqpQ==',
'src' => 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/js/all.min.js',
'version' => '6.5.1',
'always' => true,
],
],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<form class="d-inline-block" method="POST"
action="{{ route($routeDelete, [$routeDeleteRelationship => $routeDeleteRelationshipId, 'relationship' => $routeDeleteRelationship]) }}">
@method('DELETE')
@csrf
<input type="hidden" name="_return_url" value="{{ $returnUrl }}">
<input type="hidden" name="data[0][type]" value="{{ $routeDeleteRelationship }}">
<input type="hidden" name="data[0][id]" value="{{ $record['id'] }}">
<button type="submit" class="btn btn-danger ms-2" role="button">
<span class="fa-solid fa-xmark"></span>
<span class="d-none d-inline-sm">Delete</span>
</button>
</form>
10 changes: 10 additions & 0 deletions resources/views/components/table/data-row-actions-delete.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<form class="d-inline-block" method="POST"
action="{{ route($routeDelete, [$routeParameter => $record[$routeParameterKey]]) }}">
@method('DELETE')
@csrf
<input type="hidden" name="_return_url" value="{{ $returnUrl }}">
<button type="submit" class="btn btn-danger ms-2" role="button">
<span class="fa-solid fa-xmark"></span>
<span class="d-none d-sm-inline">Delete</span>
</button>
</form>
Loading

0 comments on commit 3562c95

Please sign in to comment.