feat: Update home page notices and privacy information in English, Spanish, and French; add public guides and routing for guides
All checks were successful
Deploy to production / deploy (push) Successful in 2m11s
All checks were successful
Deploy to production / deploy (push) Successful in 2m11s
- Changed beta notice to service notice on home page translations for English, Spanish, and French. - Updated privacy information to reflect transparency and continuous maintenance. - Added new public guides content with detailed sections for various topics. - Implemented routing for guide list and individual guide articles. - Created new components for displaying guides and articles.
This commit is contained in:
@@ -28,7 +28,6 @@
|
||||
</div>
|
||||
<div class="header-meta">
|
||||
<div class="header-meta__context">
|
||||
<span class="header-pill">{{ $t('appShell.header.beta') }}</span>
|
||||
<label class="header-lang">
|
||||
<span class="header-lang__label">{{ $t('appShell.header.language') }}</span>
|
||||
<select
|
||||
@@ -63,6 +62,9 @@ import { mapGetters } from 'vuex';
|
||||
import apiClient from '@/utils/axios.js';
|
||||
import { SUPPORTED_UI_LOCALES } from '@/i18n/supportedLocales.js';
|
||||
|
||||
const ADSENSE_SCRIPT_ID = 'google-adsense-script';
|
||||
const ADSENSE_CLIENT_ID = 'ca-pub-1104166651501135';
|
||||
|
||||
export default {
|
||||
name: 'AppHeader',
|
||||
data() {
|
||||
@@ -106,10 +108,12 @@ export default {
|
||||
return (
|
||||
path === '/' ||
|
||||
path.startsWith('/blogs') ||
|
||||
path.startsWith('/socialnetwork/forum') ||
|
||||
path.startsWith('/socialnetwork/forumtopic') ||
|
||||
path.startsWith('/socialnetwork/vocab/courses') ||
|
||||
path.startsWith('/falukant/home')
|
||||
path.startsWith('/ratgeber') ||
|
||||
path.startsWith('/vokabeltrainer') ||
|
||||
path.startsWith('/bisaya-lernen') ||
|
||||
path.startsWith('/deutsch-fuer-bisaya') ||
|
||||
path === '/falukant' ||
|
||||
path === '/minigames'
|
||||
);
|
||||
},
|
||||
desktopAdSlotId() {
|
||||
@@ -170,13 +174,44 @@ export default {
|
||||
initHeaderAd() {
|
||||
if (!this.showHeaderAd) return;
|
||||
if (this.adInitialized) return;
|
||||
if (typeof window === 'undefined' || !window.adsbygoogle) return;
|
||||
try {
|
||||
(window.adsbygoogle = window.adsbygoogle || []).push({});
|
||||
this.adInitialized = true;
|
||||
} catch (err) {
|
||||
console.warn('AppHeader: adsense slot init failed', err);
|
||||
if (typeof window === 'undefined') return;
|
||||
this.ensureAdSenseScript()
|
||||
.then(() => {
|
||||
try {
|
||||
(window.adsbygoogle = window.adsbygoogle || []).push({});
|
||||
this.adInitialized = true;
|
||||
} catch (err) {
|
||||
console.warn('AppHeader: adsense slot init failed', err);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.warn('AppHeader: adsense script could not be loaded', err);
|
||||
});
|
||||
},
|
||||
ensureAdSenseScript() {
|
||||
if (typeof window === 'undefined') {
|
||||
return Promise.resolve();
|
||||
}
|
||||
if (window.adsbygoogle) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
const existing = document.getElementById(ADSENSE_SCRIPT_ID);
|
||||
if (existing) {
|
||||
return new Promise((resolve, reject) => {
|
||||
existing.addEventListener('load', resolve, { once: true });
|
||||
existing.addEventListener('error', reject, { once: true });
|
||||
});
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
const script = document.createElement('script');
|
||||
script.id = ADSENSE_SCRIPT_ID;
|
||||
script.async = true;
|
||||
script.crossOrigin = 'anonymous';
|
||||
script.src = `https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=${ADSENSE_CLIENT_ID}`;
|
||||
script.addEventListener('load', resolve, { once: true });
|
||||
script.addEventListener('error', reject, { once: true });
|
||||
document.head.appendChild(script);
|
||||
});
|
||||
},
|
||||
async onUiLanguageChange(code) {
|
||||
if (!SUPPORTED_UI_LOCALES.includes(code)) {
|
||||
@@ -328,18 +363,6 @@ export default {
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.header-pill {
|
||||
padding: 5px 10px;
|
||||
border-radius: 999px;
|
||||
background: rgba(248, 162, 43, 0.14);
|
||||
border: 1px solid rgba(248, 162, 43, 0.24);
|
||||
font-size: 0.72rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
color: #8a5411;
|
||||
}
|
||||
|
||||
.header-lang {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
|
||||
Reference in New Issue
Block a user