更新一些链接, cookie二级域名共享
This commit is contained in:
parent
6b34256070
commit
178ce9db7a
@ -10,7 +10,7 @@
|
||||
"build:test": "vue-cli-service build --mode test",
|
||||
"deploy:prod": "rm -f ./dist/.DS_Store && aws s3 sync ./dist s3://cebg.games --exclude \"pubgv4/*\" --exclude \"release/*\"",
|
||||
"deploy:test": "rm -f ./dist/.DS_Store && aws s3 sync ./dist s3://test-client.cebg.games",
|
||||
"refresh:prod": "aws cloudfront create-invalidation --distribution-id E34PEY4AGTMS0Y --paths \"/*\"",
|
||||
"refresh:prod": "aws cloudfront create-invalidation --distribution-id E3L3EZ5PQ5MDAU --paths \"/*\"",
|
||||
"refresh:test": "aws cloudfront create-invalidation --distribution-id EE4HC9OXEQC7Y --paths \"/*\"",
|
||||
"svg": "vsvg -s ./src/icons/svg -t ./src/icons/components --ext ts --es6",
|
||||
"sitemap": "vue-cli-service sitemap"
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git a/node_modules/@walletconnect/browser-utils/dist/esm/local.js b/node_modules/@walletconnect/browser-utils/dist/esm/local.js
|
||||
index c7f4db3..66b8863 100644
|
||||
index c7f4db3..9e2d455 100644
|
||||
--- a/node_modules/@walletconnect/browser-utils/dist/esm/local.js
|
||||
+++ b/node_modules/@walletconnect/browser-utils/dist/esm/local.js
|
||||
@@ -1,26 +1,31 @@
|
||||
@@ -1,26 +1,29 @@
|
||||
import { safeJsonParse, safeJsonStringify } from "./json";
|
||||
import { getLocalStorage } from "./browser";
|
||||
+var Cookies = require('js-cookie')
|
||||
@ -12,9 +12,7 @@ index c7f4db3..66b8863 100644
|
||||
- if (local) {
|
||||
- local.setItem(key, raw);
|
||||
- }
|
||||
+ console.log('cookie save vale: ' + key + ' | ' + raw);
|
||||
+ console.log(Cookies);
|
||||
+ Cookies.set(key, raw);
|
||||
+ Cookies.set(key, raw, { domain: 'cebg.games'});
|
||||
+ // const local = getLocalStorage();
|
||||
+ // if (local) {
|
||||
+ // local.setItem(key, raw);
|
||||
|
BIN
src/assets/main/card/class_4.png
Normal file
BIN
src/assets/main/card/class_4.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.0 KiB |
@ -19,11 +19,11 @@
|
||||
<div class="link-list">
|
||||
<div class="sub-list">
|
||||
<div class="title">Product</div>
|
||||
<a href="/">Home</a>
|
||||
<a href="/gameplay/index.html">Gameplay</a>
|
||||
<a href="/tokenomic/index.html">Tokenomic</a>
|
||||
<a href="/nft/index.html">NFT</a>
|
||||
<a href="/market">Marketplace</a>
|
||||
<a href="https://www.cebg.games/index.html">Home</a>
|
||||
<a href="https://www.cebg.games/gameplay.html">Gameplay</a>
|
||||
<a href="https://www.cebg.games/tokenomic.html">Tokenomic</a>
|
||||
<a href="https://www.cebg.games/nft.html">NFT</a>
|
||||
<a href="https://mall.cebg.games/index.html">Marketplace</a>
|
||||
</div>
|
||||
<div class="sub-list">
|
||||
<div class="title">Resources</div>
|
||||
@ -31,13 +31,13 @@
|
||||
</div>
|
||||
<div class="sub-list">
|
||||
<div class="title">About</div>
|
||||
<a href="/team/index.html">Team</a>
|
||||
<a href="/roadmap/index.html" >Roadmap</a>
|
||||
<a href="https://www.cebg.games/team.html">Team</a>
|
||||
<a href="https://www.cebg.games/roadmap.html" >Roadmap</a>
|
||||
</div>
|
||||
<div class="sub-list">
|
||||
<div class="title">Policies</div>
|
||||
<a href="/terms">Terms of use</a>
|
||||
<a href="/privacy">Privacy Policy</a>
|
||||
<a href="https://www.cebg.games/terms.html">Terms of use</a>
|
||||
<a href="https://www.cebg.games/privacy.html">Privacy Policy</a>
|
||||
</div>
|
||||
<div class="sub-list">
|
||||
<div class="title">Contact us</div>
|
||||
|
@ -10,7 +10,7 @@
|
||||
</a>
|
||||
</div>
|
||||
<div class="header-menu">
|
||||
<a class="menu-item" href="/">
|
||||
<a class="menu-item" href="https://www.cebg.games/index.html">
|
||||
<div class="item" >Home</div>
|
||||
</a>
|
||||
<a class="menu-item" href="/mall" >
|
||||
|
@ -20,11 +20,11 @@
|
||||
<div>Product</div>
|
||||
<img class="btn-plus" src="@/assets/mobile/index/icon-plus.png" alt="plus"/>
|
||||
</div>
|
||||
<a href="/">Home</a>
|
||||
<a href="/gameplay/index.html">Gameplay</a>
|
||||
<a href="/tokenomic/index.html">Tokenomic</a>
|
||||
<a href="/nft/index.html">NFT</a>
|
||||
<a href="/market" >Marketplace</a>
|
||||
<a href="https://www.cebg.games/index.html">Home</a>
|
||||
<a href="https://www.cebg.games/gameplay.html">Gameplay</a>
|
||||
<a href="https://www.cebg.games/tokenomic.html">Tokenomic</a>
|
||||
<a href="https://www.cebg.games/nft.html">NFT</a>
|
||||
<a href="https://mall.cebg.games/index.html">Marketplace</a>
|
||||
</div>
|
||||
<div class="sub-list" :class="{'close': status[1]}">
|
||||
<div class="title" @click="toggleSublist(1)">
|
||||
@ -38,16 +38,16 @@
|
||||
<div>About</div>
|
||||
<img class="btn-plus" src="@/assets/mobile/index/icon-plus.png" alt="plus"/>
|
||||
</div>
|
||||
<a href="/team/index.html">Team</a>
|
||||
<a href="/roadmap/index.html" >Roadmap</a>
|
||||
<a href="https://www.cebg.games/team.html">Team</a>
|
||||
<a href="https://www.cebg.games/roadmap.html" >Roadmap</a>
|
||||
</div>
|
||||
<div class="sub-list" :class="{'close': status[3]}">
|
||||
<div class="title" @click="toggleSublist(3)">
|
||||
<div>Policies</div>
|
||||
<img class="btn-plus" src="@/assets/mobile/index/icon-plus.png" alt="plus"/>
|
||||
</div>
|
||||
<a href="/terms">Terms of use</a>
|
||||
<a href="/privacy">Privacy Policy</a>
|
||||
<a href="https://www.cebg.games/terms.html">Terms of use</a>
|
||||
<a href="https://www.cebg.games/privacy.html">Privacy Policy</a>
|
||||
</div>
|
||||
<div class="sub-list" :class="{'close': status[4]}">
|
||||
<div class="title" @click="toggleSublist(4)">
|
||||
|
@ -1,313 +1,208 @@
|
||||
import Vue from 'vue'
|
||||
import VueRouter, { RouteConfig } from 'vue-router'
|
||||
import { AppModule, DeviceType } from '@/store/modules/app'
|
||||
import { isMobile } from '@/utils/resize'
|
||||
import Vue from "vue";
|
||||
import VueRouter, { RouteConfig } from "vue-router";
|
||||
import { AppModule, DeviceType } from "@/store/modules/app";
|
||||
import { isMobile } from "@/utils/resize";
|
||||
|
||||
Vue.use(VueRouter)
|
||||
const mobile = isMobile()
|
||||
Vue.use(VueRouter);
|
||||
const mobile = isMobile();
|
||||
if (mobile) {
|
||||
AppModule.ToggleDevice(DeviceType.Mobile)
|
||||
AppModule.ToggleDevice(DeviceType.Mobile);
|
||||
}
|
||||
console.log('AppModule.device: ', AppModule.device, mobile)
|
||||
console.log("AppModule.device: ", AppModule.device, mobile);
|
||||
const routes: Array<RouteConfig> = [
|
||||
{
|
||||
path: '/',
|
||||
name: 'Main',
|
||||
component: resolve => mobile ? require(['@/views/mobile/Index.vue'], resolve) : require(['@/views/desktop/Index.vue'], resolve),
|
||||
alias: '/index.html',
|
||||
meta: {
|
||||
title: 'CEBG: CRYPTO ELITE‘S BATTLEGROUNDS',
|
||||
metaTags: [
|
||||
{
|
||||
name: 'description',
|
||||
content: 'CEBG is the 1st Anime + Beauties + Mechas blockchain game that supports FREE TO PLAY and PLAY TO EARN. It\'s an online multiplayer battle royale game where up to 40 players parachute onto an island and scavenge for weapons and equipment to kill others. The last player or team standing wins the round.'
|
||||
},
|
||||
{
|
||||
name: 'keywords',
|
||||
content: 'CEBG, CRYPTO ELITE‘S BATTLEGROUNDS, CEBG BATTLEGROUNDS, CE BATTLEGROUNDS, CRYPTO ELITE‘S, cebg Mobile, cebg official, free battle royale, cebg game, cec, ceg, cebg coin, cebg gold, cebg crypto, cebg p2e, play to earn, free to play, blockchain game'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/market',
|
||||
name: 'Market',
|
||||
component: resolve => mobile ? require(['@/views/mobile/Market.vue'], resolve) : require(['@/views/desktop/Market.vue'], resolve),
|
||||
path: "/",
|
||||
name: "Market",
|
||||
component: (resolve) =>
|
||||
mobile
|
||||
? require(["@/views/mobile/Market.vue"], resolve)
|
||||
: require(["@/views/desktop/Market.vue"], resolve),
|
||||
//component: resolve => require(['@/views/desktop/Market.vue'], resolve),
|
||||
meta: {
|
||||
title: 'Market | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS'
|
||||
}
|
||||
title: "Market | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/official',
|
||||
name: 'Official',
|
||||
component: resolve => require(['@/views/desktop/Official.vue'], resolve)
|
||||
path: "/official",
|
||||
name: "Official",
|
||||
component: (resolve) => require(["@/views/desktop/Official.vue"], resolve),
|
||||
},
|
||||
{
|
||||
path: '/mall',
|
||||
name: 'Mall',
|
||||
component: resolve => require(['@/views/desktop/Mall.vue'], resolve),
|
||||
path: "/mall",
|
||||
name: "Mall",
|
||||
component: (resolve) => require(["@/views/desktop/Mall.vue"], resolve),
|
||||
meta: {
|
||||
title: 'Mall | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS'
|
||||
}
|
||||
title: "Mall | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/mysteryboxes',
|
||||
name: 'Mystery',
|
||||
component: resolve => require(['@/views/desktop/Mystery.vue'], resolve),
|
||||
path: "/mysteryboxes",
|
||||
name: "Mystery",
|
||||
component: (resolve) => require(["@/views/desktop/Mystery.vue"], resolve),
|
||||
meta: {
|
||||
title: 'Mystery Boxes | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS'
|
||||
}
|
||||
title: "Mystery Boxes | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/eventreward',
|
||||
name: 'EventReward',
|
||||
component: resolve => require(['@/views/desktop/EventReward.vue'], resolve),
|
||||
path: "/eventreward",
|
||||
name: "EventReward",
|
||||
component: (resolve) =>
|
||||
require(["@/views/desktop/EventReward.vue"], resolve),
|
||||
meta: {
|
||||
title: 'Event Reward | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS'
|
||||
}
|
||||
title: "Event Reward | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/presale',
|
||||
name: 'Presale',
|
||||
component: resolve => require(['@/views/desktop/Presale.vue'], resolve),
|
||||
path: "/presale",
|
||||
name: "Presale",
|
||||
component: (resolve) => require(["@/views/desktop/Presale.vue"], resolve),
|
||||
meta: {
|
||||
title: 'Presale | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS'
|
||||
}
|
||||
title: "Presale | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS",
|
||||
},
|
||||
// beforeEnter(to, from, next) {
|
||||
// window.location.href = 'https://test.cebg.games/presale'
|
||||
// }
|
||||
},
|
||||
{
|
||||
path: '/mynft',
|
||||
name: 'MyNft',
|
||||
component: resolve => require(['@/views/desktop/MyNft.vue'], resolve),
|
||||
path: "/mynft",
|
||||
name: "MyNft",
|
||||
component: (resolve) => require(["@/views/desktop/MyNft.vue"], resolve),
|
||||
meta: {
|
||||
title: 'MyNft | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS'
|
||||
}
|
||||
title: "MyNft | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/wallet',
|
||||
name: 'Wallet',
|
||||
component: resolve => require(['@/views/desktop/Wallet.vue'], resolve),
|
||||
path: "/wallet",
|
||||
name: "Wallet",
|
||||
component: (resolve) => require(["@/views/desktop/Wallet.vue"], resolve),
|
||||
meta: {
|
||||
title: 'Wallet | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS'
|
||||
}
|
||||
title: "Wallet | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/account',
|
||||
name: 'Account',
|
||||
component: resolve => require(['@/views/desktop/AccountSetting.vue'], resolve),
|
||||
path: "/account",
|
||||
name: "Account",
|
||||
component: (resolve) =>
|
||||
require(["@/views/desktop/AccountSetting.vue"], resolve),
|
||||
meta: {
|
||||
title: 'Account | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS'
|
||||
}
|
||||
title: "Account | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/item/:id',
|
||||
name: 'Item',
|
||||
component: resolve => require(['@/views/desktop/Item.vue'], resolve),
|
||||
path: "/item/:id",
|
||||
name: "Item",
|
||||
component: (resolve) => require(["@/views/desktop/Item.vue"], resolve),
|
||||
meta: {
|
||||
title: 'NFT Info | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS'
|
||||
}
|
||||
title: "NFT Info | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/nft',
|
||||
name: 'Nft',
|
||||
// component: mobile ? MobileNft : NFT,
|
||||
component: resolve => mobile ? require(['@/views/mobile/NFT.vue'], resolve) : require(['@/views/desktop/NFT.vue'], resolve),
|
||||
alias: '/nft/index.html',
|
||||
path: "/nativelogin",
|
||||
name: "NativeLogin",
|
||||
component: (resolve) =>
|
||||
require(["@/views/mobile/NativeLogin.vue"], resolve),
|
||||
meta: {
|
||||
title: 'NFT | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS',
|
||||
metaTags: [
|
||||
{
|
||||
name: 'description',
|
||||
content: 'CEBG is the 1st Anime + Beauties + Mechas blockchain game that supports FREE TO PLAY and PLAY TO EARN. It\'s an online multiplayer battle royale game where up to 40 players parachute onto an island and scavenge for weapons and equipment to kill others. The last player or team standing wins the round.'
|
||||
title: "NativeLogin",
|
||||
nofont: "true",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'keywords',
|
||||
content: 'nft, CEBG, CRYPTO ELITE‘S BATTLEGROUNDS, CEBG BATTLEGROUNDS, CE BATTLEGROUNDS, CRYPTO ELITE‘S, cebg Mobile, cebg official, free battle royale, cebg game, cec, ceg, cebg coin, cebg gold, cebg crypto, cebg p2e, play to earn, free to play, blockchain game'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/gameplay',
|
||||
name: 'Gameplay',
|
||||
component: resolve => mobile ? require(['@/views/mobile/Gameplay.vue'], resolve) : require(['@/views/desktop/Gameplay.vue'], resolve),
|
||||
alias: '/gameplay/index.html',
|
||||
path: "/privacy",
|
||||
name: "Privacy",
|
||||
component: (resolve) =>
|
||||
require(["@/views/desktop/PrivacyPolicy.vue"], resolve),
|
||||
meta: {
|
||||
title: 'Gameplay | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS',
|
||||
metaTags: [
|
||||
{
|
||||
name: 'description',
|
||||
content: 'CEBG is the 1st Anime + Beauties + Mechas blockchain game that supports FREE TO PLAY and PLAY TO EARN. It\'s an online multiplayer battle royale game where up to 40 players parachute onto an island and scavenge for weapons and equipment to kill others. The last player or team standing wins the round.'
|
||||
title: "Privacy Policy of Crypto Elite's:BATTLEGROUNDS (CEBG)",
|
||||
},
|
||||
{
|
||||
name: 'keywords',
|
||||
content: 'gameplay, CEBG, CRYPTO ELITE‘S BATTLEGROUNDS, CEBG BATTLEGROUNDS, CE BATTLEGROUNDS, CRYPTO ELITE‘S, cebg Mobile, cebg official, free battle royale, cebg game, cec, ceg, cebg coin, cebg gold, cebg crypto, cebg p2e, play to earn, free to play, blockchain game'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/tokenomic',
|
||||
name: 'Tokenomic',
|
||||
component: resolve => mobile ? require(['@/views/mobile/Tokenomic.vue'], resolve) : require(['@/views/desktop/Tokenomic.vue'], resolve),
|
||||
alias: '/tokenomic/index.html',
|
||||
meta: {
|
||||
title: 'Tokenomic | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS',
|
||||
metaTags: [
|
||||
{
|
||||
name: 'description',
|
||||
content: 'CEBG is the 1st Anime + Beauties + Mechas blockchain game that supports FREE TO PLAY and PLAY TO EARN. It\'s an online multiplayer battle royale game where up to 40 players parachute onto an island and scavenge for weapons and equipment to kill others. The last player or team standing wins the round.'
|
||||
},
|
||||
{
|
||||
name: 'keywords',
|
||||
content: 'tokenomic, CEBG, CRYPTO ELITE‘S BATTLEGROUNDS, CEBG BATTLEGROUNDS, CE BATTLEGROUNDS, CRYPTO ELITE‘S, cebg Mobile, cebg official, free battle royale, cebg game, cec, ceg, cebg coin, cebg gold, cebg crypto, cebg p2e, play to earn, free to play, blockchain game'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/team',
|
||||
name: 'Team',
|
||||
component: resolve => mobile ? require(['@/views/mobile/Team.vue'], resolve) : require(['@/views/desktop/Team.vue'], resolve),
|
||||
alias: '/team/index.html',
|
||||
meta: {
|
||||
title: 'Team | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS',
|
||||
metaTags: [
|
||||
{
|
||||
name: 'description',
|
||||
content: 'CEBG is the 1st Anime + Beauties + Mechas blockchain game that supports FREE TO PLAY and PLAY TO EARN. It\'s an online multiplayer battle royale game where up to 40 players parachute onto an island and scavenge for weapons and equipment to kill others. The last player or team standing wins the round.'
|
||||
},
|
||||
{
|
||||
name: 'keywords',
|
||||
content: 'team, CEBG, CRYPTO ELITE‘S BATTLEGROUNDS, CEBG BATTLEGROUNDS, CE BATTLEGROUNDS, CRYPTO ELITE‘S, cebg Mobile, cebg official, free battle royale, cebg game, cec, ceg, cebg coin, cebg gold, cebg crypto, cebg p2e, play to earn, free to play, blockchain game'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/roadmap',
|
||||
name: 'Roadmap',
|
||||
component: resolve => mobile ? require(['@/views/mobile/Roadmap.vue'], resolve) : require(['@/views/desktop/Roadmap.vue'], resolve),
|
||||
alias: '/roadmap/index.html',
|
||||
meta: {
|
||||
title: 'Roadmap | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS',
|
||||
metaTags: [
|
||||
{
|
||||
name: 'description',
|
||||
content: 'CEBG is the 1st Anime + Beauties + Mechas blockchain game that supports FREE TO PLAY and PLAY TO EARN. It\'s an online multiplayer battle royale game where up to 40 players parachute onto an island and scavenge for weapons and equipment to kill others. The last player or team standing wins the round.'
|
||||
},
|
||||
{
|
||||
name: 'keywords',
|
||||
content: 'roadmap, CEBG, CRYPTO ELITE‘S BATTLEGROUNDS, CEBG BATTLEGROUNDS, CE BATTLEGROUNDS, CRYPTO ELITE‘S, cebg Mobile, cebg official, free battle royale, cebg game, cec, ceg, cebg coin, cebg gold, cebg crypto, cebg p2e, play to earn, free to play, blockchain game'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/nativelogin',
|
||||
name: 'NativeLogin',
|
||||
component: resolve => require(['@/views/mobile/NativeLogin.vue'], resolve),
|
||||
meta: {
|
||||
title: 'NativeLogin',
|
||||
nofont: 'true'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/privacy',
|
||||
name: 'Privacy',
|
||||
component: resolve => require(['@/views/desktop/PrivacyPolicy.vue'], resolve),
|
||||
meta: {
|
||||
title: 'Privacy Policy of Crypto Elite\'s:BATTLEGROUNDS (CEBG)'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/terms',
|
||||
name: 'Terms',
|
||||
component: resolve => require(['@/views/desktop/Terms.vue'], resolve),
|
||||
meta: {
|
||||
title: 'Crypto Elite\'s: BATTLEGROUNDS(CEBG) Terms of Use'
|
||||
}
|
||||
}
|
||||
]
|
||||
];
|
||||
|
||||
const router = new VueRouter({
|
||||
mode: 'history',
|
||||
mode: "history",
|
||||
base: process.env.BASE_URL,
|
||||
routes
|
||||
})
|
||||
routes,
|
||||
});
|
||||
|
||||
// ...
|
||||
const FONT_ATTRS = [
|
||||
{
|
||||
rel: 'preconnect',
|
||||
href: 'https://fonts.googleapis.com'
|
||||
rel: "preconnect",
|
||||
href: "https://fonts.googleapis.com",
|
||||
},
|
||||
{
|
||||
rel: 'preconnect',
|
||||
href: 'https://fonts.gstatic.com',
|
||||
crossorigin: ''
|
||||
rel: "preconnect",
|
||||
href: "https://fonts.gstatic.com",
|
||||
crossorigin: "",
|
||||
},
|
||||
{
|
||||
rel: 'stylesheet',
|
||||
href: 'https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;700&display=swap'
|
||||
}
|
||||
]
|
||||
rel: "stylesheet",
|
||||
href: "https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;700&display=swap",
|
||||
},
|
||||
];
|
||||
// This callback runs before every route change, including on page load.
|
||||
router.beforeEach((to, from, next) => {
|
||||
// This goes through the matched routes from last to first, finding the closest route with a title.
|
||||
// e.g., if we have `/some/deep/nested/route` and `/some`, `/deep`, and `/nested` have titles,
|
||||
// `/nested`'s will be chosen.
|
||||
const nearestWithTitle = to.matched.slice().reverse().find(r => r.meta && r.meta.title)
|
||||
const nearestWithTitle = to.matched
|
||||
.slice()
|
||||
.reverse()
|
||||
.find((r) => r.meta && r.meta.title);
|
||||
|
||||
const noFont = to.matched.slice().find(r => r.meta && r.meta.nofont)
|
||||
const noFont = to.matched.slice().find((r) => r.meta && r.meta.nofont);
|
||||
|
||||
// Find the nearest route element with meta tags.
|
||||
const nearestWithMeta = to.matched.slice().reverse().find(r => r.meta && r.meta.metaTags)
|
||||
const nearestWithMeta = to.matched
|
||||
.slice()
|
||||
.reverse()
|
||||
.find((r) => r.meta && r.meta.metaTags);
|
||||
|
||||
const previousNearestWithMeta = from.matched.slice().reverse().find(r => r.meta && r.meta.metaTags)
|
||||
const previousNearestWithMeta = from.matched
|
||||
.slice()
|
||||
.reverse()
|
||||
.find((r) => r.meta && r.meta.metaTags);
|
||||
|
||||
// If a route with a title was found, set the document (page) title to that value.
|
||||
if (nearestWithTitle) {
|
||||
document.title = nearestWithTitle.meta.title
|
||||
document.title = nearestWithTitle.meta.title;
|
||||
} else if (previousNearestWithMeta) {
|
||||
document.title = previousNearestWithMeta.meta.title
|
||||
document.title = previousNearestWithMeta.meta.title;
|
||||
}
|
||||
|
||||
// Remove any stale meta tags from the document using the key attribute we set below.
|
||||
Array.from(document.querySelectorAll('[data-vue-router-controlled]')).map((el: any) => el.parentNode.removeChild(el))
|
||||
const createDomToHeader = function(name: string, datas: any) {
|
||||
const tag = document.createElement(name)
|
||||
Array.from(document.querySelectorAll("[data-vue-router-controlled]")).map(
|
||||
(el: any) => el.parentNode.removeChild(el)
|
||||
);
|
||||
const createDomToHeader = function (name: string, datas: any) {
|
||||
const tag = document.createElement(name);
|
||||
|
||||
Object.keys(datas).forEach(key => {
|
||||
tag.setAttribute(key, datas[key])
|
||||
})
|
||||
Object.keys(datas).forEach((key) => {
|
||||
tag.setAttribute(key, datas[key]);
|
||||
});
|
||||
|
||||
// We use this to track which meta tags we create so we don't interfere with other ones.
|
||||
tag.setAttribute('data-vue-router-controlled', '')
|
||||
tag.setAttribute("data-vue-router-controlled", "");
|
||||
|
||||
return tag
|
||||
}
|
||||
return tag;
|
||||
};
|
||||
if (!noFont) {
|
||||
FONT_ATTRS.map((tagDef: any) => {
|
||||
return createDomToHeader('link', tagDef)
|
||||
})
|
||||
.forEach((tag: any) => document.head.appendChild(tag))
|
||||
return createDomToHeader("link", tagDef);
|
||||
}).forEach((tag: any) => document.head.appendChild(tag));
|
||||
}
|
||||
|
||||
// Skip rendering meta tags if there are none.
|
||||
if (!nearestWithMeta) return next()
|
||||
if (!nearestWithMeta) return next();
|
||||
|
||||
// Turn the meta tag definitions into actual elements in the head.
|
||||
nearestWithMeta.meta.metaTags.map((tagDef: any) => {
|
||||
return createDomToHeader('meta', tagDef)
|
||||
nearestWithMeta.meta.metaTags
|
||||
.map((tagDef: any) => {
|
||||
return createDomToHeader("meta", tagDef);
|
||||
})
|
||||
// Add the meta tags to the document head.
|
||||
.forEach((tag: any) => document.head.appendChild(tag))
|
||||
.forEach((tag: any) => document.head.appendChild(tag));
|
||||
|
||||
next()
|
||||
})
|
||||
next();
|
||||
});
|
||||
|
||||
export default router
|
||||
export default router;
|
||||
|
@ -24,9 +24,9 @@ const tokenKey = 'vue_typescript_access_token'
|
||||
// export const removeItem = (key: string) => localStorage.removeItem(key)
|
||||
|
||||
export const getToken = () => Cookies.get(tokenKey)
|
||||
export const setToken = (token: string) => Cookies.set(tokenKey, token)
|
||||
export const setToken = (token: string) => Cookies.set(tokenKey, token, { domain: 'cebg.games'})
|
||||
export const removeToken = () => Cookies.remove(tokenKey)
|
||||
|
||||
export const getItem = (key: string) => Cookies.get(key)
|
||||
export const setItem = (key: string, val: string) => Cookies.set(key, val)
|
||||
export const setItem = (key: string, val: string) => Cookies.set(key, val, { domain: 'cebg.games'})
|
||||
export const removeItem = (key: string) => Cookies.remove(key)
|
||||
|
@ -36,25 +36,25 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
configureWebpack(config) {
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
config.plugins.push(
|
||||
new PrerenderSPAPlugin({
|
||||
indexPath: path.resolve('dist/index.html'),
|
||||
staticDir: path.resolve('dist'),
|
||||
routes: ['/', '/nft', '/gameplay', '/tokenomic', '/roadmap', '/team'],
|
||||
renderer: new Renderer({
|
||||
headless: true,
|
||||
defaultViewport: {
|
||||
width: 1920,
|
||||
height: 1080
|
||||
}
|
||||
}),
|
||||
postProcess(renderedRoute) {
|
||||
renderedRoute.html = renderedRoute.html.replace(YOUTUBE_WIDGET_SCRIPT, '').replace(YOUTUBE_PLAYER_SCRIPT, '')
|
||||
return renderedRoute
|
||||
}
|
||||
})
|
||||
)
|
||||
}
|
||||
// if (process.env.NODE_ENV === 'production') {
|
||||
// config.plugins.push(
|
||||
// new PrerenderSPAPlugin({
|
||||
// indexPath: path.resolve('dist/index.html'),
|
||||
// staticDir: path.resolve('dist'),
|
||||
// routes: ['/', '/nft', '/gameplay', '/tokenomic', '/roadmap', '/team'],
|
||||
// renderer: new Renderer({
|
||||
// headless: true,
|
||||
// defaultViewport: {
|
||||
// width: 1920,
|
||||
// height: 1080
|
||||
// }
|
||||
// }),
|
||||
// postProcess(renderedRoute) {
|
||||
// renderedRoute.html = renderedRoute.html.replace(YOUTUBE_WIDGET_SCRIPT, '').replace(YOUTUBE_PLAYER_SCRIPT, '')
|
||||
// return renderedRoute
|
||||
// }
|
||||
// })
|
||||
// )
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user