Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use PNG logos in supporters list #101

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,17 +249,23 @@ const config = {
customFields: {
logos: {
Gruntwork: {
dark: "/logos/gruntwork.png",
light: "/logos/gruntwork-light.svg",
dark: "/logos/gruntwork-dark.png",
light: "/logos/gruntwork-light.png",
},
Spacelift: {
dark: "/logos/spacelift.svg",
light: "/logos/spacelift-light.svg",
dark: "/logos/spacelift-dark.png",
light: "/logos/spacelift-light.png",
},
env0: {
dark: "/logos/env0-dark.png",
light: "/logos/env0-light.png",
},
Scalr: {
dark: "/logos/scalr-dark.png",
light: "/logos/scalr-light.png",
},
env0: { dark: "/logos/env0.svg", light: "/logos/env0-light.svg" },
Scalr: { dark: "/logos/scalr.svg", light: "/logos/scalr-light.png" },
Harness: {
dark: "/logos/harness.svg",
dark: "/logos/harness-dark.png",
light: "/logos/harness-light.png",
},
},
Expand Down
23 changes: 15 additions & 8 deletions src/components/SupportersList/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from "react";
import Link from "@docusaurus/Link";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import ThemedImage from "@theme/ThemedImage";
import useBaseUrl from "@docusaurus/useBaseUrl";
import clsx from "clsx";

type SupportersListProps = {
list: {
Expand All @@ -24,7 +24,10 @@ export default function SupportersList({ list }: SupportersListProps) {
>
{list.map((supporter, index) => (
<li
className="py-3 md:py-6 border-b dark:border-gray-800 border-gray-200 flex gap-4 justify-between items-center"
className={clsx(
"border-b dark:border-gray-800 border-gray-200 flex gap-4 justify-between items-center",
logos[supporter.name] ? "py-2 md:py-4" : "py-3 md:py-6"
)}
key={index}
>
<Link
Expand All @@ -35,13 +38,17 @@ export default function SupportersList({ list }: SupportersListProps) {
aria-label={`Go to ${supporter.name} website`}
>
{logos[supporter.name] ? (
<ThemedImage
alt={supporter.name}
sources={{
light: useBaseUrl(logos[supporter.name].light),
dark: useBaseUrl(logos[supporter.name].dark),
<div
aria-hidden
style={{
"--light-img": `url('${useBaseUrl(
logos[supporter.name].light
)}')`,
"--dark-img": `url('${useBaseUrl(
logos[supporter.name].dark
)}')`,
}}
className="w-28"
className="w-28 h-10 [background-image:--light-img] dark:[background-image:--dark-img] bg-no-repeat bg-contain bg-left"
/>
) : (
supporter.name
Expand Down
Binary file added static/logos/env0-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/logos/env0-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion static/logos/env0-light.svg

This file was deleted.

1 change: 0 additions & 1 deletion static/logos/env0.svg

This file was deleted.

Binary file added static/logos/gruntwork-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/logos/gruntwork-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 0 additions & 14 deletions static/logos/gruntwork-light.svg

This file was deleted.

Binary file removed static/logos/gruntwork.png
Binary file not shown.
Binary file added static/logos/harness-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/logos/harness-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions static/logos/harness.svg

This file was deleted.

Binary file added static/logos/scalr-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/logos/scalr-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading