Skip to content

Commit

Permalink
mvp-tema-i18n (#9): rascunho de commune/html-dl-rem-archivum.html e c…
Browse files Browse the repository at this point in the history
…ommune/html-dl-rem-circa.html
  • Loading branch information
fititnt committed Jun 18, 2021
1 parent 83376c1 commit cbe2608
Show file tree
Hide file tree
Showing 11 changed files with 182 additions and 84 deletions.
6 changes: 3 additions & 3 deletions _data/translationem-memoriam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
gid: XZ
lid: hapi-api
titulum: "hapi-api.tm"
noindex: true
# noindex: true
situs_interretialis:
referens_officinale:
- iri: https://github.com/HXL-CPLP/Auxilium-Humanitarium-API
Expand All @@ -43,7 +43,7 @@
gid: XZ
lid: schemam
titulum: "schemam.tm"
noindex: true
# noindex: true
situs_interretialis:
referens_officinale:
- iri: https://github.com/HXL-CPLP/Auxilium-Humanitarium-API
Expand All @@ -60,7 +60,7 @@
gid: XZ
lid: commune
titulum: "commune.tm"
noindex: true
# noindex: true
situs_interretialis:
referens_officinale:
- iri: https://github.com/HXL-CPLP/Auxilium-Humanitarium-API
Expand Down
15 changes: 15 additions & 0 deletions _includes/commune/bootstrap_card.html
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
<!-- _includes/commune/bootstrap_card.html -->
{% assign rem = include.rem %}
{% assign multiplum_linguam = include.multiplum_linguam %}

{% assign h_1 = include.initiale_html_hN %}
{% assign h_2 = h_1 | plus: 1 %}
{% assign h_3 = h_2 | plus: 1 %}
{% assign h_4 = h_3 | plus: 1 %}
{% assign h1 = h_1 | prepend: 'h' %}
{% assign h2 = h_2 | prepend: 'h' %}
{% assign h3 = h_3 | prepend: 'h' %}
{% assign h4 = h_4 | prepend: 'h' %}

<!--
NOTE: _[por-Latn]Esta página é um rascunho. Ainda não implementada [por-Latn]_
-->
3 changes: 3 additions & 0 deletions _includes/commune/html-dl-rem-archivum.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<!-- _includes/commune/html-dl-rem-archivum.html -->

TODO: html-dl-rem-archivum
2 changes: 2 additions & 0 deletions _includes/commune/html-dl-rem-circa.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<!-- _includes/commune/html-dl-rem-circa.html -->
TODO html-dl-rem-circa
3 changes: 1 addition & 2 deletions _includes/index-corporeum-mul-Zyyy.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ <h2 id="{% _🗣️ 🔎🔕🔍 schemam_datum_slug 🔎🔕🔍 🗣️_ %}">{%
<h2 id="translationem-memoriam" lang="la">Trānslātiōnem memoriam</h2>

{% include tm/index.html initiale_html_hN=3 %}

{% include temporarium/tm.html %}

</article>

<aside>
Expand Down
1 change: 0 additions & 1 deletion _includes/index-corporeum.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ <h2 id="translationem-memoriam">{% _🗣️ translationem_memoriam_nomen 🗣️

{% include tm/index.html initiale_html_hN=3 %}

{% include temporarium/tm.html %}
</article>

<aside>
Expand Down
32 changes: 0 additions & 32 deletions _includes/temporarium/tm.html

This file was deleted.

2 changes: 1 addition & 1 deletion _includes/tm/index-xdefallo.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@

{% for rem in xtm.alternativum %}
<article style="padding: 1em">
{% include tm/item.html tm=rem initiale_html_hN=h_3sx multiplum_linguam=true %}
{% include tm/rem.html tm=rem initiale_html_hN=h_1sx %}
</article>
{% endfor %}
55 changes: 12 additions & 43 deletions _includes/tm/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,58 +7,27 @@
{% assign h1sx = h_1sx | prepend: 'h' %}
{% assign h2sx = h_2sx | prepend: 'h' %}
{% assign h3sx = h_3sx | prepend: 'h' %}
aaa
{{ site.data.hapi.tm }}
bbb
<hr>
ccc
{{ site.data.hapi }}
ddd
{% for xschemam_global in site.data.hapi.xschemam %}
{% if xschemam_global.collectionem_xschemam[0] %}

{% for xtm_globum in site.data.hapi.xtm %}
{% if xtm_globum.collectionem_xtm[0] %}

<section>
<{{ h1sx }} id="{% _🗣️ 🔎🔕🔍 Hapi_schemam_slug 🔎🔕🔍 🗣️_ %}--{{ xschemam_global.gid }}">
{{ xschemam_global.nomen }}
<{{ h1sx }} id="{% _🗣️ 🔎🔕🔍 Hapi_schemam_slug 🔎🔕🔍 🗣️_ %}--{{ xtm_globum.gid }}">
{{ xtm_globum.nomen }}
</{{ h1sx }}>

{% for xschemam in xschemam_global.collectionem_xschemam %}
{% for xtm in xtm_globum.collectionem_xtm %}

{% for rem in xtm.alternativum %}

{%- if xschemam.alternativum_linguam contains page.linguam and page.linguam != 'mul-Zyyy' -%}
{% assign rem = xschemam.alternativum | where: 'linguam', page.linguam | first %}
<article style="padding: 1em">
{% include schemam/item.html schemam=rem initiale_html_hN=h_2sx multiplum_linguam=false %}
{% include tm/item.html tm=rem initiale_html_hN=h_3sx multiplum_linguam=true %}
</article>

{%- else -%}

<section style="padding-left: 1em; padding-right: 1em">
<{{ h2sx }} id="{% _🗣️ 🔎🔕🔍 Hapi_schemam_slug 🔎🔕🔍 🗣️_ %}--{{ xschemam.lid | slugify }}">
<a href="#{{ xschemam.url | slugify }}">🔗</a>
{{ xschemam.lid }}
</{{ h2sx }}>

{% unless page.linguam == 'mul-Zyyy' %}
<p>
<mark lang="pt">_[por] TODO: Sem idioma disponível. Apresentando todas as opções. [por]_</mark>
</p>
{% endunless %}

{% for rem in xschemam.alternativum %}
{% comment %} {% if api_alt.url == xapi.url %}
{% continue %}
{% endif %} {% endcomment %}

<article style="padding: 1em">
{% include schemam/item.html schemam=rem initiale_html_hN=h_3sx multiplum_linguam=true %}
</article>

{% endfor %}

</section>

{%- endif -%}
{% endfor %}

{% endfor %}
</section>

{% endif %}
{% endfor %}
2 changes: 0 additions & 2 deletions _includes/tm/item.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
{% assign h3 = h_3 | prepend: 'h' %}
{% assign h4 = h_4 | prepend: 'h' %}

{% include commune/bootstrap_card.html schemam=rem initiale_html_hN=h_3sx multiplum_linguam=true %}

<div class="card">
<div class="card-header">
<small>🗣{{ tm.linguam }}🗣</small>
Expand Down
145 changes: 145 additions & 0 deletions _includes/tm/rem.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
<!-- _includes/schemam/item.html -->
{% assign rem = include.rem %}
{% assign h_1 = include.initiale_html_hN %}
{% assign h_2 = h_1 | plus: 1 %}
{% assign h_3 = h_2 | plus: 1 %}
{% assign h_4 = h_3 | plus: 1 %}
{% assign h1 = h_1 | | prepend: 'h' %}
{% assign h2 = h_2 | | prepend: 'h' %}
{% assign h3 = h_3 | | prepend: 'h' %}
{% assign h4 = h_4 | | prepend: 'h' %}

<div class="px-4 py-5 my-5 text-center">
<{{ h1 }} id="{{ rem.slug }}" class="display-5 fw-bold">
{{ rem.nomen }}
</{{ h1 }}>
<div class="col-lg-6 mx-auto">
<p class="lead mb-4">
{{ rem.summarius }}
</p>
</div>
</div>

{% include commune/html-dl-rem-circa.html %}

<dl>
<!-- Web sites -->
{% if rem.datum.situs_interretialis %}
<dt>
{% _🗣️ situs_interretialis_nomen 🗣️_ %}
</dt>
<dd>
<dl style="padding-left: 2em;">
{%- if rem.datum.situs_interretialis.referens_officinale %}
<dt>
{% _🗣️ referens_officinale_nomen 🗣️_ %}
</dt>
{% for situs in rem.datum.situs_interretialis.referens_officinale %}
<dd>
<a href="{{ situs.iri }}">
{{ situs.nomen | default: situs.iri }}
</a>
</dd>
{%- endfor %}
{% endif %}
{%- if rem.datum.situs_interretialis.vicipaedia %}
<dt>
{% _🗣️ vicipaediam_nomen 🗣️_ %}
</dt>
{% for situs in rem.datum.situs_interretialis.vicipaedia %}
<dd>
<a href="{{ situs.iri }}">
{{ situs.nomen | default: situs.iri }}
</a>
</dd>
{%- endfor %}
{% endif %}
{%- if rem.datum.wikidatum %}
<dt>
{% _🗣️ wikidatum_nomen 🗣️_ %}
</dt>
{% for situs in rem.datum.wikidatum %}
<dd>
<a href="{{ situs.codicem | prepend: 'https://www.wikidata.org/wiki/' }}">
{{ situs.codicem }}
</a>
</dd>
{%- endfor %}
{% endif %}
</dl>
</dd>
{% endif %}
</dl>

<!-- TODO: _[por-Latn] Melhorar aparencia aqui [por-Latn]_ -->

{% include commune/html-dl-rem-archivum.html %}

<dl>
<!-- Download of files -->
{% if rem.datum.archivum %}
<dt>
{% _🗣️ download_nomen 🗣️_ %}
</dt>
<dd>
<dl style="padding-left: 2em;">
{%- if rem.datum.archivum.referens_officinale %}
<dt>
{% _🗣️ referens_officinale_nomen 🗣️_ %}
</dt>
{% for situs in rem.datum.archivum.referens_officinale %}
<dd>
<a href="{{ situs.iri }}" class="btn btn-secondary">
{{ situs.nomen | default: situs.iri }}
</a>
</dd>
{%- endfor %}
{% endif %}

{%- if rem.datum.archivum %}

{%- if rem.datum.archivum.schemam.graphql %}
<dt>
{% _🗣️ graphql_schemam_nomen 🗣️_ %}
</dt>
{% for rem in rem.datum.archivum.schemam.graphql %}
<dd>
<a href="{{ rem.iri }}" class="btn btn-primary">
{{ rem.nomen | default: rem.iri }}
</a>
</dd>
{%- endfor %}
{% endif %}

{%- if rem.datum.archivum.schemam.json %}
<dt>
{% _🗣️ json_schemam_nomen 🗣️_ %}
</dt>
{% for rem in rem.datum.archivum.schemam.json %}
<dd>
<a href="{{ rem.iri }}" class="btn btn-primary">
{{ rem.nomen | default: rem.iri }}
</a>
</dd>
{%- endfor %}
{% endif %}

{%- if rem.datum.archivum.schemam.sql %}
<dt>
{% _🗣️ SQL_abbreviationem_nomen 🗣️_ %}
</dt>
{% for rem in rem.datum.archivum.schemam.sql %}
<dd>
<a href="{{ rem.iri }}" class="btn btn-primary">
{{ rem.nomen | default: rem.iri }}
</a>
</dd>
{%- endfor %}
{% endif %}

{% endif %}
</dl>
</dd>
{% endif %}
</dl>

0 comments on commit cbe2608

Please sign in to comment.