@redocly/marketing-pages 0.1.4 → 0.1.6
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/FeaturedClassics.js +1 -1
- package/dist/components/Blog/FirstThreePosts.js +6 -14
- package/dist/components/Blog/LatestPosts.js +1 -1
- package/dist/components/Blog/PrimaryPostCard.d.ts +1 -1
- package/dist/components/Blog/PrimaryPostCard.js +6 -6
- package/dist/components/Blog/SecondaryPostCard.d.ts +1 -1
- package/dist/components/Blog/SecondaryPostCard.js +6 -6
- package/dist/components/Blog/types.d.ts +0 -1
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import t,{useMemo as a}from"react";import{linearGradient as m}from"polished";import s from"styled-components";import{PrimaryPostCard as l}from"./PrimaryPostCard";import{GridSection as d,MediaBox as
|
|
1
|
+
import t,{useMemo as a}from"react";import{linearGradient as m}from"polished";import s from"styled-components";import{PrimaryPostCard as l}from"./PrimaryPostCard";import{GridSection as d,MediaBox as p,Skewed as c}from"../PositionItems";import{TextGradient as f}from"../TextGradient/TextGradient";import{breakpoints as g}from"@redocly/theme/core/utils";import{useThemeHooks as u}from"@redocly/theme/core/hooks";const G=()=>{const{usePageSharedData:o}=u(),{posts:r}=o("blog-posts"),i=["Using Redocly tools for better OpenAPI development","Build rich developer experiences with Markdown in OpenAPI","What's an API?"],n=a(()=>r.filter(({title:e})=>i.includes(e)),[r]);return t.createElement(c,{angle:0,bg:m({colorStops:["rgb(0, 104, 251)","rgb(126, 65, 255)"],toDirection:"to right bottom"}),offsetTop:"-300px",offsetBottom:"-200px"},t.createElement(p,{mb:6},t.createElement(h,null,"Featured classics"),t.createElement(d,{gridTemplateColumns:{base:"1fr",medium:"repeat(3, 1fr)"},justifyItems:{base:"center"},gridGap:{base:"5rem"}},n.map(e=>t.createElement(l,{key:e.slug,title:e.title,to:`${e.slug}`,img:e.image,description:e.description,date:e.date,author:e.author})))))},h=s(f)`
|
|
2
2
|
font-size: 28px;
|
|
3
3
|
line-height: 30px;
|
|
4
4
|
font-family: var(--font-family);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
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 d}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(l,{post:t[1],gridArea:"second"}),e.createElement(l,{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,date:d(r.date)}))))),u=o.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
justify-content: center;
|
|
@@ -6,7 +6,7 @@ import r from"react";import o from"styled-components";import{TextGradient as s}f
|
|
|
6
6
|
background-repeat: no-repeat;
|
|
7
7
|
background-size: cover;
|
|
8
8
|
background-position: center;
|
|
9
|
-
background-image: url(${({background:
|
|
9
|
+
background-image: url(${({background:r})=>r});
|
|
10
10
|
position: relative;
|
|
11
11
|
overflow: hidden;
|
|
12
12
|
border-radius: 8px;
|
|
@@ -14,21 +14,15 @@ import r from"react";import o from"styled-components";import{TextGradient as s}f
|
|
|
14
14
|
|
|
15
15
|
transition: box-shadow 0.3s;
|
|
16
16
|
&:hover {
|
|
17
|
-
box-shadow:
|
|
18
|
-
0 0 50px rgba(0 68 212 / 18%),
|
|
19
|
-
0 8px 16px 0 rgb(0 68 212 / 18%);
|
|
17
|
+
box-shadow: 0 0 50px rgba(0 68 212 / 18%), 0 8px 16px 0 rgb(0 68 212 / 18%);
|
|
20
18
|
}
|
|
21
19
|
`,w=o.div`
|
|
22
20
|
position: absolute;
|
|
23
|
-
background: linear-gradient(
|
|
24
|
-
to right bottom,
|
|
25
|
-
rgba(0, 104, 251, 0.8) 15.14%,
|
|
26
|
-
rgba(126, 65, 255, 0.8) 87.3%
|
|
27
|
-
);
|
|
21
|
+
background: linear-gradient(to right bottom, rgba(0, 104, 251, 0.8) 15.14%, rgba(126, 65, 255, 0.8) 87.3%);
|
|
28
22
|
width: 100%;
|
|
29
23
|
height: 100%;
|
|
30
24
|
left: 0;
|
|
31
|
-
`,l=({post:
|
|
25
|
+
`,l=({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"},d(r.date))))),y=o(s)`
|
|
32
26
|
font-size: 18px;
|
|
33
27
|
line-height: 24px;
|
|
34
28
|
font-family: var(--font-family);
|
|
@@ -48,9 +42,7 @@ import r from"react";import o from"styled-components";import{TextGradient as s}f
|
|
|
48
42
|
transition: box-shadow 0.2s;
|
|
49
43
|
|
|
50
44
|
&:hover {
|
|
51
|
-
box-shadow:
|
|
52
|
-
0 0 36px rgba(0 68 212 / 18%),
|
|
53
|
-
0 8px 16px 0 rgb(0 68 212 / 18%);
|
|
45
|
+
box-shadow: 0 0 36px rgba(0 68 212 / 18%), 0 8px 16px 0 rgb(0 68 212 / 18%);
|
|
54
46
|
}
|
|
55
47
|
`,v=o(x)`
|
|
56
48
|
position: relative;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import t,{useState 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 S}from"../TypographyElements/TypographyElements";import{PostsCategoryFilter as b}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 R=()=>{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(S,{color:"var(--color-text-dark)"},"Latest posts"),!n&&t.createElement(b,{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,date:e.date,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
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Post } from './types';
|
|
3
|
-
interface PrimaryPostCardProps extends Pick<Post, 'title' | '
|
|
3
|
+
interface PrimaryPostCardProps extends Pick<Post, 'title' | 'author' | 'date' | 'description'> {
|
|
4
4
|
to: string;
|
|
5
5
|
img: string;
|
|
6
6
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import t from"react";import e from"styled-components";import{H4Title 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 x}from"./Author";import{PostLink as h}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,date:m,description:l}=o;return t.createElement(u,null,t.createElement(h,{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,date:s(m)})))))}const g=e.img`
|
|
2
2
|
width: 100%;
|
|
3
3
|
height: 150px;
|
|
4
4
|
margin-bottom: 26px;
|
|
5
5
|
object-fit: contain;
|
|
6
6
|
|
|
7
|
-
@media screen and (min-width: ${
|
|
7
|
+
@media screen and (min-width: ${f.large}) {
|
|
8
8
|
height: 210px;
|
|
9
9
|
}
|
|
10
|
-
`,
|
|
10
|
+
`,u=e.div`
|
|
11
11
|
position: relative;
|
|
12
12
|
max-width: 600px;
|
|
13
13
|
background: white;
|
|
@@ -21,10 +21,10 @@ import t from"react";import e from"styled-components";import{H4Title as c,Paragr
|
|
|
21
21
|
0 0 50px rgba(0 68 212 / 18%),
|
|
22
22
|
0 8px 16px 0 rgb(0 68 212 / 18%);
|
|
23
23
|
}
|
|
24
|
-
`,
|
|
24
|
+
`,b=e.div`
|
|
25
25
|
display: flex;
|
|
26
26
|
flex-direction: column;
|
|
27
27
|
height: 100%;
|
|
28
|
-
`,
|
|
28
|
+
`,w=e(x)`
|
|
29
29
|
margin-top: auto;
|
|
30
|
-
`;export{
|
|
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' | '
|
|
3
|
+
interface SecondaryPostCardProps extends Pick<Post, 'title' | 'author' | 'date' | 'description'> {
|
|
4
4
|
to: string;
|
|
5
5
|
img: string;
|
|
6
6
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import t from"react";import e from"styled-components";import{Box 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 x,Paragraph as h}from"../TypographyElements/TypographyElements";import{formatDateString as s}from"../../utils/dates";function A(o){const{title:r,to:a,img:i,author:n,date:l,description:m}=o;return t.createElement(f,null,t.createElement(p,{to:a},t.createElement(c,{display:"flex",flexDirection:"column",height:"100%"},t.createElement("div",null,t.createElement(u,null),t.createElement(g,{src:i})),t.createElement(b,null,t.createElement(x,{my:1,color:"var(--color-text-accent)"},r),t.createElement(h,{color:"var(--color-text-dimmed)"},m),t.createElement(v,{author:n,date:s(l)})))))}const g=e.img`
|
|
2
2
|
width: 100%;
|
|
3
3
|
height: 270px;
|
|
4
4
|
object-fit: cover;
|
|
5
|
-
`,
|
|
5
|
+
`,u=e.div`
|
|
6
6
|
background: linear-gradient(
|
|
7
7
|
to right bottom,
|
|
8
8
|
rgba(0, 104, 251, 0.8) 15.14%,
|
|
@@ -12,7 +12,7 @@ import t from"react";import e from"styled-components";import{Box as d}from"../..
|
|
|
12
12
|
position: absolute;
|
|
13
13
|
width: 100%;
|
|
14
14
|
height: 270px;
|
|
15
|
-
`,
|
|
15
|
+
`,f=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 d}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
|
+
`,b=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{A as SecondaryPostCard};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/marketing-pages",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -40,7 +40,10 @@
|
|
|
40
40
|
"react-tooltip": "^4.2.21",
|
|
41
41
|
"reactjs-popup": "^2.0.6",
|
|
42
42
|
"ulid": "^2.3.0",
|
|
43
|
-
"vitest": "^3.1.3"
|
|
43
|
+
"vitest": "^3.1.3",
|
|
44
|
+
"html2canvas": "^1.4.1",
|
|
45
|
+
"jspdf": "^3.0.1",
|
|
46
|
+
"json-schema-to-ts": "^3.1.0"
|
|
44
47
|
},
|
|
45
48
|
"peerDependencies": {
|
|
46
49
|
"react": "^18.3.1",
|
|
@@ -57,9 +60,6 @@
|
|
|
57
60
|
"@types/styled-system": "^5.1.20",
|
|
58
61
|
"copyfiles": "^2.4.1",
|
|
59
62
|
"esbuild": "^0.25.4",
|
|
60
|
-
"html2canvas": "^1.4.1",
|
|
61
|
-
"json-schema-to-ts": "^3.1.0",
|
|
62
|
-
"jspdf": "^3.0.1",
|
|
63
63
|
"react": "^18.3.1",
|
|
64
64
|
"react-dom": "^18.3.1",
|
|
65
65
|
"styled-components": ">=5.3.11",
|