This commit is contained in:
2023-11-28 04:39:36 +08:00
parent a9ac0e48b3
commit dc37274b6c
86 changed files with 2106 additions and 191 deletions

View File

@@ -0,0 +1,9 @@
<template>
<div></div>
</template>
<script>
export default {
name: "App",
};
</script>
<style></style>

View File

@@ -1 +1,57 @@
import * as bootstrap from "~bootstrap";
import "@tabler/core/src/js/tabler.js";
import "./bootstrap";
import { createApp, defineAsyncComponent } from "vue";
import FrontApp from "@/FrontApp.vue";
const app = createApp({ FrontApp });
const vueComponents = import.meta.glob("@/vue/**/*.vue", {
eager: false,
});
console.log(vueComponents);
import.meta.glob(["../images/**", "../fonts/**"]);
import { createPinia } from "pinia";
app.use(createPinia());
import axios from "./plugins/axios";
import VueAxios from "vue-axios";
app.use(VueAxios, axios);
import auth from "./plugins/auth";
app.use(auth);
import eventBus from "./plugins/event-bus";
app.use(eventBus);
import Vue3Toastify from "vue3-toastify";
import "../css/toastify.css";
app.use(Vue3Toastify);
import { Ziggy as ZiggyRoute } from "./ziggy";
import { ZiggyVue } from "ziggy-js/dist/vue";
app.use(ZiggyVue, ZiggyRoute);
window.Ziggy = ZiggyRoute;
Object.entries({ ...vueComponents }).forEach(([path, definition]) => {
// Get name of component, based on filename
// "./components/Fruits.vue" will become "Fruits"
const componentName = path
.split("/")
.pop()
.replace(/\.\w+$/, "")
.replace(/([a-z])([A-Z])/g, "$1-$2")
.toLowerCase();
// console.log(componentName);
// console.log(typeof definition);
// Register component on this Vue instance
app.component(componentName, defineAsyncComponent(definition));
});
app.mount("#app");

View File

@@ -0,0 +1,75 @@
<template>
<div>
<div class="d-grid gap-2 mx-auto" style="width: 250px">
<img
style="width: 250px; height: auto"
:src="imgSrc"
alt="Featured banner"
/>
<button @click="getEmbedCode" class="btn btn-sm btn-outline-primary px-3">
Get HTML embed code
</button>
</div>
</div>
</template>
<script>
import { toast } from "vue3-toastify";
export default {
name: "GetEmbedCode",
mixins: [],
components: {},
props: ["url", "name"],
data: () => ({
imgSrc: "https://cdn.aibuddytool.com/featured-on-aibuddytool-1-1000.webp",
showToast: false,
}),
computed: {
embedCode() {
return (
"<!-- " +
this.name +
' featured by AiBuddyTool.com --><a href="' +
this.url +
'" target="_blank"><img alt="' +
this.name +
'" style="width: 250px; height: auto" src="' +
this.imgSrc +
'"></a>'
);
},
},
methods: {
getEmbedCode() {
const el = document.createElement("textarea");
el.value = this.embedCode;
document.body.appendChild(el);
el.select();
document.execCommand("copy");
document.body.removeChild(el);
toast(
"Copied! Paste the HTML embed code at the bottom of your business website footer.",
{
position: "bottom-center",
type: "success",
timeout: 3000,
closeOnClick: true,
pauseOnFocusLoss: true,
pauseOnHover: true,
draggable: true,
draggablePercent: 0.6,
showCloseButtonOnHover: false,
hideProgressBar: false,
closeButton: true,
icon: true,
rtl: false,
},
);
},
},
mounted() {},
};
</script>
<style scoped></style>

View File

