Skip to content
This repository has been archived by the owner on Aug 10, 2022. It is now read-only.

feat: implemented bootstrap-italia #20

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

EugenioCorso
Copy link

Implemented Bootstrap Italia, but in the form for sign in and sign up, the field and the text are overlapped. The problem is the way the "crispy" tag format the form

@libremente
Copy link
Member

Problem loading Titillium Web Font:
Not Found: /bootstrap-italia/dist/fonts/Titillium_Web/TitilliumWeb-Light.woff2

@libremente
Copy link
Member

libremente commented Mar 10, 2019

It looks like there are also errors in the django-toolbar app which is not properly loading info.

@libremente
Copy link
Member

I guess the problem you are raising is due to the fact that bootstrap 4 is used by "crisp-forms". In fact, this key is set: config/settings/base.py:197:CRISPY_TEMPLATE_PACK = 'bootstrap4' and if you check the templates loaded by the page you can see how the bs4 components are loaded and then, on top of that, our custom template (containing BSI) is embedded. As such, I guess we have several ways to proceed:

  • create our own forms skipping crispy_forms
  • create a compatible crispy_form template pack
  • overwrite the CSS properties which are messy through the forms.py file. Something like:
for field_name in self.fields:
    field = self.fields.get(field_name)
    field.widget.attrs['placeholder'] = field.label
    field.label = ''

What do you guys think?

@libremente
Copy link
Member

Freezing for now, let's move it to another milestone in the future.

@libremente
Copy link
Member

@EugenioCorso I saw that other people already implemented BSI inside Django. They are polishing the repo right now and, when it will be ready, I guess we can try to adopt it. 👍

@EugenioCorso
Copy link
Author

Ok perfect!

@libremente
Copy link
Member

libremente commented Mar 28, 2019

Here it is: https://github.com/italia/design-django-theme.
We should definitely test it! @EugenioCorso

@CorsoGabriele
Copy link
Contributor

We have tested it and the main problem remain (overlapping of the from labels and fields)

@libremente
Copy link
Member

Ok. Good to know it. Let's wait for that package to be a bit more stable then we can file an issue and discuss with the creator.

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

Successfully merging this pull request may close these issues.

3 participants