├── .gitattributes
├── .github
└── workflows
│ └── deploy.yml
├── Documentation
└── Onix
│ ├── .gitignore
│ ├── .npmrc
│ ├── .prettierrc
│ ├── .vscode
│ ├── extensions.json
│ └── launch.json
│ ├── LICENSE
│ ├── README.md
│ ├── astro.config.mjs
│ ├── imgs
│ ├── Releases.png
│ └── Started.png
│ ├── package-lock.json
│ ├── package.json
│ ├── pnpm-lock.yaml
│ ├── public
│ ├── favicon.svg
│ ├── opengraph.jpg
│ └── robots.txt
│ ├── src
│ ├── assets
│ │ ├── hero-alt.png
│ │ ├── hero-source.svg
│ │ ├── hero.png
│ │ └── logo.png
│ ├── components
│ │ ├── Footer.astro
│ │ ├── contactform.astro
│ │ ├── container.astro
│ │ ├── cta.astro
│ │ ├── features.astro
│ │ ├── hero.astro
│ │ ├── logos.astro
│ │ ├── navbar
│ │ │ ├── dropdown.astro
│ │ │ └── navbar.astro
│ │ ├── pricing.astro
│ │ ├── sectionhead.astro
│ │ └── ui
│ │ │ ├── button.astro
│ │ │ ├── icons
│ │ │ ├── index.js
│ │ │ └── tick.astro
│ │ │ └── link.astro
│ ├── content
│ │ ├── config.ts
│ │ ├── docs
│ │ │ └── getstarted.md
│ │ ├── releases
│ │ │ └── 3.0.0Version.md
│ │ └── team
│ │ │ ├── janette-lynch.md
│ │ │ ├── marcell-ziemann.md
│ │ │ └── robert-palmer.md
│ ├── env.d.ts
│ ├── layouts
│ │ ├── BlogLayout.astro
│ │ └── Layout.astro
│ ├── pages
│ │ ├── about.astro
│ │ ├── contact.astro
│ │ ├── docs.astro
│ │ ├── docs
│ │ │ └── [slug].astro
│ │ ├── index.astro
│ │ ├── pricing.astro
│ │ ├── releases.astro
│ │ └── releases
│ │ │ └── [slug].astro
│ └── utils
│ │ └── all.js
│ ├── tailwind.config.cjs
│ └── tsconfig.json
├── LICENSE
├── Publish
├── BladeLayout
│ └── onix.blade.php
├── Config
│ └── onix.php
├── Npm
│ ├── package.json
│ ├── postcss.config.js
│ ├── tailwind.config.js
│ └── vite.config.js
├── OnixPhpBlocks
│ ├── Blocks
│ │ ├── footer.blade.php
│ │ ├── home-page-example-01.blade.php
│ │ ├── navbar.blade.php
│ │ └── todo-list.blade.php
│ ├── Class
│ │ ├── Footer.php
│ │ ├── HomePage.php
│ │ ├── Navbar.php
│ │ └── TodoList.php
│ └── Media
│ │ ├── footer-media.blade.php
│ │ ├── home-page-example-01-media.blade.php
│ │ ├── mavbar-media.blade.php
│ │ └── todo-list-media.blade.php
├── Public
│ ├── assets
│ │ ├── app-031d5ede.js
│ │ ├── app-1a750ca9.js
│ │ ├── app-41f7798b.css
│ │ ├── app-4428fdcc.css
│ │ ├── app-4b6a58e5.css
│ │ ├── app-4c960b16.css
│ │ ├── app-4dc72098.js
│ │ ├── app-51940c6d.js
│ │ ├── app-53ba7817.css
│ │ ├── app-6b34403e.css
│ │ ├── app-79f2963c.css
│ │ ├── app-a2b59f39.js
│ │ ├── app-cb258603.css
│ │ ├── app-cf52c452.js
│ │ ├── app-de8ff430.js
│ │ ├── grape-221a6d16.js
│ │ ├── grape-3d252b9a.js
│ │ ├── grape-753d7284.js
│ │ ├── grape-80c548a0.js
│ │ ├── grape-b65eca05.js
│ │ ├── grape-f2380d7a.js
│ │ ├── main-fonts-1fc5d1c7.eot
│ │ ├── main-fonts-70c17a49.svg
│ │ ├── main-fonts-adff1e6b.ttf
│ │ ├── main-fonts-c3dd9523.woff
│ │ ├── onixGrapeJs-054b482f.css
│ │ ├── onixGrapeJs-328607b6.css
│ │ ├── sweetalert2-4194db84.js
│ │ ├── sweetalert2-4370e638.css
│ │ ├── sweetalert2-7c60aed3.js
│ │ ├── sweetalert2-a3d69089.css
│ │ ├── sweetalert2-b81e8371.js
│ │ ├── sweetalert2-cf3b0484.js
│ │ ├── sweetalert2-e4475c8a.js
│ │ └── sweetalert2-e7e3a94b.css
│ ├── manifest.json
│ └── starter
│ │ ├── assets
│ │ ├── app-339814be.js
│ │ ├── app-4c960b16.css
│ │ ├── grape-b02a3bd2.js
│ │ ├── onixGrapeJs-328607b6.css
│ │ ├── sweetalert2-4370e638.css
│ │ └── sweetalert2-7c60aed3.js
│ │ └── manifest.json
├── Resource
│ ├── css
│ │ └── app.css
│ ├── js
│ │ ├── OnixSetup
│ │ │ ├── helpers
│ │ │ │ ├── onixApi.js
│ │ │ │ └── onixEditorHelper.js
│ │ │ ├── onixGrapeJs.js
│ │ │ └── webpreset
│ │ │ │ ├── blocks.ts
│ │ │ │ ├── commands
│ │ │ │ ├── index.ts
│ │ │ │ └── openImport.ts
│ │ │ │ ├── components.ts
│ │ │ │ ├── consts.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── panels.ts
│ │ └── app.js
│ └── safePurge.txt
├── Stubs
│ └── BaseHtmlPage.stub
└── Templates
│ └── luxgamers.zip
├── README.md
├── composer.json
└── src
├── Commands
├── CreateOnixBlock.php
├── Install.php
├── InstallTemplate.php
└── Republish.php
├── Controllers
├── OnixApiController.php
├── OnixApiDeployController.php
├── OnixBlockController.php
├── OnixController.php
├── OnixDeployController.php
├── OnixPageController.php
├── OnixSettingsController.php
├── OnixSitePageController.php
└── OnixTemplateController.php
├── Database
├── Migrations
│ ├── 2021_07_21_104406_create_templates_table.php
│ ├── 2021_08_26_172454_create_blocks_table.php
│ ├── 2021_08_26_175636_create_pages_table.php
│ └── 2021_08_28_175636_create_settings_table.php
└── Seeders
│ ├── OnixSettingsSeeder.php
│ └── OnixTemplateSeeder.php
├── Helpers
└── BaseOnixBlocks.php
├── Middleware
└── OnixApi.php
├── Model
├── OnixBase.php
├── OnixBlock.php
├── OnixPage.php
├── OnixSetting.php
└── OnixTemplate.php
├── OnixProvider.php
├── Routes
├── api.php
└── web.php
├── Stubs
├── BaseBlockClass.stub
├── BaseBlockContent.stub
└── BaseBlockMedia.stub
└── views
├── components
├── layout
│ ├── flash.blade.php
│ ├── footer.blade.php
│ ├── logo.blade.php
│ ├── main.blade.php
│ ├── navbar.blade.php
│ ├── sidemenu.blade.php
│ └── theme.blade.php
├── modal
│ ├── addEditBlockModal.blade.php
│ ├── addEditPageModal.blade.php
│ ├── addEditTemplateModal.blade.php
│ └── modalDelete.blade.php
├── onix
│ └── main.blade.php
├── settings
│ └── color.blade.php
└── table
│ └── row.blade.php
└── content
├── block
├── editor.blade.php
└── index.blade.php
├── deploy
└── index.blade.php
├── page
├── editor.blade.php
└── index.blade.php
├── settings
└── index.blade.php
└── template
├── editor.blade.php
└── index.blade.php
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/.github/workflows/deploy.yml:
--------------------------------------------------------------------------------
1 | name: Deploy to GitHub Pages
2 |
3 | on:
4 | # Trigger the workflow every time you push to the `main` branch
5 | # Using a different branch name? Replace `main` with your branch’s name
6 | push:
7 | branches: [ main ]
8 | # Allows you to run this workflow manually from the Actions tab on GitHub.
9 | workflow_dispatch:
10 |
11 | # Allow this job to clone the repo and create a page deployment
12 | permissions:
13 | contents: read
14 | pages: write
15 | id-token: write
16 |
17 | jobs:
18 | build:
19 | runs-on: ubuntu-latest
20 | steps:
21 | - name: Checkout your repository using git
22 | uses: actions/checkout@v3
23 | - name: Install, build, and upload your site
24 | uses: withastro/action@v0
25 | with:
26 | path: Documentation/Onix
27 | # with:
28 | # path: . # The root location of your Astro project inside the repository. (optional)
29 | # node-version: 16 # The specific version of Node that should be used to build your site. Defaults to 16. (optional)
30 | # package-manager: yarn # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)
31 |
32 | deploy:
33 | needs: build
34 | runs-on: ubuntu-latest
35 | environment:
36 | name: github-pages
37 | url: ${{ steps.deployment.outputs.page_url }}
38 | steps:
39 | - name: Deploy to GitHub Pages
40 | id: deployment
41 | uses: actions/deploy-pages@v1
42 |
--------------------------------------------------------------------------------
/Documentation/Onix/.gitignore:
--------------------------------------------------------------------------------
1 | # build output
2 | dist/
3 | .output/
4 | .astro
5 |
6 | # dependencies
7 | node_modules/
8 |
9 | # logs
10 | npm-debug.log*
11 | yarn-debug.log*
12 | yarn-error.log*
13 | pnpm-debug.log*
14 |
15 |
16 | # environment variables
17 | .env
18 | .env.production
19 |
20 | # macOS-specific files
21 | .DS_Store
22 |
--------------------------------------------------------------------------------
/Documentation/Onix/.npmrc:
--------------------------------------------------------------------------------
1 | engine-strict=true
--------------------------------------------------------------------------------
/Documentation/Onix/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "tabWidth": 2,
3 | "useTabs": false,
4 | "bracketSameLine": true
5 | }
--------------------------------------------------------------------------------
/Documentation/Onix/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": ["astro-build.astro-vscode"],
3 | "unwantedRecommendations": []
4 | }
5 |
--------------------------------------------------------------------------------
/Documentation/Onix/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "0.2.0",
3 | "configurations": [
4 | {
5 | "command": "./node_modules/.bin/astro dev",
6 | "name": "Development server",
7 | "request": "launch",
8 | "type": "node-terminal"
9 | }
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/Documentation/Onix/README.md:
--------------------------------------------------------------------------------
1 | # onix
2 |
3 |
--------------------------------------------------------------------------------
/Documentation/Onix/astro.config.mjs:
--------------------------------------------------------------------------------
1 | import { defineConfig } from "astro/config";
2 | import tailwind from "@astrojs/tailwind";
3 | import image from "@astrojs/image";
4 | import mdx from "@astrojs/mdx";
5 | import sitemap from "@astrojs/sitemap";
6 |
7 | export default defineConfig({
8 | site: "https://mariojgt.github.io",
9 | base: '/onix-pro',
10 | integrations: [
11 | tailwind(),
12 | image({
13 | serviceEntryPoint: "@astrojs/image/sharp",
14 | }),
15 | mdx(),
16 | sitemap(),
17 | ],
18 | });
19 |
--------------------------------------------------------------------------------
/Documentation/Onix/imgs/Releases.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mariojgt/onix-pro/66875d08d22b084ee27a9c2812f16e684335f5ab/Documentation/Onix/imgs/Releases.png
--------------------------------------------------------------------------------
/Documentation/Onix/imgs/Started.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mariojgt/onix-pro/66875d08d22b084ee27a9c2812f16e684335f5ab/Documentation/Onix/imgs/Started.png
--------------------------------------------------------------------------------
/Documentation/Onix/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "astroship",
3 | "type": "module",
4 | "version": "0.0.1",
5 | "private": true,
6 | "scripts": {
7 | "dev": "astro dev",
8 | "start": "astro dev",
9 | "build": "astro build",
10 | "preview": "astro preview",
11 | "astro": "astro"
12 | },
13 | "dependencies": {
14 | "@astrojs/image": "^0.14.1",
15 | "@astrojs/mdx": "^0.16.2",
16 | "@astrojs/sitemap": "^1.1.0",
17 | "@astrojs/tailwind": "^3.0.1",
18 | "@fontsource/inter": "^4.5.15",
19 | "astro": "^2.0.15",
20 | "astro-breadcrumbs": "^1.6.0",
21 | "astro-feather-icons": "^1.0.2",
22 | "astro-icon": "^0.8.0",
23 | "astro-navbar": "^1.1.5",
24 | "astro-seo": "^0.7.1",
25 | "tailwindcss": "^3.2.7"
26 | },
27 | "devDependencies": {
28 | "@tailwindcss/typography": "^0.5.9",
29 | "postcss-nesting": "^11.2.1",
30 | "sharp": "^0.31.3"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Documentation/Onix/public/favicon.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
13 |
14 |
--------------------------------------------------------------------------------
/Documentation/Onix/public/opengraph.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mariojgt/onix-pro/66875d08d22b084ee27a9c2812f16e684335f5ab/Documentation/Onix/public/opengraph.jpg
--------------------------------------------------------------------------------
/Documentation/Onix/public/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Allow: /
3 |
4 | Sitemap: http://astroship.web3templates.com/sitemap-index.xml
--------------------------------------------------------------------------------
/Documentation/Onix/src/assets/hero-alt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mariojgt/onix-pro/66875d08d22b084ee27a9c2812f16e684335f5ab/Documentation/Onix/src/assets/hero-alt.png
--------------------------------------------------------------------------------
/Documentation/Onix/src/assets/hero.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mariojgt/onix-pro/66875d08d22b084ee27a9c2812f16e684335f5ab/Documentation/Onix/src/assets/hero.png
--------------------------------------------------------------------------------
/Documentation/Onix/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mariojgt/onix-pro/66875d08d22b084ee27a9c2812f16e684335f5ab/Documentation/Onix/src/assets/logo.png
--------------------------------------------------------------------------------
/Documentation/Onix/src/components/Footer.astro:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/Documentation/Onix/src/components/contactform.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import Button from "./ui/button.astro";
3 | ---
4 |
5 |
7 |
58 |
59 |
78 |
79 |
128 |
--------------------------------------------------------------------------------
/Documentation/Onix/src/components/container.astro:
--------------------------------------------------------------------------------
1 | ---
2 | const { class: className } = Astro.props;
3 | ---
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Documentation/Onix/src/components/cta.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import Link from "./ui/link.astro";
3 | ---
4 |
5 |
7 |
8 | Build faster websites.
9 |
10 |
11 | Pull content from anywhere and serve it fast with Astro's next-gen island
12 | architecture.
13 |
14 |
15 | Get Started
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Documentation/Onix/src/components/features.astro:
--------------------------------------------------------------------------------
1 | ---
2 | // @ts-ignore
3 | import { Icon } from "astro-icon";
4 |
5 | const features = [
6 | {
7 | title: "Bring Your Own Framework",
8 | description:
9 | "Build your site using React, Svelte, Vue, Preact, web components, or just plain ol' HTML + JavaScript.",
10 | icon: "bx:bxs-briefcase",
11 | },
12 | {
13 | title: "100% Static HTML, No JS",
14 | description:
15 | "Astro renders your entire page to static HTML, removing all JavaScript from your final build by default.",
16 | icon: "bx:bxs-window-alt",
17 | },
18 | {
19 | title: "On-Demand Components",
20 | description:
21 | "Need some JS? Astro can automatically hydrate interactive components when they become visible on the page. ",
22 | icon: "bx:bxs-data",
23 | },
24 | {
25 | title: "Broad Integration",
26 | description:
27 | "Astro supports TypeScript, Scoped CSS, CSS Modules, Sass, Tailwind, Markdown, MDX, and any other npm packages.",
28 | icon: "bx:bxs-bot",
29 | },
30 | {
31 | title: "SEO Enabled",
32 | description:
33 | "Automatic sitemaps, RSS feeds, pagination and collections take the pain out of SEO and syndication. It just works!",
34 | icon: "bx:bxs-file-find",
35 | },
36 | {
37 | title: "Community",
38 | description:
39 | "Astro is an open source project powered by hundreds of contributors making thousands of individual contributions.",
40 | icon: "bx:bxs-user",
41 | },
42 | ];
43 | ---
44 |
45 |
46 |
47 | Everything you need to start a website
48 |
49 |
50 | Astro comes batteries included. It takes the best parts of state-of-the-art
51 | tools and adds its own innovations.
52 |
53 |
54 |
55 |
56 | {
57 | features.map((item) => (
58 |
59 |
60 |
61 |
62 |
63 |
{item.title} {" "}
64 |
{item.description}
65 |
66 |
67 | ))
68 | }
69 |
70 |
--------------------------------------------------------------------------------
/Documentation/Onix/src/components/hero.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import { Picture } from "@astrojs/image/components";
3 | import Link from "@components/ui/link.astro";
4 | import { Icon } from "astro-icon";
5 | import logo from 'assets/logo.png';
6 |
7 | ---
8 |
9 |
11 |
22 |
23 |
25 | onix
26 | v0.0.0
27 |
28 |
29 | Onix is a page builder for laravel that allows you to create pages with a drag and drop interface.
30 |
31 |
32 |
41 |
48 |
49 | Bug and Issues
50 |
51 |
52 |
53 |
54 |
62 |
63 |
--------------------------------------------------------------------------------
/Documentation/Onix/src/components/logos.astro:
--------------------------------------------------------------------------------
1 | ---
2 | // @ts-ignore
3 | import { Icon } from "astro-icon";
4 | ---
5 |
6 |
7 |
Works with your technologies
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Documentation/Onix/src/components/navbar/dropdown.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import { Dropdown, DropdownItems } from "astro-navbar";
3 | const { title, lastItem, children } = Astro.props;
4 | ---
5 |
6 |
7 |
8 |
10 | {title}
11 |
18 |
22 |
23 |
24 |
25 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/Documentation/Onix/src/components/navbar/navbar.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import Container from "@components/container.astro";
3 | import Link from "@components/ui/link.astro";
4 | import Dropdown from "./dropdown.astro";
5 | import { Astronav, MenuItems, MenuIcon } from "astro-navbar";
6 |
7 | const menuitems = [
8 | // {
9 | // title: "Features",
10 | // path: "#",
11 | // children: [
12 | // { title: "Action", path: "#" },
13 | // { title: "Another action", path: "#" },
14 | // { title: "Dropdown Submenu", path: "#" },
15 | // ],
16 | // },
17 | // {
18 | // title: "Pricing",
19 | // path: "/pricing",
20 | // },
21 | // {
22 | // title: "About",
23 | // path: "/about",
24 | // },
25 | {
26 | title: "Docs",
27 | path: "/onix/docs",
28 | },
29 | {
30 | title: "Releases",
31 | path: "/onix/releases",
32 | },
33 | // {
34 | // title: "Contact",
35 | // path: "/contact",
36 | // },
37 | ];
38 | ---
39 |
40 |
41 |
42 |
43 |
53 |
54 |
55 | {
56 | menuitems.map((item, index) => (
57 | <>
58 | {item.children && (
59 |
64 | )}
65 |
66 | {!item.children && (
67 |
68 |
71 | {item.title}
72 |
73 |
74 | )}
75 | >
76 | ))
77 | }
78 |
79 |
80 | Log in
81 | Sign up
82 |
83 |
84 |
85 |
91 |
92 |
93 |
--------------------------------------------------------------------------------
/Documentation/Onix/src/components/pricing.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import { Tick } from "@components/ui/icons";
3 | import Link from "@components/ui/link.astro";
4 |
5 | const { plan } = Astro.props;
6 | ---
7 |
8 |
9 |
11 |
12 |
{plan.name}
14 | {
15 | plan.price && typeof plan.price === "object"
16 | ? plan.price.monthly
17 | : plan.price
18 | }
19 |
20 |
27 |
28 | {
29 | plan.features.map((item) => (
30 |
31 |
32 | {item}
33 |
34 | ))
35 | }
36 |
37 |
41 | {plan.button.text || "Get Started"}
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Documentation/Onix/src/components/sectionhead.astro:
--------------------------------------------------------------------------------
1 | ---
2 | const { align = "center" } = Astro.props;
3 | ---
4 |
5 |
6 |
7 | Title
8 |
9 |
10 | Some description goes here
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Documentation/Onix/src/components/ui/button.astro:
--------------------------------------------------------------------------------
1 | ---
2 | interface Props {
3 | size?: "md" | "lg";
4 | block?: boolean;
5 | style?: "outline" | "primary" | "inverted";
6 | class?: string;
7 | [x: string]: any;
8 | }
9 |
10 | const {
11 | size = "md",
12 | style = "primary",
13 | block,
14 | class: className,
15 | ...rest
16 | } = Astro.props;
17 |
18 | const sizes = {
19 | md: "px-5 py-2.5",
20 | lg: "px-6 py-3",
21 | };
22 |
23 | const styles = {
24 | outline: "border-2 border-black hover:bg-black text-black hover:text-white",
25 | primary:
26 | "bg-black text-white hover:bg-slate-900 border-2 border-transparent",
27 | };
28 | ---
29 |
30 |
40 |
41 |
--------------------------------------------------------------------------------
/Documentation/Onix/src/components/ui/icons/index.js:
--------------------------------------------------------------------------------
1 | export { default as Tick } from "./tick.astro";
2 |
--------------------------------------------------------------------------------
/Documentation/Onix/src/components/ui/icons/tick.astro:
--------------------------------------------------------------------------------
1 | ---
2 | const { class: className } = Astro.props;
3 | ---
4 |
5 |
16 |
17 |
--------------------------------------------------------------------------------
/Documentation/Onix/src/components/ui/link.astro:
--------------------------------------------------------------------------------
1 | ---
2 | interface Props {
3 | href: string;
4 | size?: "md" | "lg";
5 | block?: boolean;
6 | style?: "outline" | "primary" | "inverted" | "muted";
7 | class?: string;
8 | [x: string]: any;
9 | }
10 |
11 | const {
12 | href,
13 | block,
14 | size = "lg",
15 | style = "primary",
16 | class: className,
17 | ...rest
18 | } = Astro.props;
19 |
20 | const sizes = {
21 | lg: "px-5 py-2.5",
22 | md: "px-4 py-2",
23 | };
24 |
25 | const styles = {
26 | outline: "bg-white border-2 border-black hover:bg-gray-100 text-black ",
27 | primary: "bg-black text-white hover:bg-gray-800 border-2 border-transparent",
28 | inverted: "bg-white text-black border-2 border-transparent",
29 | muted: "bg-gray-100 hover:bg-gray-200 border-2 border-transparent",
30 | };
31 | ---
32 |
33 |
44 |
45 |
--------------------------------------------------------------------------------
/Documentation/Onix/src/content/config.ts:
--------------------------------------------------------------------------------
1 | // 1. Import utilities from `astro:content`
2 | import { z, defineCollection } from 'astro:content';
3 |
4 | // 2. Define your collection(s)
5 | const blogCollection = defineCollection({
6 | schema: z.object({
7 | draft: z.boolean(),
8 | title: z.string(),
9 | snippet: z.string(),
10 | image: z.object({
11 | src: z.string(),
12 | alt: z.string(),
13 | }),
14 | publishDate: z.string().transform(str => new Date(str)),
15 | author: z.string().default('Astroship'),
16 | category: z.string(),
17 | tags: z.array(z.string()),
18 | }),
19 | });
20 |
21 | const teamCollection = defineCollection({
22 | schema: z.object({
23 | draft: z.boolean(),
24 | name: z.string(),
25 | title: z.string(),
26 | avatar: z.object({
27 | src: z.string(),
28 | alt: z.string(),
29 | }),
30 | publishDate: z.string().transform(str => new Date(str)),
31 | }),
32 | });
33 |
34 | // 3. Export a single `collections` object to register your collection(s)
35 | // This key should match your collection directory name in "src/content"
36 | export const collections = {
37 | 'docs': blogCollection,
38 | 'releases': blogCollection,
39 | 'team': teamCollection,
40 | };
41 |
--------------------------------------------------------------------------------
/Documentation/Onix/src/content/docs/getstarted.md:
--------------------------------------------------------------------------------
1 | ---
2 | draft: false
3 | title: Onix - Get started
4 | snippet: "Learn the basics of onix CoGet started"
5 | image: {
6 | src: "https://raw.githubusercontent.com/mariojgt/onix/main/Documentation/Onix/imgs/Started.png",
7 | alt: "full stack web development"
8 | }
9 | publishDate: "2022-11-08 11:39"
10 | category: "controls"
11 | author: Mario Tarosso
12 | tags: [started, docs, getstarted]
13 | ---
14 |
15 | ## Get started
16 |
17 | Onix is a page builder that integrates with laravel, the new version 3 is a complete rewrite of the previous version, it is now integrate better with laravel and it is more flexible.
18 |
19 | To start run the following command:
20 |
21 | 'composer require mariojgt/onix'
22 |
23 | 'php artisan install:onix'
24 | // add the following line to the .env file
25 | VITE_ONIX_API_KEY=any_value // this is to avoid unwanted requests to the api
26 |
27 | ### Creating reusable blocks
28 | php artisan onix:block
29 |
30 | and follow the instructions, this will create a new block class and blade template in the `resources/onix/blocks` folder.
31 | and the php class will be in the `app/Onix/Blocks` folder.
32 |
33 | ### Accessing the page builder
34 | to acess the page builder you can use the path `onix/pages/index`
35 |
--------------------------------------------------------------------------------
/Documentation/Onix/src/content/releases/3.0.0Version.md:
--------------------------------------------------------------------------------
1 | ---
2 | draft: false
3 | title: onix - Next release 3.0.0
4 | snippet: "onix next release 3.0.0 features"
5 | image: {
6 | src: "https://raw.githubusercontent.com/mariojgt/onix/main/Documentation/Onix/imgs/Releases.png",
7 | alt: "full stack web development"
8 | }
9 | publishDate: "2023-03-08 11:10"
10 | category: "release"
11 | author: Mario Tarosso
12 | tags: [started, docs, release]
13 | ---
14 |
15 | ## Version 3.0.0
16 |
17 | This version is a major release, it contains a lot of new features and improvements.
18 |
--------------------------------------------------------------------------------
/Documentation/Onix/src/content/team/janette-lynch.md:
--------------------------------------------------------------------------------
1 | ---
2 | draft: false
3 | name: "Janette Lynch"
4 | title: "Senior Director"
5 | avatar: {
6 | src: "https://images.unsplash.com/photo-1580489944761-15a19d654956?&fit=crop&w=280",
7 | alt: "Janette Lynch"
8 | }
9 | publishDate: "2022-11-07 15:39"
10 | ---
11 |
--------------------------------------------------------------------------------
/Documentation/Onix/src/content/team/marcell-ziemann.md:
--------------------------------------------------------------------------------
1 | ---
2 | draft: false
3 | name: "Marcell Ziemann"
4 | title: "Principal Strategist"
5 | avatar: {
6 | src: "https://images.unsplash.com/photo-1633332755192-727a05c4013d?&fit=crop&w=280",
7 | alt: "Marcell Ziemann"
8 | }
9 | publishDate: "2022-11-08 15:39"
10 | ---
11 |
--------------------------------------------------------------------------------
/Documentation/Onix/src/content/team/robert-palmer.md:
--------------------------------------------------------------------------------
1 | ---
2 | draft: false
3 | name: "Robert Palmer"
4 | title: "Marketing Engineer"
5 | avatar: {
6 | src: "https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?&fit=crop&w=280",
7 | alt: "Robert Palmer"
8 | }
9 | publishDate: "2022-11-09 15:39"
10 | ---
11 |
--------------------------------------------------------------------------------
/Documentation/Onix/src/env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
--------------------------------------------------------------------------------
/Documentation/Onix/src/layouts/BlogLayout.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import Container from "@components/container.astro";
3 | import { getFormattedDate } from "@utils/all";
4 | import { log } from "astro/dist/core/logger/core";
5 | import Layout from "./Layout.astro";
6 |
7 | const { frontmatter } = Astro.props;
8 | ---
9 |
10 |
11 |
12 |
13 |
14 | {frontmatter.category}
15 |
16 |
18 | {frontmatter.title}
19 |
20 |
21 |
22 | {frontmatter.author}
23 |
24 |
•
25 |
26 | {getFormattedDate(frontmatter.publishDate)}
27 |
28 |
•
29 |
30 | {
31 | frontmatter.tags.map((tag) => (
32 | #{tag}
33 | ))
34 | }
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/Documentation/Onix/src/pages/about.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import { getCollection } from "astro:content";
3 | import { Picture } from "@astrojs/image/components";
4 | import Layout from "@layouts/Layout.astro";
5 | import Container from "@components/container.astro";
6 | import Sectionhead from "@components/sectionhead.astro";
7 |
8 | // Filter team entries with 'draft: false' & date before current date
9 | const publishedTeamMembers = await getCollection("team", ({ data }) => {
10 | return !data.draft && data.publishDate < new Date();
11 | });
12 | ---
13 |
14 |
15 |
16 |
17 | About
18 | We are a small passionate team.
19 |
20 |
21 |
22 |
23 | Empowering the world with Astro.
24 |
25 |
26 | We're a multi-cultural team from around the world! We come from diverse
27 | backgrounds, bringing different personalities, experiences and skills to
28 | the job. This is what makes our team so special.
29 |
30 |
31 |
32 | {
33 | publishedTeamMembers.map((teamMemberEntry) => (
34 |
35 |
48 |
49 |
50 |
51 | {teamMemberEntry.data.name}
52 |
53 |
54 | {teamMemberEntry.data.title}
55 |
56 |
57 |
58 | ))
59 | }
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/Documentation/Onix/src/pages/contact.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import { Icon } from "astro-icon";
3 | import Layout from "@layouts/Layout.astro";
4 | import Container from "@components/container.astro";
5 | import Sectionhead from "@components/sectionhead.astro";
6 | import Button from "@components/ui/button.astro";
7 | import Contactform from "@components/contactform.astro";
8 | ---
9 |
10 |
11 |
12 |
13 | Contact
14 | We are a here to help.
15 |
16 |
17 |
18 |
19 |
Contact Astroship
20 |
21 | Have something to say? We are here to help. Fill up the form or send
22 | email or call phone.
23 |
24 |
25 |
26 |
27 | 1734 Sanfransico, CA 93063
28 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Documentation/Onix/src/pages/docs.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import { getCollection } from "astro:content";
3 | import { Picture } from "@astrojs/image/components";
4 | import Layout from "@layouts/Layout.astro";
5 | import Container from "@components/container.astro";
6 | import Sectionhead from "@components/sectionhead.astro";
7 |
8 | // Filter blog entries with 'draft: false' & date before current date
9 | const publishedBlogEntries = await getCollection("docs", ({ data }) => {
10 | return !data.draft && data.publishDate < new Date();
11 | });
12 |
13 | // Sort content entries by publication date
14 | publishedBlogEntries.sort(function (a, b) {
15 | return b.data.publishDate.valueOf() - a.data.publishDate.valueOf();
16 | });
17 | ---
18 |
19 |
20 |
21 |
22 | onix
23 |
24 | Docs, tutorials, and guides for onix.
25 |
26 |
27 |
28 |
74 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/Documentation/Onix/src/pages/docs/[slug].astro:
--------------------------------------------------------------------------------
1 | ---
2 | import { getCollection } from "astro:content";
3 | import Layout from "@layouts/Layout.astro";
4 | import Container from "@components/container.astro";
5 |
6 | // Generate a new path for every collection entry
7 | export async function getStaticPaths() {
8 | const blogEntries = await getCollection("docs");
9 | return blogEntries.map((entry) => ({
10 | params: { slug: entry.slug },
11 | props: { entry },
12 | }));
13 | }
14 |
15 | // Get the entry directly from the prop on render
16 | const { entry } = Astro.props;
17 | const { Content } = await entry.render();
18 | ---
19 |
20 |
21 |
22 |
23 |
24 | {entry.data.category}
25 |
26 |
28 | {entry.data.title}
29 |
30 |
31 |
32 | {entry.data.author}
33 |
34 |
•
35 |
38 | {entry.data.publishDate.toDateString()}
39 |
40 |
•
41 |
42 | {
43 | entry.data.tags.map((tag) => (
44 | #{tag}
45 | ))
46 | }
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/Documentation/Onix/src/pages/index.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import Container from "@components/container.astro";
3 | import Cta from "@components/cta.astro";
4 | import Features from "@components/features.astro";
5 | import Footer from "@components/footer.astro";
6 | import Hero from "@components/hero.astro";
7 | import Logos from "@components/logos.astro";
8 | import Layout from "@layouts/Layout.astro";
9 | ---
10 |
11 |
12 |
13 |
14 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Documentation/Onix/src/pages/pricing.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import Layout from "@layouts/Layout.astro";
3 | import Container from "@components/container.astro";
4 | import Sectionhead from "@components/sectionhead.astro";
5 | import Pricing from "@components/pricing.astro";
6 |
7 | const pricing = [
8 | {
9 | name: "Personal",
10 | price: "Free",
11 | popular: false,
12 | features: [
13 | "Lifetime free",
14 | "Up to 3 users",
15 | "Unlimited Pages",
16 | "Astro Sub domain",
17 | "Basic Integrations",
18 | "Community Support",
19 | ],
20 | button: {
21 | text: "Get Started",
22 | link: "/",
23 | },
24 | },
25 | {
26 | name: "Startup",
27 | price: {
28 | monthly: "$19",
29 | annual: "$16",
30 | discount: "10%",
31 | original: "$24",
32 | },
33 | popular: true,
34 | features: [
35 | "All Free Features",
36 | "Up to 20 users",
37 | "20 Custom domains",
38 | "Unlimited Collaborators",
39 | "Advanced Integrations",
40 | "Priority Support",
41 | ],
42 | button: {
43 | text: "Get Started",
44 | link: "#",
45 | },
46 | },
47 | {
48 | name: "Enterprise",
49 | price: "Custom",
50 | popular: false,
51 | features: [
52 | "All Pro Features",
53 | "Unlimited Custom domains",
54 | "99.99% Uptime SLA",
55 | "SAML & SSO Integration",
56 | "Dedicated Account Manager",
57 | "24/7 Phone Support",
58 | ],
59 | button: {
60 | text: "Contact us",
61 | link: "/contact",
62 | },
63 | },
64 | ];
65 | ---
66 |
67 |
68 |
69 |
70 | Pricing
71 | Simple & Predictable pricing. No Surprises.
74 |
75 |
76 |
77 | {pricing.map((item) =>
)}
78 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/Documentation/Onix/src/pages/releases.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import { getCollection } from "astro:content";
3 | import { Picture } from "@astrojs/image/components";
4 | import Layout from "@layouts/Layout.astro";
5 | import Container from "@components/container.astro";
6 | import Sectionhead from "@components/sectionhead.astro";
7 |
8 | // Filter blog entries with 'draft: false' & date before current date
9 | const publishedBlogEntries = await getCollection("releases", ({ data }) => {
10 | return !data.draft && data.publishDate < new Date();
11 | });
12 |
13 | // Sort content entries by publication date
14 | publishedBlogEntries.sort(function (a, b) {
15 | return b.data.publishDate.valueOf() - a.data.publishDate.valueOf();
16 | });
17 | ---
18 |
19 |
20 |
21 |
22 | onix
23 |
24 | Docs, tutorials, and guides for onix.
25 |
26 |
27 |
28 |
74 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/Documentation/Onix/src/pages/releases/[slug].astro:
--------------------------------------------------------------------------------
1 | ---
2 | import { getCollection } from "astro:content";
3 | import Layout from "@layouts/Layout.astro";
4 | import Container from "@components/container.astro";
5 |
6 | // Generate a new path for every collection entry
7 | export async function getStaticPaths() {
8 | const blogEntries = await getCollection("releases");
9 | return blogEntries.map((entry) => ({
10 | params: { slug: entry.slug },
11 | props: { entry },
12 | }));
13 | }
14 |
15 | // Get the entry directly from the prop on render
16 | const { entry } = Astro.props;
17 | const { Content } = await entry.render();
18 | ---
19 |
20 |
21 |
22 |
23 |
24 | {entry.data.category}
25 |
26 |
28 | {entry.data.title}
29 |
30 |
31 |
32 | {entry.data.author}
33 |
34 |
•
35 |
38 | {entry.data.publishDate.toDateString()}
39 |
40 |
•
41 |
42 | {
43 | entry.data.tags.map((tag) => (
44 | #{tag}
45 | ))
46 | }
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/Documentation/Onix/src/utils/all.js:
--------------------------------------------------------------------------------
1 | /** */
2 | export const getFormattedDate = (date) =>
3 | date
4 | ? new Date(date).toLocaleDateString("en-us", {
5 | year: "numeric",
6 | month: "short",
7 | day: "numeric",
8 | })
9 | : "";
10 |
--------------------------------------------------------------------------------
/Documentation/Onix/tailwind.config.cjs:
--------------------------------------------------------------------------------
1 | /** @type {import('tailwindcss').Config} */
2 | const defaultTheme = require("tailwindcss/defaultTheme");
3 | module.exports = {
4 | content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"],
5 | theme: {
6 | extend: {
7 | fontFamily: {
8 | sans: ["InterVariable", "Inter", ...defaultTheme.fontFamily.sans],
9 | },
10 | },
11 | colors: {
12 | 'master': {
13 | 100: '#1f2636',
14 | 200: '#2a3247'
15 | },
16 | 'master-text': {
17 | 100: '#ffffff',
18 | 200: '#696b69',
19 | },
20 | yellow: {
21 | 100: '#f9e79f',
22 | 200: '#f7dc6f',
23 | 300: '#f4d03f',
24 | 400: '#f1c40f',
25 | 500: '#e8b800',
26 | 600: '#b79500',
27 | 700: '#846200',
28 | 800: '#513000',
29 | 900: '#1f0d00',
30 | },
31 | rarity: {
32 | poor: '#9d9d9d',
33 | common: '#ffffff',
34 | uncommon: '#1eff00',
35 | rare: '#0070dd',
36 | epic: '#a335ee',
37 | legendary: '#ff8000',
38 | artifact: '#e6cc80',
39 | heirloom: '#00ccff',
40 | wow: '#00ccff',
41 | }
42 | }
43 | },
44 | plugins: [
45 | require("@tailwindcss/typography")
46 | ],
47 | };
48 |
--------------------------------------------------------------------------------
/Documentation/Onix/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "astro/tsconfigs/base",
3 | "compilerOptions": {
4 | "strictNullChecks": true,
5 | "baseUrl": "src",
6 | "paths": {
7 | "@lib/*": [
8 | "lib/*"
9 | ],
10 | "@utils/*": [
11 | "utils/*"
12 | ],
13 | "@components/*": [
14 | "components/*"
15 | ],
16 | "@layouts/*": [
17 | "layouts/*"
18 | ],
19 | "@assets/*": [
20 | "assets/*"
21 | ],
22 | "@pages/*": [
23 | "pages/*"
24 | ],
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Mario Jose Goes Tarosso
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Publish/BladeLayout/onix.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | {{ $title ?? 'Onix Grape js' }}
8 | {{ Vite::useBuildDirectory('vendor/Onix/' . session('template'))->withEntryPoints([
9 | 'resources/vendor/Onix/js/app.js',
10 | 'resources/vendor/Onix/css/app.css',
11 | ]) }}
12 | @stack('css')
13 |
14 |
15 |
16 | {{ $slot }}
17 |
18 | @stack('js')
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Publish/Config/onix.php:
--------------------------------------------------------------------------------
1 | env('VITE_ONIX_API_KEY'), // Prevent the api unwanted requests
5 |
6 | /*
7 | |--------------------------------------------------------------------------
8 | | Onix block generator output path
9 | |--------------------------------------------------------------------------
10 | */
11 | 'media_path' => 'onix.media', // The component looks
12 | 'component_path' => 'onix.blocks', // The blocks html content
13 | /*
14 | |--------------------------------------------------------------------------
15 | | Onix available editor color palette
16 | |--------------------------------------------------------------------------
17 | */
18 | 'primary_color' => [
19 | '#000000ff',
20 | '#0d1b2aff',
21 | '#231942ff',
22 | '#01161eff',
23 | '#3d5a80ff',
24 | '#1f2041ff',
25 | ],
26 | 'color_secondary' => [
27 | '#14213dff',
28 | '#1b263bff',
29 | '#5e548eff',
30 | '#124559ff',
31 | '#98c1d9ff',
32 | '#4b3f72ff',
33 | '#f7b267ff',
34 | '#f79d65ff',
35 | '#f4845fff',
36 | '#f27059ff',
37 | '#f25c54ff',
38 | ],
39 | 'color_tertiary' => [
40 | '#fca311ff',
41 | '#415a77ff',
42 | '#9f86c0ff',
43 | '#598392ff',
44 | '#e0fbfcff',
45 | '#ffc857ff',
46 | ],
47 | 'color_quaternary' => [
48 | '#e5e5e5ff',
49 | '#778da9ff',
50 | '#be95c4ff',
51 | '#aec3b0ff',
52 | '#ee6c4dff',
53 | '#119da4ff',
54 | ],
55 |
56 | /*
57 | |--------------------------------------------------------------------------
58 | | Onix editor css and js files
59 | |--------------------------------------------------------------------------
60 | */
61 | 'editor_base_path' => 'vendor/Onix',
62 | // The last name of you css file used in vite
63 | 'editor_css' => [
64 | 'app.css',
65 | ],
66 | // The last name of you js file used in vite
67 | 'editor_js' => [
68 | 'app.js',
69 | ],
70 |
71 | // If you want to restrict the access to the editor you can add the middleware here
72 | 'middleware' => [
73 | 'web',
74 | ],
75 |
76 | // Onix blade pages route prefix
77 | 'route_prefix' => 'onix/',
78 | ];
79 |
--------------------------------------------------------------------------------
/Publish/Npm/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "scripts": {
4 | "dev": "vite",
5 | "build": "vite build"
6 | },
7 | "devDependencies": {
8 | "@vue/compiler-sfc": "^3.0.5",
9 | "autoprefixer": "^10.4.13",
10 | "axios": "^1.3.4",
11 | "cross-env": "^7.0",
12 | "laravel-mix": "^6.0.10",
13 | "laravel-vite-plugin": "^0.7.1",
14 | "lodash": "^4.17.19",
15 | "popper.js": "^1.12",
16 | "postcss": "^8.4.21",
17 | "resolve-url-loader": "^5.0.0",
18 | "sass": "^1.32.4",
19 | "sass-loader": "^13.2.0",
20 | "tailwindcss": "^3.2.7",
21 | "vite": "^4.1.4",
22 | "vue-loader": "^17.0.1"
23 | },
24 | "dependencies": {
25 | "@fortawesome/fontawesome-free": "^6.3.0",
26 | "daisyui": "^4.11.1",
27 | "grapesjs": "^0.21.4",
28 | "grapesjs-aviary": "^0.1.2",
29 | "grapesjs-blocks-basic": "^1.0.1",
30 | "grapesjs-blocks-flexbox": "^0.1.1",
31 | "grapesjs-component-code-editor": "^1.0.20",
32 | "grapesjs-component-countdown": "^1.0.1",
33 | "grapesjs-firestore": "^1.0.2",
34 | "grapesjs-lory-slider": "^0.1.5",
35 | "grapesjs-navbar": "^1.0.1",
36 | "grapesjs-plugin-export": "^1.0.7",
37 | "grapesjs-plugin-filestack": "^0.1.1",
38 | "grapesjs-plugin-forms": "^2.0.1",
39 | "grapesjs-preset-webpage": "^1.0.2",
40 | "grapesjs-script-editor": "^1.0.3",
41 | "grapesjs-tabs": "^1.0.6",
42 | "sweetalert2": "^11.4.8",
43 | "toastify-js": "^1.9.3",
44 | "vue": "^3.0.5"
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/Publish/Npm/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | tailwindcss: {},
4 | autoprefixer: {},
5 | },
6 | }
7 |
--------------------------------------------------------------------------------
/Publish/Npm/tailwind.config.js:
--------------------------------------------------------------------------------
1 | const plugin = require('tailwindcss/plugin')
2 |
3 | module.exports = {
4 | content: [
5 | // Path to my php view it will only purge stuff we going to use
6 | "./resources/vendor/Onix/**/*.js",
7 | "./resources/vendor/Onix/**/*.txt",
8 | "./vendor/mariojgt/onix/**/*.php",
9 | "./resources/views/**/*.php",
10 | ],
11 | theme: {
12 | extend: {},
13 | },
14 | plugins: [
15 | require('daisyui'),
16 | ],
17 | daisyui: {
18 | themes: ["light", "dark", "cupcake"],
19 | },
20 | }
21 |
--------------------------------------------------------------------------------
/Publish/Npm/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite';
2 | import laravel from 'laravel-vite-plugin';
3 |
4 | export default defineConfig({
5 | plugins: [
6 | laravel([
7 | 'resources/vendor/Onix/js/OnixSetup/onixGrapeJs.js', // Normal js files
8 | 'resources/vendor/Onix/js/app.js', // Normal js files
9 | 'resources/vendor/Onix/css/app.css', // Normal css files
10 | ])
11 | ],
12 | build: {
13 | outDir: 'public/vendor/Onix/starter',
14 | emptyOutDir: true,
15 | rollupOptions: {
16 | input: {
17 | grape: '/resources/vendor/Onix/js/OnixSetup/onixGrapeJs.js',
18 | app: '/resources/vendor/Onix/js/app.js',
19 | css: '/resources/vendor/Onix/css/app.css',
20 | },
21 | },
22 | },
23 | server: {
24 | host: '0.0.0.0',
25 | hmr: {
26 | host: 'localhost'
27 | }
28 | },
29 | });
30 |
--------------------------------------------------------------------------------
/Publish/OnixPhpBlocks/Blocks/footer.blade.php:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/Publish/OnixPhpBlocks/Blocks/home-page-example-01.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
Login now!
5 |
Provident cupiditate voluptatem et in. Quaerat fugiat ut assumenda excepturi exercitationem
6 | quasi. In deleniti eaque aut repudiandae et a id nisi.
7 |
8 |
9 |
10 |
11 |
12 | Email
13 |
14 |
15 |
16 |
25 |
26 | Login
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/Publish/OnixPhpBlocks/Blocks/navbar.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
17 |
20 |
21 |
22 |
24 |
26 |
27 |
28 |
29 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/Publish/OnixPhpBlocks/Class/Footer.php:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Publish/OnixPhpBlocks/Media/home-page-example-01-media.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Publish/OnixPhpBlocks/Media/mavbar-media.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Publish/OnixPhpBlocks/Media/todo-list-media.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Publish/Public/assets/app-031d5ede.js:
--------------------------------------------------------------------------------
1 | import{S as w}from"./sweetalert2-e4475c8a.js";window.Swal=w;
2 |
--------------------------------------------------------------------------------
/Publish/Public/assets/app-1a750ca9.js:
--------------------------------------------------------------------------------
1 | import{S as t,a as c}from"./sweetalert2-cf3b0484.js";window.Swal=t;const a=async function(i){const o=document.getElementById(i);try{await c.get("/deploy/info").then(n=>{let e="";n.data.data.forEach(r=>{e+=`${r.text}
`}),o.innerHTML=e})}catch{t.fire({icon:"error",title:"Oops...",text:"Something went wrong getting the deploy info!😭"})}};window.deploySite=async function(i,o){const n=document.getElementById(o);n.innerHTML="";try{t.fire({icon:"success",title:"Success!",text:"Site deployment started!🚀"});const e=setInterval(()=>{a(o)},1e3);await c.post("/deploy/start",{mode:i}).then(r=>{t.fire({icon:"success",title:"Success!",text:"Site deployment completed!🚀"}),setTimeout(()=>{clearInterval(e)},1e3)})}catch{t.fire({icon:"error",title:"Oops...",text:"Something went wrong deploying the site!😭"})}setTimeout(()=>{clearInterval(codeFeedbak)},1e3)};
2 |
--------------------------------------------------------------------------------
/Publish/Public/assets/app-4dc72098.js:
--------------------------------------------------------------------------------
1 | import{S as t,a as c}from"./sweetalert2-cf3b0484.js";window.Swal=t;const a=async function(i){const o=document.getElementById(i);try{await c.get("/deploy/info").then(n=>{let e="";n.data.data.forEach(r=>{e+=`${r.text}
`}),o.innerHTML=e})}catch{t.fire({icon:"error",title:"Oops...",text:"Something went wrong getting the deploy info!😭"})}};window.deploySite=async function(i,o){const n=document.getElementById(o);n.innerHTML="";try{t.fire({icon:"success",title:"Success!",text:"Site deployment started!🚀"});const e=setInterval(()=>{a(o)},1e3);await c.post("/deploy/start",{mode:i}).then(r=>{t.fire({icon:"success",title:"Success!",text:"Site deployment completed!🚀"}),setTimeout(()=>{clearInterval(e)},1e3)})}catch{t.fire({icon:"error",title:"Oops...",text:"Something went wrong deploying the site!😭"}),setTimeout(()=>{clearInterval(codeFeedbak)},1e3)}};
2 |
--------------------------------------------------------------------------------
/Publish/Public/assets/app-a2b59f39.js:
--------------------------------------------------------------------------------
1 | import{b as r,S as t,a}from"./sweetalert2-b81e8371.js";window.axios=r;window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";window.Swal=t;const c=async function(i){const o=document.getElementById(i);try{await a.get("/deploy/info").then(n=>{let e="";n.data.data.forEach(s=>{e+=`${s.text}
`}),o.innerHTML=e})}catch{t.fire({icon:"error",title:"Oops...",text:"Something went wrong getting the deploy info!😭"})}};window.deploySite=async function(i,o){const n=document.getElementById(o);n.innerHTML="";try{t.fire({icon:"success",title:"Success!",text:"Site deployment started!🚀"});const e=setInterval(()=>{c(o)},1e3);await a.post("/deploy/start",{mode:i}).then(s=>{t.fire({icon:"success",title:"Success!",text:"Site deployment completed!🚀"}),setTimeout(()=>{clearInterval(e)},1e3)})}catch{t.fire({icon:"error",title:"Oops...",text:"Something went wrong deploying the site!😭"})}setTimeout(()=>{clearInterval(codeFeedbak)},1e3)};
2 |
--------------------------------------------------------------------------------
/Publish/Public/assets/app-cf52c452.js:
--------------------------------------------------------------------------------
1 | import{b as r,S as t,a}from"./sweetalert2-4194db84.js";window.axios=r;window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";window.Swal=t;const c=async function(i){const o=document.getElementById(i);try{await a.get("/deploy/info").then(n=>{let e="";n.data.data.forEach(s=>{e+=`${s.text}
`}),o.innerHTML=e})}catch{t.fire({icon:"error",title:"Oops...",text:"Something went wrong getting the deploy info!😭"})}};window.deploySite=async function(i,o){const n=document.getElementById(o);n.innerHTML="";try{t.fire({icon:"success",title:"Success!",text:"Site deployment started!🚀"});const e=setInterval(()=>{c(o)},1e3);await a.post("/deploy/start",{mode:i}).then(s=>{t.fire({icon:"success",title:"Success!",text:"Site deployment completed!🚀"}),setTimeout(()=>{clearInterval(e)},1e3)})}catch{t.fire({icon:"error",title:"Oops...",text:"Something went wrong deploying the site!😭"})}setTimeout(()=>{clearInterval(codeFeedbak)},1e3)};
2 |
--------------------------------------------------------------------------------
/Publish/Public/assets/app-de8ff430.js:
--------------------------------------------------------------------------------
1 | import{b as r,S as t,a}from"./sweetalert2-7c60aed3.js";window.axios=r;window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";window.Swal=t;const c=async function(i){const o=document.getElementById(i);try{await a.get("/deploy/info").then(n=>{let e="";n.data.data.forEach(s=>{e+=`${s.text}
`}),o.innerHTML=e})}catch{t.fire({icon:"error",title:"Oops...",text:"Something went wrong getting the deploy info!😭"})}};window.deploySite=async function(i,o){const n=document.getElementById(o);n.innerHTML="";try{t.fire({icon:"success",title:"Success!",text:"Site deployment started!🚀"});const e=setInterval(()=>{c(o)},1e3);await a.post("/deploy/start",{mode:i}).then(s=>{t.fire({icon:"success",title:"Success!",text:"Site deployment completed!🚀"}),setTimeout(()=>{clearInterval(e)},1e3)})}catch{t.fire({icon:"error",title:"Oops...",text:"Something went wrong deploying the site!😭"})}setTimeout(()=>{clearInterval(codeFeedbak)},1e3)};
2 |
--------------------------------------------------------------------------------
/Publish/Public/assets/main-fonts-1fc5d1c7.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mariojgt/onix-pro/66875d08d22b084ee27a9c2812f16e684335f5ab/Publish/Public/assets/main-fonts-1fc5d1c7.eot
--------------------------------------------------------------------------------
/Publish/Public/assets/main-fonts-adff1e6b.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mariojgt/onix-pro/66875d08d22b084ee27a9c2812f16e684335f5ab/Publish/Public/assets/main-fonts-adff1e6b.ttf
--------------------------------------------------------------------------------
/Publish/Public/assets/main-fonts-c3dd9523.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mariojgt/onix-pro/66875d08d22b084ee27a9c2812f16e684335f5ab/Publish/Public/assets/main-fonts-c3dd9523.woff
--------------------------------------------------------------------------------
/Publish/Public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "_sweetalert2-7c60aed3.js": {
3 | "css": [
4 | "assets/sweetalert2-4370e638.css"
5 | ],
6 | "file": "assets/sweetalert2-7c60aed3.js"
7 | },
8 | "resources/vendor/Onix/css/app.css": {
9 | "file": "assets/app-4c960b16.css",
10 | "isEntry": true,
11 | "src": "resources/vendor/Onix/css/app.css"
12 | },
13 | "resources/vendor/Onix/js/OnixSetup/onixGrapeJs.css": {
14 | "file": "assets/onixGrapeJs-328607b6.css",
15 | "src": "resources/vendor/Onix/js/OnixSetup/onixGrapeJs.css"
16 | },
17 | "resources/vendor/Onix/js/OnixSetup/onixGrapeJs.js": {
18 | "css": [
19 | "assets/onixGrapeJs-328607b6.css"
20 | ],
21 | "file": "assets/grape-3d252b9a.js",
22 | "imports": [
23 | "_sweetalert2-7c60aed3.js"
24 | ],
25 | "isEntry": true,
26 | "src": "resources/vendor/Onix/js/OnixSetup/onixGrapeJs.js"
27 | },
28 | "resources/vendor/Onix/js/app.js": {
29 | "file": "assets/app-de8ff430.js",
30 | "imports": [
31 | "_sweetalert2-7c60aed3.js"
32 | ],
33 | "isEntry": true,
34 | "src": "resources/vendor/Onix/js/app.js"
35 | },
36 | "sweetalert2.css": {
37 | "file": "assets/sweetalert2-4370e638.css",
38 | "src": "sweetalert2.css"
39 | }
40 | }
--------------------------------------------------------------------------------
/Publish/Public/starter/assets/app-339814be.js:
--------------------------------------------------------------------------------
1 | import{b as c,S as n,a as i}from"./sweetalert2-7c60aed3.js";window.axios=c;window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";window.Swal=n;const r=async function(s){const t=document.getElementById(s);try{await i.get("/deploy/info").then(o=>{let e="";o.data.data.forEach(a=>{e+=`${a.text}
`}),t.innerHTML=e})}catch{n.fire({icon:"error",title:"Oops...",text:"Something went wrong getting the deploy info!😭"})}};window.deploySite=async function(s,t){const o=document.getElementById(t);o.innerHTML="";try{n.fire({icon:"success",title:"Success!",text:"Site deployment started!🚀"});const e=setInterval(()=>{r(t)},1e3);await i.post("/deploy/start",{mode:s}).then(a=>{n.fire({icon:"success",title:"Success!",text:"Site deployment completed!🚀"}),setTimeout(()=>{clearInterval(e)},1e3)})}catch(e){console.log(e)}setTimeout(()=>{clearInterval(codeFeedbak)},1e3)};
2 |
--------------------------------------------------------------------------------
/Publish/Public/starter/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "_sweetalert2-7c60aed3.js": {
3 | "css": [
4 | "assets/sweetalert2-4370e638.css"
5 | ],
6 | "file": "assets/sweetalert2-7c60aed3.js"
7 | },
8 | "resources/vendor/Onix/css/app.css": {
9 | "file": "assets/app-4c960b16.css",
10 | "isEntry": true,
11 | "src": "resources/vendor/Onix/css/app.css"
12 | },
13 | "resources/vendor/Onix/js/OnixSetup/onixGrapeJs.css": {
14 | "file": "assets/onixGrapeJs-328607b6.css",
15 | "src": "resources/vendor/Onix/js/OnixSetup/onixGrapeJs.css"
16 | },
17 | "resources/vendor/Onix/js/OnixSetup/onixGrapeJs.js": {
18 | "css": [
19 | "assets/onixGrapeJs-328607b6.css"
20 | ],
21 | "file": "assets/grape-b02a3bd2.js",
22 | "imports": [
23 | "_sweetalert2-7c60aed3.js"
24 | ],
25 | "isEntry": true,
26 | "src": "resources/vendor/Onix/js/OnixSetup/onixGrapeJs.js"
27 | },
28 | "resources/vendor/Onix/js/app.js": {
29 | "file": "assets/app-339814be.js",
30 | "imports": [
31 | "_sweetalert2-7c60aed3.js"
32 | ],
33 | "isEntry": true,
34 | "src": "resources/vendor/Onix/js/app.js"
35 | },
36 | "sweetalert2.css": {
37 | "file": "assets/sweetalert2-4370e638.css",
38 | "src": "sweetalert2.css"
39 | }
40 | }
--------------------------------------------------------------------------------
/Publish/Resource/css/app.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
4 |
5 |
--------------------------------------------------------------------------------
/Publish/Resource/js/OnixSetup/helpers/onixApi.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios';
2 |
3 | // Create an axios instance and set the base url to the api and export it
4 | const token = import.meta.env.VITE_ONIX_API_KEY;
5 |
6 | const api = axios.create({
7 | baseURL: '/onix-api/',
8 | headers: {
9 | 'Authorization': 'Bearer ' + token,
10 | 'Accept': 'application/json',
11 | 'Content-Type': 'application/json',
12 | },
13 | });
14 |
15 | export default api;
16 |
--------------------------------------------------------------------------------
/Publish/Resource/js/OnixSetup/onixGrapeJs.js:
--------------------------------------------------------------------------------
1 | // Import the grape scss file
2 | import 'grapesjs/dist/css/grapes.min.css';
3 | import grapesjs from 'grapesjs';
4 | import onixPreset from './webpreset/index.ts';
5 | import javascriptEditor from 'grapesjs-script-editor';
6 | import codeEditor from 'grapesjs-component-code-editor';
7 | import { startCodeEditor, loadEditorData, saveEditorData, getSiteStyles } from './helpers/onixEditorHelper.js';
8 |
9 | let editor = null;
10 |
11 | const startOnixEditor = async (cssStyles = [], jsScripts = []) => {
12 | // Create the grape js editor
13 | editor = grapesjs.init({
14 | container: '#gjs',
15 | width: 'auto',
16 | height: '1000px',
17 | showOffsets: true,
18 | noticeOnUnload: false,
19 | storageManager: false,
20 | fromElement: true,
21 | plugins: [onixPreset, codeEditor, javascriptEditor],
22 | canvas: {
23 | styles: cssStyles,
24 | scripts: jsScripts
25 | }
26 | });
27 | // Automatically update the editor style when the page is loaded
28 | startCodeEditor(editor);
29 | };
30 |
31 | // Create a function and export to the window so we can call and start the editor from the blade file
32 | window.startEditor = async function (mode, slug, template) {
33 | const styles = await getSiteStyles(template);
34 | await startOnixEditor(styles.css, styles.js);
35 | await loadEditorData(editor, mode, slug, template);
36 | }
37 | // Expose to the browser the save function so we can use it in the blade file
38 | window.saveEditorData = function () {
39 | saveEditorData(editor, true);
40 | }
41 |
--------------------------------------------------------------------------------
/Publish/Resource/js/OnixSetup/webpreset/commands/index.ts:
--------------------------------------------------------------------------------
1 | import type grapesjs from "grapesjs";
2 | import { RequiredPluginOptions } from "..";
3 |
4 | import openImport from "./openImport";
5 | import {
6 | cmdImport,
7 | cmdDeviceDesktop,
8 | cmdDeviceTablet,
9 | cmdDeviceMobile,
10 | cmdClear,
11 | saveData,
12 | loadData
13 | } from "../consts";
14 |
15 | import { saveEditorData } from '../../helpers/onixEditorHelper.js';
16 |
17 | export default (editor: grapesjs.Editor, config: RequiredPluginOptions) => {
18 | const { Commands } = editor;
19 | const txtConfirm = config.textCleanCanvas;
20 |
21 | Commands.add(cmdImport, openImport(editor, config));
22 | Commands.add(cmdDeviceDesktop, {
23 | run: (ed) => ed.setDevice("Desktop"),
24 | stop: () => {},
25 | });
26 | Commands.add(cmdDeviceTablet, {
27 | run: (ed) => ed.setDevice("Tablet"),
28 | stop: () => {},
29 | });
30 | Commands.add(cmdDeviceMobile, {
31 | run: (ed) => ed.setDevice("Mobile portrait"),
32 | stop: () => {},
33 | });
34 | Commands.add(
35 | cmdClear,
36 | (e) => confirm(txtConfirm) && e.runCommand("core:canvas-clear")
37 | );
38 |
39 | // Function that saves the data
40 | Commands.add(saveData, (editor) => {
41 | saveEditorData(editor);
42 | });
43 |
44 | // Function that saves the data
45 | Commands.add(loadData, (editor) => {
46 | editor.runCommand("onix-grape-save");
47 | });
48 | };
49 |
--------------------------------------------------------------------------------
/Publish/Resource/js/OnixSetup/webpreset/commands/openImport.ts:
--------------------------------------------------------------------------------
1 | import type grapesjs from 'grapesjs';
2 | import { RequiredPluginOptions } from '..';
3 |
4 | import { cmdImport } from '../consts';
5 |
6 | type CommandInterface = Parameters[1];
7 |
8 | export default (editor: grapesjs.Editor, config: RequiredPluginOptions): CommandInterface => {
9 | const pfx = editor.getConfig('stylePrefix');
10 | const modal = editor.Modal;
11 | const container = document.createElement('div');
12 | const importLabel = config.modalImportLabel;
13 | const importCnt = config.modalImportContent;
14 | // @ts-ignore
15 | const codeViewer = editor.CodeManager.getViewer('CodeMirror').clone();
16 | let viewerEditor = codeViewer.editor;
17 |
18 | // Init import button
19 | const btnImp = document.createElement('button');
20 | btnImp.type = 'button';
21 | btnImp.innerHTML = config.modalImportButton;
22 | btnImp.className = `${pfx}btn-prim ${pfx}btn-import`;
23 | btnImp.onclick = e => {
24 | editor.Css.clear();
25 | editor.setComponents(viewerEditor.getValue().trim());
26 | modal.close();
27 | };
28 |
29 | // Init code viewer
30 | codeViewer.set({ ...{
31 | codeName: 'htmlmixed',
32 | theme: 'hopscotch',
33 | readOnly: 0
34 | }, ...config.importViewerOptions});
35 |
36 | return {
37 | run(editor) {
38 | if (!viewerEditor) {
39 | const txtarea = document.createElement('textarea');
40 |
41 | if (importLabel) {
42 | const labelEl = document.createElement('div');
43 | labelEl.className = `${pfx}import-label`;
44 | labelEl.innerHTML = importLabel;
45 | container.appendChild(labelEl);
46 | }
47 |
48 | container.appendChild(txtarea);
49 | container.appendChild(btnImp);
50 | codeViewer.init(txtarea);
51 | viewerEditor = codeViewer.editor;
52 | }
53 |
54 | modal.setTitle(config.modalImportTitle);
55 | modal.setContent(container);
56 | const cnt = typeof importCnt == 'function' ? importCnt(editor) : importCnt;
57 | codeViewer.setContent(cnt || '');
58 | modal.open().onceClose(() => editor.stopCommand(cmdImport))
59 | viewerEditor.refresh();
60 | },
61 |
62 | stop() {
63 | modal.close();
64 | }
65 | };
66 | };
67 |
--------------------------------------------------------------------------------
/Publish/Resource/js/OnixSetup/webpreset/consts.ts:
--------------------------------------------------------------------------------
1 | export const cmdImport = 'gjs-open-import-webpage';
2 | export const cmdDeviceDesktop = 'set-device-desktop';
3 | export const cmdDeviceTablet = 'set-device-tablet';
4 | export const cmdDeviceMobile = 'set-device-mobile';
5 | export const cmdClear = 'canvas-clear';
6 | export const saveData = 'save-data';
7 | export const loadData = 'load-data';
8 |
--------------------------------------------------------------------------------
/Publish/Resource/js/OnixSetup/webpreset/index.ts:
--------------------------------------------------------------------------------
1 | import type grapesjs from 'grapesjs';
2 | import commands from './commands';
3 | import blocks from './blocks';
4 | import panels from './panels';
5 | import components from './components';
6 |
7 | export type PluginOptions = {
8 | /**
9 | * Which blocks to add.
10 | * @default ['link-block', 'quote', 'text-basic']
11 | */
12 | blocks?: string[];
13 |
14 | /**
15 | * Add custom block options, based on block id.
16 | * @default (blockId) => ({})
17 | * @example (blockId) => blockId === 'quote' ? { attributes: {...} } : {};
18 | */
19 | block?: (blockId: string) => ({});
20 |
21 | /**
22 | * Modal import title.
23 | * @default 'Import'
24 | */
25 | modalImportTitle?: string;
26 |
27 | /**
28 | * Modal import button text.
29 | * @default 'Import'
30 | */
31 | modalImportButton?: string;
32 |
33 | /**
34 | * Import description inside import modal.
35 | * @default ''
36 | */
37 | modalImportLabel?: string;
38 |
39 | /**
40 | * Default content to setup on import model open.
41 | * Could also be a function with a dynamic content return (must be a string).
42 | * @default ''
43 | * @example editor => editor.getHtml()
44 | */
45 | modalImportContent?: string | ((editor: grapesjs.Editor) => string);
46 |
47 | /**
48 | * Code viewer (eg. CodeMirror) options.
49 | * @default {}
50 | */
51 | importViewerOptions?: Record;
52 |
53 | /**
54 | * Confirm text before clearing the canvas.
55 | * @default 'Are you sure you want to clear the canvas?'
56 | */
57 | textCleanCanvas?: string;
58 |
59 | /**
60 | * Show the Style Manager on component change.
61 | * @default true
62 | */
63 | showStylesOnChange?: boolean;
64 |
65 | /**
66 | * Load custom preset theme.
67 | * @default true
68 | */
69 | useCustomTheme?: boolean;
70 | };
71 |
72 | export type RequiredPluginOptions = Required;
73 |
74 | const plugin: grapesjs.Plugin = (editor, opts: Partial = {}) => {
75 | const config: RequiredPluginOptions = {
76 | modalImportTitle: 'Import',
77 | modalImportButton: 'Import',
78 | modalImportLabel: '',
79 | modalImportContent: '',
80 | importViewerOptions: {},
81 | textCleanCanvas: 'Are you sure you want to clear the canvas?',
82 | showStylesOnChange: true,
83 | useCustomTheme: true,
84 | ...opts,
85 | };
86 |
87 | // Example change the editor theme
88 | // if (config.useCustomTheme && typeof window !== 'undefined') {
89 | // const primaryColor = '#0d3b66';
90 | // const secondaryColor = '#faf0ca';
91 | // const tertiaryColor = '#f4d35e';
92 | // const quaternaryColor = '#ee964b';
93 | // const prefix = 'gjs-';
94 | // let cssString = '';
95 |
96 | // [
97 | // ['one', primaryColor],
98 | // ['two', secondaryColor],
99 | // ['three', tertiaryColor],
100 | // ['four', quaternaryColor],
101 | // ].forEach(([cnum, ccol]) => {
102 | // cssString += `
103 | // .${prefix}${cnum}-bg {
104 | // background-color: ${ccol};
105 | // }
106 |
107 | // .${prefix}${cnum}-color {
108 | // color: ${ccol};
109 | // }
110 |
111 | // .${prefix}${cnum}-color-h:hover {
112 | // color: ${ccol};
113 | // }
114 | // `;
115 | // });
116 |
117 | // const style = document.createElement('style');
118 | // style.innerText = cssString;
119 | // document.head.appendChild(style);
120 | // }
121 |
122 | // Load components
123 | components(editor, config);
124 |
125 | // Load blocks
126 | blocks(editor, config);
127 |
128 | // Load commands
129 | commands(editor, config);
130 |
131 | // Load panels
132 | panels(editor, config);
133 | }
134 |
135 | export default plugin;
136 |
--------------------------------------------------------------------------------
/Publish/Resource/js/app.js:
--------------------------------------------------------------------------------
1 | // ES6 Modules or TypeScript
2 | import Swal from 'sweetalert2/dist/sweetalert2.js'
3 | import 'sweetalert2/src/sweetalert2.scss'
4 | import onixApi from './OnixSetup/helpers/onixApi.js';
5 | // Import axios
6 | import axios from 'axios';
7 | window.axios = axios;
8 |
9 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
10 |
11 | // Export the swetalert2 to the window object so we can use it in the blade file
12 | window.Swal = Swal;
13 |
14 | const getDeplyInfo = async function (codeDisplayId) {
15 | // Find the code display element
16 | const codeDisplay = document.getElementById(codeDisplayId);
17 | // Get the select elemtn value based in the id deploy-mode
18 | try {
19 | await onixApi.get('/deploy/info').then((response) => {
20 | let outPut = '';
21 | response.data.data.forEach(item => {
22 | // now we append a pre tag with the lines of code and the code tag with the code content
23 | outPut += `${item.text}
`
24 | });
25 | codeDisplay.innerHTML = outPut;
26 | });
27 | } catch (error) {
28 | Swal.fire({
29 | icon: 'error',
30 | title: 'Oops...',
31 | text: 'Something went wrong getting the deploy info!😭',
32 | });
33 | }
34 | }
35 |
36 | // Create a function and export to the window so we can start the deployment process from the blade file
37 | window.deploySite = async function (deployMode, codeFeedbackId) {
38 | // Find the code display element
39 | const codeDisplay = document.getElementById(codeFeedbackId);
40 | // Clear the code display
41 | codeDisplay.innerHTML = '';
42 |
43 | // Get the select elemtn value based in the id deploy-mode
44 | try {
45 | Swal.fire({
46 | icon: 'success',
47 | title: 'Success!',
48 | text: 'Site deployment started!🚀',
49 | });
50 |
51 | const codeFeedbak = setInterval(() => {
52 | getDeplyInfo(codeFeedbackId);
53 | }, 1000);
54 |
55 | await onixApi.post('/deploy/start',{
56 | mode: deployMode
57 | }).then((response) => {
58 | Swal.fire({
59 | icon: 'success',
60 | title: 'Success!',
61 | text: 'Site deployment completed!🚀',
62 | });
63 | setTimeout(() => {
64 | clearInterval(codeFeedbak);
65 | }, 1000);
66 | });
67 | } catch (error) {
68 | console.log(error);
69 | // Swal.fire({
70 | // icon: 'error',
71 | // title: 'Oops...',
72 | // text: 'Something went wrong deploying the site!😭',
73 | // });
74 | }
75 | setTimeout(() => {
76 | clearInterval(codeFeedbak);
77 | }, 1000);
78 | }
79 |
--------------------------------------------------------------------------------
/Publish/Resource/safePurge.txt:
--------------------------------------------------------------------------------
1 | footer footer-center p-10 bg-primary text-primary-content inline-block fill-current font-bold grid grid-flow-col gap-4 fill-current bg-black
2 |
--------------------------------------------------------------------------------
/Publish/Stubs/BaseHtmlPage.stub:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Wave - Bootstrap 5 One Page Template
9 |
13 |
14 |
15 |
21 | {{styles}}
22 |
23 |
24 |
25 | {{html}}
26 |
27 | {{scripts}}
28 |
29 |
--------------------------------------------------------------------------------
/Publish/Templates/luxgamers.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mariojgt/onix-pro/66875d08d22b084ee27a9c2812f16e684335f5ab/Publish/Templates/luxgamers.zip
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Onix - Laravel Page Builder
2 |
3 | Onix is a powerful page builder that integrates seamlessly with Laravel. It provides a flexible and efficient way to create reusable blocks and manage pages.
4 |
5 | ## Getting Started
6 |
7 | To get started with Onix, you need to install it via composer:
8 |
9 | ```sh
10 | composer require mariojgt/onix
11 | ```
12 |
13 | After installation, run the Onix installation command:
14 |
15 | ```sh
16 | php artisan install:onix
17 | ```
18 |
19 | Add the following line to your `.env` file to avoid unwanted requests to the API:
20 |
21 | ```sh
22 | VITE_ONIX_API_KEY=any_value
23 | ```
24 |
25 | ## Creating Reusable Blocks
26 |
27 | To create a new block, run the following command and follow the instructions:
28 |
29 | ```sh
30 | php artisan onix:block
31 | ```
32 |
33 | This will create a new block class and blade template in the `resources/onix/blocks` folder. The PHP class will be located in the `app/Onix/Blocks` folder.
34 |
35 | ### Accessing the Page Builder Settings
36 |
37 | To access the page builder, navigate to the path `onix/settings` in your application.
38 | You can protect the acess using the config `onix.middleware` by default its web(public)
39 |
40 | ## Commands
41 |
42 | Onix provides several commands to help manage your application:
43 |
44 | - Republish: `Mariojgt\Onix\Commands\Republish`
45 | - Install: `Mariojgt\Onix\Commands\Install`
46 | - CreateOnixBlock: `Mariojgt\Onix\Commands\CreateOnixBlock`
47 |
48 | ## Controllers
49 |
50 | Onix includes several controllers for handling various aspects of your application:
51 |
52 | - OnixApiController: `Mariojgt\Onix\Controllers\OnixApiController`
53 | - OnixApiDeployController: `Mariojgt\Onix\Controllers\OnixApiDeployController`
54 | - OnixBlockController: `Mariojgt\Onix\Controllers\OnixBlockController`
55 | - OnixController: `Mariojgt\Onix\Controllers\OnixController`
56 | - OnixDeployController: `Mariojgt\Onix\Controllers\OnixDeployController`
57 | - OnixPageController: `Mariojgt\Onix\Controllers\OnixPageController`
58 | - OnixSettingsController: `Mariojgt\Onix\Controllers\OnixSettingsController`
59 | - OnixSitePageController: `Mariojgt\Onix\Controllers\OnixSitePageController`
60 |
61 | ## Contributing
62 |
63 | Contributions are welcome!
64 |
65 | ## License
66 |
67 | This project is licensed under the terms of the MIT License.
68 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mariojgt/onix",
3 | "description": "A laravel page buidler out of the box",
4 | "keywords": [
5 | "laravel",
6 | "grapejs",
7 | "grape js",
8 | "ck editor",
9 | "laravel page builder",
10 | "page builder",
11 | "builder"
12 | ],
13 | "type": "laravel",
14 | "license": "MIT",
15 | "authors": [
16 | {
17 | "name": "mario",
18 | "email": "mariojgt2@gmail.com"
19 | }
20 | ],
21 | "require":{
22 | "php": "^8.1"
23 | },
24 | "autoload": {
25 | "psr-4": {
26 | "Mariojgt\\Onix\\": "src"
27 | }
28 | },
29 |
30 | "scripts": {
31 | "post-autoload-dump": [
32 | "@php artisan route:list"
33 | ]
34 | },
35 |
36 | "extra": {
37 | "laravel": {
38 | "providers": [
39 | "Mariojgt\\Onix\\OnixProvider"
40 | ]
41 | }
42 | },
43 | "minimum-stability": "dev",
44 | "prefer-stable": true
45 | }
46 |
--------------------------------------------------------------------------------
/src/Commands/CreateOnixBlock.php:
--------------------------------------------------------------------------------
1 | ask('What is the name of the template? example: starter');
45 | // Ask for the block id
46 | $componentId = $this->ask('What is the id of the block?');
47 | // Ask for the block name
48 | $label = $this->ask('What is the name of the block?');
49 | // Ask for the block content location
50 | $mediaPath = $this->ask('What is the media path filename?(example: home-media)');
51 | // Ask for the block media location
52 | $contentPath = $this->ask('What is the content filename? (example: home))');
53 | // Ask for the category
54 | $category = $this->ask('What is the category of the block?');
55 | // Ask for the class name
56 | $className = $this->ask('What is the class name of the block?');
57 | $className = Str::studly($className);
58 | $replace = [
59 | 'variables' => [
60 | '{{componentId}}',
61 | '{{label}}',
62 | '{{mediaPath}}',
63 | '{{contentPath}}',
64 | '{{category}}',
65 | '{{className}}',
66 | '{{templateName}}'
67 | ],
68 | 'values' => [
69 | $componentId,
70 | $label,
71 | $mediaPath,
72 | $contentPath,
73 | $category,
74 | $className,
75 | $templateName
76 | ]
77 | ];
78 |
79 | // Create the default media file
80 | $this->loadStubFileAndSave(
81 | 'BaseBlockClass',
82 | app_path('Onix/Blocks'),
83 | $className,
84 | '.php',
85 | $replace
86 | );
87 |
88 | // Create the default media file
89 | $this->loadStubFileAndSave(
90 | 'BaseBlockMedia',
91 | resource_path('views/onix/media'),
92 | Str::kebab($mediaPath),
93 | '.blade.php'
94 | );
95 |
96 | // Create the default content file
97 | $this->loadStubFileAndSave(
98 | 'BaseBlockContent',
99 | resource_path('views/onix/blocks'),
100 | Str::kebab($contentPath),
101 | '.blade.php'
102 | );
103 |
104 | $this->newLine();
105 | $this->info('The Block was created');
106 | }
107 |
108 | private function loadStubFileAndSave($stubFile, $saveFilePath, $fileName, $fileExtension = '.php', $replace = null)
109 | {
110 | File::isDirectory($saveFilePath) or File::makeDirectory($saveFilePath, 0777, true, true);
111 |
112 | $stub = file_get_contents(__DIR__ . '../../Stubs/' . $stubFile . '.stub');
113 | if (!empty($replace)) {
114 | $stub = str_replace($replace['variables'], $replace['values'], $stub);
115 | }
116 | file_put_contents($saveFilePath . '/' . $fileName . $fileExtension, $stub);
117 | }
118 | }
119 |
--------------------------------------------------------------------------------
/src/Commands/Install.php:
--------------------------------------------------------------------------------
1 | 'Mariojgt\Onix\OnixProvider',
46 | '--force' => true,
47 | ]);
48 |
49 | // Migrate
50 | Artisan::call('migrate');
51 |
52 | // Call the seeder for the onix settings
53 | Artisan::call('db:seed', [
54 | '--class' => OnixSettingsSeeder::class,
55 | '--force' => true,
56 | ]);
57 |
58 | Artisan::call('db:seed', [
59 | '--class' => OnixTemplateSeeder::class,
60 | '--force' => true,
61 | ]);
62 |
63 | Artisan::call('install:template luxgamers');
64 |
65 | $this->newLine();
66 | $this->info('The command was successful!');
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/src/Commands/InstallTemplate.php:
--------------------------------------------------------------------------------
1 | argument('template');
47 |
48 | if ($template === null) {
49 | // Read all the zip file on the template folder
50 | $templates = [];
51 | $files = File::files(public_path('templates'));
52 | foreach ($files as $file) {
53 | $templates[] = str_replace('.zip', '', $file->getFilename());
54 | }
55 |
56 | // reordering the array
57 | $templates = array_values($templates);
58 | $this->info('Please select the template you want to install');
59 | $this->info('----------------------------------------------');
60 | $template = $this->choice('Select the template', $templates);
61 | }
62 |
63 | // Unzip the template
64 | $this->info('Unzipping the template');
65 | $zip = new \ZipArchive;
66 | $res = $zip->open(public_path('templates/' . $template . '.zip'));
67 |
68 | if ($res === TRUE) {
69 | $zip->extractTo(public_path('templates/'));
70 | $zip->close();
71 | } else {
72 | $this->error('Failed to unzip the template');
73 | }
74 |
75 | // Copy the css and js to public folder
76 | $this->info('Copying the template assets');
77 | File::copyDirectory(public_path('templates/' . $template . '/css'), public_path('vendor/Onix/' . $template . '/css'));
78 | File::copyDirectory(public_path('templates/' . $template . '/js'), public_path('vendor/Onix/' . $template . '/js'));
79 |
80 | // Move the blocks to the blocks folder
81 | $this->info('Copying the template blocks');
82 | File::copyDirectory(public_path('templates/' . $template . '/blocks/phpblock/'), app_path('Onix/Blocks/'));
83 |
84 | $this->info('Copying the html template blocks');
85 | File::copyDirectory(public_path('templates/' . $template . '/blocks/htmlblock/'), resource_path('views/onix/blocks/'));
86 |
87 | $this->info('Copying the block icons');
88 | File::copyDirectory(public_path('templates/' . $template . '/blocks/media/'), resource_path('views/onix/media/'));
89 |
90 | // Find the seeder TemplateSeeder and run it
91 | $this->info('Running the template seeder');
92 | $seeder = public_path('templates/' . $template . '/template.json');
93 | // Get the class from the $seeder file
94 | $templateInfo = json_decode(file_get_contents($seeder));
95 |
96 |
97 | $this->info('Copying the template assets');
98 | foreach ($templateInfo->file_copy_paths as $key => $item) {
99 | File::copyDirectory(public_path($item->from), public_path($item->to));
100 | }
101 |
102 | OnixTemplate::updateOrCreate([
103 | 'slug' => $templateInfo->template->slug,
104 | ], [
105 | 'name' => $templateInfo->template->name,
106 | 'slug' => $templateInfo->template->slug,
107 | 'description' => $templateInfo->template->description,
108 | 'css_file' => $templateInfo->template->css_file,
109 | 'js_file' => $templateInfo->template->js_file,
110 | 'use_manifest' => $templateInfo->template->use_manifest,
111 | 'preview_image' => $templateInfo->template->preview_image,
112 | ]);
113 | }
114 | }
115 |
--------------------------------------------------------------------------------
/src/Commands/Republish.php:
--------------------------------------------------------------------------------
1 | output->createProgressBar(5);
42 | $bar->start();
43 |
44 | // First we move the resources where we keep the css and js files
45 | $targetFolderResource = resource_path('vendor/Onix/');
46 | $destitionResource = __DIR__ . '/../../Publish/Resource';
47 | File::copyDirectory($targetFolderResource, $destitionResource);
48 | $bar->advance(); // Little Progress bar
49 |
50 | // Now we move the already compiles files from the public
51 | $targetFolderPublic = public_path('vendor/Onix/');
52 | $destitionPublic = __DIR__ . '/../../Publish/Public';
53 | File::copyDirectory($targetFolderPublic, $destitionPublic);
54 | $bar->advance(); // Little Progress bar
55 |
56 | // Now we copy the webpack file
57 | $targetFolderWebPack = base_path('vite.config.js');
58 | $destitionWebPack = __DIR__ . '/../../Publish/Npm/vite.config.js';
59 | File::copy($targetFolderWebPack, $destitionWebPack);
60 | $bar->advance(); // Little Progress bar
61 |
62 | // Now we copy the tailwind file
63 | $targetFolderWebPack = base_path('tailwind.config.js');
64 | $destitionWebPack = __DIR__ . '/../../Publish/Npm/tailwind.config.js';
65 | File::copy($targetFolderWebPack, $destitionWebPack);
66 | $bar->advance(); // Little Progress bar
67 |
68 | // Now we copy the package.json file
69 | $targetFolderWebPack = base_path('package.json');
70 | $destitionWebPack = __DIR__ . '/../../Publish/Npm/package.json';
71 | File::copy($targetFolderWebPack, $destitionWebPack);
72 | $bar->advance(); // Little Progress bar
73 |
74 | // Now copy the config file
75 | $targetFolderWebPack = base_path('config/onix.php');
76 | $destitionWebPack = __DIR__ . '/../../Publish/Config/onix.php';
77 | File::copy($targetFolderWebPack, $destitionWebPack);
78 | $bar->advance(); // Little Progress bar
79 |
80 | $bar->finish(); // Finish the progress bar
81 | $this->newLine();
82 | $this->info('The command was successful!');
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/src/Controllers/OnixApiDeployController.php:
--------------------------------------------------------------------------------
1 | outPutFile = 'deploy.txt';
21 | }
22 |
23 |
24 | public function startDeploy(Request $request)
25 | {
26 | $validation = $request->validate([
27 | 'mode' => 'required|in:blade, inersia',
28 | ]);
29 |
30 | switch ($validation['mode']) {
31 | case 'blade':
32 | $this->bladeFilesDeploy($request);
33 | break;
34 | case 'inersia':
35 | $this->inersiaFilesDeploy($request);
36 | break;
37 | default:
38 | return response()->json([
39 | 'status' => false,
40 | 'data' => 'Mode not found',
41 | ]);
42 | break;
43 | }
44 |
45 | // This command will run vite build
46 | $this->runDeployCommand($request);
47 |
48 | return response()->json([
49 | 'status' => true,
50 | 'data' => 'Deploy completed',
51 | ]);
52 | }
53 |
54 | public function readyDeployStatusFile(Request $request)
55 | {
56 | // Check if the file exist
57 | if (file_exists(public_path($this->outPutFile))) {
58 | $lines = [];
59 | // Read the file
60 | $file = file_get_contents(public_path($this->outPutFile));
61 | // On every \n we add to the array
62 | $lines = explode("\n", $file);
63 | $finalLines = [];
64 | // Loop the lines and append the lines and prefix the line with the line number
65 | foreach ($lines as $key => $line) {
66 | $finalLines[] = [
67 | 'line' => $key,
68 | 'editor_prefix' => '>',
69 | 'text' => $line,
70 | ];
71 | }
72 | // Return the file
73 | return response()->json([
74 | 'status' => true,
75 | 'data' => $finalLines,
76 | ]);
77 | } else {
78 | return response()->json([
79 | 'status' => false,
80 | 'data' => 'File not found',
81 | ]);
82 | }
83 | }
84 |
85 | public function bladeFilesDeploy(Request $request): bool
86 | {
87 | // Get all the pages
88 | $pages = OnixPage::all();
89 | // Loop the pages
90 | foreach ($pages as $page) {
91 | $pageHtml = $page->html;
92 | $page->deployed = 1;
93 | $page->save();
94 |
95 | $tags = $page->template->getCssAndJsTag();
96 | // Save the page in to a blade file
97 | $replace = [
98 | 'variables' => [
99 | '{{html}}',
100 | '{{styles}}',
101 | '{{scripts}}',
102 | ],
103 | 'values' => [
104 | $pageHtml,
105 | $tags['styles'],
106 | $tags['scripts'],
107 | ]
108 | ];
109 |
110 | // Create the default media file
111 | $this->loadStubFileAndSave(
112 | 'BaseHtmlPage',
113 | resource_path('views/pages/onix'),
114 | $page->slug,
115 | '.blade.php',
116 | $replace
117 | );
118 | }
119 |
120 | return true;
121 | }
122 |
123 | /**
124 | * This function will run the npm run build command
125 | *
126 | * @param Request $request
127 | *
128 | * @return [type]
129 | */
130 | private function runDeployCommand(Request $request)
131 | {
132 | // Create a blank file in the public folder so we can use to check the terminal information
133 | $file = fopen(public_path($this->outPutFile), 'w');
134 | // clear the file
135 | ftruncate($file, 0);
136 | // Run the build command
137 | $process = Process::start('npm run build');
138 | // Write in the file the command output
139 | fwrite($file, $process->output() . PHP_EOL);
140 | // and display the command output on while is running
141 | while ($process->running()) {
142 | // Now append the output to the file in a new line using 1 second delay
143 | fwrite($file, $process->output() . PHP_EOL);
144 | sleep(1);
145 | }
146 | // now at the end we replace the file with the final output
147 | file_put_contents(public_path($this->outPutFile), $process->output());
148 | // Now we can close the file
149 | fclose($file);
150 | }
151 |
152 | private function loadStubFileAndSave($stubFile, $saveFilePath, $fileName, $fileExtension = '.php', $replace = null) : void
153 | {
154 | File::isDirectory($saveFilePath) or File::makeDirectory($saveFilePath, 0777, true, true);
155 | $stub = file_get_contents(app_path('Onix/Stubs/' . $stubFile . '.stub'));
156 | if (!empty($replace)) {
157 | $stub = str_replace($replace['variables'], $replace['values'], $stub);
158 | }
159 | file_put_contents($saveFilePath . '/' . $fileName . $fileExtension, $stub);
160 |
161 | return;
162 | }
163 | }
164 |
--------------------------------------------------------------------------------
/src/Controllers/OnixBlockController.php:
--------------------------------------------------------------------------------
1 | pluck('name', 'id');
21 |
22 | return view('onix::content.block.index', compact('block', 'templates'));
23 | }
24 |
25 | /**
26 | * @return [blade view]
27 | */
28 | public function editor(Request $request, $slug = null)
29 | {
30 | $block = OnixBlock::where('slug', $slug)->first();
31 |
32 | return view('onix::content.block.editor', compact('block'));
33 | }
34 |
35 | public function delete(Request $request, OnixBlock $block)
36 | {
37 | $block->delete();
38 |
39 | return redirect()->back()->with('info', 'Block deleted');
40 | }
41 |
42 | /**
43 | * @param Request $request
44 | *
45 | * @return [blade view]
46 | */
47 | public function store(Request $request)
48 | {
49 | $request->validate([
50 | 'componentId' => 'required',
51 | 'label' => 'required',
52 | 'media' => 'required',
53 | 'category' => 'required',
54 | 'slug' => 'required|unique:onix_blocks',
55 | 'template_id' => 'required',
56 | ]);
57 |
58 | $block = new OnixBlock();
59 | $block->template_id = $request->template_id;
60 | $block->componentId = $request->componentId;
61 | $block->label = $request->label;
62 | $block->slug = Str::slug($request->slug, '-');
63 | $block->media = $request->media;
64 | $block->category = $request->category;
65 | $block->component_sync = $request->component_sync == 'on' ? 1 : 0;
66 | $block->status = $request->status == 'on' ? 1 : 0;
67 | $block->save();
68 |
69 |
70 | return redirect()->back()->with('success', 'Page created');
71 | }
72 |
73 | /**
74 | * @param Request $request
75 | *
76 | * @return [blade view]
77 | */
78 | public function edit(Request $request, OnixBlock $block)
79 | {
80 | $request->validate([
81 | 'componentId' => 'required',
82 | 'label' => 'required',
83 | 'media' => 'required',
84 | 'category' => 'required',
85 | 'slug' => 'required|unique:onix_blocks,slug,' . $block->id
86 | ]);
87 |
88 | $block->componentId = $request->componentId;
89 | $block->label = $request->label;
90 | $block->slug = Str::slug($request->slug, '-');
91 | $block->media = $request->media;
92 | $block->category = $request->category;
93 | $block->component_sync = $request->component_sync == 'on' ? 1 : 0;
94 | $block->status = $request->status == 'on' ? 1 : 0;
95 | $block->save();
96 |
97 | return redirect()->back()->with('info', 'Block edited');
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/src/Controllers/OnixController.php:
--------------------------------------------------------------------------------
1 | pluck('name', 'id');
23 | return view('onix::content.page.index', compact('pages', 'templates'));
24 | }
25 |
26 | /**
27 | * @return [blade view]
28 | */
29 | public function editor(Request $request, $slug = null)
30 | {
31 | $page = OnixPage::where('slug', $slug)->first();
32 | $template = $page->template;
33 | return view('onix::content.page.editor', compact('page', 'template'));
34 | }
35 |
36 | public function delete(Request $request, OnixPage $page)
37 | {
38 | $page->delete();
39 |
40 | return redirect()->back()->with('info', 'Page deleted');
41 | }
42 |
43 | /**
44 | * @param Request $request
45 | *
46 | * @return [blade view]
47 | */
48 | public function store(Request $request)
49 | {
50 | $request->validate([
51 | 'title' => 'required',
52 | 'template_id' => 'required',
53 | 'slug' => 'required|unique:onix_pages'
54 | ]);
55 |
56 | $page = new OnixPage();
57 | $page->title = $request->title;
58 | $page->slug = Str::slug($request->slug, '-');
59 | $page->status = $request->status == 'on' ? 1 : 0;
60 | $page->template_id = $request->template_id;
61 | $page->save();
62 |
63 | return redirect()->back()->with('success', 'Page created');
64 | }
65 |
66 | /**
67 | * @param Request $request
68 | *
69 | * @return [blade view]
70 | */
71 | public function edit(Request $request, OnixPage $page)
72 | {
73 | $request->validate([
74 | 'title' => 'required',
75 | 'slug' => 'required|unique:onix_pages,slug,' . $page->id
76 | ]);
77 |
78 | $page->title = $request->title;
79 | $page->slug = Str::slug($request->slug, '-');
80 | $page->status = $request->status == 'on' ? 1 : 0;
81 | $page->save();
82 |
83 | return redirect()->back()->with('info', 'Page edited');
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/src/Controllers/OnixSettingsController.php:
--------------------------------------------------------------------------------
1 | color_primary = $request->color_primary;
32 | $onixSetting->color_secondary = $request->color_secondary;
33 | $onixSetting->color_tertiary = $request->color_tertiary;
34 | $onixSetting->color_quaternary = $request->color_quaternary;
35 | $onixSetting->save();
36 |
37 | return redirect()->back()->with('success', 'Settings updated.');
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/Controllers/OnixSitePageController.php:
--------------------------------------------------------------------------------
1 | firstOrFail();
21 | if ($page->status == 0) {
22 | abort(404);
23 | }
24 | session(['template' => $page->template->slug]);
25 | return view('pages.onix.' . $page->slug);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/Controllers/OnixTemplateController.php:
--------------------------------------------------------------------------------
1 | validate([
33 | 'name' => 'required',
34 | 'slug' => 'required|unique:onix_templates,slug,' . $template->id
35 | ]);
36 |
37 | $template->name = $request->name;
38 | $template->slug = Str::slug($request->slug, '-');
39 | $template->use_manifest = $request->use_manifest == 'on' ? 1 : 0;
40 | $template->css_file = $request->css_path;
41 | $template->js_file = $request->js_path;
42 | $template->save();
43 |
44 | return redirect()->back()->with('info', 'Page edited');
45 | }
46 |
47 | /**
48 | * @param Request $request
49 | *
50 | * @return [blade view]
51 | */
52 | public function create(Request $request)
53 | {
54 | $request->validate([
55 | 'name' => 'required',
56 | 'slug' => 'required|unique:onix_templates,slug'
57 | ]);
58 | $template = new OnixTemplate();
59 | $template->name = $request->name;
60 | $template->slug = Str::slug($request->slug, '-');
61 | $template->use_manifest = $request->use_manifest == 'on' ? 1 : 0;
62 | $template->css_file = $request->css_path;
63 | $template->js_file = $request->js_path;
64 | $template->save();
65 |
66 | return redirect()->back()->with('info', 'Page edited');
67 | }
68 |
69 | public function delete(Request $request, OnixTemplate $template)
70 | {
71 | $template->delete();
72 |
73 | return redirect()->back()->with('info', 'Page deleted');
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/src/Database/Migrations/2021_07_21_104406_create_templates_table.php:
--------------------------------------------------------------------------------
1 | id();
16 | $table->string('name');
17 | $table->string('slug')->unique();
18 | $table->string('description')->nullable();
19 | $table->string('css_file')->nullable();
20 | $table->string('js_file')->nullable();
21 | $table->boolean('use_manifest')->default(0);
22 | $table->string('preview_image')->nullable();
23 | $table->timestamps();
24 | });
25 | }
26 |
27 | /**
28 | * Reverse the migrations.
29 | */
30 | public function down(): void
31 | {
32 | Schema::dropIfExists('onix_templates');
33 | }
34 | };
35 |
--------------------------------------------------------------------------------
/src/Database/Migrations/2021_08_26_172454_create_blocks_table.php:
--------------------------------------------------------------------------------
1 | id();
18 | $table->unsignedBigInteger('template_id')->nullable();
19 | $table->foreign('template_id')->references('id')->on('onix_templates')->onDelete('cascade');
20 | $table->string('componentId');
21 | $table->string('label');
22 | $table->string('slug')->unique();
23 | $table->mediumText('media')->nullable();
24 | $table->string('category')->nullable();
25 | $table->tinyInteger('component_sync')->default(1);
26 | $table->longText('content')->nullable();
27 | $table->longText('block_data')->nullable();
28 | $table->tinyInteger('status')->default(1);
29 | $table->timestamps();
30 | });
31 | }
32 |
33 | /**
34 | * Reverse the migrations.
35 | *
36 | * @return void
37 | */
38 | public function down()
39 | {
40 | Schema::dropIfExists('onix_blocks');
41 | }
42 | };
43 |
--------------------------------------------------------------------------------
/src/Database/Migrations/2021_08_26_175636_create_pages_table.php:
--------------------------------------------------------------------------------
1 | id();
18 | $table->unsignedBigInteger('template_id')->nullable();
19 | $table->foreign('template_id')->references('id')->on('onix_templates')->onDelete('cascade');
20 | $table->string('title')->nullable();
21 | $table->string('slug')->nullable();
22 | $table->longText('content')->nullable();
23 | $table->longText('preview')->nullable();
24 | $table->longText('html')->nullable();
25 | $table->tinyInteger('status')->default(1);
26 | $table->tinyInteger('deployed')->default(0);
27 | $table->timestamps();
28 | });
29 | }
30 |
31 | /**
32 | * Reverse the migrations.
33 | *
34 | * @return void
35 | */
36 | public function down()
37 | {
38 | Schema::dropIfExists('onix_pages');
39 | }
40 | };
41 |
--------------------------------------------------------------------------------
/src/Database/Migrations/2021_08_28_175636_create_settings_table.php:
--------------------------------------------------------------------------------
1 | id();
18 | $table->string('color_primary')->default('#000000ff')->nullable();
19 | $table->string('color_secondary')->default('#14213dff')->nullable();
20 | $table->string('color_tertiary')->default('#fca311ff')->nullable();
21 | $table->string('color_quaternary')->default('#e5e5e5ff')->nullable();
22 | $table->timestamps();
23 | });
24 | }
25 |
26 | /**
27 | * Reverse the migrations.
28 | *
29 | * @return void
30 | */
31 | public function down()
32 | {
33 | Schema::dropIfExists('onix_settings');
34 | }
35 | };
36 |
--------------------------------------------------------------------------------
/src/Database/Seeders/OnixSettingsSeeder.php:
--------------------------------------------------------------------------------
1 | delete();
23 | }
24 |
25 | $onixSetting = new OnixSetting();
26 | $onixSetting->color_primary = '#000000ff';
27 | $onixSetting->color_secondary = '#14213dff';
28 | $onixSetting->color_tertiary = '#fca311ff';
29 | $onixSetting->color_quaternary = '#e5e5e5ff';
30 | $onixSetting->save();
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/Database/Seeders/OnixTemplateSeeder.php:
--------------------------------------------------------------------------------
1 | 'starter',
21 | 'slug' => 'starter',
22 | 'description' => 'default content template',
23 | 'css_file' => 'resources/vendor/Onix/css/app.css',
24 | 'js_file' => 'resources/vendor/Onix/js/app.js',
25 | ]);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/Helpers/BaseOnixBlocks.php:
--------------------------------------------------------------------------------
1 | mediaBasePath = config('onix.media_path');
20 | $this->contentBasePath = config('onix.component_path');
21 | }
22 |
23 | public function getContentBladeHtml()
24 | {
25 | return view($this->contentBasePath . '.' . $this->contentPath)->render();
26 | }
27 |
28 | public function getMediaBladeHtml()
29 | {
30 | return view($this->mediaBasePath . '.' . $this->mediaPath)->render();
31 | }
32 |
33 | public function getBlock()
34 | {
35 | return [
36 | 'componentId' => $this->componentId,
37 | 'label' => $this->label,
38 | 'category' => $this->category,
39 | 'media' => $this->getMediaBladeHtml(),
40 | 'content' => $this->getContentBladeHtml(),
41 | ];
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/Middleware/OnixApi.php:
--------------------------------------------------------------------------------
1 | bearerToken();
25 |
26 | // Check if the token match the one in the config
27 | if ($token != config('onix.request_token')) {
28 | return response()->json([
29 | 'message' => 'Unauthorized',
30 | ], 401);
31 | }
32 | return $next($request);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/Model/OnixBase.php:
--------------------------------------------------------------------------------
1 | blade());
15 | */
16 | public function blade()
17 | {
18 | $raw = str_replace('.blade.php', '', $this->filepath);
19 | $raw = str_replace('/', '.', $raw);
20 | $raw = str_replace('views.', '', $raw);
21 | return $raw;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Model/OnixBlock.php:
--------------------------------------------------------------------------------
1 | hasOne(OnixTemplate::class, 'id', 'template_id');
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/Model/OnixPage.php:
--------------------------------------------------------------------------------
1 | hasOne(OnixTemplate::class, 'id', 'template_id');
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/Model/OnixSetting.php:
--------------------------------------------------------------------------------
1 | slug);
29 | if (!file_exists($path)) {
30 | mkdir($path, 0777, true);
31 | }
32 | });
33 | }
34 |
35 | public function getCssFiles()
36 | {
37 | $basePath = config('onix.editor_base_path') . '/' . $this->slug;
38 |
39 | // If the template is not using the manifest file we going to get the css and js files from the database
40 | $css = explode(',', $this->css_file);
41 | foreach ($css as $key => $item) {
42 | // remove any white space
43 | $item = preg_replace('/\s+/', '', $item);
44 | if (Str::startsWith($item, 'http') || Str::startsWith($item, 'https')) {
45 | $cssFiles[] = $item;
46 | } else {
47 | $cssFiles[] = url($basePath . '/' . $item);
48 | }
49 | }
50 | return $cssFiles;
51 | }
52 |
53 | public function getJsFiles()
54 | {
55 | $basePath = config('onix.editor_base_path') . '/' . $this->slug;
56 |
57 | // If the template is not using the manifest file we going to get the css and js files from the database
58 | $js = explode(',', $this->js_file);
59 | foreach ($js as $key => $item) {
60 | // remove any white space
61 | $item = preg_replace('/\s+/', '', $item);
62 | // if start with http we going to use the url as is
63 | if (Str::startsWith($item, 'http') || Str::startsWith($item, 'https')) {
64 | $jsFiles[] = $item;
65 | } else {
66 | $jsFiles[] = url($basePath . '/' . $item);
67 | }
68 | }
69 | return $jsFiles;
70 | }
71 |
72 | public function getCssAndJsTag()
73 | {
74 | $cssFiles = $this->getCssFiles();
75 | $jsFiles = $this->getJsFiles();
76 | $css = '';
77 | $js = '';
78 | foreach ($cssFiles as $key => $item) {
79 | $css .= ' ';
80 | }
81 | foreach ($jsFiles as $key => $item) {
82 | $js .= '';
83 | }
84 | return [
85 | 'styles' => $css,
86 | 'scripts' => $js
87 | ];
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/src/OnixProvider.php:
--------------------------------------------------------------------------------
1 | app->runningInConsole()) {
23 | $this->commands([
24 | Republish::class,
25 | Install::class,
26 | CreateOnixBlock::class,
27 | InstallTemplate::class,
28 | ]);
29 | }
30 |
31 | // Load onix views
32 | $this->loadViewsFrom(__DIR__ . '/views', 'onix');
33 | // Load onix routes
34 | $this->loadRoutesFrom(__DIR__ . '/Routes/web.php');
35 | // Load api routes
36 | $this->loadRoutesFrom(__DIR__ . '/Routes/api.php');
37 | // Load Migrations
38 | $this->loadMigrationsFrom(__DIR__ . '/Database/Migrations');
39 |
40 | $this->app['router']->aliasMiddleware('onix-api', OnixApi::class);
41 | }
42 |
43 | /**
44 | * Register the application services.
45 | *
46 | * @return void
47 | */
48 | public function register()
49 | {
50 | $this->publish();
51 | }
52 |
53 | public function publish()
54 | {
55 | // Publish the npm case we need to do soem developent
56 | $this->publishes([
57 | __DIR__ . '/../Publish/Npm/' => base_path(),
58 | ]);
59 |
60 | // Publish the resource in case we need to compile
61 | $this->publishes([
62 | __DIR__ . '/../Publish/Resource/' => resource_path('vendor/Onix/'),
63 | ]);
64 |
65 | // Publish the public folder
66 | $this->publishes([
67 | __DIR__ . '/../Publish/Public/' => public_path('vendor/Onix/'),
68 | ]);
69 |
70 | // Publish the config folder
71 | $this->publishes([
72 | __DIR__ . '/../Publish/Config/' => config_path(''),
73 | ]);
74 |
75 | /*
76 | |--------------------------------------------------------------------------
77 | | Publish the example blocks
78 | |--------------------------------------------------------------------------
79 | */
80 | // Publish the blocks classes
81 | $this->publishes([
82 | __DIR__ . '/../Publish/OnixPhpBlocks/Class' => app_path('Onix/Blocks'),
83 | ]);
84 |
85 | // Publish the blocks media file
86 | $this->publishes([
87 | __DIR__ . '/../Publish/OnixPhpBlocks/Media' => resource_path('views/onix/media'),
88 | ]);
89 |
90 | // Publish the blocks media file
91 | $this->publishes([
92 | __DIR__ . '/../Publish/OnixPhpBlocks/Blocks' => resource_path('views/onix/blocks'),
93 | ]);
94 |
95 | /*
96 | |--------------------------------------------------------------------------
97 | | Publish the stubs for the pages for the deploy
98 | |--------------------------------------------------------------------------
99 | */
100 | $this->publishes([
101 | __DIR__ . '/../Publish/Stubs' => app_path('Onix/Stubs'),
102 | ]);
103 |
104 | // Publish the layout file for the blade page
105 | $this->publishes([
106 | __DIR__ . '/../Publish/BladeLayout/' => resource_path('views/components/layout'),
107 | ]);
108 |
109 | // publish the templates
110 | $this->publishes([
111 | __DIR__ . '/../Publish/Templates/' => public_path('templates/'),
112 | ]);
113 | }
114 | }
115 |
--------------------------------------------------------------------------------
/src/Routes/api.php:
--------------------------------------------------------------------------------
1 | ['onix-api'],
10 | 'prefix' => 'onix-api',
11 | ], function () {
12 | // Onix controller
13 | Route::get('/config', [OnixApiController::class, 'config']);
14 | Route::get('/site-styles', [OnixApiController::class, 'getSiteStyles']);
15 | // Save pages
16 | Route::post('/save/page', [OnixApiController::class, 'savePage']);
17 | Route::get('/load/page/{slug}', [OnixApiController::class, 'loadPage']);
18 | // Saves Block
19 | Route::post('/save/block', [OnixApiController::class, 'saveBlock']);
20 | Route::get('/load/block/{slug}', [OnixApiController::class, 'loadBlock']);
21 | Route::get('/load/blocks', [OnixApiController::class, 'loadBlocks']);
22 |
23 | // Start deployment
24 | Route::post('/deploy/start', [OnixApiDeployController::class, 'startDeploy']);
25 | Route::get('/deploy/info', [OnixApiDeployController::class, 'readyDeployStatusFile']);
26 | });
27 |
--------------------------------------------------------------------------------
/src/Routes/web.php:
--------------------------------------------------------------------------------
1 | config('onix.middleware'),
13 | ], function () {
14 |
15 | /*
16 | |--------------------------------------------------------------------------
17 | | Onix template controller
18 | |--------------------------------------------------------------------------
19 | */
20 | Route::get('/onix/templates/index', [OnixTemplateController::class, 'index'])->name('onix.templates.index');
21 | Route::delete('/onix/templates/edit/{template}', [OnixTemplateController::class, 'delete'])->name('onix.templates.delete');
22 | Route::post('/onix/templates/edit/{template}', [OnixTemplateController::class, 'edit'])->name('onix.templates.edit');
23 | Route::post('/onix/templates/create', [OnixTemplateController::class, 'create'])->name('onix.templates.create');
24 |
25 | /*
26 | |--------------------------------------------------------------------------
27 | | Onix pages controller
28 | |--------------------------------------------------------------------------
29 | */
30 | Route::get('/onix/pages/index', [OnixPageController::class, 'index'])->name('onix.pages.index');
31 | Route::post('/onix/pages/create', [OnixPageController::class, 'store'])->name('onix.pages.create');
32 | Route::post('/onix/pages/edit/{page}', [OnixPageController::class, 'edit'])->name('onix.pages.edit');
33 | Route::delete('/onix/pages/delete/{page}', [OnixPageController::class, 'delete'])->name('onix.pages.delete');
34 | Route::get('/onix/editor/pages/{slug?}', [OnixPageController::class, 'editor'])->name('onix.pages.editor');
35 |
36 | /*
37 | |--------------------------------------------------------------------------
38 | | Onix blocks controller
39 | |--------------------------------------------------------------------------
40 | */
41 | Route::get('/onix/block/index', [OnixBlockController::class, 'index'])->name('onix.block.index');
42 | Route::post('/onix/block/create', [OnixBlockController::class, 'store'])->name('onix.block.create');
43 | Route::post('/onix/block/edit/{block}', [OnixBlockController::class, 'edit'])->name('onix.block.edit');
44 | Route::delete('/onix/block/delete/{block}', [OnixBlockController::class, 'delete'])->name('onix.block.delete');
45 | Route::get('/onix/editor/block/{slug?}', [OnixBlockController::class, 'editor'])->name('onix.block.editor');
46 |
47 | // Settings blocks
48 | Route::get('/onix/settings', [OnixSettingsController::class, 'index'])->name('onix.settings');
49 | Route::post('/onix/settings', [OnixSettingsController::class, 'update'])->name('onix.settings');
50 |
51 | // Paged deploy page
52 | Route::get('/onix/deploy', [OnixDeployController::class, 'index'])->name('onix.deploy');
53 | });
54 |
55 | Route::group([
56 | 'middleware' => ['web'],
57 | ], function () {
58 | /*
59 | |--------------------------------------------------------------------------
60 | | Onix website pages controller
61 | |--------------------------------------------------------------------------
62 | */
63 | Route::get(config('onix.route_prefix') . '{slug?}', [OnixSitePageController::class, 'index'])->name('onix.page');
64 | });
65 |
--------------------------------------------------------------------------------
/src/Stubs/BaseBlockClass.stub:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/views/components/layout/flash.blade.php:
--------------------------------------------------------------------------------
1 | @if ($message = Session::get('success'))
2 | @push('js')
3 |
13 | @endpush
14 | @endif
15 | @if ($message = Session::get('error'))
16 | @push('js')
17 |
27 | @endpush
28 | @endif
29 |
30 | @if ($message = Session::get('info'))
31 | @push('js')
32 |
42 | @endpush
43 | @endif
44 |
45 | {{-- general message --}}
46 | @if ($errors->any())
47 | @php
48 | $count= 0;
49 | @endphp
50 | @foreach ($errors->all() as $error)
51 | @push('js')
52 |
62 | @endpush
63 | @endforeach
64 | @endif
65 |
--------------------------------------------------------------------------------
/src/views/components/layout/footer.blade.php:
--------------------------------------------------------------------------------
1 |
33 |
--------------------------------------------------------------------------------
/src/views/components/layout/logo.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
8 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/src/views/components/layout/main.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | {{ $title ?? 'Onix Grape js' }}
10 | {{ Vite::useBuildDirectory('vendor/Onix/starter')->withEntryPoints([
11 | 'resources/vendor/Onix/js/OnixSetup/onixGrapeJs.js',
12 | 'resources/vendor/Onix/js/app.js',
13 | 'resources/vendor/Onix/css/app.css',
14 | ]) }}
15 | @stack('css')
16 |
17 |
18 |
19 |
20 | {{-- Id used to toogle the side menu --}}
21 |
22 | {{-- Website content --}}
23 |
24 |
25 |
26 |
27 | {{ $slot }}
28 |
29 | @if ($footer ?? true)
30 |
31 | @endif
32 |
33 | {{-- Side Menu Drawer Start here --}}
34 |
35 |
36 |
37 |
38 | {{-- Side Menu Drawer End here --}}
39 |
40 |
41 | @stack('js')
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/src/views/components/layout/navbar.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{-- Trigger the side menu --}}
4 |
5 | {{-- Mobile Humburber menu --}}
6 |
13 | {{-- Normal Logo --}}
14 |
19 |
20 |
21 |
22 |
23 |
24 | {{--
--}}
38 |
39 |
40 |
41 |
42 | {{--
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
74 |
--}}
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/src/views/components/layout/sidemenu.blade.php:
--------------------------------------------------------------------------------
1 |
71 |
--------------------------------------------------------------------------------
/src/views/components/modal/addEditBlockModal.blade.php:
--------------------------------------------------------------------------------
1 | @props([
2 | 'modalId' => 'create-page',
3 | 'componentId',
4 | 'label',
5 | 'slug',
6 | 'media',
7 | 'status' => true,
8 | 'category',
9 | 'sync' => false,
10 | 'action' => 'onix.pages.create',
11 | 'edit' => false,
12 | 'templates'
13 | ])
14 |
15 |
16 |
17 | @if ($edit)
18 |
19 |
21 |
22 | Edit Block
23 | @else
24 |
25 |
26 |
27 | Create Block
28 | @endif
29 |
30 |
31 |
32 |
33 |
114 |
--------------------------------------------------------------------------------
/src/views/components/modal/addEditPageModal.blade.php:
--------------------------------------------------------------------------------
1 | @props([
2 | 'modalId' => 'create-page',
3 | 'title',
4 | 'slug',
5 | 'status',
6 | 'action' => 'onix.pages.create',
7 | 'edit' => false,
8 | 'status' => true,
9 | 'templates',
10 | ])
11 |
12 |
13 |
15 | @if ($edit)
16 |
18 |
20 |
21 | Edit Page
22 | @else
23 |
25 |
26 |
27 | Create Page
28 | @endif
29 |
30 |
31 |
32 |
33 |
88 |
--------------------------------------------------------------------------------
/src/views/components/modal/addEditTemplateModal.blade.php:
--------------------------------------------------------------------------------
1 | @props([
2 | 'modalId' => 'create-Template',
3 | 'name',
4 | 'slug',
5 | 'use_manifest',
6 | 'action' => 'onix.Templates.create',
7 | 'edit' => false,
8 | 'use_manifest' => true,
9 | 'templates',
10 | 'css_path',
11 | 'js_path',
12 | ])
13 |
14 |
15 |
17 | @if ($edit)
18 |
20 |
22 |
23 | Edit Template
24 | @else
25 |
27 |
28 |
29 | Create Template
30 | @endif
31 |
32 |
33 |
34 |
35 |
98 |
--------------------------------------------------------------------------------
/src/views/components/modal/modalDelete.blade.php:
--------------------------------------------------------------------------------
1 | @props(['action' => '', 'modalId' => 'delete-modal', 'title' => 'Delete', 'message' => 'Are you sure you want to delete this item?'])
2 |
3 |
4 |
5 |
7 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
{{ $title }}
17 |
18 | @method('DELETE')
19 | @csrf
20 |
21 |
22 |
24 |
26 |
27 |
{{ $message }}
28 |
29 |
30 |
31 | Close
32 | Confirm
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/src/views/components/onix/main.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
Enable Auto Save
8 |
9 |
10 |
11 |
12 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/src/views/components/settings/color.blade.php:
--------------------------------------------------------------------------------
1 | @props([
2 | 'fieldName' => 'color-primary',
3 | 'label' => 'Primary Color',
4 | 'colorOptions' => [
5 | '#0d3b66',
6 | '#ee964b',
7 | '#f7b731'
8 | ],
9 | 'value' => '#ffffff'
10 | ])
11 |
12 |
13 |
14 |
15 |
16 |
18 |
19 |
20 |
23 |
24 |
25 |
27 |
28 | @foreach ($colorOptions as $item)
29 |
30 |
32 |
33 |
34 |
35 | @endforeach
36 |
37 |
38 |
39 |
40 |
41 |
42 | @once
43 | @push('js')
44 |
50 | @endpush
51 | @endonce
52 |
--------------------------------------------------------------------------------
/src/views/components/table/row.blade.php:
--------------------------------------------------------------------------------
1 | @props([
2 | 'item',
3 | 'mode' => 'page', // block, page
4 | 'templates',
5 | ])
6 |
7 |
8 |
9 |
10 | @if ($item->media)
11 |
{!! $item->media !!}
12 |
13 | @else
14 |
16 | @endif
17 |
18 |
{{ $item->title }}
19 |
{{ $item->slug }}
20 |
21 |
22 |
25 | @if ($mode == 'page')
26 | @if ($item->deployed == 1)
27 |
28 | Deployed
29 |
30 | @else
31 |
32 | Not Deployed
33 |
34 | @endif
35 | @endif
36 | @if ($mode == 'page')
37 | @if ($item->status == 1)
38 |
39 |
41 |
42 |
43 |
44 | Active
45 |
46 | @else
47 |
48 |
50 |
51 |
52 |
53 | Inactive
54 |
55 | @endif
56 | @endif
57 | @if ($mode == 'page')
58 |
59 |
61 |
63 |
64 |
65 |
66 |
67 |
69 |
71 |
72 |
73 |
75 |
76 | @elseif ($mode == 'block')
77 |
78 |
80 |
82 |
83 |
84 |
87 |
88 | @elseif ($mode == 'template')
89 |
90 |
100 |
101 | @endif
102 |
103 |
104 |
105 |
--------------------------------------------------------------------------------
/src/views/content/block/editor.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | @if (!empty($block))
4 |
9 | @endif
10 |
11 |
--------------------------------------------------------------------------------
/src/views/content/block/index.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
19 |
20 |
21 | @if (count($block) >= 1)
22 | @foreach ($block as $item)
23 |
24 | @endforeach
25 | @else
26 |
29 | @endif
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/src/views/content/deploy/index.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
Deploy log
10 |
You can deploy your site in two ways, blade file or inersia js
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | Depoly mode?
21 | Blade File
22 | Inersia JS
23 |
24 |
25 |
26 |
27 |
28 | Deploy
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/src/views/content/page/editor.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | @if (!empty($page))
4 |
9 | @endif
10 |
11 |
--------------------------------------------------------------------------------
/src/views/content/page/index.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
19 |
20 |
21 | @if (count($pages) >= 1)
22 | @foreach ($pages as $item)
23 |
24 | @endforeach
25 | @else
26 |
29 | @endif
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/src/views/content/settings/index.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
Editor color
10 |
11 |
12 |
13 | @csrf
14 |
15 |
21 |
22 |
28 |
29 |
35 |
36 |
42 |
43 |
44 |
45 |
46 |
47 | Update Settings
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/src/views/content/template/editor.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | @if (!empty($page))
4 |
9 | @endif
10 |
11 |
--------------------------------------------------------------------------------
/src/views/content/template/index.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
19 |
20 |
21 | @if (count($templates) >= 1)
22 | @foreach ($templates as $item)
23 |
24 | @endforeach
25 | @else
26 |
29 | @endif
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------