Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mariojgt committed Mar 8, 2023
1 parent 9825b6e commit ec7bbfa
Show file tree
Hide file tree
Showing 13 changed files with 676 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Publish/Npm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"grapesjs-preset-webpage": "^1.0.2",
"grapesjs-script-editor": "^1.0.3",
"grapesjs-tabs": "^1.0.6",
"sweetalert2": "^11.7.3",
"sweetalert2": "^11.4.8",
"toastify-js": "^1.9.3",
"vue": "^3.0.5"
}
Expand Down
6 changes: 6 additions & 0 deletions Publish/Npm/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
1 change: 1 addition & 0 deletions Publish/Public/assets/app-41f7798b.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Publish/Public/assets/app-a2b59f39.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

578 changes: 578 additions & 0 deletions Publish/Public/assets/grape-b65eca05.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Publish/Public/assets/sweetalert2-a3d69089.css

Large diffs are not rendered by default.

69 changes: 69 additions & 0 deletions Publish/Public/assets/sweetalert2-b81e8371.js

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions Publish/Public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"_sweetalert2-4194db84.js": {
"_sweetalert2-b81e8371.js": {
"css": [
"assets/sweetalert2-e7e3a94b.css"
"assets/sweetalert2-a3d69089.css"
],
"file": "assets/sweetalert2-4194db84.js"
"file": "assets/sweetalert2-b81e8371.js"
},
"node_modules/grapesjs/dist/fonts/main-fonts.eot": {
"file": "assets/main-fonts-1fc5d1c7.eot",
Expand All @@ -22,7 +22,7 @@
"src": "node_modules/grapesjs/dist/fonts/main-fonts.woff"
},
"resources/vendor/Onix/css/app.css": {
"file": "assets/app-4428fdcc.css",
"file": "assets/app-41f7798b.css",
"isEntry": true,
"src": "resources/vendor/Onix/css/app.css"
},
Expand All @@ -40,23 +40,23 @@
"css": [
"assets/onixGrapeJs-054b482f.css"
],
"file": "assets/grape-753d7284.js",
"file": "assets/grape-b65eca05.js",
"imports": [
"_sweetalert2-4194db84.js"
"_sweetalert2-b81e8371.js"
],
"isEntry": true,
"src": "resources/vendor/Onix/js/OnixSetup/onixGrapeJs.js"
},
"resources/vendor/Onix/js/app.js": {
"file": "assets/app-cf52c452.js",
"file": "assets/app-a2b59f39.js",
"imports": [
"_sweetalert2-4194db84.js"
"_sweetalert2-b81e8371.js"
],
"isEntry": true,
"src": "resources/vendor/Onix/js/app.js"
},
"sweetalert2.css": {
"file": "assets/sweetalert2-e7e3a94b.css",
"file": "assets/sweetalert2-a3d69089.css",
"src": "sweetalert2.css"
}
}
1 change: 1 addition & 0 deletions Publish/Resource/css/app.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ to install it you can use composer:

composer require onix/laravel
php artisan install:onix
// add the following line to the .env file
VITE_ONIX_API_KEY=any_value // this is to avoid unwanted requests to the api

## Features
- Page builder
Expand Down
6 changes: 2 additions & 4 deletions src/Controllers/OnixBlockController.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ public function store(Request $request)
'label' => 'required',
'media' => 'required',
'category' => 'required',
'slug' => 'required|unique:onix_blocks',
'status' => 'required',
'slug' => 'required|unique:onix_blocks'
]);

$block = new OnixBlock();
Expand Down Expand Up @@ -79,8 +78,7 @@ public function edit(Request $request, OnixBlock $block)
'label' => 'required',
'media' => 'required',
'category' => 'required',
'slug' => 'required|unique:onix_blocks,slug,' . $block->id,
'status' => 'required',
'slug' => 'required|unique:onix_blocks,slug,' . $block->id
]);

$block->componentId = $request->componentId;
Expand Down
6 changes: 2 additions & 4 deletions src/Controllers/OnixPageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ public function store(Request $request)
{
$request->validate([
'title' => 'required',
'slug' => 'required|unique:onix_pages',
'status' => 'required',
'slug' => 'required|unique:onix_pages'
]);

$page = new OnixPage();
Expand All @@ -69,8 +68,7 @@ public function edit(Request $request, OnixPage $page)
{
$request->validate([
'title' => 'required',
'slug' => 'required|unique:onix_pages,slug,' . $page->id,
'status' => 'required',
'slug' => 'required|unique:onix_pages,slug,' . $page->id
]);

$page->title = $request->title;
Expand Down
4 changes: 3 additions & 1 deletion src/Controllers/OnixSitePageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ class OnixSitePageController extends OnixController
public function index(Request $request, $slug = null)
{
$page = OnixPage::where('slug', $slug)->firstOrFail();

if ($page->status == 0) {
abort(404);
}
return view('pages.onix.' . $page->slug);
}
}

0 comments on commit ec7bbfa

Please sign in to comment.