From fa52c50667b8dca0840b48ee002e563eb8d42340 Mon Sep 17 00:00:00 2001 From: stevekaplan123 Date: Sun, 2 Jun 2024 17:39:24 +0300 Subject: [PATCH 01/28] chore: first pass for SheetsSidebar --- static/css/static.css | 6 ++++++ static/js/Misc.jsx | 13 +++++++++++-- static/js/NavSidebar.jsx | 33 +++++++++++++++++++++++++++++++-- static/js/SheetsHomePage.jsx | 12 ++++++++++++ templates/static/sheets.html | 2 +- 5 files changed, 61 insertions(+), 5 deletions(-) diff --git a/static/css/static.css b/static/css/static.css index 3408c52dd6..eaf1425702 100644 --- a/static/css/static.css +++ b/static/css/static.css @@ -5,6 +5,12 @@ display: flex; flex-direction: row; } +#sheetsButton { + display: none; +} +#sheetsLandingPage #sheetsButton { + display: inline; +} .inApp #staticContentWrapper { display: none; } diff --git a/static/js/Misc.jsx b/static/js/Misc.jsx index 409e0f4558..74f3102beb 100644 --- a/static/js/Misc.jsx +++ b/static/js/Misc.jsx @@ -1114,7 +1114,15 @@ const AllAdminButtons = ({ buttonOptions, buttonIDs, adminClasses }) => { ); }; -const CategoryHeader = ({children, type, data = [], toggleButtonIDs = ["subcategory", "edit"], actionButtons = {}}) => { + +const CreateSheetsButton = () => { + return + make a sheet icon + Create + +} + +const CategoryHeader = ({children, type, data = [], toggleButtonIDs = ["subcategory", "edit"], actionButtons = {}}) => { /* Provides an interface for using admin tools. `type` is 'sources', 'cats', 'books' or 'topics' @@ -3382,5 +3390,6 @@ export { requestWithCallBack, OnInView, TopicPictureUploader, - ImageWithCaption + ImageWithCaption, + CreateSheetsButton }; diff --git a/static/js/NavSidebar.jsx b/static/js/NavSidebar.jsx index 1aaadeaee4..61b6c03adf 100644 --- a/static/js/NavSidebar.jsx +++ b/static/js/NavSidebar.jsx @@ -1,7 +1,7 @@ import React, { useState, useEffect } from 'react'; import classNames from 'classnames'; import Sefaria from './sefaria/sefaria'; -import {AppStoreButton, DonateLink, EnglishText, HebrewText, ImageWithCaption} from './Misc' +import {AppStoreButton, CreateSheetsButton, DonateLink, EnglishText, HebrewText, ImageWithCaption} from './Misc' import {NewsletterSignUpForm} from "./NewsletterSignUpForm"; import {InterfaceText, ProfileListing, Dropdown} from './Misc'; import { Promotions } from './Promotions' @@ -44,6 +44,8 @@ const Modules = ({type, props}) => { "GetTheApp": GetTheApp, "StayConnected": StayConnected, "AboutLearningSchedules": AboutLearningSchedules, + "CreateASheet": CreateASheet, + "WhatIsASourceSheet": WhatIsASourceSheet, "AboutTranslatedText": AboutTranslatedText, "AboutCollections": AboutCollections, "ExploreCollections": ExploreCollections, @@ -691,7 +693,34 @@ const StayConnected = () => { // TODO: remove? looks like we are not using this ); }; - +const WhatIsASourceSheet = () => ( + + What is a Source Sheet? + + + Lorem ipsum + Get Started + + + Lorem ipsum + Get Started + + + +); +const CreateASheet = () => ( + + Create A Sheet + + + Mix and match sources along with outside sources, comments, images, and videos. + + + + + + +); const AboutLearningSchedules = () => ( Learning Schedules diff --git a/static/js/SheetsHomePage.jsx b/static/js/SheetsHomePage.jsx index 24fcd196e9..a84996eb53 100644 --- a/static/js/SheetsHomePage.jsx +++ b/static/js/SheetsHomePage.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import {NavSidebar} from "./NavSidebar"; const SheetsHeroBanner = () => { return
; } +const SheetsSidebar = () => { + const sidebarModules = [ + {type: "CreateASheet"}, + {type: "WhatIsASourceSheet"}, + ]; + return +} + + + const SheetsHomePage = () => { return
+
} export default SheetsHomePage; \ No newline at end of file diff --git a/templates/static/sheets.html b/templates/static/sheets.html index 74b1b041e9..4271a1990f 100644 --- a/templates/static/sheets.html +++ b/templates/static/sheets.html @@ -19,7 +19,7 @@ {% endblock %} {% block content %} -
+

Loading...

From 4a98e94ddef081f94f7d9c8e34a9ce07a6e67f43 Mon Sep 17 00:00:00 2001 From: stevekaplan123 Date: Mon, 3 Jun 2024 09:34:11 +0300 Subject: [PATCH 02/28] chore: sheetsLandingPage resourcesLink button CSS --- static/css/static.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/static/css/static.css b/static/css/static.css index eaf1425702..ae090216da 100644 --- a/static/css/static.css +++ b/static/css/static.css @@ -11,6 +11,11 @@ #sheetsLandingPage #sheetsButton { display: inline; } +#sheetsLandingPage .resourcesLink { + display: block; + width: 30%; + margin-top: 15px; +} .inApp #staticContentWrapper { display: none; } From a6e3413c3ae439efd851540a1de2e1f18413522e Mon Sep 17 00:00:00 2001 From: stevekaplan123 Date: Mon, 3 Jun 2024 15:43:27 +0300 Subject: [PATCH 03/28] chore: homepage sheets sidebar css -- use button class --- static/css/s2.css | 15 +++++++++++++++ static/js/NavSidebar.jsx | 4 ++-- static/js/SheetsHomePage.jsx | 5 ++--- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/static/css/s2.css b/static/css/s2.css index b8d07bfb4d..7e90e3c23c 100644 --- a/static/css/s2.css +++ b/static/css/s2.css @@ -7870,6 +7870,21 @@ But not to use a display block directive that might break continuous mode for ot --hebrew-font: var(--hebrew-sans-serif-font-family); border: none; } +.sheets .button { + background-color: var(--midrash-green); +} +.sheets #getStarted { + width: 111px; + height: 39px; + padding: 10px 15px 10px 15px; + border-radius: 6px; + border: 1px solid #CCCCCC; + display: block; + background-color: white; + color: black; + font-size: 16px; + white-space: nowrap; +} .button.disabled{ border: 1px solid var(--light-grey); background-color: var(--lightest-grey); diff --git a/static/js/NavSidebar.jsx b/static/js/NavSidebar.jsx index 61b6c03adf..b308494fe5 100644 --- a/static/js/NavSidebar.jsx +++ b/static/js/NavSidebar.jsx @@ -699,11 +699,11 @@ const WhatIsASourceSheet = () => ( Lorem ipsum - Get Started + Get Started Lorem ipsum - Get Started + Get Started diff --git a/static/js/SheetsHomePage.jsx b/static/js/SheetsHomePage.jsx index 5ca17a5ea4..eb83d1a379 100644 --- a/static/js/SheetsHomePage.jsx +++ b/static/js/SheetsHomePage.jsx @@ -27,13 +27,12 @@ const SheetsSidebar = () => { const SheetsHomePage = () => { - return
+ return
-
- +