thepolicylab-projectportals / project-portal-theme

Gatsby Theme for the Project Portals
MIT License
1 stars 0 forks source link

Refactor images #663

Open hollandjg opened 8 months ago

hollandjg commented 8 months ago

It looks to me as though the handling of images on the whole – where they get stored, how they are divided up, and whether you can set images for the layout components from the CMS (you can't right now) – needs another look, but that's a different PR. It feels like, with this PR, we're getting the hang of handling images!

Originally posted by @hollandjg in https://github.com/thepolicylab-projectportals/project-portal-theme/pull/651#pullrequestreview-1690708586

JRWallace commented 6 months ago

Project portal images overview

There are several types of images in project portal and they are configured in different ways:

Project Images are the images you can see rendered on project pages.

Favicon is the image that is shown in the browser tab.

Theme Images are images that are tightly tied to the components in the theme, including things like banner, navbar, and footer images

    navbarLogo: file(
      name: { eq: "navbar" }
      extension: { in: ["png", "jpg", "jpeg"] }
      sourceInstanceName: { eq: "themeImages" }
    ) {
      childImageSharp {
        gatsbyImageData(height: 64)
      }
    }

Contact Icons are the images that are used as the image for contacts.

Images are the background images that are part of the header-with-image component.