diff --git a/.gitignore b/.gitignore index 03659d8..af75bce 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,7 @@ /public/sources-data.json /public/reviewers-data.json /public/light-transcripts.json +/public/transcripts-length.json # misc .DS_Store diff --git a/contentlayer.config.ts b/contentlayer.config.ts index cc4ebe2..8380db0 100644 --- a/contentlayer.config.ts +++ b/contentlayer.config.ts @@ -44,6 +44,10 @@ const getTranscriptAliases = (allTranscripts: ContentTranscriptType[]) => { fs.writeFileSync("./public/aliases.json", JSON.stringify(aliases)); }; +const getTranscriptsLength = (transcripts: ContentTranscriptType[]) => { + fs.writeFileSync("./public/transcripts-length.json", JSON.stringify(transcripts.length)); +} + const getTopics = () => { const filePath = path.join(process.cwd(), "public", "topics.json"); const fileContents = fs.readFileSync(filePath, "utf8"); @@ -552,6 +556,7 @@ export default makeSource({ getTranscriptAliases(allTranscripts); createSpeakers(allTranscripts); generateSourcesCount(allTranscripts, allSources); - lightWeightTranscript(allTranscripts) + lightWeightTranscript(allTranscripts); + getTranscriptsLength(allTranscripts); }, }); diff --git a/src/components/landing-page/HeroSection.tsx b/src/components/landing-page/HeroSection.tsx index 1dc1650..c68ef7e 100644 --- a/src/components/landing-page/HeroSection.tsx +++ b/src/components/landing-page/HeroSection.tsx @@ -5,6 +5,7 @@ import Image from "next/image"; import HeroImageDestop from "/public/images/hero-desktop-image.webp"; import { ArrowLinkUpRight } from "@bitcoin-dev-project/bdp-ui/icons"; import circleBackground from "/public/svgs/circle-background.svg"; +import transcriptsLength from "/public/transcripts-length.json"; import circleBackgroundMobile from "/public/svgs/circle-background-mobile.svg"; import mobileDesktopImage from "/public/svgs/mobile-desktop-image.svg"; import Wrapper from "../layout/Wrapper"; @@ -23,7 +24,7 @@ const HeroSection = ({languageCode}: {languageCode: LanguageCode}) => { {t("home.hero.title")}

- {t("home.hero.subtitle-1")} {t("home.hero.subtitle-2")}{" "} + {transcriptsLength || "1024+"} {t("home.hero.subtitle-1")} {t("home.hero.subtitle-2")}{" "} {t("home.hero.subtitle-3")}

diff --git a/src/components/layout/FooterComponent.tsx b/src/components/layout/FooterComponent.tsx index 41aa076..bc042c0 100644 --- a/src/components/layout/FooterComponent.tsx +++ b/src/components/layout/FooterComponent.tsx @@ -89,7 +89,7 @@ const FooterComponent = () => { /> - + diff --git a/src/i18n/locales/en.ts b/src/i18n/locales/en.ts index 67d2150..04781c1 100644 --- a/src/i18n/locales/en.ts +++ b/src/i18n/locales/en.ts @@ -18,7 +18,7 @@ const translations = { "home": { "hero": { "title": "Unlock the treasure trove of technical Bitcoin transcripts", - "subtitle-1": "1042+ transcripts", + "subtitle-1": " transcripts", "subtitle-2": "growing every day.", "subtitle-3": "Thanks to people like you.", "cta": "Explore Transcripts", diff --git a/src/i18n/locales/es.ts b/src/i18n/locales/es.ts index 1a41c66..3ac5751 100644 --- a/src/i18n/locales/es.ts +++ b/src/i18n/locales/es.ts @@ -17,7 +17,7 @@ const translations = { home: { hero: { title: "Descubre el tesoro de transcripciones técnicas de Bitcoin", - "subtitle-1": "1042+ transcripciones", + "subtitle-1": " transcripciones", "subtitle-2": "creciendo cada día.", "subtitle-3": "Gracias a personas como tú.", cta: "Explorar Transcripciones", diff --git a/src/i18n/locales/pt.ts b/src/i18n/locales/pt.ts index f89a282..56279d8 100644 --- a/src/i18n/locales/pt.ts +++ b/src/i18n/locales/pt.ts @@ -17,7 +17,7 @@ const translations = { "home": { "hero": { "title": "Desbloqueie o tesouro de transcrições técnicas sobre Bitcoin", - "subtitle-1": "Mais de 1042 transcrições", + "subtitle-1": " transcrições", "subtitle-2": "crescendo a cada dia.", "subtitle-3": "Graças a pessoas como você.", "cta": "Explorar Transcrições", diff --git a/src/i18n/locales/zh.ts b/src/i18n/locales/zh.ts index abaef8c..b8d3a84 100644 --- a/src/i18n/locales/zh.ts +++ b/src/i18n/locales/zh.ts @@ -17,7 +17,7 @@ const translations = { "home": { "hero": { "title": "解锁技术性比特币文稿的宝藏", - "subtitle-1": "1042+ 文稿", + "subtitle-1": " 文稿", "subtitle-2": "每日更新。", "subtitle-3": "感谢像您这样的人。", "cta": "探索文稿" diff --git a/src/types/json.d.ts b/src/types/json.d.ts new file mode 100644 index 0000000..da3b7f6 --- /dev/null +++ b/src/types/json.d.ts @@ -0,0 +1,4 @@ +declare module "*.json" { + const value: number; + export default value; +} \ No newline at end of file