diff --git a/english-content.txt b/english-content.txt new file mode 100644 index 0000000..bc91c03 --- /dev/null +++ b/english-content.txt @@ -0,0 +1,5 @@ +Ezen honlapot magyar bitcoinerek maréknyi csoportja fejleszti önként. A honlap egyrészt kapcsolódási és közös megnyilvánulási pontként funkcionál, másért a bitcoin irányába nyitott érdeklődőket minőségi magyar nyelvű információ csokorral hivatott szolgálni. + +A HUSZONEGY telegram csoport nyitott, bárki csatlakozhat, akit érdekel a Bitcoinnal kapcsolatos magyar nyelvű kommunikáció. Egyetlen szabályunk, hogy a csoporton belül csak Bitcoinról kommunikálunk magyar nyelven. + +A HUSZONEGY csoport a decentralizált, Bitcoin-alapú jövőrt dolgozik. diff --git a/src/components/EnglishExplain.vue b/src/components/EnglishExplain.vue new file mode 100644 index 0000000..7c88277 --- /dev/null +++ b/src/components/EnglishExplain.vue @@ -0,0 +1,36 @@ + + + + + \ No newline at end of file diff --git a/src/components/EnglishShort.vue b/src/components/EnglishShort.vue new file mode 100644 index 0000000..4ed891c --- /dev/null +++ b/src/components/EnglishShort.vue @@ -0,0 +1,43 @@ + + + + + \ No newline at end of file diff --git a/src/router/index.ts b/src/router/index.ts index 242104f..57f7261 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,4 +1,10 @@ -import { + + { + path: '/english', + name: 'English', + component: () => import('../views/EnglishView.vue'), + meta: { title: 'English' } + },import { createRouter, createWebHistory, createMemoryHistory, diff --git a/src/router/index_backup.ts b/src/router/index_backup.ts new file mode 100644 index 0000000..242104f --- /dev/null +++ b/src/router/index_backup.ts @@ -0,0 +1,219 @@ +import { + createRouter, + createWebHistory, + createMemoryHistory, + type RouteRecordRaw +} from 'vue-router' +import HomeView from '../views/HomeView.vue' + +export const routes: RouteRecordRaw[] = [ + { + path: '/', + name: 'home', + component: HomeView, + meta: { + title: 'HUSZONEGY - A magyar Bitcoin tudástár és közösség', + metaTags: [ + { name: 'description', content: 'Tanulj a Bitcoinról magyarul! Cikkek, podcastok, ingyenesen letölthető könyvek és aktív közösség.' }, + { name: 'keywords', content: 'bitcoin, huszonegy, magyarország, decentralizáció, szabadság, közösség' } + ] + } + }, + { + path: '/cikk', + name: 'articles', + component: () => import('../views/ArticlesView.vue'), + meta: { + title: 'Bitcoin cikkek magyarul - HUSZONEGY', + metaTags: [ + { name: 'description', content: 'Bitcoin cikkek, elemzések és tanulmányok magyarul.' }, + { name: 'keywords', content: 'bitcoin cikkek, magyar bitcoin, bitcoin tanulmány' } + ] + } + }, + { + path: '/forum', + name: 'forum', + component: () => import('../views/ForumView.vue'), + meta: { + title: 'Bitcoin fórum - HUSZONEGY közösség', + metaTags: [ + { name: 'description', content: 'Magyar Bitcoin közösség fóruma. Csatlakozz a beszélgetéshez, tedd fel kérdéseidet és ossz meg tapasztalatokat más magyar bitcoinerekkel!' }, + { name: 'keywords', content: 'bitcoin fórum, magyar bitcoin közösség, bitcoin beszélgetés, telegram csoport' } + ] + } + }, + { + path: '/hir', + name: 'news', + component: () => import('../views/NewsView.vue'), + meta: { + title: 'Bitcoin hírek magyarul - HUSZONEGY', + metaTags: [ + { name: 'description', content: 'Friss Bitcoin hírek és újdonságok magyarul. Kövesd a legfontosabb eseményeket a Bitcoin világából naprakészen!' }, + { name: 'keywords', content: 'bitcoin hírek, bitcoin hírek magyarul, bitcoin news, bitcoin újdonságok' } + ] + } + }, + { + path: '/podcast', + name: 'podcasts', + component: () => import('../views/PodsView.vue'), + meta: { + title: 'Bitcoin podcast magyarul - HUSZONEGY', + metaTags: [ + { name: 'description', content: 'Magyar Bitcoin podcastok és beszélgetések. Hallgass interjúkat, szakértői véleményeket és közösségi beszélgetéseket a Bitcoin világából!' }, + { name: 'keywords', content: 'bitcoin podcast, magyar bitcoin podcast, beszélgetés, bitcoin interjú' } + ] + } + }, + { + path: '/podcast/:slug', + name: 'PodDetailView', + component: () => import('../views/PodDetailView.vue'), + props: true + }, + { + path: '/konyv', + name: 'books', + component: () => import('../views/BooksView.vue'), + meta: { + title: 'Bitcoin könyvek magyarul - HUSZONEGY', + metaTags: [ + { name: 'description', content: 'Ajánlott Bitcoin könyvek magyar nyelven és fordításban. A legjobb Bitcoin könyvek kezdőknek és szakértőknek.' }, + { name: 'keywords', content: 'bitcoin könyv, bitcoin könyv magyarul, bitcoin irodalom, bitcoin olvasmány' } + ] + } + }, + { + path: '/tarcak', + name: 'wallets', + component: () => import('../views/WalletsView.vue'), + meta: { + title: 'Bitcoin tárcák és eszközök - HUSZONEGY', + metaTags: [ + { name: 'description', content: 'Ajánlott Bitcoin tárcák, hardver wallet-ek és eszközök. Válaszd ki a számodra legmegfelelőbb megoldást a biztonságos Bitcoin tároláshoz!' }, + { name: 'keywords', content: 'bitcoin tárca, hardver wallet, bitcoin wallet, trezor, coldcard, ledger' } + ] + } + }, + { + path: '/meetup', + name: 'meetup', + component: () => import('../views/MeetupView.vue'), + meta: { + title: 'Bitcoin meetupok Magyarországon - HUSZONEGY', + metaTags: [ + { name: 'description', content: 'Bitcoin meetupok, találkozók és események Magyarországon. Csatlakozz a közösséghez, ismerj meg más bitcoinereket és tanulj együtt!' }, + { name: 'keywords', content: 'bitcoin meetup, bitcoin találkozó, bitcoin esemény, bitcoin közösség magyarország' } + ] + } + }, + { + path: '/link', + name: 'links', + component: () => import('../views/LinksView.vue'), + meta: { + title: 'Hasznos Bitcoin linkek - HUSZONEGY', + metaTags: [ + { name: 'description', content: 'Válogatott Bitcoin linkek, partnereink, kapcsolódó honlapok magyarul és angolul.' }, + { name: 'keywords', content: 'bitcoin linkek, bitcoin források, bitcoin oktatás' } + ] + } + }, + { + path: '/eloadas', + name: 'presentations', + component: () => import('../views/PreziView.vue'), + meta: { + title: 'Bitcoin előadások magyarul - HUSZONEGY', + metaTags: [ + { name: 'description', content: 'Bitcoin előadások, prezentációk és konferencia anyagok magyarul.' }, + { name: 'keywords', content: 'bitcoin előadás, bitcoin prezentáció, bitcoin konferencia' } + ] + } + }, + { + path: '/oktatovideo', + name: 'videos', + component: () => import('../views/VideoView.vue'), + meta: { + title: 'Bitcoin oktatóvideók magyarul - HUSZONEGY', + metaTags: [ + { name: 'description', content: 'Bitcoin oktatóvideók kezdőknek és haladóknak magyarul. Tanuld meg a Bitcoin használatát!' }, + { name: 'keywords', content: 'bitcoin videó, bitcoin oktatás, bitcoin tutorial' } + ] + } + }, + { + path: '/tamogatas', + name: 'support', + component: () => import('../views/SupportView.vue'), + meta: { + title: 'HUSZONEGY támogatása - Bitcoin adományok', + metaTags: [ + { name: 'description', content: 'Támogasd a HUSZONEGY magyar Bitcoin közösséget!' } + ] + } + }, + { + path: '/pizzaday', + name: 'pizzaday', + component: () => import('../views/PizzaView.vue'), + meta: { title: 'Bitcoin Pizza Nap - HUSZONEGY' } + }, + { path: '/support', redirect: '/tamogatas' }, + { + path: '/404', + name: 'not-found', + component: () => import('../views/NotFoundView.vue'), + meta: { title: 'Oldal nem található - HUSZONEGY' } + }, + { + path: '/:pathMatch(.*)*', + component: () => import('../views/NotFoundView.vue'), + meta: { title: 'Oldal nem található - HUSZONEGY' } + } +] + +const router = createRouter({ + // Ez a sor dönti el, hogy szerver (GitHub) vagy böngésző módban vagyunk-e + history: import.meta.env.SSR + ? createMemoryHistory(import.meta.env.BASE_URL) + : createWebHistory(import.meta.env.BASE_URL), + routes, + linkActiveClass: 'active', +}) + + +// EZ A RÉSZ FRISSÍTI A BÖNGÉSZŐT, DE CSAK HA TÉNYLEG BÖNGÉSZŐBEN VAGYUNK +if (!import.meta.env.SSR) { + router.afterEach((to) => { + // Cím frissítése + const title = (to.meta as any).title + if (title) document.title = title + + // Meta tagek frissítése (SEO) + const tags = (to.meta as any).metaTags as any[] + if (tags && Array.isArray(tags)) { + tags.forEach(tagData => { + const selector = tagData.name + ? `meta[name="${tagData.name}"]` + : `meta[property="${tagData.property}"]` + + const element = document.querySelector(selector) + if (element) { + element.setAttribute('content', tagData.content) + } else { + const newTag = document.createElement('meta') + if (tagData.name) newTag.setAttribute('name', tagData.name) + if (tagData.property) newTag.setAttribute('property', tagData.property) + newTag.setAttribute('content', tagData.content) + document.head.appendChild(newTag) + } + }) + } + }) +} + +export default router \ No newline at end of file diff --git a/src/views/EnglishView.vue b/src/views/EnglishView.vue new file mode 100644 index 0000000..29fc786 --- /dev/null +++ b/src/views/EnglishView.vue @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/src/views/EnglishView_backup.vue b/src/views/EnglishView_backup.vue new file mode 100644 index 0000000..1218ec3 --- /dev/null +++ b/src/views/EnglishView_backup.vue @@ -0,0 +1,19 @@ + + + + + diff --git a/update-router.js b/update-router.js new file mode 100644 index 0000000..77728ce --- /dev/null +++ b/update-router.js @@ -0,0 +1,31 @@ +const fs = require('fs'); + +// Read existing router file +const routerPath = 'src/router/index.ts'; +const routerContent = fs.readFileSync(routerPath, 'utf8'); + +// Find the routes array +const routesStart = routerContent.indexOf('const routes = ['); +const routesEnd = routerContent.indexOf('];', routesStart); +const routesArray = routerContent.substring(routesStart, routesEnd + 1); + +// Create new route for English +const newRoute = ` + { + path: '/english', + name: 'English', + component: () => import('../views/EnglishView.vue'), + meta: { title: 'English' } + },`; + +// Insert new route before the last route (NotFoundView) +const lastRouteIndex = routesArray.lastIndexOf('},'); +const newRoutesArray = routesArray.substring(0, lastRouteIndex + 2) + newRoute + routesArray.substring(lastRouteIndex + 2); + +// Replace routes array in original content +const newRouterContent = routerContent.substring(0, routesStart) + newRoutesArray + routerContent.substring(routesEnd + 1); + +// Write updated content +fs.writeFileSync(routerPath, newRouterContent, 'utf8'); + +console.log('Router updated successfully!'); \ No newline at end of file diff --git a/update-router.mjs b/update-router.mjs new file mode 100644 index 0000000..dd3e946 --- /dev/null +++ b/update-router.mjs @@ -0,0 +1,31 @@ +import fs from 'fs'; + +// Read existing router file +const routerPath = 'src/router/index.ts'; +const routerContent = fs.readFileSync(routerPath, 'utf8'); + +// Find the routes array +const routesStart = routerContent.indexOf('const routes = ['); +const routesEnd = routerContent.indexOf('];', routesStart); +const routesArray = routerContent.substring(routesStart, routesEnd + 1); + +// Create new route for English +const newRoute = ` + { + path: '/english', + name: 'English', + component: () => import('../views/EnglishView.vue'), + meta: { title: 'English' } + },`; + +// Insert new route before the last route (NotFoundView) +const lastRouteIndex = routesArray.lastIndexOf('},'); +const newRoutesArray = routesArray.substring(0, lastRouteIndex + 2) + newRoute + routesArray.substring(lastRouteIndex + 2); + +// Replace routes array in original content +const newRouterContent = routerContent.substring(0, routesStart) + newRoutesArray + routerContent.substring(routesEnd + 1); + +// Write updated content +fs.writeFileSync(routerPath, newRouterContent, 'utf8'); + +console.log('Router updated successfully!'); \ No newline at end of file