Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 71 additions & 25 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"prettier": "^2.3.0",
"react": "^16.14.0",
"react-icons": "^3.11.0",
"react-scrollama": "^2.2.16",
"react-social-icons": "^4.1.0",
"save": "^2.4.0"
}
Expand Down
3 changes: 3 additions & 0 deletions studio/schemas/blockContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,8 @@ export default {
{
type: "iframe",
},
{
type: "scrollytellingComponent",
},
],
};
4 changes: 4 additions & 0 deletions studio/schemas/schemas.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import preview from "./preview";
import project from "./project";
import projectMember from "./projectMember";
import redirect from "./redirect";
import scrollytellingBlock from "./scrollytellingBlock";
import scrollytellingComponent from "./scrollytellingComponent";
import shortForm from "./shortForm";
import siteSettings from "./siteSettings";
import slideshow from "./slideshow";
Expand Down Expand Up @@ -63,6 +65,8 @@ export default createSchema({
project,
projectMember,
redirect,
scrollytellingBlock,
scrollytellingComponent,
shortForm,
siteSettings,
slideshow,
Expand Down
32 changes: 32 additions & 0 deletions studio/schemas/scrollytellingBlock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
export default {
name: "scrollytellingBlock",
title: "Scrollytelling Block",
type: "object",
description: "Scrollytelling Block to be used Scrollytelling Component",
preview: {
select: {
media: 'graphic',
},
},
fields: [
{
name: "graphic",
title: "Graphic",
description: "Array of contents blocks and associated images",
type: "figure",
options: {
isHighlighted: true,
},
},
{
name: "textContent",
title: "Text Content",
description: "Array of contents blocks and associated images",
type: 'blockContent',
options: {
isHighlighted: true,
},
},
],
};

30 changes: 30 additions & 0 deletions studio/schemas/scrollytellingComponent.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
export default {
title: "Scrollytelling Component",
name: "scrollytellingComponent",
type: "object",
description: "Scrollytelling Component to be used inside articles",
preview: {
select: {
blocks: 'scrollyTellingBlocks',
},
prepare(selection) {
const {blocks} = selection;
return {
subtitle: `There are ${blocks.length} Scrollytelling Blocks`,
};
},
},
fields: [
{
name: "scrollyTellingBlocks",
title: "Scrollytelling Blocks",
description: "Array of Scrollytelling blocks",
type: "array",
of: [{type: "scrollytellingBlock"}],
options: {
isHighlighted: true,
},
},
],
};

Loading