diff --git a/project/settings/base.py b/project/settings/base.py index 5855ac314cd0ed6f111babdf868f000386d1517b..f06c38f73ed78133db82ccfef8d23abf3ced6848 100644 --- a/project/settings/base.py +++ b/project/settings/base.py @@ -21,6 +21,7 @@ ALLOWED_HOSTS = [] MIDDLEWARE = [ "django.middleware.security.SecurityMiddleware", "django.contrib.sessions.middleware.SessionMiddleware", + "django.middleware.locale.LocaleMiddleware", "django.middleware.common.CommonMiddleware", "django.middleware.csrf.CsrfViewMiddleware", "django.contrib.auth.middleware.AuthenticationMiddleware", diff --git a/project/urls.py b/project/urls.py index 2f7c558cbf15004ac6da0025bfdf0f86bd07d39a..f2444b5063acc9d3ae607b03322e3ec10e7359d2 100644 --- a/project/urls.py +++ b/project/urls.py @@ -16,6 +16,8 @@ router.extend(rp_router) urlpatterns = [ url(r"^admin/", admin.site.urls), + url(r'^i18n/', include('django.conf.urls.i18n')), + url(r"^api/", include(router.urls, namespace="api")), url(r"^rp/", include("rp.urls", namespace="rp")), url(r'^accounts/', include('allauth.urls')), diff --git a/static/src/components/navigation.css b/static/src/components/navigation.css index 73cda17f5988aa33a07cc1f345b8cd05f0e721d5..30c89712cf890cedfdc0c23e0ba0f42a90b9d0f0 100644 --- a/static/src/components/navigation.css +++ b/static/src/components/navigation.css @@ -1,13 +1,22 @@ /* Navigation */ @custom-selector :--enter :hover, :focus; +@custom-selector :--link a, .btn-link; +@custom-selector :--navbar-blue .navbar.dark-blue-bg, .navbar.medium-blue-bg; + .navbar-sm { font-size: 13px; font-weight: 600; } -.navbar a { +.navbar :--link { color: var(--color-medium-blue); + line-height: 1.5rem; + font-size: 13px; + font-weight: 600; + border: 0; + padding: 0.5em 1em; + &:--enter { color: var(--color-dark-blue); } @@ -19,10 +28,12 @@ position: absolute; } -.navbar.dark-blue-bg a, .navbar.medium-blue-bg a { +:--navbar-blue :--link { color: var(--color-white); &:--enter { color: var(--color-medium-gray); + text-decoration: none; + cursor: pointer; } } @@ -53,7 +64,7 @@ ul.nav.nav-integrated li { background-color: var(--color-white); } - & a { + & :--link { padding: 1rem; font-weight: bold; text-align: center; diff --git a/templates/base.html b/templates/base.html index 470b7a932026c4504821ec01be74b2288e5371c1..c4cbde209946938f7ebe674512c42d825334bfab 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,4 +1,5 @@ {% load static %} +{% load i18n %} @@ -26,15 +27,27 @@ +