diff --git a/_data/pages/what-is-starknet.yml b/_data/pages/what-is-starknet.yml index a5edef05b2..0f9d4ae4bf 100644 --- a/_data/pages/what-is-starknet.yml +++ b/_data/pages/what-is-starknet.yml @@ -5,8 +5,9 @@ page_last_updated: true blocks: - type: page_header title: "What is Starknet? " + description: "" - type: markdown - body: > + body: >- Starknet is a Validity-Rollup (aka ZK-Rollup) Layer 2 network that operates on top of Ethereum, enabling dApps to massively scale without compromising on security. @@ -61,6 +62,8 @@ blocks: The Core contract verifies the proof's authenticity and confirms receiving the State Diff, subsequently updating the Starknet state on the Ethereum blockchain. This updated state is then added to an Ethereum block, distributed across the node network for validation and voting. When the block accumulates sufficient votes, it achieves "finalized" status, cementing its place as an immutable part of Ethereum. title: Secure Settlement on Ethereum description: Chapter 4 explains how to secure settlement on Ethereum + chapterDescriptionFullWidth: true + playlistOnBottom: false - type: link_list heading: Further reading listSize: lg diff --git a/workspaces/cms-config/src/blocks.ts b/workspaces/cms-config/src/blocks.ts index a985890f5e..7735dedaa7 100644 --- a/workspaces/cms-config/src/blocks.ts +++ b/workspaces/cms-config/src/blocks.ts @@ -692,6 +692,20 @@ export const blocks = [ label: "Education video section", widget: "object", fields: [ + { + label: "Chapter description full width", + name: "chapterDescriptionFullWidth", + widget: "boolean", + default: false, + required: false, + }, + { + label: "Chapters playlist on bottom of video desktop", + name: "playlistOnBottom", + widget: "boolean", + default: true, + required: false, + }, { crowdin: true, label: 'Chapter 1', diff --git a/workspaces/cms-data/src/pages.ts b/workspaces/cms-data/src/pages.ts index 642022439e..3efe2ab66d 100644 --- a/workspaces/cms-data/src/pages.ts +++ b/workspaces/cms-data/src/pages.ts @@ -158,6 +158,8 @@ export interface VideoSectionBlock { readonly sequencer: ChapterInfo; readonly prover: ChapterInfo; readonly 'eth-settlement': ChapterInfo; + readonly chapterDescriptionFullWidth: boolean; + readonly playlistOnBottom: boolean; } export interface NewsletterBlock { diff --git a/workspaces/website/src/blocks/VideoSectionBlock.tsx b/workspaces/website/src/blocks/VideoSectionBlock.tsx index f429631ea6..ff93bc733b 100644 --- a/workspaces/website/src/blocks/VideoSectionBlock.tsx +++ b/workspaces/website/src/blocks/VideoSectionBlock.tsx @@ -2,7 +2,7 @@ * Module dependencies */ -import { Box } from "@chakra-ui/react"; +import { Box, Show } from "@chakra-ui/react"; import { VideoSectionBlock as VideoSectionProps, ChapterInfo @@ -26,6 +26,8 @@ type ChapterType = Chapter & ChapterInfo; */ export default function VideoSectionBlock(props: VideoSectionProps) { + const { playlistOnBottom, chapterDescriptionFullWidth } = props; + const normalizedPlaylist = useMemo(() => { return playlist.map((chapter) => { const chapterInfo = props[chapter.id as keyof VideoSectionProps] as ChapterInfo; @@ -55,23 +57,26 @@ export default function VideoSectionBlock(props: VideoSectionProps) { onChapterChange={(id) => setCurrentChapter(normalizedPlaylist.find((p) => p.id === id) ?? normalizedPlaylist[0]) } - playlistOnBottom + playlistOnBottom={playlistOnBottom} /> - - - setCurrentChapter(normalizedPlaylist.find((p) => p.id === id) ?? normalizedPlaylist[0]) - } - items={normalizedPlaylist.map((p) => ({ - id: p.id, - label: p.subtitle, - }))} - /> + + + + setCurrentChapter(normalizedPlaylist.find((p) => p.id === id) ?? normalizedPlaylist[0]) + } + items={normalizedPlaylist.map((p) => ({ + id: p.id, + label: p.subtitle, + }))} + playlistOnBottom={playlistOnBottom} + /> + diff --git a/workspaces/website/src/components/CategoryTabs/CategoryTabs.tsx b/workspaces/website/src/components/CategoryTabs/CategoryTabs.tsx index 8c7742c31a..dd475afb2b 100644 --- a/workspaces/website/src/components/CategoryTabs/CategoryTabs.tsx +++ b/workspaces/website/src/components/CategoryTabs/CategoryTabs.tsx @@ -49,9 +49,9 @@ export const CategoryTabs = ({ width="100%" padding={'0 24px'} > - {items.map((item) => { + {items.map((item, index) => { return ( - +