Skip to content

Commit

Permalink
[#2685] styling
Browse files Browse the repository at this point in the history
  • Loading branch information
jiromaykin committed Aug 27, 2024
1 parent b3d5312 commit 33dc9a8
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{% get_solo 'configurations.SiteConfiguration' as config %}
<h1 class="utrecht-heading-1">{% trans "Registratie voltooien" %}</h1><br>
{% if config.registration_text %}<p class="utrecht-paragraph">{{ config.registration_text|urlize|linebreaksbr }}</p>{% endif %}
<form method="POST" id="necessary-form" action="{{ request.get_full_path }}" class="form" novalidate>
<form method="POST" id="necessary-form" action="{{ request.get_full_path }}" class="form form__choice-list" novalidate>
{% csrf_token %}

{% if form.first_name %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

<li class="choice-list__item">
<label class="choice-list__label {% if bold_label %}choice-list__label--large{% endif %}" for="id_{{ name }}_{{ index }}">
{% if icon_symbol %}
{% icon icon_symbol outlined=True extra_classes="icon--large" %}
{% endif %}
<input type="{% if input_type_radio %}radio{% else %}checkbox{% endif %}" class="choice-list__radio" id="id_{{ name }}_{{ index }}" name="{{ name }}" value="{{ choice.0|unlocalize }}" {% if choice.0 in data or checked %}checked="checked"{% endif %}>
<div class="choice-list__content">
{% if bold_label %}<h2 class="choice-list__heading">Kies {{ choice.1 }}</h2>{% endif %}
<p class="choice-list__p">{{ choice.1 }}</p>
</div>
{% if icon_symbol %}
{% icon icon_symbol outlined=True extra_classes="icon--large" %}
{% endif %}
</label>
</li>
1 change: 0 additions & 1 deletion src/open_inwoner/scss/components/File/File.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
}

&__file + .file__data {
background-color: greenyellow;
margin-top: var(--spacing-small);
}

Expand Down
24 changes: 21 additions & 3 deletions src/open_inwoner/scss/components/Form/ChoiceList.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,31 @@
display: grid;
grid-template-columns: 50% 50%;
grid-template-rows: auto auto;
gap: var(--spacing-extra-large);
grid-row-gap: 0;
grid-column-gap: var(--spacing-extra-large);
width: calc(100% - var(--spacing-extra-large));

.choice-list__content {
max-width: 100%;
}

& .choice-list__label {
flex-direction: column-reverse;
text-align: center;

[class*='icons'] {
margin-bottom: var(--spacing-small);
}

.choice-list__content {
margin-bottom: var(--spacing-large);
}
}

@media (max-width: 500px) {
display: flex;
row-gap: var(--spacing-medium);
width: 100%;
}
}

Expand Down Expand Up @@ -120,7 +140,6 @@
border-top: 1px solid var(--color-gray-light);
margin: var(--spacing-large) 0 0 0;
padding: var(--spacing-large) 0 0 0;
max-width: var(--form-width);

.choice-list__p {
margin: var(--spacing-large) 0 0 0;
Expand Down Expand Up @@ -152,7 +171,6 @@

&-multiple__item {
border: var(--border-width-thin) solid var(--color-white);
max-width: var(--form-width);
}

&-multiple__item .choice-list-multiple__content .checkbox__label {
Expand Down
7 changes: 7 additions & 0 deletions src/open_inwoner/scss/components/Form/Form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,13 @@
cursor: default;
pointer-events: none;
}

&__choice-list {
@media (max-width: 767px) {
gap: var(--spacing-large);
max-width: var(--form-width);
}
}
}

/// Specific forms
Expand Down
2 changes: 1 addition & 1 deletion src/open_inwoner/templates/pages/kvk/branches.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% render_grid %}
{% render_column start=4 span=6 %}
<h1 class="utrecht-heading-1" id="title">{% trans "Log in" %}</h1>
<form method="POST" id="eherkenning-branch-form" class="form">
<form method="POST" id="eherkenning-branch-form" class="form form__choice-list">
{% csrf_token %}
{% if form.branch_number.errors %}
{% errors errors=form.branch_number.errors %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h1 class="utrecht-heading-1" id="title">
{% trans "Notificatie voorkeuren" %}
</h1>

<form method="POST" id="change-notifications" action="{% url 'profile:notifications' %}" class="form" novalidate>
<form method="POST" id="change-notifications" action="{% url 'profile:notifications' %}" class="form form__choice-list" novalidate>
{% csrf_token %}

{% if form.any_notifications_enabled %}
Expand Down

0 comments on commit 33dc9a8

Please sign in to comment.