danihodovic / django-allauth-ui

Nice looking templates for django-allauth
https://django-allauth-ui.hodovi.ch
MIT License
188 stars 24 forks source link

from a beginner:how can i add my own html content? #91

Closed riyuejuyjyj closed 6 days ago

riyuejuyjyj commented 1 week ago

Sorry to ask that question seems to be foolished , I noticed that the old version's html pages (templates/account/) mostly extend the base html. In the old versions if i want to add a navbar, just add a newfolder named account under my own templates folder and paste the old version's base html in the account folder,then put my own content in the base html .But in the new versions the base html has gone,so where could i change ?

chrome_gwHaJDkxUs chrome_QEOwu0WIgg

danihodovic commented 1 week ago

Place your app above allauth_ui and extend allauth/layouts/base.html in the body block.

https://github.com/danihodovic/django-allauth-ui/blob/master/allauth_ui/templates/allauth/layouts/base.html#L19-L26

For an example see https://github.com/danihodovic/django-allauth-ui/blob/master/sample_deployment/sample_deployment/templates/allauth/layouts/base.html which adds a fixed theme select switcher at https://django-allauth-ui.hodovi.ch/accounts/login/

riyuejuyjyj commented 1 week ago

thanks a lot

danihodovic commented 6 days ago

You're welcome