Skip to content

Commit

Permalink
Make the login buttons look nicer, update allauth
Browse files Browse the repository at this point in the history
  • Loading branch information
MaertHaekkinen committed Oct 2, 2023
1 parent bd5291d commit 268ddba
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 10 deletions.
6 changes: 2 additions & 4 deletions ajapaik/ajapaik/static/css/ajp-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -636,22 +636,20 @@ a.fullscreen {

.facebook-connect a {
width: 169px;
height: 21px;
height: 28px;
background: url(../images/connect-with-facebook.png) no-repeat;
}

.wikimedia-commons-connect a {
width: 169px;
height: 57px;
background: url(../images/connect-with-wikimedia-commons.png) no-repeat;
margin-top: -5px;
}

.google-connect a {
width: 169px;
height: 57px;
height: 30px;
background: url(../images/connect-with-google.png) no-repeat;
margin-top: -5px;
}

.ir {
Expand Down
Binary file modified ajapaik/ajapaik/static/images/connect-with-facebook.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ajapaik/ajapaik/static/images/connect-with-google.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions ajapaik/ajapaik/templates/authentication/_login.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@

{% with 'facebook google wikimedia-commons' as provider_list %}
{% for provider in provider_list.split %}
<div class="{{provider}}-connect my-1">
<a href="{% provider_login_url provider %}?next={% if next %}{{ next|urlencode }}{% else %}{{ request.get_full_path|urlencode }}{% endif %}" class="ir">{% blocktrans %}Connect with {{provider}}{% endblocktrans %}</a>
<div class="{{provider}}-connect my-2">
<a href="/?next={% if next %}{{ next|urlencode }}{% else %}{{ request.get_full_path|urlencode }}{% endif %}" class="ir">{% blocktrans %}Connect with {{provider}}{% endblocktrans %}</a>
</div>
{% endfor %}
{% endwith %}
Expand Down
5 changes: 3 additions & 2 deletions ajapaik/settings/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'allauth.account.middleware.AccountMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'ajapaik.ajapaik.user_middleware.UserMiddleware',
'django_user_agents.middleware.UserAgentMiddleware',
Expand Down Expand Up @@ -163,7 +164,7 @@
LOGIN_REDIRECT_URL = '/'
REGISTRATION_FORM = 'ajapaik.ajapaik.forms.UserRegistrationForm'

INSTALLED_APPS = (
INSTALLED_APPS = [
'admin_tools',
'admin_tools.theming',
'admin_tools.menu',
Expand Down Expand Up @@ -207,7 +208,7 @@
'allauth.socialaccount.providers.facebook',
'allauth.socialaccount.providers.google',
'ajapaik.ajapaik.socialaccount.providers.wikimedia_commons'
)
]

# Note: Allauth login's next-parameter redirection doesn't understand wildcards in ALLOWED_HOSTS.
ALLOWED_HOSTS = ['.ajapaik.ee', '127.0.0.1']
Expand Down
2 changes: 1 addition & 1 deletion requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ django-registration-redux==2.9
django-bootstrap4==3.0.1
django-leaflet==0.28.1
django-user-agents==0.4.0
django-allauth==0.45.0
django-allauth==0.57.0
django-cors-headers
flickrapi==2.4.0
geopy==2.2.0
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ wheel==0.37.0
cmake
Django==3.2.20
django-admin-tools==0.9.0
django-allauth==0.45.0
django-allauth==0.57.0
django-autocomplete-light==3.8.2
django-bootstrap4==3.0.1
django-bulk-update==2.2.0
Expand Down

0 comments on commit 268ddba

Please sign in to comment.