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

Move logo into partial for easier overriding #1544

Closed
3 tasks done
boileaum opened this issue Mar 25, 2020 · 3 comments
Closed
3 tasks done

Move logo into partial for easier overriding #1544

boileaum opened this issue Mar 25, 2020 · 3 comments
Labels
change request Issue requests a new feature or improvement

Comments

@boileaum
Copy link

I checked that...

  • ... the documentation does not mention anything about my idea
  • ... to my best knowledge, my idea wouldn't break something for other users
  • ... there are no open or closed issues that are related to my idea

Description

The block

          {% if config.theme.logo.icon %}
            <i class="md-icon">{{ config.theme.logo.icon }}</i>
          {% else %}
            <img alt="logo" src="{{ config.theme.logo | url }}" width="24" height="24">
          {% endif %}

is repeated in material/partial/header.html and material/partial/nav.html and could be factorized into a material/partial/logo.html file using an include statement.

Use Cases

It would make easier to customize the logo area (actually, I spent some time before realizing it was double located...).

@squidfunk
Copy link
Owner

This is a great idea but only became possible because of the refactoring we're currently undertaking. If you look closely, you'll see that the width and height values are different, but those shouldn't be necessary anymore for the refactoring branch. For this reason, I just moved the logo into partials/logo.html as you suggested in c9b2c1e

@squidfunk squidfunk added the change request Issue requests a new feature or improvement label Mar 26, 2020
@squidfunk squidfunk changed the title the html code defining the logo is duplicated Move logo into partial for easier overriding Mar 26, 2020
@boileaum
Copy link
Author

Thanks for the quick correction.
And thanks also for this nice project!

@squidfunk
Copy link
Owner

The fix was just released as part of RC 4. See #1498 for details.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change request Issue requests a new feature or improvement
Projects
None yet
Development

No branches or pull requests

2 participants