Skip to content

Commit

Permalink
Merge pull request #703 from maykinmedia/feature/1574-create-tab-temp…
Browse files Browse the repository at this point in the history
…late

💄 [#1574] Create tab panel template
  • Loading branch information
pi-sigma authored Jul 18, 2023
2 parents 50fbc75 + 81276ba commit 5ea47fc
Show file tree
Hide file tree
Showing 5 changed files with 182 additions and 0 deletions.
108 changes: 108 additions & 0 deletions src/open_inwoner/scss/components/TabPanel/TabPanel.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
.tab--container {
position: relative;
margin: 0 auto;
display: flex;
max-width: 100%;
width: 100%;
}

.tabs {
background: #fff;
overflow: initial;
width: 100%;

@media (min-width: 500px) {
overflow: hidden;
}
}

.list.tabs__headers {
display: block;
align-items: center;
box-sizing: border-box;
width: 100%;
margin: 0;
overflow: hidden;
padding: 0;
position: relative;

&::before {
left: 0;
right: 0;
bottom: 0px;
height: 0;
border-bottom: 2px solid var(--color-gray-light);
content: '';
top: auto;
display: block;
position: absolute;
}

&::after {
clear: both;
display: block;
content: '';
}
}

.list-item.tab__header--item {
max-width: var(--mobile-xs-width);
border: none;
display: block;
float: none;
padding: 0;
border: 0;
margin-right: -1px;
position: relative;

@media (min-width: 360px) {
max-width: 200px;
float: left;
}
}

.link.tab__header {
box-sizing: border-box;
color: var(--color-gray-lighter);
display: inline-block;
cursor: pointer;
width: 100%;
padding: var(--spacing-large);
transition: 0.3s;

&:target {
scroll-margin-top: 150px;
}
&:target::before {
scroll-margin-top: 150px;
}

&.active {
border-bottom: 2px solid var(--color-primary);
color: var(--font-color-body);
font-weight: bold;
margin: 0;
}
}

.tabs__body {
padding: 0;
}

.tab__content,
.tab__content.active {
margin: 1em;
scroll-margin-top: 150px;

p {
padding: 0;
}
}

.active {
display: block;
}

.hide {
display: none;
}
1 change: 1 addition & 0 deletions src/open_inwoner/scss/components/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
@import './Sticky/Sticky.scss';
@import './Table/Table.scss';
@import './Table/Tabled.scss';
@import './TabPanel/TabPanel.scss';
@import './Tags/Tag.scss';
@import './Tags/TagList.scss';
@import './Typography/H1.scss';
Expand Down
1 change: 1 addition & 0 deletions src/open_inwoner/scss/views/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@
--row-height: 40px;
--row-height-small: 24px;
--row-height-big: 48px;
--row-height-giant: 57px;
--gutter-width: 32px;

--spacing-tiny: 2px;
Expand Down
36 changes: 36 additions & 0 deletions src/open_inwoner/templates/pages/ssd/monthly_reports_list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{% extends 'master.html' %}
{% load i18n grid_tags %}

{% block content %}
{% render_grid %}
{% render_column span=9 %}
<h1 class="h1" id="title">
{% trans "Mijn uitkeringen" %}
</h1>
<p>{% trans "Bekijk en download hier uw maandelijkse/jaarlijkse uitkeringsspecificaties om direct inzicht te krijgen in uw financiële situatie." %}</p>

<div class="tab--container">
<div class="tabs">
<ul class="list tabs__headers">
<li class="list-item tab__header--item"><span id="monthly" class="link tab__header active">{% trans "Maandspecificaties" %}</span></li>
<li class="list-item tab__header--item"><a href="{% url 'profile:yearly_benefits_index' %}" id="yearly" class="link tab__header">{% trans "Jaaropgaven" %}</a></li>
</ul>

<div class="tabs__body">
<div id="maandspecificaties" class="tab__content active">
<p>{% trans "Selecteer de maand die u wilt downloaden. Let op: de huidige maand is pas vanaf de 25ste zichtbaar. Deze uitkeringsspecificatie is een momentopname van de aan u uitbetaalde uitkering. Aan deze specificatie kunt u geen rechten ontlenen." %}</p>
<ul>
{% for report in monthly_benefits %}
<li>
<a href="{% url 'profile:download_monthly_benefits' file_name=report %}">{{ report }}</a>
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
</div>

{% endrender_column %}
{% endrender_grid %}
{% endblock content %}
36 changes: 36 additions & 0 deletions src/open_inwoner/templates/pages/ssd/yearly_reports_list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{% extends 'master.html' %}
{% load i18n grid_tags icon_tags %}

{% block content %}
{% render_grid %}
{% render_column span=9 %}
<h1 class="h1" id="title">
{% trans "Mijn uitkeringen" %}
</h1>
<p>{% trans "Bekijk en download hier uw maandelijkse/jaarlijkse uitkeringsspecificaties om direct inzicht te krijgen in uw financiële situatie." %}</p>

<div class="tab--container">
<div class="tabs">
<ul class="list tabs__headers">
<li class="list-item tab__header--item"><a href="{% url 'profile:monthly_benefits_index' %}" id="yearly" class="link tab__header">{% trans "Maandspecificaties" %}</a></li>
<li class="list-item tab__header--item"><span id="yearly" class="link tab__header active">{% trans "Jaaropgaven" %}</span></li>
</ul>

<div class="tabs__body">
<div id="jaaropgaven" class="tab__content active">
<p>{% trans "Selecteer het jaar dat u wilt downloaden. Aan deze jaaropgaven kunt u geen rechten ontlenen." %}</p>
<ul>
{% for report in yearly_benefits %}
<li>
<a href="{% url 'profile:download_yearly_benefits' file_name=report %}" target="_blank" rel="noopener noreferrer">{{ report }}</a>
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
</div>

{% endrender_column %}
{% endrender_grid %}
{% endblock content %}

0 comments on commit 5ea47fc

Please sign in to comment.