theme.css loaded Fraunces, Inter and JetBrains Mono from Google Fonts. That sent every visitor's address to Google on every page load, and an instance with no internet drew in fallback type. All three families are now vendored under frontend/src/assets/fonts with every subset Google publishes for them, plus their OFL licences. The Content-Security-Policy no longer lists fonts.googleapis.com or fonts.gstatic.com. A new guard test fails if any stylesheet, page or component links a remote asset or preconnects to one, or if the CSP names another host. The theme.css header now describes the sheet as it is instead of how it used to read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
27 lines
887 B
TypeScript
27 lines
887 B
TypeScript
import { createApp } from "vue";
|
|
import { createPinia } from "pinia";
|
|
import App from "./App.vue";
|
|
import router from "./router";
|
|
import "./assets/fonts/fonts.css";
|
|
import "./assets/theme.css";
|
|
// After theme.css — it consumes the tokens declared there.
|
|
import "./assets/components.css";
|
|
import "./assets/prose.css";
|
|
// Global rather than `<style src>` per pane: plugin-vue cannot compile one
|
|
// src stylesheet shared by several SFCs, and the image build fails on it.
|
|
import "./assets/sweep-shared.css";
|
|
|
|
const app = createApp(App);
|
|
app.use(createPinia());
|
|
app.use(router);
|
|
app.mount("#app");
|
|
|
|
// Register service worker for push notifications and PWA
|
|
if ('serviceWorker' in navigator) {
|
|
window.addEventListener('load', () => {
|
|
navigator.serviceWorker.register('/sw.js').catch(() => {
|
|
// SW registration failed — app still works, just no push notifications
|
|
})
|
|
})
|
|
}
|