Skip to content

Commit

Permalink
enh(Subnav): Add remaining attributed logos to TitleLink logo dict (#477
Browse files Browse the repository at this point in the history
)

* Add remaining attributed logo options

* Add changeset

* CSS: Add new logos to height rule

* CSS: Add vagrant height rule
  • Loading branch information
EnMod authored Jan 5, 2022
1 parent a352ad9 commit 5b957ce
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/odd-eyes-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hashicorp/react-subnav': patch
---

Adds remaining attributed logo options to the `<TitleLink />` logo dictionary.
30 changes: 29 additions & 1 deletion packages/subnav/partials/TitleLink/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,59 +9,87 @@ import ConsulLogoAttr from '@hashicorp/mktg-logos/product/consul/primary/attribu
import HashiCorpLogo from '@hashicorp/mktg-logos/corporate/hashicorp/primary/black.svg?include'
import HCPLogo from '@hashicorp/mktg-logos/product/hcp/primary/black.svg?include'
import NomadLogo from '@hashicorp/mktg-logos/product/nomad/primary/color.svg?include'
import NomadLogoAttr from '@hashicorp/mktg-logos/product/nomad/primary/attributed_color.svg?include'
import PackerLogo from '@hashicorp/mktg-logos/product/packer/primary/color.svg?include'
import PackerLogoAttr from '@hashicorp/mktg-logos/product/packer/primary/attributed_color.svg?include'
import TerraformLogo from '@hashicorp/mktg-logos/product/terraform/primary/color.svg?include'
import TerraformLogoAttr from '@hashicorp/mktg-logos/product/terraform/primary/attributed_color.svg?include'
import VagrantLogo from '@hashicorp/mktg-logos/product/vagrant/primary/color.svg?include'
import VagrantLogoAttr from '@hashicorp/mktg-logos/product/vagrant/primary/attributed_color.svg?include'
import VaultLogo from '@hashicorp/mktg-logos/product/vault/primary/color.svg?include'
import VaultLogoAttr from '@hashicorp/mktg-logos/product/vault/primary/attributed_color.svg?include'
import BoundaryLogo from '@hashicorp/mktg-logos/product/boundary/primary/color.svg?include'
import BoundaryLogoAttr from '@hashicorp/mktg-logos/product/boundary/primary/attributed_color.svg?include'
import WaypointLogo from '@hashicorp/mktg-logos/product/waypoint/primary/color.svg?include'
import WaypointLogoAttr from '@hashicorp/mktg-logos/product/waypoint/primary/attributed_color.svg?include'
import TerraformCloudLogo from '@hashicorp/mktg-logos/product/terraform-cloud/primary/color.svg?include'
import TerraformCloudLogoAttr from '@hashicorp/mktg-logos/product/terraform-cloud/primary/attributed_color.svg?include'
/* white logos, for dark theme */
import ConsulLogoWhite from '@hashicorp/mktg-logos/product/consul/primary/colorwhite.svg?include'
import ConsulLogoWhiteAttr from '@hashicorp/mktg-logos/product/consul/primary/attributed_colorwhite.svg?include'
import HashiCorpLogoWhite from '@hashicorp/mktg-logos/corporate/hashicorp/primary/white.svg?include'
import HCPLogoWhite from '@hashicorp/mktg-logos/product/hcp/primary/white.svg?include'
import NomadLogoWhite from '@hashicorp/mktg-logos/product/nomad/primary/colorwhite.svg?include'
import NomadLogoWhiteAttr from '@hashicorp/mktg-logos/product/nomad/primary/attributed_colorwhite.svg?include'
import PackerLogoWhite from '@hashicorp/mktg-logos/product/packer/primary/colorwhite.svg?include'
import PackerLogoWhiteAttr from '@hashicorp/mktg-logos/product/packer/primary/attributed_colorwhite.svg?include'
import TerraformLogoWhite from '@hashicorp/mktg-logos/product/terraform/primary/colorwhite.svg?include'
import TerraformLogoWhiteAttr from '@hashicorp/mktg-logos/product/terraform/primary/attributed_colorwhite.svg?include'
import VagrantLogoWhite from '@hashicorp/mktg-logos/product/vagrant/primary/colorwhite.svg?include'
import VagrantLogoWhiteAttr from '@hashicorp/mktg-logos/product/vagrant/primary/attributed_colorwhite.svg?include'
import VaultLogoWhite from '@hashicorp/mktg-logos/product/vault/primary/colorwhite.svg?include'
import VaultLogoAttrWhite from '@hashicorp/mktg-logos/product/vault/primary/attributed_colorwhite.svg?include'
import BoundaryLogoWhite from '@hashicorp/mktg-logos/product/boundary/primary/colorwhite.svg?include'
import BoundaryLogoWhiteAttr from '@hashicorp/mktg-logos/product/boundary/primary/attributed_colorwhite.svg?include'
import WaypointLogoWhite from '@hashicorp/mktg-logos/product/waypoint/primary/colorwhite.svg?include'
import WaypointLogoWhiteAttr from '@hashicorp/mktg-logos/product/waypoint/primary/attributed_colorwhite.svg?include'
import TerraformCloudLogoWhite from '@hashicorp/mktg-logos/product/terraform-cloud/primary/colorwhite.svg?include'
import TerraformCloudLogoWhiteAttr from '@hashicorp/mktg-logos/product/terraform-cloud/primary/attributed_colorwhite.svg?include'

