-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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 superset-logo-horiz.png bigger #30933
Comments
To enlarge the
import injectCustomCss from 'path/to/injectCustomCss';
const customCss = `
/* Example CSS to enlarge the logo */
.navbar-brand img {
width: 200px; /* Adjust the width as needed */
height: auto; /* Maintain aspect ratio */
}
`;
const removeCustomCSS = injectCustomCss(customCss);
// Call removeCustomCSS() if you need to remove the custom styles later
By using these methods, you can customize the size of the logo without modifying the core Superset files. |
@dosu I dont have InjectCustomCss because I have installed superset with |
In a pip-installed Superset environment, you can still apply custom CSS by using the
from superset import db
from superset.models.core import CssTemplate
# Define your custom CSS
custom_css = """
.navbar-brand img {
width: 200px; /* Adjust the width as needed */
height: auto; /* Maintain aspect ratio */
}
"""
# Create a new CSS template
css_template = CssTemplate(
template_name='Custom Logo Size',
css=custom_css
)
# Add the template to the database
db.session.add(css_template)
db.session.commit()
This approach allows you to manage your custom styles without needing direct access to the frontend codebase. |
I would like to enlarge the
superset-logo-horiz.png
logo on the Superset UI's frontend.I understand that the superset_config.py file does not recognize CUSTOM_CSS = "/static/assets/".
Does anyone know the correct way to achieve this?
The text was updated successfully, but these errors were encountered: