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

Make it possible to override or remove the Crown logotype from the header #1639

Open
36degrees opened this issue Nov 12, 2019 · 6 comments
Open
Labels
feature request User requests a new feature header nunjucks

Comments

@36degrees
Copy link
Contributor

As per alphagov/govuk-design-system-backlog#97 (comment):

Would it be possible in a future update the ability to change the SVG of the crown? At CH we don't use the crown for our services and there is no simple way to swap it out using Nunjucks

@kellylee-gds
Copy link
Contributor

Making the change itself is easy. Understanding how we want teams to use the header and in which circumstances is more complex.

@DevRCRun
Copy link

As a local authority, consuming the npm module, we're at this point (needing to remove / replace icons and fonts) before we can start testing our first service internally. Looking at macro-options.json for the header component I don't immediately spot an option that would let us change the embedded govuk-header__logotype-crown svg via a param.

Is there something I'm missing or are we best forking the header component and making the changes we need in our own project?

@NickColley
Copy link
Contributor

@DevRCRun yes you're correct, for now you can't do that with the Nunjucks macro and will need to use HTML directly instead.

@Dlozitskiy
Copy link

I'm developing a Flask app.

I'm using govukHeader and modifying the package directly at ./node_modules/govuk-frontend/dist/govuk/components/header/template.njk replacing logo SVG, however the changes are not getting reflected after flask restart.

Any tips on what am I missing to get GOV.UK replaced with another logo? cc @NickColley

@romaricpascal
Copy link
Member

@Dlozitskiy Is your Flask app loading our Nunjucks template directly? I would have thought Python apps would rely on Jinja templates (like this port of GOV.UK Frontend), as Nunjucks is a templating engine for JavaScript (although its syntax is taken from Jinja). If you're using govuk-frontend-jinja for your templates, it would be this template you need to edit instead of the one in node_modules/govuk-frontend.

@Dlozitskiy
Copy link

Thank you @romaricpascal, that was indeed the case, had to modify /opt/venv/lib/python3.11/site-packages/govuk_frontend_jinja/templates/components/header/macro.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request User requests a new feature header nunjucks
Projects
None yet
Development

No branches or pull requests

7 participants