Skip to content

Commit

Permalink
replace unhead
Browse files Browse the repository at this point in the history
  • Loading branch information
camdendotlol committed Aug 7, 2024
1 parent 9bfc357 commit 3d680d6
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 136 deletions.
56 changes: 30 additions & 26 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Topsters 3</title>
<meta property="description" content="Make topster charts with music, movies, games, and more.">
<meta property="og:title" content="Topsters 3">
<meta property="og:description" content="Make topster charts with music, movies, games, and more.">
<meta property="og:type" content="website" />
<meta property="og:url" content="https://topsters.org" />
<link rel="icon" href="/favicon.ico">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Nunito&display=swap" rel="stylesheet">
</head>
<body>
<noscript>
<strong>We're sorry but Topsters 3 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
<html lang="en-US">

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Topsters 3</title>
<meta property="description" content="Make topster charts with music, movies, games, and more.">
<meta property="og:title" content="Topsters 3">
<meta property="og:description" content="Make topster charts with music, movies, games, and more.">
<meta property="og:type" content="website" />
<meta property="og:url" content="https://topsters.org" />
<link rel="icon" href="/favicon.ico">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Nunito&display=swap" rel="stylesheet">
</head>

<body>
<noscript>
<strong>We're sorry but Topsters 3 doesn't work properly without JavaScript enabled. Please enable it to
continue.</strong>
</noscript>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>

</html>
98 changes: 11 additions & 87 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"lint": "eslint ."
},
"dependencies": {
"@unhead/vue": "^1.9.16",
"bootstrap-icons-vue": "^1.11.3",
"fflate": "^0.8.2",
"topster": "^5.3.0",
Expand All @@ -30,6 +29,7 @@
"eslint-plugin-vue": "^9.27.0",
"typescript": "^5.5.3",
"vite": "^5.3.4",
"vite-plugin-radar": "^0.9.6",
"vue-tsc": "^2.0.26"
}
}
17 changes: 0 additions & 17 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,8 @@
import { onMounted } from 'vue'
import Home from './Home.vue'
import { redirectUsers } from './helpers/redirect'
import { useHead } from '@unhead/vue'
import './global.css'
useHead({
script: [
{
innerHTML: `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '${import.meta.env.VITE_GOOGLE_ANALYTICS_TAG}');`
},
{
src: `https://www.googletagmanager.com/gtag/js?id=${import.meta.env.VITE_GOOGLE_ANALYTICS_TAG}`
}
]
})
onMounted(async () => {
// Redirect new users to topsters.org
if (window.location.href.includes('ostrakon.xyz')) {
Expand Down
4 changes: 0 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import { createApp } from 'vue'
import App from './App.vue'
import { store, key } from './store'
import { createHead } from '@unhead/vue'

const head = createHead()

createApp(App)
.use(store, key)
.use(head)
.mount('#app')
7 changes: 6 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { VitePluginRadar } from 'vite-plugin-radar'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()]
plugins: [vue(), VitePluginRadar({
analytics: {
id: 'G-4GL8BY0YV1'
}
})]
})

0 comments on commit 3d680d6

Please sign in to comment.