@redocly/marketing-pages 0.1.38 → 0.1.39
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.
- package/dist/components/Blog/Author.d.ts +2 -2
- package/dist/components/Blog/Author.js +1 -1
- package/dist/components/Blog/FeaturedClassics.js +1 -1
- package/dist/components/Blog/FirstThreePosts.js +2 -2
- package/dist/components/Blog/LatestPosts.js +2 -2
- package/dist/components/Blog/PostInfo.d.ts +1 -1
- package/dist/components/Blog/PostInfo.js +2 -2
- package/dist/components/Blog/PrimaryPostCard.d.ts +1 -1
- package/dist/components/Blog/PrimaryPostCard.js +2 -2
- package/dist/components/Blog/SecondaryPostCard.d.ts +1 -1
- package/dist/components/Blog/SecondaryPostCard.js +4 -4
- package/dist/components/Blog/types.d.ts +1 -1
- package/dist/templates/BlogPost.js +2 -2
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Author as AuthorType } from './types';
|
|
3
3
|
export interface AuthorProps {
|
|
4
|
-
|
|
4
|
+
publishedDate: Date;
|
|
5
5
|
author: AuthorType;
|
|
6
6
|
className?: string;
|
|
7
7
|
}
|
|
8
|
-
export declare const Author: ({ author,
|
|
8
|
+
export declare const Author: ({ author, publishedDate, className }: AuthorProps) => React.JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import e from"react";import l from"styled-components";import{Box as r}from"../../ui/Box";import{TextNormal as o}from"../TypographyElements/TypographyElements";import{ResponsiveImg as c}from"../ImageComponents/ResponsiveImg";const d=({author:t,
|
|
1
|
+
import e from"react";import l from"styled-components";import{Box as r}from"../../ui/Box";import{TextNormal as o}from"../TypographyElements/TypographyElements";import{ResponsiveImg as c}from"../ImageComponents/ResponsiveImg";const d=({author:t,publishedDate:m,className:a})=>e.createElement(r,{display:"flex",className:a},e.createElement(n,{src:t.image}),e.createElement(r,{display:"flex",flexDirection:"column",justifyContent:"center",pl:"12px"},e.createElement(o,{color:"var(--color-text-accent)"},"By ",t.name),e.createElement(o,{color:"var(--color-text-dimmed)"},m.toLocaleString("en-US",{year:"numeric",month:"long",day:"2-digit"})))),n=l(c).attrs({alt:"avatar"})`
|
|
2
2
|
height: 55px;
|
|
3
3
|
`;export{d as Author};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import t,{useMemo as
|
|
1
|
+
import t,{useMemo as a}from"react";import{linearGradient as l}from"polished";import m from"styled-components";import{PrimaryPostCard as c}from"./PrimaryPostCard";import{GridSection as d,MediaBox as u,Skewed as f}from"../PositionItems";import{TextGradient as p}from"../TextGradient/TextGradient";import{breakpoints as h}from"@redocly/theme/core/utils";import{useThemeHooks as g}from"@redocly/theme/core/hooks";const k=()=>{const{usePageSharedData:i}=g(),{posts:o}=i("blog-posts"),r=["Redocly Premium vs Open Source Features","Open-sourcing Redocly\u2019s unique approach to dogfooding","API documentation essentials","Using Redocly tools for better OpenAPI development","Build rich developer experiences with Markdown in OpenAPI","llms.txt is overhyped","Redocly Launches New API Tools Suite","The rise of interactive documentation","My favorite new features","Rethinking sub-resources in API design","What's an API?","API Governance: Shift-Left to Save Money and Accelerate Velocity","Learn OpenAPI in a day"],n=a(()=>[...o.filter(({title:s})=>r.includes(s))].sort(()=>Math.random()-.5).slice(0,3),[o]);return t.createElement(f,{angle:0,bg:l({colorStops:["rgb(0, 104, 251)","rgb(126, 65, 255)"],toDirection:"to right bottom"}),offsetTop:"-300px",offsetBottom:"-200px"},t.createElement(u,{mb:6},t.createElement(b,null,"Featured classics"),t.createElement(d,{gridTemplateColumns:{base:"1fr",medium:"repeat(3, 1fr)"},justifyItems:{base:"center"},gridGap:{base:"5rem"}},n.map(e=>t.createElement(c,{key:e.slug,title:e.title,to:`${e.slug}`,img:e.image,description:e.description,publishedDate:e.publishedDate,author:e.author})))))},b=m(p)`
|
|
2
2
|
font-size: 28px;
|
|
3
3
|
line-height: 30px;
|
|
4
4
|
font-family: var(--font-family);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from"react";import o from"styled-components";import{TextGradient as s}from"../TextGradient/TextGradient";import{Box as m}from"../../ui/Box";import{MediaBox as c,GridSection as p,Grid as a}from"../PositionItems";import{H2Title as f,Paragraph as i}from"../TypographyElements/TypographyElements";import{PostLink as n}from"./PostLink";import{Author as x}from"./Author";import{formatDateString as
|
|
1
|
+
import e from"react";import o from"styled-components";import{TextGradient as s}from"../TextGradient/TextGradient";import{Box as m}from"../../ui/Box";import{MediaBox as c,GridSection as p,Grid as a}from"../PositionItems";import{H2Title as f,Paragraph as i}from"../TypographyElements/TypographyElements";import{PostLink as n}from"./PostLink";import{Author as x}from"./Author";import{formatDateString as l}from"../../utils/dates";import{breakpoints as g}from"@redocly/theme/core/utils";import{useThemeHooks as b}from"@redocly/theme/core/hooks";function M(){const{usePageSharedData:r}=b(),{posts:t}=r("blog-posts");return e.createElement(c,{my:6},e.createElement(p,{gridTemplateColumns:{base:"1fr",small:"1fr 1fr"},gridTemplateRows:{base:"1fr",small:"1fr 1fr"},gridTemplateAreas:{base:'"first" "second" "third"',small:'"first second" "first third"'},gridGap:{base:"20px"}},e.createElement(h,{post:t[0]}),e.createElement(d,{post:t[1],gridArea:"second"}),e.createElement(d,{post:t[2],gridArea:"third"})))}const h=({post:r})=>e.createElement(a,{gridArea:"first"},e.createElement(n,{to:r.slug},e.createElement(u,{background:r.image},e.createElement(w,null),e.createElement(m,{position:"relative"},e.createElement(f,{color:"var(--secondary-color)"},r.title),e.createElement(i,{color:"var(--secondary-color)"},r.description),e.createElement(v,{author:r.author,publishedDate:l(r.publishedDate)}))))),u=o.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
justify-content: center;
|
|
@@ -22,7 +22,7 @@ import e from"react";import o from"styled-components";import{TextGradient as s}f
|
|
|
22
22
|
width: 100%;
|
|
23
23
|
height: 100%;
|
|
24
24
|
left: 0;
|
|
25
|
-
`,
|
|
25
|
+
`,d=({post:r,gridArea:t})=>e.createElement(a,{gridArea:t},e.createElement(n,{to:r.slug},e.createElement(E,{gridArea:t},e.createElement(y,{my:0},r.title),e.createElement(i,{color:"var(--color-text-dimmed)",m:0},r.description),e.createElement(i,{color:"var(--color-text-dimmed)",fontWeight:500,fontStyle:"italic"},l(r.publishedDate))))),y=o(s)`
|
|
26
26
|
font-size: 18px;
|
|
27
27
|
line-height: 24px;
|
|
28
28
|
font-family: var(--font-family);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import t,{useState as i,useMemo as g}from"react";import p from"styled-components";import{Button as h}from"../Button/CustomButton";import{Box as y}from"../../ui/Box";import{MediaBox as C,GridSection as x}from"../PositionItems";import{H2Title as
|
|
1
|
+
import t,{useState as i,useMemo as g}from"react";import p from"styled-components";import{Button as h}from"../Button/CustomButton";import{Box as y}from"../../ui/Box";import{MediaBox as C,GridSection as x}from"../PositionItems";import{H2Title as b}from"../TypographyElements/TypographyElements";import{PostsCategoryFilter as S}from"../Blog/PostsCategoryFilter";import{SecondaryPostCard as k}from"../Blog/SecondaryPostCard";import{useMediaQuery as w}from"../../hooks/useMediaQuery";import{useThemeHooks as E}from"@redocly/theme/core/hooks";const L=()=>{const{usePageSharedData:c}=E(),n=w("(max-width: 550px)"),[r,a]=i(!1),[o,m]=i(null),{posts:l,metadata:{categories:d}}=c("blog-posts"),f=e=>{m(e),a(!1)},s=g(()=>o?l.filter(e=>e.categories.findIndex(u=>u.id===o)!==-1):l,[o]);return t.createElement(C,null,t.createElement(b,{color:"var(--color-text-dark)"},"Latest posts"),!n&&t.createElement(S,{categories:d,selectedCategory:o,onCategoryClick:f}),t.createElement(x,{gridTemplateColumns:{base:"1fr",small:"1fr 1fr"},gridRowGap:6,gridColumnGap:5,justifyItems:{base:"center"}},s.slice(0,r?void 0:4).map(e=>t.createElement(k,{key:e.slug,title:e.title,to:`${e.slug}`,img:e.image,description:e.description,publishedDate:e.publishedDate,author:e.author}))),s.length>4&&t.createElement(y,{display:"flex",mt:6,justifyContent:"center"},t.createElement(v,{variant:"outlined",onClick:()=>a(e=>!e),size:"large"},r?"Show less":"Show more")))},v=p(h)`
|
|
2
2
|
color: var(--color-accent-main);
|
|
3
3
|
border: 1px solid var(--color-accent-main);
|
|
4
4
|
|
|
@@ -6,4 +6,4 @@ import t,{useState as i,useMemo as g}from"react";import p from"styled-components
|
|
|
6
6
|
border: 1px solid var(--color-accent-main);
|
|
7
7
|
background-color: #fcf3f0;
|
|
8
8
|
}
|
|
9
|
-
`;export{
|
|
9
|
+
`;export{L as LatestPosts};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from"react";import r from"styled-components";import{TextGradient as x}from"../TextGradient/TextGradient";import{TextNormal as l,TextSmall as f}from"../TypographyElements/TypographyElements";import{Box as d}from"../../ui/Box";import{formatDateString as h}from"../../utils/dates";import{breakpoints as n}from"@redocly/theme/core/utils";import{Tag as u}from"@redocly/theme/components/Tag/Tag";function y(t){const{
|
|
1
|
+
import e from"react";import r from"styled-components";import{TextGradient as x}from"../TextGradient/TextGradient";import{TextNormal as l,TextSmall as f}from"../TypographyElements/TypographyElements";import{Box as d}from"../../ui/Box";import{formatDateString as h}from"../../utils/dates";import{breakpoints as n}from"@redocly/theme/core/utils";import{Tag as u}from"@redocly/theme/components/Tag/Tag";function y(t){const{publishedDate:o,author:m,title:c,image:p,categories:s}=t,g=(i,a)=>{typeof window<"u"&&(window.location.href=`/blog/category/${i}${a?`/${a}`:""}`)};return e.createElement(d,{mt:5},e.createElement(E,null,e.createElement(w,null,s.map(i=>e.createElement(b,{key:i.category.id,onClick:()=>g(i.category.id,i.subcategory?.id||null)},i.category.label,i.subcategory?.label&&` \u2022 ${i.subcategory?.label}`))),e.createElement($,{my:5},c)),e.createElement(v,{author:m,publishedDate:h(o)}),e.createElement(C,null,e.createElement(I,{src:p,alt:"post"})))}const b=r(u)`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 32px;
|
|
4
4
|
padding: 0 12px;
|
|
@@ -17,7 +17,7 @@ import e from"react";import r from"styled-components";import{TextGradient as x}f
|
|
|
17
17
|
display: flex;
|
|
18
18
|
flex-direction: column;
|
|
19
19
|
gap: 16px;
|
|
20
|
-
`,v=({author:t,
|
|
20
|
+
`,v=({author:t,publishedDate:o})=>e.createElement(d,{display:"flex"},e.createElement(T,{bg:t.image}),e.createElement(B,null,e.createElement(k,{hasAuthorBIO:t.authorBIO},e.createElement(l,{color:"var(--color-text-dark)",fontWeight:500},"By ",t.name),e.createElement(l,{style:{marginLeft:t.authorBIO&&"10px"}},o.toLocaleString("en-US",{year:"numeric",month:"long",day:"2-digit"}))),e.createElement(f,{color:"var(--color-text-dimmed)"},t.authorBIO))),k=r.div`
|
|
21
21
|
display: flex;
|
|
22
22
|
flex-wrap: wrap;
|
|
23
23
|
flex-direction: ${({hasAuthorBIO:t})=>t?"row":"column"};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Post } from './types';
|
|
3
|
-
interface PrimaryPostCardProps extends Pick<Post, 'title' | 'author' | '
|
|
3
|
+
interface PrimaryPostCardProps extends Pick<Post, 'title' | 'author' | 'publishedDate' | 'description'> {
|
|
4
4
|
to: string;
|
|
5
5
|
img: string;
|
|
6
6
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import t from"react";import e from"styled-components";import{H4Title as p,Paragraph as d}from"../TypographyElements/TypographyElements";import{Box as c}from"../../ui/Box";import{Author as
|
|
1
|
+
import t from"react";import e from"styled-components";import{H4Title as p,Paragraph as d}from"../TypographyElements/TypographyElements";import{Box as c}from"../../ui/Box";import{Author as h}from"./Author";import{PostLink as x}from"./PostLink";import{formatDateString as s}from"../../utils/dates";import{breakpoints as f}from"@redocly/theme/core/utils";function S(o){const{title:r,to:i,img:a,author:n,publishedDate:m,description:l}=o;return t.createElement(u,null,t.createElement(x,{to:i},t.createElement(c,{display:"flex",flexDirection:"column",height:"100%",p:"24px 32px 32px 32px"},t.createElement(g,{src:a}),t.createElement(b,null,t.createElement(p,null,r),t.createElement(d,{color:"var(--color-text-dimmed)"},l),t.createElement(w,{author:n,publishedDate:s(m)})))))}const g=e.img`
|
|
2
2
|
width: 100%;
|
|
3
3
|
height: 150px;
|
|
4
4
|
margin-bottom: 26px;
|
|
@@ -25,6 +25,6 @@ import t from"react";import e from"styled-components";import{H4Title as p,Paragr
|
|
|
25
25
|
display: flex;
|
|
26
26
|
flex-direction: column;
|
|
27
27
|
height: 100%;
|
|
28
|
-
`,w=e(
|
|
28
|
+
`,w=e(h)`
|
|
29
29
|
margin-top: auto;
|
|
30
30
|
`;export{S as PrimaryPostCard};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Post } from './types';
|
|
3
|
-
interface SecondaryPostCardProps extends Pick<Post, 'title' | 'author' | '
|
|
3
|
+
interface SecondaryPostCardProps extends Pick<Post, 'title' | 'author' | 'publishedDate' | 'description'> {
|
|
4
4
|
to: string;
|
|
5
5
|
img: string;
|
|
6
6
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import t from"react";import e from"styled-components";import{Box as c}from"../../ui/Box";import{Author as d}from"./Author";import{PostLink as p}from"./PostLink";import{H4Title as
|
|
1
|
+
import t from"react";import e from"styled-components";import{Box as c}from"../../ui/Box";import{Author as d}from"./Author";import{PostLink as p}from"./PostLink";import{H4Title as h,Paragraph as s}from"../TypographyElements/TypographyElements";import{formatDateString as x}from"../../utils/dates";function S(o){const{title:r,to:i,img:a,author:n,publishedDate:l,description:m}=o;return t.createElement(b,null,t.createElement(p,{to:i},t.createElement(c,{display:"flex",flexDirection:"column",height:"100%"},t.createElement("div",null,t.createElement(u,null),t.createElement(g,{src:a})),t.createElement(f,null,t.createElement(h,{my:1,color:"var(--color-text-accent)"},r),t.createElement(s,{color:"var(--color-text-dimmed)"},m),t.createElement(v,{author:n,publishedDate:x(l)})))))}const g=e.img`
|
|
2
2
|
width: 100%;
|
|
3
3
|
height: 270px;
|
|
4
4
|
object-fit: cover;
|
|
@@ -12,7 +12,7 @@ import t from"react";import e from"styled-components";import{Box as c}from"../..
|
|
|
12
12
|
position: absolute;
|
|
13
13
|
width: 100%;
|
|
14
14
|
height: 270px;
|
|
15
|
-
`,
|
|
15
|
+
`,b=e.div`
|
|
16
16
|
position: relative;
|
|
17
17
|
max-width: 500px;
|
|
18
18
|
background: white;
|
|
@@ -26,11 +26,11 @@ import t from"react";import e from"styled-components";import{Box as c}from"../..
|
|
|
26
26
|
0 0 50px rgba(0 68 212 / 18%),
|
|
27
27
|
0 8px 16px 0 rgb(0 68 212 / 18%);
|
|
28
28
|
}
|
|
29
|
-
`,
|
|
29
|
+
`,f=e.div`
|
|
30
30
|
padding: 18px 36px 36px 36px;
|
|
31
31
|
display: flex;
|
|
32
32
|
flex-direction: column;
|
|
33
33
|
height: 100%;
|
|
34
34
|
`,v=e(d)`
|
|
35
35
|
margin-top: auto;
|
|
36
|
-
`;export{
|
|
36
|
+
`;export{S as SecondaryPostCard};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from"react";import o from"styled-components";import{useThemeHooks as s}from"@redocly/theme/core/hooks";import
|
|
1
|
+
import e from"react";import o from"styled-components";import{useThemeHooks as s}from"@redocly/theme/core/hooks";import p from"@redocly/marketing-pages/components/Blog/PostInfo.js";import{MediaBox as d}from"@redocly/marketing-pages/components/PositionItems/MediaBox.js";import{Markdown as u}from"@redocly/theme/components/Markdown/Markdown";import{Box as h}from"@redocly/marketing-pages/ui/Box.js";import{RecentPosts as g}from"@redocly/marketing-pages/components/Blog/RecentPosts.js";function f(a){const{usePageProps:r}=s(),m=r(),{publishedDate:i,author:t,categories:n,title:l,image:c}=m.metadata;return e.createElement(w,{style:{background:"white"}},e.createElement(x,null,e.createElement(p,{authorName:t?.name,authorBIO:t.authorBIO,publishedDate:i,categories:n,title:l,author:t,avatar:t?.image,image:c}),e.createElement(u,null,a.children)),e.createElement(d,null,e.createElement(h,{my:"80px"},e.createElement(g,null))))}const x=o.div`
|
|
2
2
|
margin-left: auto;
|
|
3
3
|
margin-right: auto;
|
|
4
4
|
max-width: calc(90vw);
|
|
@@ -9,4 +9,4 @@ import e from"react";import o from"styled-components";import{useThemeHooks as s}
|
|
|
9
9
|
`,w=o.div`
|
|
10
10
|
position: relative;
|
|
11
11
|
overflow: hidden;
|
|
12
|
-
`;export{
|
|
12
|
+
`;export{f as default};
|