const logoDict = {
light: {
boundary: BoundaryLogo,
hashiCorpBoundary: BoundaryLogoAttr,
consul: ConsulLogo,
hashiCorpConsul: ConsulLogoAttr,
hashicorp: HashiCorpLogo,
hashiCorpConsul: ConsulLogoAttr,
hcp: HCPLogo,
nomad: NomadLogo,
hashiCorpNomad: NomadLogoAttr,
packer: PackerLogo,
hashiCorpPacker: PackerLogoAttr,
terraform: TerraformLogo,
hashiCorpTerraform: TerraformLogoAttr,
tfc: TerraformCloudLogo,
hashiCorpTfc: TerraformCloudLogoAttr,
vagrant: VagrantLogo,
hashiCorpVagrant: VagrantLogoAttr,
vault: VaultLogo,
hashiCorpVault: VaultLogoAttr,
waypoint: WaypointLogo,
hashiCorpWaypoint: WaypointLogoAttr,
},
dark: {
boundary: BoundaryLogoWhite,
hashiCorpBoundary: BoundaryLogoWhiteAttr,
consul: ConsulLogoWhite,
hashicorp: HashiCorpLogoWhite,
hashiCorpConsul: ConsulLogoWhiteAttr,
hcp: HCPLogoWhite,
nomad: NomadLogoWhite,
hashiCorpNomad: NomadLogoWhiteAttr,
packer: PackerLogoWhite,
hashiCorpPacker: PackerLogoWhiteAttr,
terraform: TerraformLogoWhite,
hashiCorpTerraform: TerraformLogoWhiteAttr,
tfc: TerraformCloudLogoWhite,
hashiCorpTfc: TerraformCloudLogoWhiteAttr,
vagrant: VagrantLogoWhite,
hashiCorpVagrant: VagrantLogoWhiteAttr,
vault: VaultLogoWhite,
hashiCorpVault: VaultLogoAttrWhite,
waypoint: WaypointLogoWhite,
hashiCorpWaypoint: WaypointLogoWhiteAttr,
},
}

Expand Down
9 changes: 8 additions & 1 deletion packages/subnav/partials/TitleLink/style.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@
}

&.hashiCorpVault,
&.hashiCorpConsul {
&.hashiCorpConsul,
&.hashiCorpNomad,
&.hashiCorpPacker,
&.hashiCorpTerraform,
&.hashiCorpVagrant,
&.hashiCorpBoundary,
&.hashiCorpWaypoint,
&.hashiCorpTfc {
& svg {
height: 40px;
}
Expand Down

1 comment on commit 5b957ce

@vercel
Copy link

@vercel vercel bot commented on 5b957ce Jan 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.