diff --git a/src/open_inwoner/js/components/modal/index.js b/src/open_inwoner/js/components/modal/index.js
index 0c3868a922..7ce1f0fa4f 100644
--- a/src/open_inwoner/js/components/modal/index.js
+++ b/src/open_inwoner/js/components/modal/index.js
@@ -7,6 +7,12 @@ export default class Modal {
this.close = this.node.querySelector('.modal__close')
this.confirm = this.node.querySelector('.modal__confirm')
+ this.node.addEventListener('click', (event) => {
+ if (!event.target.closest('.modal__container')) {
+ this.hide()
+ }
+ })
+
this.close.addEventListener('click', () => {
this.hide()
})
@@ -42,9 +48,11 @@ export default class Modal {
show() {
this.node.classList.add('modal--open')
+ document.body.style.overflow = 'hidden'
}
hide() {
this.node.classList.remove('modal--open')
+ document.body.style.overflow = 'visible'
}
}
diff --git a/src/open_inwoner/plans/templates/plans/preview.html b/src/open_inwoner/plans/templates/plans/preview.html
index fb5d358652..a76942fed8 100644
--- a/src/open_inwoner/plans/templates/plans/preview.html
+++ b/src/open_inwoner/plans/templates/plans/preview.html
@@ -1,4 +1,4 @@
-{% load i18n %}
+{% load i18n link_tags %}
{% if plan_template.goal %}
@@ -8,16 +8,15 @@
{% if plan_template.file %}
{% trans 'File:' %}
-
{{ plan_template.file }}
+
{% link href=plan_template.file.url text=plan_template.file %}
{% endif %}
{% if plan_template.actiontemplates.exists %}
{% trans 'Actions:' %}
-
{% for action_template in plan_template.actiontemplates.all %}
-
{{ forloop.counter }}
+
{{ forloop.counter }}
{% trans 'Name:' %}
{{ action_template.name }}
@@ -30,8 +29,8 @@
{% trans 'Type:' %}
{{ action_template.get_type_display }}
-
{% trans 'Ends in x days:' %}
-
{{ action_template.end_in_days }}
+
{% trans 'Eindigt' %}
+
{% trans "Over" %}{{ over }} {{ action_template.end_in_days }} {% trans "dagen" %} {{ days }}
{% endfor %}
{% endif %}
diff --git a/src/open_inwoner/scss/components/Preview/Preview.scss b/src/open_inwoner/scss/components/Preview/Preview.scss
index 1fb2c26e3e..24e66dd390 100644
--- a/src/open_inwoner/scss/components/Preview/Preview.scss
+++ b/src/open_inwoner/scss/components/Preview/Preview.scss
@@ -5,14 +5,29 @@
.preview {
display: grid;
grid-template-columns: 134px 1fr;
- gap: var(--spacing-small);
+ gap: var(--spacing-large);
text-align: left;
+ @media (min-width: 768px) {
+ grid-template-columns: 90px 1fr;
+ }
+
.preview__span {
grid-column: 1 / 3;
display: grid;
grid-template-columns: 20px 110px 1fr;
- gap: var(--spacing-small);
+ gap: var(--spacing-medium);
+ padding-bottom: var(--spacing-medium);
+ border-top: none;
+
+ @media (min-width: 768px) {
+ grid-column: 2 / 3;
+ }
+ }
+
+ .preview__span ~ .preview__span {
+ padding: var(--spacing-large) 0;
+ border-top: var(--border-width) solid var(--color-mute);
}
.preview__title {
diff --git a/src/open_inwoner/scss/components/modal/_modal.scss b/src/open_inwoner/scss/components/modal/_modal.scss
index dcdf205821..8f4f60b740 100644
--- a/src/open_inwoner/scss/components/modal/_modal.scss
+++ b/src/open_inwoner/scss/components/modal/_modal.scss
@@ -15,10 +15,17 @@
}
&__container {
- max-width: 700px;
+ max-width: 90%;
+ max-height: 90vh;
background-color: #fff;
border-radius: var(--border-radius);
padding: var(--spacing-giant);
+ overflow-y: auto;
+ box-sizing: border-box;
+
+ @media (min-width: 768px) {
+ max-width: 720px;
+ }
}
&__title {
@@ -47,6 +54,10 @@
display: flex;
justify-content: center;
gap: var(--spacing-medium);
+
+ &--align-right {
+ justify-content: right;
+ }
}
&__button:empty {
diff --git a/src/open_inwoner/templates/pages/plans/create.html b/src/open_inwoner/templates/pages/plans/create.html
index df7f3761aa..46f0ceb4f2 100644
--- a/src/open_inwoner/templates/pages/plans/create.html
+++ b/src/open_inwoner/templates/pages/plans/create.html
@@ -48,7 +48,7 @@
{% trans "Samenwerken" %}
{{ plan_template.name }}
{{ plan_template.string_preview }}
-
+
{% spaceless %}
{% button text=_("Sluiten") extra_classes="modal__button modal__close" primary=True %}
{% endspaceless %}