closerdao / closer-ui

closer-ui.vercel.app
1 stars 0 forks source link

Photo gallery & custom pages #557

Open closerearth opened 6 days ago

closerearth commented 6 days ago

API Let's start the process of making more platform defined landing pages, and ability to define this in a database rather then in code.

  1. As a first step, let's add a /page model to the API which can have mostly the same fields as Article, but with:
    • isHomePage: bool
    • heroVideo: text (youtube embed ID) (if set should render like TDF hero)
    • photos: array of photoIDs (if set, the page should show a photoGallery)
    • faqs: text (ID of a google sheet to load - if set, page should display the Frequently asked questions component with data from that sheet)
    • resources: array [{url: xx.com, label: "History", description: "lorem ipsum"}] (if set, should render a ResourceList component)
    • showUpcomingEvents: bool

UI

  1. Add pages editor in the admin
    • It should appear in the admin menu under "Custom pages"
    • For each page you can click into it and edit the different fields.
  2. Make the home page dynamic. Start dropping in dynamic content.
    • Load api.moos.garden/page?where={isHomePage: 1} then render the landing page with this info.
    • Update the photo gallery component (like on TDF homepage) to render the list of photos from the page instead of a static list. <PhotoGallery photos={page.photos} />
valieff commented 2 days ago

discuss design with Fran

valieff commented 2 days ago

I suggest additional fields for page model:

heroTitle heroSubtitle heroCtaButtonText heroCtaButtonUrl heroImage in case image is preferred for hero block instead of video

These will allow to compose a hero block which is often needed on landing pages.

Also there will be a block of text, that can contain images, lists, subheadings, videos - editable via rich text editor.