Files
cloudron-box/dashboard/src/index.js
2025-05-15 15:11:11 +02:00

34 lines
775 B
JavaScript

import { createApp } from 'vue';
import '@fontsource/noto-sans';
import { tooltip, fallbackImage } from 'pankow';
// Override the link rendering method for markdown renderings to open in new tab
import { marked } from 'marked';
const renderer = new marked.Renderer();
renderer.link = function(item) {
const titleAttr = item.title ? ` title="${item.title}"` : '';
return `<a href="${item.href}" target="_blank" ${titleAttr}>${item.text}</a>`;
};
marked.setOptions({ renderer });
import i18n from './i18n.js';
import Index from './Index.vue';
import './style.css';
(async function init() {
const app = createApp(Index);
app.use(await i18n());
app.directive('tooltip', tooltip);
app.directive('fallback-image', fallbackImage);
app.mount('#app');
})();