From a8a0d34ca0afff503ef3c4645c7f4feef9aa9bc8 Mon Sep 17 00:00:00 2001 From: Esteban Date: Sat, 28 Feb 2026 09:19:52 -0500 Subject: [PATCH] added news page, added button read more news, only view 6 news in landing --- prisma/dev.db | Bin 28672 -> 28672 bytes src/components/HeroHome.astro | 2 +- src/components/section/NewsSection.astro | 8 ++++- src/content/news/en/2026-02-15.md | 16 ++++----- src/i18n/en.json | 3 ++ src/i18n/es.json | 2 ++ src/pages/[locale]/news/index.astro | 42 +++++++++++++++++++++++ src/pages/news/index.astro | 42 +++++++++++++++++++++++ 8 files changed, 105 insertions(+), 10 deletions(-) create mode 100644 src/pages/[locale]/news/index.astro create mode 100644 src/pages/news/index.astro diff --git a/prisma/dev.db b/prisma/dev.db index e8186c342a6b71989939c8f8c0e53d062c2d3228..29958d0c395ffd909ae836cbecd8a0c8354c103e 100644 GIT binary patch delta 83 zcmZp8z}WDBae_3Xz(g5mMuCk9%i=kl8TdEwxAHr07F00h7jR%^XOOnkWo1n*E=f&F i%$ppaFD0P>|3n#QM*fWn%i=kL82C5vxAF&V7F2NIH#THuXArd%Wo0c%Ee4~c l#JrT$GD9PW^xVYE9KGcHT#zv1oSGTy%t7R>=*g}5)d0O-9qj-B diff --git a/src/components/HeroHome.astro b/src/components/HeroHome.astro index 4151725..a5441db 100644 --- a/src/components/HeroHome.astro +++ b/src/components/HeroHome.astro @@ -9,7 +9,7 @@ const tl = createTranslator(Astro.currentLocale);
-
+
diff --git a/src/components/section/NewsSection.astro b/src/components/section/NewsSection.astro index 14e4c5c..fe02202 100644 --- a/src/components/section/NewsSection.astro +++ b/src/components/section/NewsSection.astro @@ -1,6 +1,10 @@ --- import { getCollection, getEntry } from "astro:content"; import NewsCard from "../cards/NewsCard.astro"; +import Button from "../ui/Button.astro"; +const { props } = Astro.props; +const currentLocale = Astro.currentLocale; + const newsItems = await getCollection("news", (post)=>{ const currentLocale = Astro.currentLocale; return post.data.locale == currentLocale @@ -15,15 +19,17 @@ const tl = createTranslator(Astro.currentLocale);

{tl("news.title")}

{tl("news.text")}

{tl("news.text2")}

+
{ - [...newsItems] // copiamos para no mutar el original + [...newsItems] .sort((a, b) => new Date(b.data.date).getTime() - new Date(a.data.date).getTime() ) + .slice(0,6) .map((item) => ( )) diff --git a/src/content/news/en/2026-02-15.md b/src/content/news/en/2026-02-15.md index 8b788e7..566bfa4 100644 --- a/src/content/news/en/2026-02-15.md +++ b/src/content/news/en/2026-02-15.md @@ -36,18 +36,18 @@ gallery: [ }, ] --- -**El encuentro reunió a referentes educativos y comunitarios de distintos países para fortalecer redes institucionales y promover el intercambio académico** +**The meeting brought together educational and community leaders from different countries to strengthen institutional networks and promote academic exchange.** -El domingo 15 de febrero de 2026 se realizó la apertura oficial del III Congreso Internacional de Rabinos en Puerto Rico, consolidando el inicio formal de una agenda académica y de trabajo que convoca a líderes religiosos y educativos de diferentes regiones del mundo. +On Sunday, February 15, 2026, the 3rd International Congress of Rabbis began in Puerto Rico, marking the official start of an academic and work agenda that brought together religious and educational leaders from different regions of the world. -Durante la sesión inaugural se destacó que el congreso busca trascender el formato tradicional de conferencias para constituirse en un espacio de articulación institucional, intercambio de experiencias y fortalecimiento de vínculos entre comunidades. En ese marco, el Dr. José Benjamín Pérez Matos —presidente del Centro del Reino de Paz y Justicia— subrayó la importancia de que el encuentro funcione como instancia de reencuentro y cooperación sostenida, más allá de los paneles y exposiciones programadas. +The opening session underscored that the congress aims to transcend the traditional conference formats to serve as a space for institutional alignment, experience-sharing, and strengthening ties between communities. In that context, Dr. José Benjamín Pérez Matos, President of the Kingdom of Peace and Justice Center, emphasized the importance of the meeting providing an opportunity for reconnection and on-going partnership, beyond the scheduled panels and presentations. -En su intervención, hizo referencia al valor formativo de la tradición bíblica y a la dimensión universal de ciertos principios espirituales vinculados a la responsabilidad ética y la proyección internacional de las comunidades. Asimismo, invitó a los participantes a orientar el trabajo del congreso hacia el fortalecimiento del aprendizaje profundo, el diálogo respetuoso y la construcción de redes colaborativas. +In his speech, he referred to the formative value of biblical tradition and the universal scope of certain spiritual principles linked to ethical responsibility and the international reach of communities. Likewise, he invited participants to center the efforts of the congress on fostering in-depth learning, respectful dialogue, and the development of collaborative networks. -También dirigieron palabras a los presentes el rabino Eliahu Birnbaum, director de los institutos Straus-Amiel y Beren-Amiel, y Yinon Ahiman, director general de la red Ohr Torah Stone, quienes resaltaron el papel de la formación rabínica contemporánea frente a los desafíos sociales y culturales actuales. +Rabbi Eliahu Birnbaum, Director of the Straus-Amiel and Beren-Amiel Institute, and Yinon Ahiman, Director General of the Ohr Torah Stone network, also addressed attendees and highlighted the role of contemporary rabbinical training in the face of current social and cultural challenges. -La primera jornada incluyó paneles académicos con la participación del Dr. Roi Abecassis, jefe del Departamento de Educación de la Organización Sionista Mundial; del rabino Dorón Pérez, presidente de dicha organización —quien intervino mediante mensaje en video—; y del rabino Dr. Katriel Kenneth Brander, presidente y director de las instituciones Ohr Torah Stone. +The first day included academic panels with the participation of Roi Abecassis, Head of the Education Department of the World Zionist Organization; Rabbi Doron Perez, President of the World Zionist Organization, who participated virtually; and Rabbi Dr. Katriel Kenneth Brander, President and Rosh HaYeshiva of the Ohr Torah Stone network. -El evento contó además con la presencia institucional del rabino Moshé Bakshi-Dorón, director general de la Yeshivat Yesod HaTorah. +The event was also attended by Rabbi Moshe Bakshi Doron, Rosh HaYeshiva of Yesod HaTorah. -Con una agenda centrada en educación, liderazgo comunitario y cooperación internacional, el III Congreso Internacional de Rabinos se proyecta como una plataforma de articulación global orientada a consolidar vínculos entre instituciones y promover iniciativas conjuntas en el ámbito formativo y social. \ No newline at end of file +With an agenda focused on education, community leadership, and international cooperation, the 3rd International Congress of Rabbis aims to serve as a platform for global alignment that deepens ties between institutions and promotes joint educational and social initiatives. \ No newline at end of file diff --git a/src/i18n/en.json b/src/i18n/en.json index 2a344ae..9062bef 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -178,6 +178,9 @@ "news.title": "News", "news.text": "Institutional updates and global reach", "news.text2": "This section brings together the main events, awards, and undertakings of the Kingdom of Peace and Justice Center and its founder.", + "news.text3": "This page brings together the main events, awards, and undertakings of the Kingdom of Peace and Justice Center and its founder.", + "news.buttonLable": "See More News", + "participate.title": "Participate | Collaborate", "participate.text": "Joining means making a commitment with purpose", diff --git a/src/i18n/es.json b/src/i18n/es.json index a4b0be4..b09fc32 100644 --- a/src/i18n/es.json +++ b/src/i18n/es.json @@ -184,6 +184,8 @@ "news.title": "Noticias", "news.text": "Actualidad institucional y proyección internacional", "news.text2": "Esta sección reúne las principales actividades, reconocimientos y acciones del Centro del Reino de Paz y Justicia y de su fundador.", + "news.text3": "Esta página reúne las principales actividades, reconocimientos y acciones del Centro del Reino de Paz y Justicia y de su fundador.", + "news.buttonLable": "Ver Más Noticias", "participate.title": "Participa | Colabora", "participate.text": "Sumarse es asumir un compromiso con propósito", diff --git a/src/pages/[locale]/news/index.astro b/src/pages/[locale]/news/index.astro new file mode 100644 index 0000000..33d3dd8 --- /dev/null +++ b/src/pages/[locale]/news/index.astro @@ -0,0 +1,42 @@ +--- +import MainLayout from "@/layouts/MainLayout.astro" +import NewsSection from "@/components/section/NewsSection.astro" +import Header from "@/components/Header.astro" +import NewsCard from "@/components/cards/NewsCard.astro"; +import { getCollection, getEntry } from "astro:content"; + + +import { createTranslator, t } from '@/i18n'; +const tl = createTranslator(Astro.currentLocale); + +const newsItems = await getCollection("news", (post)=>{ + const currentLocale = Astro.currentLocale; + return post.data.locale == currentLocale +}); +--- + + +
+
+
+
+
+

{tl("news.title")}

+

{tl("news.text")}

+ +
+ + +
+ { + [...newsItems] + .sort((a, b) => + new Date(b.data.date).getTime() - new Date(a.data.date).getTime() + ) + .map((item) => ( + + )) + } +
+
+
\ No newline at end of file diff --git a/src/pages/news/index.astro b/src/pages/news/index.astro new file mode 100644 index 0000000..1a6599a --- /dev/null +++ b/src/pages/news/index.astro @@ -0,0 +1,42 @@ +--- +import MainLayout from "@/layouts/MainLayout.astro" +import NewsSection from "@/components/section/NewsSection.astro" +import Header from "@/components/Header.astro" +import NewsCard from "@/components/cards/NewsCard.astro"; +import { getCollection, getEntry } from "astro:content"; + + +import { createTranslator, t } from '@/i18n'; +const tl = createTranslator(Astro.currentLocale); + +const newsItems = await getCollection("news", (post)=>{ + const currentLocale = Astro.currentLocale; + return post.data.locale == currentLocale +}); +--- + + +
+
+
+
+
+

{tl("news.title")}

+

{tl("news.text")}

+ +
+ + +
+ { + [...newsItems] + .sort((a, b) => + new Date(b.data.date).getTime() - new Date(a.data.date).getTime() + ) + .map((item) => ( + + )) + } +
+
+
\ No newline at end of file