@crtobiasdelsud/portal-ui 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/CHANGELOG.md +71 -0
  2. package/README.md +829 -0
  3. package/package.json +43 -0
  4. package/src/adapters/AdaptersContext.jsx +28 -0
  5. package/src/components/ArticleHero/ArticleHero.jsx +73 -0
  6. package/src/components/ArticleHero/ArticleHero.module.scss +89 -0
  7. package/src/components/ArticleHero/variants/V0/V0.jsx +29 -0
  8. package/src/components/ArticleHero/variants/V0/V0.module.scss +51 -0
  9. package/src/components/ArticleHero/variants/V0Desktop/V0Desktop.jsx +29 -0
  10. package/src/components/ArticleHero/variants/V0Desktop/V0Desktop.module.scss +54 -0
  11. package/src/components/ArticleHero/variants/V0Tablet/V0Tablet.jsx +29 -0
  12. package/src/components/ArticleHero/variants/V0Tablet/V0Tablet.module.scss +49 -0
  13. package/src/components/ArticleHero/variants/V1/V1.jsx +29 -0
  14. package/src/components/ArticleHero/variants/V1/V1.module.scss +40 -0
  15. package/src/components/ArticleHero/variants/V2/V2.jsx +29 -0
  16. package/src/components/ArticleHero/variants/V2/V2.module.scss +44 -0
  17. package/src/components/ArticleHero/variants/V3/V3.jsx +25 -0
  18. package/src/components/ArticleHero/variants/V3/V3.module.scss +41 -0
  19. package/src/components/ArticleHero/variants/V4/V4.jsx +25 -0
  20. package/src/components/ArticleHero/variants/V4/V4.module.scss +36 -0
  21. package/src/components/ArticleHero/variants/V5/V5.jsx +25 -0
  22. package/src/components/ArticleHero/variants/V5/V5.module.scss +33 -0
  23. package/src/components/ArticleHeroFull/ArticleHeroFull.jsx +38 -0
  24. package/src/components/ArticleHeroFull/ArticleHeroFull.module.scss +116 -0
  25. package/src/components/ArticleSidebar/ArticleSidebar.jsx +28 -0
  26. package/src/components/ArticleSidebar/ArticleSidebar.module.scss +41 -0
  27. package/src/components/AuthorBlock/AuthorBlock.jsx +67 -0
  28. package/src/components/AuthorBlock/AuthorBlock.module.scss +35 -0
  29. package/src/components/AuthorBlock/variants/V1/V1.jsx +38 -0
  30. package/src/components/AuthorBlock/variants/V1/V1.module.scss +25 -0
  31. package/src/components/AuthorBlock/variants/V2/V2.jsx +38 -0
  32. package/src/components/AuthorBlock/variants/V2/V2.module.scss +10 -0
  33. package/src/components/AuthorBlock/variants/V3/V3.jsx +30 -0
  34. package/src/components/AuthorBlock/variants/V3/V3.module.scss +10 -0
  35. package/src/components/AuthorBlock/variants/V4/V4.jsx +30 -0
  36. package/src/components/AuthorBlock/variants/V4/V4.module.scss +10 -0
  37. package/src/components/Banner/Banner.module.scss +70 -0
  38. package/src/components/Banner/BannerDisplay.jsx +118 -0
  39. package/src/components/Banner/BannerView.jsx +35 -0
  40. package/src/components/Blocks/BlockColumns/BlockColumns.jsx +37 -0
  41. package/src/components/Blocks/BlockColumns/BlockColumns.module.scss +64 -0
  42. package/src/components/Blocks/BlockColumnsBajada/BlockColumnsBajada.jsx +38 -0
  43. package/src/components/Blocks/BlockColumnsBajada/BlockColumnsBajada.module.scss +64 -0
  44. package/src/components/Blocks/BlockMain/BlockMain.jsx +18 -0
  45. package/src/components/Blocks/BlockMain/BlockMain.module.scss +9 -0
  46. package/src/components/Blocks/BlockMainNarrow/BlockMainNarrow.jsx +18 -0
  47. package/src/components/Blocks/BlockMainNarrow/BlockMainNarrow.module.scss +9 -0
  48. package/src/components/Blocks/BlockMainSidebar/BlockMainSidebar.jsx +33 -0
  49. package/src/components/Blocks/BlockMainSidebar/BlockMainSidebar.module.scss +44 -0
  50. package/src/components/Blocks/BlockStack/BlockStack.jsx +8 -0
  51. package/src/components/Blocks/BlockStack/BlockStack.module.scss +18 -0
  52. package/src/components/Blocks/WidgetErrorBoundary.jsx +43 -0
  53. package/src/components/Breadcrumb/Breadcrumb.jsx +24 -0
  54. package/src/components/Breadcrumb/Breadcrumb.module.scss +33 -0
  55. package/src/components/Breadcrumb/variants/V1/V1.jsx +39 -0
  56. package/src/components/Breadcrumb/variants/V1/V1.module.scss +3 -0
  57. package/src/components/Breadcrumb/variants/V2/V2.jsx +28 -0
  58. package/src/components/Breadcrumb/variants/V2/V2.module.scss +3 -0
  59. package/src/components/Breadcrumb/variants/V3/V3.jsx +28 -0
  60. package/src/components/Breadcrumb/variants/V3/V3.module.scss +3 -0
  61. package/src/components/Breadcrumb/variants/V4/V4.jsx +28 -0
  62. package/src/components/Breadcrumb/variants/V4/V4.module.scss +3 -0
  63. package/src/components/Breadcrumb/variants/V5/V5.jsx +28 -0
  64. package/src/components/Breadcrumb/variants/V5/V5.module.scss +4 -0
  65. package/src/components/Cabezal/Cabezal.module.scss +82 -0
  66. package/src/components/Cabezal/CabezalView.jsx +87 -0
  67. package/src/components/Cabezal/CardCabezal/CardCabezal.module.scss +403 -0
  68. package/src/components/Cabezal/CardCabezal/index.jsx +25 -0
  69. package/src/components/Cabezal/CardCabezal/variants/Amp/Amp.jsx +20 -0
  70. package/src/components/Cabezal/CardCabezal/variants/Carrusel/Carrusel.jsx +39 -0
  71. package/src/components/Cabezal/CardCabezal/variants/Carrusel/Carrusel.module.scss +87 -0
  72. package/src/components/Cabezal/CardCabezal/variants/Compact/Compact.jsx +36 -0
  73. package/src/components/Cabezal/CardCabezal/variants/Default/Default.jsx +35 -0
  74. package/src/components/Cabezal/CardCabezal/variants/Featured/Featured.jsx +36 -0
  75. package/src/components/Cabezal/CardCabezal/variants/FeaturedDuo/FeaturedDuo.jsx +36 -0
  76. package/src/components/Cabezal/CardCabezal/variants/FeaturedHorizontal/FeaturedHorizontal.jsx +36 -0
  77. package/src/components/Cabezal/CardCabezal/variants/Medium/Medium.jsx +35 -0
  78. package/src/components/Cabezal/CardCabezal/variants/Ranked/Ranked.jsx +36 -0
  79. package/src/components/Cabezal/variants/Carrusel/Carrusel.jsx +167 -0
  80. package/src/components/Cabezal/variants/Carrusel/Carrusel.module.scss +145 -0
  81. package/src/components/Cabezal/variants/Categoria/Categoria.jsx +29 -0
  82. package/src/components/Cabezal/variants/Categoria/Categoria.module.scss +82 -0
  83. package/src/components/Cabezal/variants/CategoriaDos/CategoriaDos.jsx +29 -0
  84. package/src/components/Cabezal/variants/CategoriaDos/CategoriaDos.module.scss +99 -0
  85. package/src/components/Cabezal/variants/Compact/Compact.jsx +24 -0
  86. package/src/components/Cabezal/variants/Compact/Compact.module.scss +73 -0
  87. package/src/components/Cabezal/variants/Default/Default.jsx +24 -0
  88. package/src/components/Cabezal/variants/Default/Default.module.scss +71 -0
  89. package/src/components/Cabezal/variants/Desktop/Desktop.jsx +45 -0
  90. package/src/components/Cabezal/variants/Desktop/Desktop.module.scss +113 -0
  91. package/src/components/Cabezal/variants/Duo/Duo.jsx +24 -0
  92. package/src/components/Cabezal/variants/Duo/Duo.module.scss +72 -0
  93. package/src/components/Cabezal/variants/DuoSinCopete/DuoSinCopete.jsx +24 -0
  94. package/src/components/Cabezal/variants/DuoSinCopete/DuoSinCopete.module.scss +72 -0
  95. package/src/components/Cabezal/variants/Horizontal/Horizontal.jsx +24 -0
  96. package/src/components/Cabezal/variants/Horizontal/Horizontal.module.scss +64 -0
  97. package/src/components/Cabezal/variants/LeeAdemas/LeeAdemas.jsx +53 -0
  98. package/src/components/Cabezal/variants/LeeAdemas/LeeAdemas.module.scss +103 -0
  99. package/src/components/Cabezal/variants/LoQueSeLee/LoQueSeLee.jsx +48 -0
  100. package/src/components/Cabezal/variants/LoQueSeLee/LoQueSeLee.module.scss +103 -0
  101. package/src/components/Cabezal/variants/LoQueSeLee/LoQueSeLeeSkeleton.jsx +21 -0
  102. package/src/components/Cabezal/variants/LoQueSeLee/LoQueSeLeeSkeleton.module.scss +34 -0
  103. package/src/components/Cabezal/variants/Medium/Medium.jsx +24 -0
  104. package/src/components/Cabezal/variants/Medium/Medium.module.scss +78 -0
  105. package/src/components/Cabezal/variants/Mobile/Mobile.jsx +48 -0
  106. package/src/components/Cabezal/variants/Mobile/Mobile.module.scss +64 -0
  107. package/src/components/Cabezal/variants/Ranking/Ranking.jsx +24 -0
  108. package/src/components/Cabezal/variants/Ranking/Ranking.module.scss +79 -0
  109. package/src/components/Cabezal/variants/SeguiLeyendo/SeguiLeyendo.jsx +38 -0
  110. package/src/components/Cabezal/variants/SeguiLeyendo/SeguiLeyendo.module.scss +52 -0
  111. package/src/components/Cabezal/variants/Tablet/Tablet.jsx +45 -0
  112. package/src/components/Cabezal/variants/Tablet/Tablet.module.scss +113 -0
  113. package/src/components/Cabezal/variants/Tres/Tres.jsx +24 -0
  114. package/src/components/Cabezal/variants/Tres/Tres.module.scss +74 -0
  115. package/src/components/Cabezal/variants/UnaDetallada/UnaDetallada.jsx +29 -0
  116. package/src/components/Cabezal/variants/UnaDetallada/UnaDetallada.module.scss +86 -0
  117. package/src/components/Cards/ArticleBody/ArticleBody.module.scss +9 -0
  118. package/src/components/Cards/ArticleBody/ArticleBodyView.jsx +23 -0
  119. package/src/components/Cards/ArticleCard/ArticleCard.jsx +111 -0
  120. package/src/components/Cards/ArticleCard/ArticleCard.module.scss +129 -0
  121. package/src/components/Cards/Bajada/Bajada.jsx +41 -0
  122. package/src/components/Cards/Bajada/Bajada.module.scss +113 -0
  123. package/src/components/Cards/Bajada/variants/V1/V1.jsx +20 -0
  124. package/src/components/Cards/Bajada/variants/V1/V1.module.scss +2 -0
  125. package/src/components/Cards/Bajada/variants/V2/V2.jsx +20 -0
  126. package/src/components/Cards/Bajada/variants/V2/V2.module.scss +2 -0
  127. package/src/components/Clima/Clima.module.scss +93 -0
  128. package/src/components/Clima/ClimaView.jsx +45 -0
  129. package/src/components/DateTime/DateTime.jsx +26 -0
  130. package/src/components/DateTime/DateTime.module.scss +29 -0
  131. package/src/components/DolarTicker/DolarTicker.jsx +137 -0
  132. package/src/components/DolarTicker/DolarTicker.module.scss +249 -0
  133. package/src/components/DolarTicker/arrow_back_ios_black.svg +3 -0
  134. package/src/components/DolarTicker/arrow_back_ios_white.svg +3 -0
  135. package/src/components/DolarTicker/arrow_downward.svg +3 -0
  136. package/src/components/DolarTicker/arrow_upward.svg +3 -0
  137. package/src/components/DolarTickerOriginal/DolarTickerOriginal.jsx +137 -0
  138. package/src/components/DolarTickerOriginal/DolarTickerOriginal.module.scss +235 -0
  139. package/src/components/DolarTickerOriginal/arrow_back_ios_black.svg +3 -0
  140. package/src/components/DolarTickerOriginal/arrow_back_ios_white.svg +3 -0
  141. package/src/components/DolarTickerOriginal/arrow_downward.svg +3 -0
  142. package/src/components/DolarTickerOriginal/arrow_upward.svg +3 -0
  143. package/src/components/EditorOutput/EditorOutput.jsx +303 -0
  144. package/src/components/EditorOutput/EditorOutput.module.scss +310 -0
  145. package/src/components/EditorOutputFull/EditorOutputFull.jsx +303 -0
  146. package/src/components/EditorOutputFull/EditorOutputFull.module.scss +317 -0
  147. package/src/components/Feed/Feed.module.scss +77 -0
  148. package/src/components/Feed/FeedView.jsx +25 -0
  149. package/src/components/Feed/variants/V1/V1.jsx +34 -0
  150. package/src/components/Feed/variants/V1/V1.module.scss +39 -0
  151. package/src/components/Feed/variants/V2/V2.jsx +36 -0
  152. package/src/components/Feed/variants/V2/V2.module.scss +72 -0
  153. package/src/components/Footers/FooterSimple/FooterSimple.jsx +170 -0
  154. package/src/components/Footers/FooterSimple/FooterSimple.module.scss +256 -0
  155. package/src/components/Headers/HeaderSimple/CategoriesBar/CategoriesBar.jsx +104 -0
  156. package/src/components/Headers/HeaderSimple/CategoriesBar/CategoriesBar.module.scss +112 -0
  157. package/src/components/Headers/HeaderSimple/DrawerContext/DrawerContext.jsx +44 -0
  158. package/src/components/Headers/HeaderSimple/HeaderSimpleAmp/HeaderSimpleAmp.jsx +95 -0
  159. package/src/components/Headers/HeaderSimple/HeaderSimpleAmp/HeaderSimpleAmp.module.scss +2 -0
  160. package/src/components/Headers/HeaderSimple/HeaderSimpleDesktop/HeaderSimpleDesktop.jsx +93 -0
  161. package/src/components/Headers/HeaderSimple/HeaderSimpleDesktop/HeaderSimpleDesktop.module.scss +121 -0
  162. package/src/components/Headers/HeaderSimple/HeaderSimpleDesktopCompact/HeaderSimpleDesktopCompact.jsx +96 -0
  163. package/src/components/Headers/HeaderSimple/HeaderSimpleDesktopCompact/HeaderSimpleDesktopCompact.module.scss +137 -0
  164. package/src/components/Headers/HeaderSimple/HeaderSimpleDesktopCompact/SearchTrigger.jsx +17 -0
  165. package/src/components/Headers/HeaderSimple/HeaderSimpleMobile/HeaderSimpleMobile.jsx +89 -0
  166. package/src/components/Headers/HeaderSimple/HeaderSimpleMobile/HeaderSimpleMobile.module.scss +76 -0
  167. package/src/components/Headers/HeaderSimple/HeaderSimpleSwitch/HeaderSimpleSwitch.jsx +47 -0
  168. package/src/components/Headers/HeaderSimple/HeaderSimpleSwitch/HeaderSwitch.jsx +32 -0
  169. package/src/components/Headers/HeaderSimple/HeaderSimpleSwitch/HeaderSwitch.module.scss +46 -0
  170. package/src/components/Headers/HeaderSimple/LiveBanner/LiveBanner.jsx +79 -0
  171. package/src/components/Headers/HeaderSimple/LiveBanner/LiveBanner.module.scss +102 -0
  172. package/src/components/Headers/HeaderSimple/MenuDrawer/MenuDrawer.jsx +217 -0
  173. package/src/components/Headers/HeaderSimple/MenuDrawer/MenuDrawer.module.scss +243 -0
  174. package/src/components/Headers/HeaderSimple/_headerUtils.js +48 -0
  175. package/src/components/Headers/HeaderSimple/_logos/mendoza-claro.svg +43 -0
  176. package/src/components/Headers/HeaderSimple/_logos/mendoza-oscuro.svg +43 -0
  177. package/src/components/Hero/Hero.module.scss +131 -0
  178. package/src/components/Hero/HeroView.jsx +48 -0
  179. package/src/components/Recommended/Recommended.module.scss +119 -0
  180. package/src/components/Recommended/RecommendedView.jsx +23 -0
  181. package/src/components/ShareBlock/ShareBlock.jsx +75 -0
  182. package/src/components/ShareBlock/ShareBlock.module.scss +60 -0
  183. package/src/components/ShareBlock/variants/V1/V1.jsx +27 -0
  184. package/src/components/ShareBlock/variants/V1/V1.module.scss +2 -0
  185. package/src/components/ShareBlock/variants/V2/V2.jsx +27 -0
  186. package/src/components/ShareBlock/variants/V2/V2.module.scss +3 -0
  187. package/src/components/SpeechButton/SpeechButton.jsx +60 -0
  188. package/src/components/SpeechButton/SpeechButton.module.scss +49 -0
  189. package/src/components/SpeechPlayerBar/SpeechPlayerBar.jsx +92 -0
  190. package/src/components/SpeechPlayerBar/SpeechPlayerBar.module.scss +180 -0
  191. package/src/components/SpeechProviderWrapper/SpeechProviderWrapper.jsx +13 -0
  192. package/src/components/TextWrap/TextWrap.module.scss +72 -0
  193. package/src/components/TextWrap/TextWrapView.jsx +23 -0
  194. package/src/components/UI/AspectImage/AspectImage.jsx +53 -0
  195. package/src/components/UI/FocalImage/FocalImage.jsx +36 -0
  196. package/src/components/UI/Icon/Icon.jsx +40 -0
  197. package/src/components/UI/Icon/Icon.module.scss +82 -0
  198. package/src/components/UI/IconSmall/IconSmall.jsx +40 -0
  199. package/src/components/UI/IconSmall/IconSmall.module.scss +82 -0
  200. package/src/components/UI/PageWrapper/PageWrapper.jsx +9 -0
  201. package/src/components/UI/PageWrapper/PageWrapper.module.scss +5 -0
  202. package/src/components/UI/ToolTip/ToolTip.jsx +49 -0
  203. package/src/components/UI/ToolTip/ToolTip.module.scss +26 -0
  204. package/src/components/UI/index.js +6 -0
  205. package/src/constants/imageSizes.js +10 -0
  206. package/src/context/SiteConfigContext.jsx +79 -0
  207. package/src/context/SpeechContext.jsx +138 -0
  208. package/src/data/ArticlePoolContext.jsx +83 -0
  209. package/src/data/index.js +7 -0
  210. package/src/data/useArticles.js +67 -0
  211. package/src/index.js +101 -0
  212. package/src/styles/index.scss +3 -0
  213. package/src/styles/mixins/_helpers.scss +6 -0
  214. package/src/styles/mixins/_media.scss +30 -0
  215. package/src/styles/variables/_breakpoint.scss +4 -0
  216. package/src/styles/variables/_colors.scss +4 -0
  217. package/src/styles/variables/_spacing.scss +0 -0
  218. package/src/utils/colorContrast.js +64 -0
  219. package/src/utils/fechaHora.js +26 -0
