Skip to content

[BUG] logo-mode does not get passed to navigation #1914

@mnordhaus

Description

@mnordhaus

Describe the bug

According the current hinode documentation logo-mode should activate the automated toggeling of the logo for darkmode when complied to the naming convention *-light.* / *-dark.* for the alternative images.

To reproduce

Add logo variants to the static/img folder like:

  • logo.svg
  • logo-light.svg
  • logo-dark.svg

Configure in params.toml:
...
[navigation]
anchor = true
logo = "/img/logo.svg"
logo-mode = true
...
Toggle modes
-> it still displays logo.svg

Expected behavior

Both alternative logos are getting rendered and the switch works

Host environment

Please complete the following information where applicable.

  • Hinode version: [2.8.5]`

Additional context

Fix pass logo-mode in baseof.html line 56+

    <body{{ with $bodyClasses }} class="{{ delimit . " " }}"{{ end }}>
        {{- partial "assets/navbar.html" (dict
            "logo-mode" (index site.Params.navigation "logo-mode")

I had to modify the postcss.config.js too

      /d-none-light/,
      /d-none-dark/,
      /d-none-inline-light/,
      /d-none-inline-dark/,

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreleased

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions