render_box, altnames style

(keep id-number for accompanying context)
This commit is contained in:
Mathieu Jaumotte 2021-07-30 11:12:44 +02:00
parent 4cac5f9a4a
commit 175d6892ec
4 changed files with 21 additions and 12 deletions

View File

@ -21,7 +21,13 @@
// styles communs pour tous les bandeaux // styles communs pour tous les bandeaux
div.banner { div.banner {
.id-number {
font-weight: lighter;
font-size: 50%;
margin-left: 0.5em;
&:before { content: '(n°'; }
&:after { content: ')'; }
}
a.phone, a.phone,
a.email { a.email {
color: white; color: white;

View File

@ -31,10 +31,13 @@ section.chill-entity {
span.badge { span.badge {
margin-left: 0.3em; margin-left: 0.3em;
} }
span.altnames,
span.id-number { span.id-number {
font-weight: lighter; font-weight: lighter;
font-size: 50%; font-size: 50%;
margin-left: 0.5em; margin-left: 0.5em;
}
span.id-number {
&:before { content: '(n°'; } &:before { content: '(n°'; }
&:after { content: ')'; } &:after { content: ')'; }
} }

View File

@ -1,7 +1,7 @@
{# {#
Template to render a person Template to render a person
* render string ['raw'|'label'|'bloc']
OPTIONS OPTIONS
* render string ['raw'|'label'|'bloc']
* addAltNames bool * addAltNames bool
* addLink bool * addLink bool
* addEntity bool * addEntity bool
@ -19,13 +19,13 @@
<span class="firstname">{{ person.firstName }}</span> <span class="firstname">{{ person.firstName }}</span>
<span class="lastname">{{ person.lastName }}</span> <span class="lastname">{{ person.lastName }}</span>
{%- if options['addAltNames'] -%} {%- if options['addAltNames'] -%}
<span class="altnames">
{%- for n in person.altNames -%} {%- for n in person.altNames -%}
{%- if loop.first -%}({% else %} {%- endif -%} <span class="altname altname-{{ n.key }}">
<span class="altname altname-{{ n.key }}"> {{- n.label -}}
{{- n.label -}} </span>
</span>
{%- if loop.last -%}){%- endif -%}
{%- endfor -%} {%- endfor -%}
</span>
{%- endif -%} {%- endif -%}
{% endmacro raw %} {% endmacro raw %}
@ -44,8 +44,8 @@
<span class="badge rounded-pill bg-secondary">{{ 'Person'|trans }}</span> <span class="badge rounded-pill bg-secondary">{{ 'Person'|trans }}</span>
{%- endif -%} {%- endif -%}
{%- if options['addId'] -%} {%- if options['addId'] -%}
<span class="id-number" title="{{ 'Person'|trans ~ ' ' ~ person.id }}"> <span class="id-number" title="{{ 'Person'|trans ~ ' ' ~ person.id }}">
{{ person.id|upper }} {{ person.id|upper }}
</span> </span>
{%- endif -%} {%- endif -%}
</div> </div>

View File

@ -1,7 +1,7 @@
{# {#
Template to render a thirdparty Template to render a thirdparty
* render string ['raw'|'label'|'bloc']
OPTIONS OPTIONS
* render string ['raw'|'label'|'bloc']
* with_valid_from bool * with_valid_from bool
* addLink bool * addLink bool
* addEntity bool * addEntity bool
@ -34,8 +34,8 @@
<span class="badge rounded-pill bg-secondary">{{ 'Third party'|trans }}</span> <span class="badge rounded-pill bg-secondary">{{ 'Third party'|trans }}</span>
{%- endif -%} {%- endif -%}
{%- if options['addId'] -%} {%- if options['addId'] -%}
<span class="id-number" title="{{ 'Third party'|trans ~ ' ' ~ thirdparty.id }}"> <span class="id-number" title="{{ 'Third party'|trans ~ ' ' ~ thirdparty.id }}">
{{ person.id|upper }} {{ thirdparty.id|upper }}
</span> </span>
{%- endif -%} {%- endif -%}
</div> </div>