@@ -1,4 +1,4 @@
const Ziggy = {"url":"https:\/\/aibuddytool.test","port":null,"defaults":{},"routes":{"debugbar.openhandler":{"uri":"_debugbar\/open","methods":["GET","HEAD"]},"debugbar.clockwork":{"uri":"_debugbar\/clockwork\/{id}","methods":["GET","HEAD"]},"debugbar.assets.css":{"uri":"_debugbar\/assets\/stylesheets","methods":["GET","HEAD"]},"debugbar.assets.js":{"uri":"_debugbar\/assets\/javascript","methods":["GET","HEAD"]},"debugbar.cache.delete":{"uri":"_debugbar\/cache\/{key}\/{tags?}","methods":["DELETE"]},"sanctum.csrf-cookie":{"uri":"sanctum\/csrf-cookie","methods":["GET","HEAD"]},"ignition.healthCheck":{"uri":"_ignition\/health-check","methods":["GET","HEAD"]},"ignition.executeSolution":{"uri":"_ignition\/execute-solution","methods":["POST"]},"ignition.updateConfig":{"uri":"_ignition\/update-config","methods":["POST"]},"api.auth.login.post":{"uri":"api\/login","methods":["POST"]},"api.auth.logout.post":{"uri":"api\/logout","methods":["POST"]},"api.admin.post.get":{"uri":"api\/admin\/post\/{id}","methods":["GET","HEAD"]},"api.admin.country-locales":{"uri":"api\/admin\/country-locales","methods":["GET","HEAD"]},"api.admin.categories":{"uri":"api\/admin\/categories\/{country_locale_slug}","methods":["GET","HEAD"]},"api.admin.authors":{"uri":"api\/admin\/authors","methods":["GET","HEAD"]},"api.admin.upload.cloud.image":{"uri":"api\/admin\/image\/upload","methods":["POST"]},"api.admin.post.upsert":{"uri":"api\/admin\/admin\/post\/upsert","methods":["POST"]},"feeds.main":{"uri":"posts.rss","methods":["GET","HEAD"]},"login":{"uri":"login","methods":["GET","HEAD"]},"logout":{"uri":"logout","methods":["POST"]},"register":{"uri":"register","methods":["GET","HEAD"]},"password.request":{"uri":"password\/reset","methods":["GET","HEAD"]},"password.email":{"uri":"password\/email","methods":["POST"]},"password.reset":{"uri":"password\/reset\/{token}","methods":["GET","HEAD"]},"password.update":{"uri":"password\/reset","methods":["POST"]},"password.confirm":{"uri":"password\/confirm","methods":["GET","HEAD"]},"dashboard":{"uri":"admin","methods":["GET","HEAD"]},"admin.changelog":{"uri":"admin\/changelog","methods":["GET","HEAD"]},"about":{"uri":"admin\/about","methods":["GET","HEAD"]},"users.index":{"uri":"admin\/users","methods":["GET","HEAD"]},"posts.manage":{"uri":"admin\/posts","methods":["GET","HEAD"]},"posts.manage.edit":{"uri":"admin\/posts\/edit\/{post_id}","methods":["GET","HEAD"]},"posts.manage.delete":{"uri":"admin\/posts\/delete\/{post_id}","methods":["GET","HEAD"]},"posts.manage.indexing":{"uri":"admin\/posts\/indexing\/{post_id}","methods":["GET","HEAD"]},"posts.manage.new":{"uri":"admin\/posts\/new","methods":["GET","HEAD"]},"profile.show":{"uri":"admin\/profile","methods":["GET","HEAD"]},"profile.update":{"uri":"admin\/profile","methods":["PUT"]},"front.home":{"uri":"\/","methods":["GET","HEAD"]},"front.discover.home":{"uri":"discover","methods":["GET","HEAD"]},"front.discover.category":{"uri":"discover\/{category_slug}","methods":["GET","HEAD"]},"front.terms":{"uri":"terms","methods":["GET","HEAD"]},"front.privacy":{"uri":"privacy","methods":["GET","HEAD"]},"front.disclaimer":{"uri":"disclaimer","methods":["GET","HEAD"]}}};
const Ziggy = {"url":"https:\/\/aibuddytool.test","port":null,"defaults":{},"routes":{"debugbar.openhandler":{"uri":"_debugbar\/open","methods":["GET","HEAD"]},"debugbar.clockwork":{"uri":"_debugbar\/clockwork\/{id}","methods":["GET","HEAD"],"parameters":["id"]},"debugbar.assets.css":{"uri":"_debugbar\/assets\/stylesheets","methods":["GET","HEAD"]},"debugbar.assets.js":{"uri":"_debugbar\/assets\/javascript","methods":["GET","HEAD"]},"debugbar.cache.delete":{"uri":"_debugbar\/cache\/{key}\/{tags?}","methods":["DELETE"],"parameters":["key","tags"]},"sanctum.csrf-cookie":{"uri":"sanctum\/csrf-cookie","methods":["GET","HEAD"]},"ignition.healthCheck":{"uri":"_ignition\/health-check","methods":["GET","HEAD"]},"ignition.executeSolution":{"uri":"_ignition\/execute-solution","methods":["POST"]},"ignition.updateConfig":{"uri":"_ignition\/update-config","methods":["POST"]},"api.auth.login.post":{"uri":"api\/login","methods":["POST"]},"api.auth.logout.post":{"uri":"api\/logout","methods":["POST"]},"api.admin.post.get":{"uri":"api\/admin\/post\/{id}","methods":["GET","HEAD"],"parameters":["id"]},"api.admin.country-locales":{"uri":"api\/admin\/country-locales","methods":["GET","HEAD"]},"api.admin.categories":{"uri":"api\/admin\/categories\/{country_locale_slug}","methods":["GET","HEAD"],"parameters":["country_locale_slug"]},"api.admin.authors":{"uri":"api\/admin\/authors","methods":["GET","HEAD"]},"api.admin.upload.cloud.image":{"uri":"api\/admin\/image\/upload","methods":["POST"]},"api.admin.post.upsert":{"uri":"api\/admin\/admin\/post\/upsert","methods":["POST"]},"feeds.main":{"uri":"posts.rss","methods":["GET","HEAD"]},"login":{"uri":"login","methods":["GET","HEAD"]},"logout":{"uri":"logout","methods":["POST"]},"register":{"uri":"register","methods":["GET","HEAD"]},"password.request":{"uri":"password\/reset","methods":["GET","HEAD"]},"password.email":{"uri":"password\/email","methods":["POST"]},"password.reset":{"uri":"password\/reset\/{token}","methods":["GET","HEAD"],"parameters":["token"]},"password.update":{"uri":"password\/reset","methods":["POST"]},"password.confirm":{"uri":"password\/confirm","methods":["GET","HEAD"]},"dashboard":{"uri":"admin","methods":["GET","HEAD"]},"admin.changelog":{"uri":"admin\/changelog","methods":["GET","HEAD"]},"about":{"uri":"admin\/about","methods":["GET","HEAD"]},"users.index":{"uri":"admin\/users","methods":["GET","HEAD"]},"posts.manage":{"uri":"admin\/posts","methods":["GET","HEAD"]},"posts.manage.edit":{"uri":"admin\/posts\/edit\/{post_id}","methods":["GET","HEAD"],"parameters":["post_id"]},"posts.manage.delete":{"uri":"admin\/posts\/delete\/{post_id}","methods":["GET","HEAD"],"parameters":["post_id"]},"posts.manage.indexing":{"uri":"admin\/posts\/indexing\/{post_id}","methods":["GET","HEAD"],"parameters":["post_id"]},"posts.manage.new":{"uri":"admin\/posts\/new","methods":["GET","HEAD"]},"profile.show":{"uri":"admin\/profile","methods":["GET","HEAD"]},"profile.update":{"uri":"admin\/profile","methods":["PUT"]},"front.home":{"uri":"\/","methods":["GET","HEAD"]},"front.discover.home":{"uri":"discover","methods":["GET","HEAD"]},"front.discover.category":{"uri":"discover\/{category_slug}","methods":["GET","HEAD"],"parameters":["category_slug"]},"front.search.post":{"uri":"ai-search","methods":["POST"]},"front.search.results":{"uri":"ai-search\/{query}","methods":["GET","HEAD"],"parameters":["query"]},"front.aitool.show":{"uri":"ai-tool\/{ai_tool_slug}","methods":["GET","HEAD"],"parameters":["ai_tool_slug"]},"front.terms":{"uri":"terms","methods":["GET","HEAD"]},"front.privacy":{"uri":"privacy","methods":["GET","HEAD"]},"front.disclaimer":{"uri":"disclaimer","methods":["GET","HEAD"]}}};
if (typeof window !== 'undefined' && typeof window.Ziggy !== 'undefined') {
Object.assign(Ziggy.routes, window.Ziggy.routes);