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

Products Page

Open saengel opened this issue 1 year ago • 0 comments

Description

Adding a new products page to the super-about page displaying different experiments and products offered by Sefaria, as well an opportunity for users to explore projects 'powered-by-Sefaria'.

Code changes:

  1. In sites/sefaria/urls.py added the products url
  2. In static/css/s2.css all of the CSS needed for the elements on the page, as well as integrations into the SuperAbout page
  3. Importing and exporting the <ProductsPage /> component from static/js/ReaderApp.jsx
  4. In static/js/StaticPages.jsx adding the <ProductsPage /> component, which is comprised of a <Product /> and a <DevBox /> component. This page queries Strapi for the product data using a GraphQL query. If the user is an admin, it queries for draft content as well. This data is then transformed into a more usable structure, and is mapped to the <Product /> components, creating a list. This list is split at position 2, and we render the first portion of the list of <Product /> components, then the <DevBox/> and finally the remaining list of <Product /> components.
    • Each <Product /> is comprised of sub components for each portion of the product, the <ProductTitle />, <ProductCTA />, <ProductDesc />.
  5. In templates/_sidebar.html code was added to integrate the products page into the new sidebar
  6. In templates/static/products.html, we created the template for the products page.

Notes:

  • All of the links are still "dummy" data for now. This needs to be changed (mostly in Strapi, the <DevBox /> component once we're ready to display it).
  • The <DevBox /> component needs to be commented out once it passes design review, since we are not ready to display it yet.

saengel avatar May 30 '24 08:05 saengel