Skip to content
Open
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
4 changes: 0 additions & 4 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ products.forEach(name => {
productIcons[name] = require(getProduct(name)).pathD
})

if (docsConfig.productLogoPathD && docsConfig.productIconKey) {
return Error("Set either `productLogoPathD` or `productIconKey` in docs-config.js, not both")
}

if (docsConfig.productIconKey) {
docsConfig.productLogoPathD = productIcons[docsConfig.productIconKey]
}
Expand Down
10 changes: 5 additions & 5 deletions src/components/docs-product-logo.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from "react"
import getCloudflareDocsConfig from "../utils/get-cloudflare-docs-config"
import AccessibleSVG from "./accessible-svg"
import getUniqueReadableID from "../utils/get-unique-readable-id"

const titleID = getUniqueReadableID("title")

export default () => {
const { product, productLogoPathD } = getCloudflareDocsConfig()
const { product, productIconKey, logoSVGContent} = getCloudflareDocsConfig()

return (
<AccessibleSVG title={`Cloudflare ${product} logo`} viewBox="0 0 48 48">
<path d={productLogoPathD}/>
</AccessibleSVG>
<span id={titleID} title={`Cloudflare ${productIconKey} logo`} dangerouslySetInnerHTML={{__html: logoSVGContent}} />
)
}
8 changes: 8 additions & 0 deletions src/css/docs/components/docs-nav-logo-lockup.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@
flex-shrink: 0;
}

[theme="light"] .DocsNavLogoLockup--logo {
fill: var(--orange);
}

[theme="dark"] .DocsNavLogoLockup--logo {
fill: var(--orange);
}

.DocsNavLogoLockup--text {
font-size: var(--font-size, 1em);
font-weight: 700;
Expand Down
2 changes: 2 additions & 0 deletions src/utils/get-cloudflare-docs-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export default () => {
pathPrefix
product
productLogoPathD
productIconKey
logoSVGContent
contentRepo
contentRepoFolder
externalLinks {
Expand Down