Skip to content

Commit

Permalink
Next onix version (#22)
Browse files Browse the repository at this point in the history
* v3 started

* Pages crud now completed

* Minimal php version

* Outdated package.json update

* Main updates

* page settings

* updates

* updates

* Deploy action added

* Updates

* final updates
  • Loading branch information
mariojgt authored Mar 8, 2023
1 parent 071bb9c commit 9825b6e
Show file tree
Hide file tree
Showing 155 changed files with 7,308 additions and 2,606 deletions.
20 changes: 20 additions & 0 deletions Publish/BladeLayout/onix.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>{{ $title ?? 'Onix Grape js' }}</title>
{{ Vite::useBuildDirectory('vendor/Onix')->withEntryPoints([
'resources/vendor/Onix/js/app.js',
'resources/vendor/Onix/css/app.css',
]) }}
@stack('css')
</head>
<body>
<div id="app">
{{ $slot }}
</div>
@stack('js')
</body>
</html>
93 changes: 81 additions & 12 deletions Publish/Config/onix.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,87 @@
<?php

return [
'demo_enable' => true, // If true users can see the demo
'request_token' => env('VITE_ONIX_API_KEY'), // Prevent the api unwanted requests

/********************************************************************/
// In here is where we load the javascript file compiled using webpack
// The reason why is because you can complile you owm version so you can reference those files in here
/*
|--------------------------------------------------------------------------
| Onix block generator output path
|--------------------------------------------------------------------------
*/
'media_path' => 'onix.media', // The component looks
'component_path' => 'onix.blocks', // The blocks html content
/*
|--------------------------------------------------------------------------
| Onix available editor color palette
|--------------------------------------------------------------------------
*/
'primary_color' => [
'#000000ff',
'#0d1b2aff',
'#231942ff',
'#01161eff',
'#3d5a80ff',
'#1f2041ff',
],
'color_secondary' => [
'#14213dff',
'#1b263bff',
'#5e548eff',
'#124559ff',
'#98c1d9ff',
'#4b3f72ff',
'#f7b267ff',
'#f79d65ff',
'#f4845fff',
'#f27059ff',
'#f25c54ff',
],
'color_tertiary' => [
'#fca311ff',
'#415a77ff',
'#9f86c0ff',
'#598392ff',
'#e0fbfcff',
'#ffc857ff',
],
'color_quaternary' => [
'#e5e5e5ff',
'#778da9ff',
'#be95c4ff',
'#aec3b0ff',
'#ee6c4dff',
'#119da4ff',
],

// Call main scripts you need this because is using the axios request
'onix_app_js' => '/vendor/Onix/js/app.js',
// Call the Onix plugin preset
'onix_onix_preset_js' => '/vendor/Onix/js/onixPreset.js',
// Call Grape js code ditor plugin
'grape_code_editor' => '/vendor/Onix/js/grapeCodeEditor.js',
// Call the script editor
'grape_script_editor' => '/vendor/Onix/js/scriptEditor.js',
/*
|--------------------------------------------------------------------------
| Onix editor css and js files
|--------------------------------------------------------------------------
*/
// Files base path (this is the location where the manifest.json file is located in the public folder)
'use_cdn' => true,
'editor_base_path' => 'vendor/Onix',
// The last name of you css file used in vite
'editor_css' => [
'app.css',
],
// The last name of you js file used in vite
'editor_js' => [
'app.js',
],
// If you want to use cdn instead of the local files you can add the cdn url here dont forget to change the use_cdn to true
'editor_css_cdn' => [
'https://cdn.jsdelivr.net/npm/[email protected]/dist/full.css',
],
'editor_js_cdn' => [
'https://cdn.tailwindcss.com',
],

// If you want to restrict the access to the editor you can add the middleware here
'middleware' => [
'web',
],

// Onix blade pages route prefix
'route_prefix' => 'onix/',
];
41 changes: 20 additions & 21 deletions Publish/Npm/package.json
Original file line number Diff line number Diff line change
@@ -1,46 +1,45 @@
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npx mix watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "npx mix watch --hot",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --config=node_modules/laravel-mix/setup/webpack.config.js"
"dev": "vite",
"build": "vite build"
},
"devDependencies": {
"@vue/compiler-sfc": "^3.0.5",
"axios": "^0.21.1",
"autoprefixer": "^10.4.13",
"axios": "^1.3.4",
"cross-env": "^7.0",
"laravel-mix": "^6.0.10",
"laravel-vite-plugin": "^0.7.1",
"lodash": "^4.17.19",
"popper.js": "^1.12",
"postcss": "^8.2.4",
"postcss": "^8.4.21",
"resolve-url-loader": "^5.0.0",
"sass": "^1.32.4",
"sass-loader": "^8.0.0",
"vue-loader": "^16.0.0-rc.1"
"sass-loader": "^13.2.0",
"tailwindcss": "^3.2.7",
"vite": "^4.1.4",
"vue-loader": "^17.0.1"
},
"dependencies": {
"@fortawesome/fontawesome-free": "^5.15.2",
"@fortawesome/fontawesome-free": "^6.3.0",
"daisyui": "^2.43.0",
"grapesjs": "^0.20.1",
"grapesjs": "^0.20.4",
"grapesjs-aviary": "^0.1.2",
"grapesjs-blocks-basic": "^0.1.8",
"grapesjs-blocks-basic": "^1.0.1",
"grapesjs-blocks-flexbox": "^0.1.1",
"grapesjs-component-code-editor": "^1.0.13",
"grapesjs-component-countdown": "^0.1.3",
"grapesjs-firestore": "^0.1.1",
"grapesjs-component-code-editor": "^1.0.20",
"grapesjs-component-countdown": "^1.0.1",
"grapesjs-firestore": "^1.0.2",
"grapesjs-lory-slider": "^0.1.5",
"grapesjs-navbar": "^0.1.5",
"grapesjs-navbar": "^1.0.1",
"grapesjs-plugin-export": "^1.0.7",
"grapesjs-plugin-filestack": "^0.1.1",
"grapesjs-plugin-forms": "^2.0.1",
"grapesjs-preset-webpage": "^0.1.11",
"grapesjs-preset-webpage": "^1.0.2",
"grapesjs-script-editor": "^1.0.3",
"grapesjs-tabs": "^1.0.6",
"sweetalert2": "^9.17.2",
"tailwindcss": "^3.2.4",
"sweetalert2": "^11.7.3",
"toastify-js": "^1.9.3",
"vue": "^3.0.5"
}
Expand Down
11 changes: 3 additions & 8 deletions Publish/Npm/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
const plugin = require('tailwindcss/plugin')

