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 flag icon more customizable #38

Open
tetron432 opened this issue May 27, 2021 · 2 comments
Open

Make flag icon more customizable #38

tetron432 opened this issue May 27, 2021 · 2 comments

Comments

@tetron432
Copy link

tetron432 commented May 27, 2021

It's really difficult to get the flag icon in template to show up where I would want it to go- is it possible to get {% render_flag_form post user %} variable as an HTML element or template variable so we can put it where we want? The icon is always at the far right regardless where I put it.

@tetron432 tetron432 changed the title I get an "Invalid block... Did you forget to register or load this tag?" error when putting {% render_flag_form post user %} Make flag icon more customizable May 27, 2021
@abhiabhi94
Copy link
Owner

Thanks for the feedback.

I agree this is something that should be a lot easier to customize. As of now, this behavior of the icon floating towards the right comes from CSS.

.flag-icon {
float: right;
border: inherit;
background: inherit;
}

The class flag-icon is need by the JavaScript file flag.js for some processing. So the name needs to be there. Although you can override the default static files pretty similar to how you override the default templates. For more information on this, please see https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#collectstatic

If you have any ideas, how we can make this customization easier, I would love to know them.

@abhiabhi94
Copy link
Owner

There is more some information in the documentation about customizing the flag icon. Please see https://django-flag-app.readthedocs.io/en/latest/style-customisation.html#flag-icon in case, this fits your case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants