diff --git a/static/src/scss/_hero.scss b/static/src/scss/_hero.scss index 89f34f6..193c1d0 100644 --- a/static/src/scss/_hero.scss +++ b/static/src/scss/_hero.scss @@ -104,3 +104,8 @@ section.hero { margin-bottom: 0 !important; } } + +#view-restriction-banner { + text-align: center; + border-radius: 0; +} diff --git a/static/src/scss/_password_required.scss b/static/src/scss/_password_required.scss new file mode 100644 index 0000000..4aca004 --- /dev/null +++ b/static/src/scss/_password_required.scss @@ -0,0 +1,43 @@ +body.page-password-required { + height: 100vh; + + main { + height: 100%; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + margin-bottom: 0; + text-align: center; + } + + form { + width: 80%; + max-width: 500px; + } + + .input { + text-align: center; + + @include dark-mode { + background-color: color.adjust($dark, $alpha: -0.2); + color: $dark-mode-text; + + &::placeholder { + color: rgba(214 210 205 / 80%); + } + } + } + + .errorlist { + color: $danger; + margin-bottom: 1rem; + } + + h1, + p { + @include dark-mode { + color: $dark-mode-text; + } + } +} diff --git a/static/src/scss/base.scss b/static/src/scss/base.scss index f8ff93d..c8d24d6 100644 --- a/static/src/scss/base.scss +++ b/static/src/scss/base.scss @@ -19,6 +19,7 @@ @import "spotify"; @import "404"; @import "contact"; +@import "password_required"; html, body { diff --git a/website/common/templates/password_required.html b/website/common/templates/password_required.html new file mode 100644 index 0000000..99feecc --- /dev/null +++ b/website/common/templates/password_required.html @@ -0,0 +1,41 @@ +{% extends "base.html" %} + +{% load static wagtailcore_tags wagtailimages_tags %} + +{% block body_class %}page-password-required{% endblock %} + +{% block title %}Password required{% endblock %} + +{% block extra_head %} + +{% endblock %} + +{% block main_content %} +
You need a password to access this page.
+ + +{% endblock %} diff --git a/website/common/templates/wagtail_base.html b/website/common/templates/wagtail_base.html index 15307a4..c09dc65 100644 --- a/website/common/templates/wagtail_base.html +++ b/website/common/templates/wagtail_base.html @@ -15,6 +15,12 @@ {% endif %} + {% if page.get_view_restrictions.exists %} +