nuxt init

This commit is contained in:
hay-kot
2021-07-31 14:00:28 -08:00
parent 79b3985a49
commit 8d3db89327
275 changed files with 13274 additions and 4003 deletions

44
frontend.old/src/main.js Normal file
View File

@@ -0,0 +1,44 @@
import "./installCompAPI"; // Must Be First
import Vue from "vue";
import App from "./App.vue";
import vuetify from "./plugins/vuetify";
import store from "./store";
import VueRouter from "vue-router";
import { router } from "./routes";
import { globals } from "@/utils/globals";
import i18n from "./i18n";
import "typeface-roboto/index.css";
import "./registerServiceWorker";
Vue.config.productionTip = false;
Vue.use(VueRouter);
Vue.component("TheButton", () => import("@/components/UI/Buttons/TheButton.vue"));
Vue.prototype.$globals = globals;
const vueApp = new Vue({
vuetify,
store,
router,
i18n,
render: h => h(App),
}).$mount("#app");
// Truncate
const truncate = function(text, length, clamp) {
clamp = clamp || "...";
let node = document.createElement("div");
node.innerHTML = text;
let content = node.textContent;
return content.length > length ? content.slice(0, length) + clamp : content;
};
const titleCase = function(value) {
return value.replace(/(?:^|\s|-)\S/g, x => x.toUpperCase());
};
Vue.filter("truncate", truncate);
Vue.filter("titleCase", titleCase);
export { router, vueApp };