@redocly/marketing-pages 0.1.37 → 0.1.38
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/PostInfo.d.ts +4 -1
- package/dist/components/Blog/PostInfo.js +30 -10
- package/dist/components/Blog/PostsCategoryFilter.js +6 -4
- package/dist/components/Blog/types.d.ts +4 -1
- package/dist/templates/BlogPost.d.ts +1 -1
- package/dist/templates/BlogPost.js +2 -2
- package/package.json +1 -1
|
@@ -1,18 +1,38 @@
|
|
|
1
|
-
import e from"react";import r from"styled-components";import{TextGradient as
|
|
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{date:o,author:m,title:c,image:p,categories:g}=t,s=(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,g.map(i=>e.createElement(b,{key:i.category.id,onClick:()=>s(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,date:h(o)}),e.createElement(C,null,e.createElement(I,{src:p,alt:"post"})))}const b=r(u)`
|
|
2
|
+
display: flex;
|
|
3
|
+
height: 32px;
|
|
4
|
+
padding: 0 12px;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
align-items: center;
|
|
7
|
+
gap: 8px;
|
|
8
|
+
border-radius: 20px;
|
|
9
|
+
border: 1px solid #dcdde5;
|
|
10
|
+
background: #fbfbfc;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
`,w=r.div`
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: flex-start;
|
|
15
|
+
gap: 8px;
|
|
16
|
+
`,E=r.div`
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
gap: 16px;
|
|
20
|
+
`,v=({author:t,date: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`
|
|
2
21
|
display: flex;
|
|
3
22
|
flex-wrap: wrap;
|
|
4
23
|
flex-direction: ${({hasAuthorBIO:t})=>t?"row":"column"};
|
|
5
|
-
|
|
24
|
+
`,$=r(x)`
|
|
6
25
|
font-family: var(--font-family);
|
|
7
26
|
font-size: 44px;
|
|
8
27
|
line-height: 48px;
|
|
9
28
|
font-weight: 600;
|
|
29
|
+
margin-top: 0;
|
|
10
30
|
|
|
11
|
-
@media screen and (min-width: ${
|
|
31
|
+
@media screen and (min-width: ${n.medium}) {
|
|
12
32
|
font-size: 64px;
|
|
13
33
|
line-height: 78px;
|
|
14
34
|
}
|
|
15
|
-
`,
|
|
35
|
+
`,T=r.div`
|
|
16
36
|
width: 80px;
|
|
17
37
|
height: 80px;
|
|
18
38
|
border-radius: 50%;
|
|
@@ -22,7 +42,7 @@ import e from"react";import r from"styled-components";import{TextGradient as d}f
|
|
|
22
42
|
background-size: cover;
|
|
23
43
|
background-position: center;
|
|
24
44
|
z-index: 1;
|
|
25
|
-
`,
|
|
45
|
+
`,B=r.div`
|
|
26
46
|
display: flex;
|
|
27
47
|
flex-direction: column;
|
|
28
48
|
justify-content: center;
|
|
@@ -33,15 +53,15 @@ import e from"react";import r from"styled-components";import{TextGradient as d}f
|
|
|
33
53
|
padding: 0 10px 0 58px;
|
|
34
54
|
background: white;
|
|
35
55
|
border-radius: 8px;
|
|
36
|
-
`,
|
|
56
|
+
`,I=r.img`
|
|
37
57
|
height: 100%;
|
|
38
58
|
max-height: 210px;
|
|
39
59
|
width: auto;
|
|
40
60
|
|
|
41
|
-
@media screen and (min-width: ${
|
|
61
|
+
@media screen and (min-width: ${n.small}) {
|
|
42
62
|
max-height: 320px;
|
|
43
63
|
}
|
|
44
|
-
`,
|
|
64
|
+
`,C=r.div`
|
|
45
65
|
display: flex;
|
|
46
66
|
align-items: center;
|
|
47
67
|
justify-content: center;
|
|
@@ -50,7 +70,7 @@ import e from"react";import r from"styled-components";import{TextGradient as d}f
|
|
|
50
70
|
background-color: #deeeff;
|
|
51
71
|
overflow: hidden;
|
|
52
72
|
|
|
53
|
-
@media screen and (min-width: ${
|
|
73
|
+
@media screen and (min-width: ${n.small}) {
|
|
54
74
|
height: 370px;
|
|
55
75
|
}
|
|
56
|
-
`;export{
|
|
76
|
+
`;export{y as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
${({active:r})=>r?
|
|
1
|
+
import o from"react";import i,{css as a}from"styled-components";import{Box as m}from"../../ui/Box";const g=({categories:r,selectedCategory:t,onCategoryClick:l})=>o.createElement(m,{display:"flex",flexWrap:"wrap",my:5},o.createElement(n,{size:"medium",key:"All",active:!t,onClick:()=>l(null)},"All"),r.map(({id:e,label:c})=>o.createElement(n,{size:"large",key:e,active:e===t,href:`/blog/category/${e}`},c))),n=i.a`
|
|
2
|
+
${({active:r})=>r?a`
|
|
3
3
|
background: #f88d3b;
|
|
4
|
-
`:
|
|
4
|
+
`:a`
|
|
5
5
|
background: rgba(0, 68, 212, 0.2);
|
|
6
6
|
`}
|
|
7
7
|
|
|
@@ -10,6 +10,8 @@ import e from"react";import p,{css as l}from"styled-components";import{Button as
|
|
|
10
10
|
border-radius: 24px;
|
|
11
11
|
color: var(--color-warm-grey-10);
|
|
12
12
|
border-color: transparent;
|
|
13
|
+
text-decoration: none;
|
|
14
|
+
text-align: center;
|
|
13
15
|
font-size: 18px;
|
|
14
16
|
padding: 8px 18px;
|
|
15
17
|
min-width: 120px;
|
|
@@ -18,4 +20,4 @@ import e from"react";import p,{css as l}from"styled-components";import{Button as
|
|
|
18
20
|
border-color: var(--color-carrot-7);
|
|
19
21
|
background: #f88d3b;
|
|
20
22
|
}
|
|
21
|
-
`;export{
|
|
23
|
+
`;export{g as PostsCategoryFilter};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export default function
|
|
2
|
+
export default function BlogPost(props: any): React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from"react";import o from"styled-components";import{useThemeHooks as s}from"@redocly/theme/core/hooks";import d from"@redocly/marketing-pages/components/Blog/PostInfo.js";import{MediaBox as p}from"@redocly/marketing-pages/components/PositionItems/MediaBox.js";import{Markdown as u}from"@redocly/theme/components/Markdown/Markdown";import{Box as g}from"@redocly/marketing-pages/ui/Box.js";import{RecentPosts as f}from"@redocly/marketing-pages/components/Blog/RecentPosts.js";function h(a){const{usePageProps:r}=s(),m=r(),{date:i,author:t,categories:n,title:l,image:c}=m.metadata;return e.createElement(
|
|
1
|
+
import e from"react";import o from"styled-components";import{useThemeHooks as s}from"@redocly/theme/core/hooks";import d from"@redocly/marketing-pages/components/Blog/PostInfo.js";import{MediaBox as p}from"@redocly/marketing-pages/components/PositionItems/MediaBox.js";import{Markdown as u}from"@redocly/theme/components/Markdown/Markdown";import{Box as g}from"@redocly/marketing-pages/ui/Box.js";import{RecentPosts as f}from"@redocly/marketing-pages/components/Blog/RecentPosts.js";function h(a){const{usePageProps:r}=s(),m=r(),{date:i,author:t,categories:n,title:l,image:c}=m.metadata;return e.createElement(w,{style:{background:"white"}},e.createElement(x,null,e.createElement(d,{authorName:t?.name,authorBIO:t.authorBIO,date:i,categories:n,title:l,author:t,avatar:t?.image,image:c}),e.createElement(u,null,a.children)),e.createElement(p,null,e.createElement(g,{my:"80px"},e.createElement(f,null))))}const x=o.div`
|
|
2
2
|
margin-left: auto;
|
|
3
3
|
margin-right: auto;
|
|
4
4
|
max-width: calc(90vw);
|
|
@@ -6,7 +6,7 @@ import e from"react";import o from"styled-components";import{useThemeHooks as s}
|
|
|
6
6
|
@media screen and (min-width: 900px) {
|
|
7
7
|
max-width: 800px;
|
|
8
8
|
}
|
|
9
|
-
`,
|
|
9
|
+
`,w=o.div`
|
|
10
10
|
position: relative;
|
|
11
11
|
overflow: hidden;
|
|
12
12
|
`;export{h as default};
|