@@ -0,0 +1,25 @@
1
+ import shared from '../../ArticleHero.module.scss'
2
+ import s from './V4.module.scss'
3
+
4
+ export default function V4({ isAmp, inlineStyle, titulo, volanta, ImgEl, ExtrasEl, imgOnlyClass, noImgMod }) {
5
+ const VolantaEl = volanta
6
+ ? <span className={isAmp ? 'article-hero__volanta' : `${shared.volanta} ${s.volanta}`}>{volanta}</span>
7
+ : null
8
+ const TituloEl = <h1 className={isAmp ? 'article-hero__titulo' : `${shared.titulo} ${s.titulo}`}>{titulo}</h1>
9
+
10
+ return (
11
+ <article
12
+ className={isAmp ? 'article-hero article-hero--4' : `${shared.container}${noImgMod}`}
13
+ style={inlineStyle}
14
+ >
15
+ <div className={isAmp ? 'article-hero__img-wrap' : shared.imgWrap}>
16
+ {imgOnlyClass ? <div className={imgOnlyClass}>{ImgEl}</div> : ImgEl}
17
+ <div className={isAmp ? 'article-hero__overlay' : s.overlay}>
18
+ {VolantaEl}
19
+ {TituloEl}
20
+ </div>
21
+ </div>
22
+ {ExtrasEl}
23
+ </article>
24
+ )
25
+ }
@@ -0,0 +1,36 @@
1
+ @use "../../../../styles/index" as *;
2
+ .volanta {
3
+ align-self: flex-start;
4
+ background: transparent;
5
+ color: var(--primary-color, #b1043f);
6
+ padding: 0;
7
+ font-family: "Inter", "Helvetica", Arial, sans-serif;
8
+ font-size: 1em;
9
+ font-weight: 500;
10
+ line-height: 1.7625rem;
11
+ color: #B1043F;
12
+
13
+
14
+ @include respond(tablet) { font-size: 24px; }
15
+ @include respond(desktop) { font-size: 24px; }
16
+ }
17
+
18
+ .overlay {
19
+ position: absolute;
20
+ inset: auto 0 0 0;
21
+ height: 72%;
22
+ display: flex;
23
+ flex-direction: column;
24
+ justify-content: flex-end;
25
+ padding: 20px 18px 24px;
26
+ gap: 8px;
27
+ }
28
+
29
+ .titulo {
30
+ color: #ffffff;
31
+ font-weight: 500;
32
+ font-size: clamp(32px, 5vw, 60px);
33
+ text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
34
+
35
+ @include respond(tablet) { font-size: 2rem; }
36
+ }
@@ -0,0 +1,25 @@
1
+ import shared from '../../ArticleHero.module.scss'
2
+ import s from './V5.module.scss'
3
+
4
+ export default function V5({ isAmp, inlineStyle, titulo, volanta, ImgEl, ExtrasEl, imgOnlyClass, noImgMod }) {
5
+ const VolantaEl = volanta
6
+ ? <span className={isAmp ? 'article-hero__volanta' : `${shared.volanta} ${s.volanta}`}>{volanta}</span>
7
+ : null
8
+ const TituloEl = <h1 className={isAmp ? 'article-hero__titulo' : `${shared.titulo} ${s.titulo}`}>{titulo}</h1>
9
+
10
+ return (
11
+ <article
12
+ className={isAmp ? 'article-hero article-hero--5' : `${shared.container}${noImgMod}`}
13
+ style={inlineStyle}
14
+ >
15
+ <div className={isAmp ? 'article-hero__img-wrap' : shared.imgWrap}>
16
+ {imgOnlyClass ? <div className={imgOnlyClass}>{ImgEl}</div> : ImgEl}
17
+ <div className={isAmp ? 'article-hero__overlay' : s.overlay}>
18
+ {VolantaEl}
19
+ {TituloEl}
20
+ </div>
21
+ </div>
22
+ {ExtrasEl}
23
+ </article>
24
+ )
25
+ }
@@ -0,0 +1,33 @@
1
+ @use "../../../../styles/index" as *;
2
+
3
+ .overlay {
4
+ position: absolute;
5
+ inset: 0;
6
+ background: linear-gradient(
7
+ to bottom,
8
+ transparent 0%,
9
+ var(--secondary-color) 70%,
10
+ var(--secondary-color) 100%
11
+ );
12
+ display: flex;
13
+ flex-direction: column;
14
+ justify-content: space-between;
15
+ padding: 20px 18px 36px;
16
+ }
17
+
18
+ .volanta {
19
+ font-size: 16px;
20
+ align-self: center;
21
+ font-weight: 500;
22
+
23
+ @include respond(tablet) { font-size: 24px; }
24
+ @include respond(desktop) { font-size: 24px; }
25
+ }
26
+
27
+ .titulo {
28
+ color: #ffffff;
29
+ font-size: clamp(32px, 5vw, 60px);
30
+ text-align: center;
31
+
32
+ @include respond(tablet) { font-size: 2.25rem; }
33
+ }
@@ -0,0 +1,38 @@
1
+ 'use client'
2
+
3
+ import styles from './ArticleHeroFull.module.scss'
4
+ import { useSiteConfig } from '../../context/SiteConfigContext.jsx'
5
+
6
+ export default function ArticleHeroFull({ titulo, copete, imagen, focalPoint, categoria }) {
7
+ const { config } = useSiteConfig()
8
+ const siteName = config?.slots?.header?.settings?.siteName ?? ''
9
+
10
+ const objPos = focalPoint
11
+ ? `${focalPoint.x ?? 50}% ${focalPoint.y ?? 50}%`
12
+ : 'center center'
13
+
14
+ return (
15
+ <div className={styles.hero}>
16
+ {imagen && (
17
+ <img
18
+ src={imagen}
19
+ alt={titulo ?? ''}
20
+ className={styles.img}
21
+ style={{ objectPosition: objPos }}
22
+ />
23
+ )}
24
+ <div className={styles.gradient} />
25
+ <div className={styles.content}>
26
+ {categoria && (
27
+ <div className={styles.breadcrumb}>
28
+ {siteName && <span>{siteName}</span>}
29
+ {siteName && <span className={styles.sep}>&rsaquo;</span>}
30
+ <a href={`/${categoria.slug}`}>{categoria.nombre ?? categoria.slug}</a>
31
+ </div>
32
+ )}
33
+ <h1 className={styles.titulo}>{titulo}</h1>
34
+ {copete && <p className={styles.copete}>{copete}</p>}
35
+ </div>
36
+ </div>
37
+ )
38
+ }
@@ -0,0 +1,116 @@
1
+ @use "../../styles/index" as *;
2
+
3
+ .hero {
4
+ position: relative;
5
+ width: 100%;
6
+ min-height: 90vh;
7
+ overflow: hidden;
8
+ display: flex;
9
+ align-items: flex-end;
10
+
11
+ @include respond(tablet) {
12
+ min-height: 75vh;
13
+ }
14
+
15
+ @include respond(desktop) {
16
+ min-height: 75vh;
17
+ }
18
+ }
19
+
20
+ .img {
21
+ position: absolute;
22
+ inset: 0;
23
+ width: 100%;
24
+ height: 100%;
25
+ object-fit: cover;
26
+ }
27
+
28
+ .gradient {
29
+ position: absolute;
30
+ inset: 0;
31
+ background: linear-gradient(180deg, rgb(0 0 0 / .5) 0%, rgb(0 0 0 / .5) .01%, #000 67.03%);
32
+ }
33
+
34
+ .content {
35
+ position: relative;
36
+ z-index: 1;
37
+ width: 100%;
38
+ padding: 0 10% 2.5rem;
39
+ text-align: center;
40
+ color: #fff;
41
+
42
+ @include respond(tablet) {
43
+ max-width: 80%;
44
+ margin: 40px auto;
45
+ padding: 0px;
46
+ }
47
+
48
+ @include respond(desktop) {
49
+ padding: 0px;
50
+ max-width: 70%;
51
+ max-width: 1010px;
52
+ margin: 40px auto;
53
+ }
54
+ }
55
+
56
+ .breadcrumb {
57
+ display: inline-flex;
58
+ align-items: center;
59
+ gap: 0.4rem;
60
+ padding: 0.3rem 0.9rem;
61
+ margin-bottom: 0.9rem;
62
+ font-family: var(--font-inter), Inter, sans-serif;
63
+ color: #fff;
64
+ letter-spacing: 0.02em;
65
+ font-size: .875em;
66
+ font-weight: 300;
67
+ line-height: 1.25rem;
68
+
69
+ a {
70
+ color: #fff;
71
+ text-decoration: none;
72
+ }
73
+ }
74
+
75
+ .sep {
76
+ opacity: 0.6;
77
+ font-size: 0.9rem;
78
+ }
79
+
80
+ .titulo {
81
+ font-size: 2.25em;
82
+ font-weight: 700;
83
+ line-height: 1.3em;
84
+ margin: 0 0 1rem;
85
+ text-align: center;
86
+
87
+ @include respond(tablet) {
88
+ font-size: 3.75rem;
89
+ font-weight: 700;
90
+ line-height: 1.3em;
91
+ margin: 0 0 1rem;
92
+ }
93
+
94
+ @include respond(desktop) {
95
+ font-size: 3.75rem;
96
+ font-weight: 700;
97
+ line-height: 1.3em;
98
+ margin: 0 0 1rem;
99
+ }
100
+ }
101
+
102
+ .copete {
103
+ color: rgb(255, 255, 255);
104
+ margin: 0 auto;
105
+ font-size: 1.125rem;
106
+ line-height: 1.3em;
107
+ padding-top: 1.875rem;
108
+ font-weight: 400;
109
+ font-family: var(--font-inter), Inter, sans-serif;
110
+
111
+ @include respond(tablet) {
112
+ font-size: 1.125rem;
113
+ line-height: 1.3em;
114
+ padding-top: 1.875rem;
115
+ }
116
+ }
@@ -0,0 +1,28 @@
1
+ 'use client'
2
+
3
+ import { useBanners } from '../../context/SiteConfigContext.jsx'
4
+ import BannerDisplay from '../Banner/BannerDisplay.jsx'
5
+ import styles from './ArticleSidebar.module.scss'
6
+
7
+ export default function ArticleSidebar({ children, hasWidgets = false }) {
8
+ const banners = useBanners()
9
+ const banner = banners?.[0]
10
+
11
+ if (!hasWidgets && !banner) return null
12
+
13
+ const hasImage = banner?.imagen?.url || banner?.imagenVertical?.url || banner?.imagenHorizontal?.url
14
+
15
+ return (
16
+ <aside className={styles.sidebar}>
17
+ {hasWidgets
18
+ ? <div className={styles.widgetList}>{children}</div>
19
+ : <div className={styles.sticky}>
20
+ {hasImage
21
+ ? <BannerDisplay banner={banner} />
22
+ : <div className={styles.placeholder} />
23
+ }
24
+ </div>
25
+ }
26
+ </aside>
27
+ )
28
+ }
@@ -0,0 +1,41 @@
1
+ .sidebar {
2
+ display: none;
3
+
4
+ @media (min-width: 1200px) {
5
+ display: block;
6
+ min-width: 0;
7
+ height: 100%;
8
+ }
9
+ }
10
+
11
+ // Fallback banner (sin widgets configurados)
12
+ .sticky {
13
+ @media (min-width: 1200px) {
14
+ position: sticky;
15
+ top: 100px;
16
+ min-height: 250px;
17
+ }
18
+ }
19
+
20
+ // Lista de widgets configurados desde el CMS
21
+ .widgetList {
22
+ @media (min-width: 1200px) {
23
+ display: flex;
24
+ flex-direction: column;
25
+ gap: 20px;
26
+ height: 100%;
27
+
28
+ // Solo el último widget sigue al scroll
29
+ & > :last-child {
30
+ position: sticky;
31
+ top: 100px;
32
+ }
33
+ }
34
+ }
35
+
36
+ .placeholder {
37
+ width: 100%;
38
+ height: 250px;
39
+ background: #e9e9e9;
40
+ border-radius: 4px;
41
+ }
@@ -0,0 +1,67 @@
1
+ 'use client'
2
+
3
+ import { useState, useEffect } from 'react'
4
+ import { useTheme, useSiteConfig } from '../../context/SiteConfigContext.jsx'
5
+ import V1 from './variants/V1/V1'
6
+ import V2 from './variants/V2/V2'
7
+ import V3 from './variants/V3/V3'
8
+ import V4 from './variants/V4/V4'
9
+
10
+ const VARIANTS = { '1': V1, '2': V2, '3': V3, '4': V4 }
11
+
12
+ function formatDate(fechaPublicacion, useLongDate) {
13
+ if (!fechaPublicacion) return null
14
+ const date = new Date(fechaPublicacion)
15
+ const fecha = date.toLocaleDateString('es-AR', useLongDate
16
+ ? { day: '2-digit', month: 'long', year: 'numeric' }
17
+ : { day: '2-digit', month: '2-digit', year: 'numeric' })
18
+ const hora = date.toLocaleTimeString('es-AR', { hour: '2-digit', minute: '2-digit' })
19
+ return `${fecha} - ${hora}`
20
+ }
21
+
22
+ export default function AuthorBlock({ autor, publicarComoOrg = false, fechaPublicacion, isAmp = false }) {
23
+ const theme = useTheme()
24
+ const { slots } = useSiteConfig()
25
+ const v = String(theme.authorBlock ?? 1)
26
+
27
+ const settings = slots?.header?.settings ?? {}
28
+ const iconUrl = settings.iconUrl ?? null
29
+ const siteName = settings.siteName ?? null
30
+
31
+ const useOrg = publicarComoOrg || !autor
32
+ const displayName = useOrg ? siteName : autor?.nombre
33
+ const authorSlug = !useOrg ? (autor?.slug ?? null) : null
34
+
35
+ const showAvatar = v === '1' || v === '2'
36
+ const avatarSrc = (!useOrg && autor?.avatar) ? autor.avatar : (iconUrl || '/profile-placeholder.svg')
37
+ const useLongDate = v === '1' || v === '2'
38
+
39
+ const [dateStr, setDateStr] = useState(null)
40
+ useEffect(() => {
41
+ setDateStr(formatDate(fechaPublicacion, useLongDate))
42
+ }, [fechaPublicacion, useLongDate])
43
+
44
+ const inlineStyle = isAmp ? {} : {
45
+ '--primary-color': theme.primary,
46
+ '--surface-color': theme.surface,
47
+ '--secondary-color': theme.secondary,
48
+ }
49
+
50
+ const ampDate = isAmp ? formatDate(fechaPublicacion, useLongDate) : null
51
+
52
+ const Variant = VARIANTS[v] ?? V1
53
+
54
+ const sharedProps = {
55
+ isAmp,
56
+ inlineStyle,
57
+ displayName,
58
+ authorSlug,
59
+ dateStr,
60
+ ampDate,
61
+ avatarSrc,
62
+ showAvatar,
63
+ v,
64
+ }
65
+
66
+ return <Variant {...sharedProps} />
67
+ }
@@ -0,0 +1,35 @@
1
+ @use "../../styles/index.scss" as *;
2
+
3
+ // ── Base ─────────────────────────────────────────────────────────────────────
4
+
5
+ .container {
6
+ display: flex;
7
+ align-items: center;
8
+ margin-bottom: 1.25rem;
9
+ font-family: var(--font-inter, Inter, sans-serif);
10
+ font-size: 14px;
11
+ border-left: 3px solid var(--primary-color, #b1043f);
12
+
13
+ @include respond(desktop) {
14
+ margin-bottom: 0rem;
15
+ }
16
+
17
+ }
18
+
19
+
20
+ .avatar {
21
+ width: 72px;
22
+ height: 72px;
23
+ object-fit: cover;
24
+ flex-shrink: 0;
25
+ }
26
+
27
+ .info {
28
+ display: flex;
29
+ flex-direction: column;
30
+ gap: 4px;
31
+ }
32
+
33
+ .name strong {
34
+ font-weight: 700;
35
+ }
@@ -0,0 +1,38 @@
1
+ import { useAdapters } from '../../../../adapters/AdaptersContext.jsx'
2
+ import shared from '../../AuthorBlock.module.scss'
3
+ import s from './V1.module.scss'
4
+
5
+ export default function V1({ isAmp, inlineStyle, displayName, authorSlug, dateStr, ampDate, avatarSrc, showAvatar, v }) {
6
+ const { Link } = useAdapters()
7
+ if (isAmp) {
8
+ return (
9
+ <div className={`author-block author-block--${v}`} style={inlineStyle}>
10
+ {showAvatar && (
11
+ <amp-img src={avatarSrc} alt={displayName ?? ''} width="64" height="64" layout="fixed" class="author-block__avatar" />
12
+ )}
13
+ <div className="author-block__info">
14
+ <span className="author-block__name">Por <strong>{displayName}</strong></span>
15
+ {ampDate && <span className="author-block__date">{ampDate}</span>}
16
+ </div>
17
+ </div>
18
+ )
19
+ }
20
+
21
+ return (
22
+ <div className={`${shared.container} ${s.root}`} style={inlineStyle}>
23
+ {showAvatar && (
24
+ <img src={avatarSrc} alt={displayName ?? ''} className={shared.avatar} />
25
+ )}
26
+ <div className={shared.info}>
27
+ <span className={`${shared.name} ${s.name}`}>
28
+
29
+ {authorSlug
30
+ ? <Link href={`/autor/${authorSlug}`}><strong>{displayName}</strong></Link>
31
+ : <strong>Por{' '} {displayName}</strong>
32
+ }
33
+ </span>
34
+ {dateStr && <span className={`${shared.date} ${s.date}`}>{dateStr}</span>}
35
+ </div>
36
+ </div>
37
+ )
38
+ }
@@ -0,0 +1,25 @@
1
+ @use "../../../../styles/index.scss" as *;
2
+
3
+ .root {
4
+ background: var(--surface-color, #f5f5f5);
5
+ padding: 14px 16px;
6
+ gap: 14px;
7
+ }
8
+
9
+ .name {
10
+ color: var(--text-color, #252523);
11
+
12
+ a {
13
+ color: inherit;
14
+ text-decoration: none;
15
+
16
+ &:hover strong {
17
+ color: var(--primary-color, #b1043f);
18
+ }
19
+ }
20
+
21
+ strong:hover {
22
+ color: var(--primary-color, #b1043f);
23
+ }
24
+ }
25
+ .date { color: var(--text-color, #252523); }
@@ -0,0 +1,38 @@
1
+ import { useAdapters } from '../../../../adapters/AdaptersContext.jsx'
2
+ import shared from '../../AuthorBlock.module.scss'
3
+ import s from './V2.module.scss'
4
+
5
+ export default function V2({ isAmp, inlineStyle, displayName, authorSlug, dateStr, ampDate, avatarSrc, showAvatar, v }) {
6
+ const { Link } = useAdapters()
7
+ if (isAmp) {
8
+ return (
9
+ <div className={`author-block author-block--${v}`} style={inlineStyle}>
10
+ {showAvatar && (
11
+ <amp-img src={avatarSrc} alt={displayName ?? ''} width="64" height="64" layout="fixed" class="author-block__avatar" />
12
+ )}
13
+ <div className="author-block__info">
14
+ <span className="author-block__name">Por <strong>{displayName}</strong></span>
15
+ {ampDate && <span className="author-block__date">{ampDate}</span>}
16
+ </div>
17
+ </div>
18
+ )
19
+ }
20
+
21
+ return (
22
+ <div className={`${shared.container} ${s.root}`} style={inlineStyle}>
23
+ {showAvatar && (
24
+ <img src={avatarSrc} alt={displayName ?? ''} className={shared.avatar} />
25
+ )}
26
+ <div className={shared.info}>
27
+ <span className={`${shared.name} ${s.name}`}>
28
+ Por{' '}
29
+ {authorSlug
30
+ ? <Link href={`/autor/${authorSlug}`}><strong>{displayName}</strong></Link>
31
+ : <strong>{displayName}</strong>
32
+ }
33
+ </span>
34
+ {dateStr && <span className={`${shared.date} ${s.date}`}>{dateStr}</span>}
35
+ </div>
36
+ </div>
37
+ )
38
+ }
@@ -0,0 +1,10 @@
1
+ @use "../../../../styles/index.scss" as *;
2
+
3
+ .root {
4
+ background: var(--secondary-color, #16234a);
5
+ padding: 14px 16px;
6
+ gap: 14px;
7
+ }
8
+
9
+ .name { color: #fff; }
10
+ .date { color: rgba(255, 255, 255, 0.8); font-size: 0.875rem; }
@@ -0,0 +1,30 @@
1
+ import { useAdapters } from '../../../../adapters/AdaptersContext.jsx'
2
+ import shared from '../../AuthorBlock.module.scss'
3
+ import s from './V3.module.scss'
4
+
5
+ export default function V3({ isAmp, inlineStyle, displayName, authorSlug, dateStr, ampDate, v }) {
6
+ const { Link } = useAdapters()
7
+ if (isAmp) {
8
+ return (
9
+ <div className={`author-block author-block--${v}`} style={inlineStyle}>
10
+ <div className="author-block__info">
11
+ <span className="author-block__name">Por <strong>{displayName}</strong></span>
12
+ {ampDate && <span className="author-block__date">{ampDate}</span>}
13
+ </div>
14
+ </div>
15
+ )
16
+ }
17
+
18
+ return (
19
+ <div className={`${shared.container} ${s.root}`} style={inlineStyle}>
20
+ <span className={`${shared.name} ${s.name}`}>
21
+ Por{' '}
22
+ {authorSlug
23
+ ? <Link href={`/autor/${authorSlug}`}><strong>{displayName}</strong></Link>
24
+ : <strong>{displayName}</strong>
25
+ }
26
+ </span>
27
+ {dateStr && <span className={`${shared.date} ${s.date}`}>{dateStr}</span>}
28
+ </div>
29
+ )
30
+ }
@@ -0,0 +1,10 @@
1
+ @use "../../../../styles/index.scss" as *;
2
+
3
+ .root {
4
+ background: var(--secondary-color, #16234a);
5
+ padding: 14px 16px;
6
+ justify-content: space-between;
7
+ }
8
+
9
+ .name { color: #fff; }
10
+ .date { color: rgba(255, 255, 255, 0.85); font-size: 0.9rem; }
@@ -0,0 +1,30 @@
1
+ import { useAdapters } from '../../../../adapters/AdaptersContext.jsx'
2
+ import shared from '../../AuthorBlock.module.scss'
3
+ import s from './V4.module.scss'
4
+
5
+ export default function V4({ isAmp, inlineStyle, displayName, authorSlug, dateStr, ampDate, v }) {
6
+ const { Link } = useAdapters()
7
+ if (isAmp) {
8
+ return (
9
+ <div className={`author-block author-block--${v}`} style={inlineStyle}>
10
+ <div className="author-block__info">
11
+ <span className="author-block__name">Por <strong>{displayName}</strong></span>
12
+ {ampDate && <span className="author-block__date">{ampDate}</span>}
13
+ </div>
14
+ </div>
15
+ )
16
+ }
17
+
18
+ return (
19
+ <div className={`${shared.container} ${s.root}`} style={inlineStyle}>
20
+ <span className={`${shared.name} ${s.name}`}>
21
+ Por{' '}
22
+ {authorSlug
23
+ ? <Link href={`/autor/${authorSlug}`}><strong>{displayName}</strong></Link>
24
+ : <strong>{displayName}</strong>
25
+ }
26
+ </span>
27
+ {dateStr && <span className={`${shared.date} ${s.date}`}>{dateStr}</span>}
28
+ </div>
29
+ )
30
+ }
@@ -0,0 +1,10 @@
1
+ @use "../../../../styles/index.scss" as *;
2
+
3
+ .root {
4
+ background: var(--surface-color, #f5f5f5);
5
+ padding: 14px 16px;
6
+ justify-content: space-between;
7
+ }
8
+
9
+ .name { color: #1a1a1a; }
10
+ .date { color: #555; font-size: 0.9rem; }