module.exports = {
darkMode: 'class',
mode: 'jit',
purge: [
content: [
// Path to my php view it will only purge stuff we going to use
"./resources/vendor/Onix/**/*.js",
"./resources/vendor/Onix/**/*.txt",
"./vendor/mariojgt/onix/**/*.php",
"./resources/views/**/*.php",
],
theme: {
extend: {},
},
variants: {
extend: {
textOpacity: ['dark']
}
},
plugins: [
require('daisyui'),
],
Expand Down
23 changes: 23 additions & 0 deletions Publish/Npm/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';

export default defineConfig({
plugins: [
laravel([
'resources/vendor/Onix/js/OnixSetup/onixGrapeJs.js', // Normal js files
'resources/vendor/Onix/js/app.js', // Normal js files
'resources/vendor/Onix/css/app.css', // Normal css files
])
],
build: {
outDir: 'public/vendor/Onix',
emptyOutDir: true,
rollupOptions: {
input: {
grape: '/resources/vendor/Onix/js/OnixSetup/onixGrapeJs.js',
app: '/resources/vendor/Onix/js/app.js',
css: '/resources/vendor/Onix/css/app.css',
},
},
}
});
48 changes: 0 additions & 48 deletions Publish/Npm/webpack.mix.js

This file was deleted.

12 changes: 12 additions & 0 deletions Publish/OnixPhpBlocks/Blocks/footer.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<footer class="footer items-center p-4 bg-neutral text-neutral-content">
<div class="items-center grid-flow-col">
<svg width="36" height="36" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" class="fill-current"><path d="M22.672 15.226l-2.432.811.841 2.515c.33 1.019-.209 2.127-1.23 2.456-1.15.325-2.148-.321-2.463-1.226l-.84-2.518-5.013 1.677.84 2.517c.391 1.203-.434 2.542-1.831 2.542-.88 0-1.601-.564-1.86-1.314l-.842-2.516-2.431.809c-1.135.328-2.145-.317-2.463-1.229-.329-1.018.211-2.127 1.231-2.456l2.432-.809-1.621-4.823-2.432.808c-1.355.384-2.558-.59-2.558-1.839 0-.817.509-1.582 1.327-1.846l2.433-.809-.842-2.515c-.33-1.02.211-2.129 1.232-2.458 1.02-.329 2.13.209 2.461 1.229l.842 2.515 5.011-1.677-.839-2.517c-.403-1.238.484-2.553 1.843-2.553.819 0 1.585.509 1.85 1.326l.841 2.517 2.431-.81c1.02-.33 2.131.211 2.461 1.229.332 1.018-.21 2.126-1.23 2.456l-2.433.809 1.622 4.823 2.433-.809c1.242-.401 2.557.484 2.557 1.838 0 .819-.51 1.583-1.328 1.847m-8.992-6.428l-5.01 1.675 1.619 4.828 5.011-1.674-1.62-4.829z"></path></svg>
<p>Copyright © 2023 - All right reserved</p>
</div>
<div class="grid-flow-col gap-4 md:place-self-center md:justify-self-end">
<a><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="fill-current"><path d="M24 4.557c-.883.392-1.832.656-2.828.775 1.017-.609 1.798-1.574 2.165-2.724-.951.564-2.005.974-3.127 1.195-.897-.957-2.178-1.555-3.594-1.555-3.179 0-5.515 2.966-4.797 6.045-4.091-.205-7.719-2.165-10.148-5.144-1.29 2.213-.669 5.108 1.523 6.574-.806-.026-1.566-.247-2.229-.616-.054 2.281 1.581 4.415 3.949 4.89-.693.188-1.452.232-2.224.084.626 1.956 2.444 3.379 4.6 3.419-2.07 1.623-4.678 2.348-7.29 2.04 2.179 1.397 4.768 2.212 7.548 2.212 9.142 0 14.307-7.721 13.995-14.646.962-.695 1.797-1.562 2.457-2.549z"></path></svg>
</a>
<a><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="fill-current"><path d="M19.615 3.184c-3.604-.246-11.631-.245-15.23 0-3.897.266-4.356 2.62-4.385 8.816.029 6.185.484 8.549 4.385 8.816 3.6.245 11.626.246 15.23 0 3.897-.266 4.356-2.62 4.385-8.816-.029-6.185-.484-8.549-4.385-8.816zm-10.615 12.816v-8l8 3.993-8 4.007z"></path></svg></a>
<a><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="fill-current"><path d="M9 8h-3v4h3v12h5v-12h3.642l.358-4h-4v-1.667c0-.955.192-1.333 1.115-1.333h2.885v-5h-3.808c-3.596 0-5.192 1.583-5.192 4.615v3.385z"></path></svg></a>
</div>
</footer>
31 changes: 31 additions & 0 deletions Publish/OnixPhpBlocks/Blocks/home-page-example-01.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<div class="hero min-h-screen bg-base-200">
<div class="hero-content flex-col lg:flex-row-reverse">
<div class="text-center lg:text-left">
<h1 class="text-5xl font-bold">Login now!</h1>
<p class="py-6">Provident cupiditate voluptatem et in. Quaerat fugiat ut assumenda excepturi exercitationem
quasi. In deleniti eaque aut repudiandae et a id nisi.</p>
</div>
<div class="card flex-shrink-0 w-full max-w-sm shadow-2xl bg-base-100">
<div class="card-body">
<div class="form-control">
<label class="label">
<span class="label-text">Email</span>
</label>
<input type="text" placeholder="email" class="input input-bordered" />
</div>
<div class="form-control">
<label class="label">
<span class="label-text">Password</span>
</label>
<input type="text" placeholder="password" class="input input-bordered" />
<label class="label">
<a href="#" class="label-text-alt link link-hover">Forgot password?</a>
</label>
</div>
<div class="form-control mt-6">
<button class="btn btn-primary">Login</button>
</div>
</div>
</div>
</div>
</div>
39 changes: 39 additions & 0 deletions Publish/OnixPhpBlocks/Blocks/navbar.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<div class="navbar bg-base-100">
<div class="navbar-start">
<div class="dropdown">
<label tabindex="0" class="btn btn-ghost btn-circle">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24"
stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h7" />
</svg>
</label>
<ul tabindex="0" class="menu menu-compact dropdown-content mt-3 p-2 shadow bg-base-100 rounded-box w-52">
<li><a>Homepage</a></li>
<li><a>Portfolio</a></li>
<li><a>About</a></li>
</ul>
</div>
</div>
<div class="navbar-center">
<a class="btn btn-ghost normal-case text-xl">ONIX</a>
</div>
<div class="navbar-end">
<button class="btn btn-ghost btn-circle">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24"
stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
</svg>
</button>
<button class="btn btn-ghost btn-circle">
<div class="indicator">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24"
stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9" />
</svg>
<span class="badge badge-xs badge-primary indicator-item"></span>
</div>
</button>
</div>
</div>
Loading

0 comments on commit 9825b6e

Please sign in to comment.