Sefaria-Project icon indicating copy to clipboard operation
Sefaria-Project copied to clipboard

Feature/sc 26957/sidebar with create a sheet and educational

Open stevekaplan123 opened this issue 1 year ago • 1 comments

Description

This PR implements the NavSidebar of the Sheets Homepage which displays two sections with text and buttons. The sections are "Create A Sheet" and "What is a Source Sheet?"

Code Changes

Since I used the NavSidebar component, I implemented WhatIsASourceSheet and CreateASheet as Modules in NavSidebar.jsx. I used, and modified, a previously existing Module component TitledText, which has never been made use of before. Previously, TitledText took as inputs english/hebrew titles and english/hebrew text and created a Module component with the corresponding title and text. I now implemented so that it takes the title and text as a dictionary of 'en' and 'he', and it can now receive children. In my usage of TitledText, I pass as children a button to be displayed. So, for example, the WhatIsASourceSheet component uses TitledText as follows:

const WhatIsASourceSheet = () => (
    <TitledText title={{'en': 'What is a Source Sheet?', 'he': ''}}
                text={{'en': '',
                       'he': ''}}
                h1Header={true}>
        <GetStartedButton/>
    </TitledText>
);

stevekaplan123 avatar Aug 06 '24 08:08 stevekaplan123

Verbally discussed some additional needed changes

edamboritz avatar Aug 12 '24 12:08 edamboritz