Inertia Structure

app.js file structure.

import 'bootstrap-vue-next/dist/bootstrap-vue-next.css';
import '../scss/app.scss'

import { createApp, h } from 'vue';
import { createInertiaApp } from '@inertiajs/vue3';
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';
import { ZiggyVue } from '../../vendor/tightenco/ziggy/dist/vue.m';
import BootstrapVueNext from 'bootstrap-vue-next'
import i18n from './i18n'
import store from "./state/store";
import VueApexCharts from "vue3-apexcharts";

createInertiaApp({
    title: title => title ? `${title} - Inertia + Vue Admin & Dashboard Template` : 'Judia - Inertia + Vue Admin & Dashboard Template',
    resolve: (name) => resolvePageComponent(`./Pages/${name}.vue`, import.meta.glob('./Pages/**/*.vue')),
    setup({ el, App, props, plugin }) {
        return createApp({ render: () => h(App, props) })
            .use(plugin)
            .use(store)
            .use(BootstrapVueNext)
            .use(i18n)
            .use(VueApexCharts)
            .use(ZiggyVue, Ziggy)
            .mount(el);
    },
    progress: {
        color: '#4B5563',
    },
});    

ssr.js file structure.

import { createSSRApp, h } from 'vue';
import { renderToString } from '@vue/server-renderer';
import { createInertiaApp } from '@inertiajs/vue3';
import createServer from '@inertiajs/vue3/server';
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';
import { ZiggyVue } from '../../vendor/tightenco/ziggy/dist/vue.m';
import BootstrapVueNext from 'bootstrap-vue-next'
import i18n from './i18n'
import store from "./state/store";
import VueApexCharts from "vue3-apexcharts";

createServer((page) =>
    createInertiaApp({
        page,
        render: renderToString,
        title: title => title ? `${title} - Inertia + Vue Admin & Dashboard Template` : 'Judia - Inertia + Vue Admin & Dashboard Template',
        resolve: (name) => resolvePageComponent(`./Pages/${name}.vue`, import.meta.glob('./Pages/**/*.vue')),
        setup({ App, props, plugin }) {
            return createSSRApp({ render: () => h(App, props) })
                .use(plugin)
                .use(store)
                .use(BootstrapVueNext)
                .use(i18n)
                .use(VueApexCharts)
                .use(ZiggyVue, {
                    ...page.props.ziggy,
                    location: new URL(page.props.ziggy.location),
                });
        },
    })
);

Layout setup

You can set the default layout in the resources/js/state/modules/layout.js file.

mode="light" To set layout mode Light.
mode="dark" To set layout mode Dark.
mode="brand" To set layout mode Brand.
cardLayout="borderless" To set layout Borderless.
cardLayout="border" To set layout Border.
position="fixed" To set layout position Fixed.
position="scrollable" To set layout position Scrollable.
topbar="light" To set the Light color of Topbar.
topbar="dark" To set the dark color of Topbar.
topbar="brand" To set the Brand color of Topbar.
topbarImage="pattern-1" To set the pattern-1 of Topbar Image.
topbarImage="pattern-2" To set the pattern-2 of Topbar Image.
topbarImage="pattern-3" To set the pattern-3 of Topbar Image.
preloader="enable" To enable the preloader on the Page.
preloader="disable" To disable the preloader on the Page.
© Judia.
Design & Develop by Themesbrand