Skip to content

Commit

Permalink
HXL-CPLP/forum#58, hapi-t9n-alpha (#13), mvp-l10n-schemas (#7): forma…
Browse files Browse the repository at this point in the history
…tacao de /mul-Zyyy/
  • Loading branch information
fititnt committed Jun 10, 2021
1 parent 9fab018 commit 02f2c08
Show file tree
Hide file tree
Showing 7 changed files with 151 additions and 62 deletions.
23 changes: 14 additions & 9 deletions _data/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
openapi_filum: /api/UN/HDX/eng/openapi.yaml
# title: HDX - The Humanitarian Data Exchange API
title: '{% _🗣️ 📝eng-Latn📝 Hapi_api_UN_HDX_titulum 📝eng-Latn📝 🗣️_ %}'
opus_in_progressu: true
noindex: true

- xdefallo: /mul-Zyyy/api/UN/HDX/
Expand All @@ -70,15 +71,16 @@

# # Note: this is just a test to check if non US-ASCII characters can work with
# # Hapi toolchain
# - xdefallo: /mul-Zyyy/api/UN/HDX/
# # uid: /arb/api/UN/اختبارات/
# linguam: arb-Arab
# typum: api
# gid: UN
# lid: 'اختبارات'
# openapi_filum: /api/UN/HDX/eng/openapi.yaml
# title: "اختبارات"
# noindex: true
- xdefallo: /mul-Zyyy/api/UN/HDX/
# uid: /arb/api/UN/اختبارات/
linguam: arb-Arab
typum: api
gid: UN
lid: 'اختبارات'
openapi_filum: /api/UN/HDX/eng/openapi.yaml
title: "اختبارات"
opus_in_progressu: true
noindex: true

## -----------------------------------------------------------------------------
- xdefallo: /mul-Zyyy/api/UN/reliefweb/
Expand Down Expand Up @@ -108,6 +110,7 @@
openapi_filum: /api/UN/reliefweb/eng/openapi.yaml
# title: ReliefWeb - Informing humanitarians worldwide
title: '{% _🗣️ 📝por-Latn📝 Hapi_api_UN_reliefweb_titulum 📝por-Latn📝 🗣️_ %}'
opus_in_progressu: true
noindex: true

## -----------------------------------------------------------------------------
Expand Down Expand Up @@ -140,6 +143,7 @@
lid: '{% _🗣️ 📝por-Latn📝 Hapi_api_UN_CODV2API_slug 📝por-Latn📝 🗣️_ %}'
openapi_filum: /api/UN/CODV2API/eng/openapi.yaml # TODO: _[por] Criar uma versão em português [por]_
title: '{% _🗣️ 📝por-Latn📝 Hapi_api_UN_CODV2API_titulum 📝por-Latn📝 🗣️_ %}'
opus_in_progressu: true
noindex: true

### [linguam]/api/ZX ___________________________________________________________
Expand Down Expand Up @@ -172,6 +176,7 @@
openapi_filum: /api/XZ/HXL-Proxy/eng/openapi.yaml # TODO: _[por] Criar uma versão em português [por]_
# title: HXL-Proxy - Proxy of the Humanitarian Exchange Language
title: '{% _🗣️ 📝por-Latn📝 Hapi_api_XZ_HXL-Proxy_titulum 📝por-Latn📝 🗣️_ %}'
opus_in_progressu: true
noindex: true

### [linguam]/api/BR ___________________________________________________________
Expand Down
46 changes: 29 additions & 17 deletions _includes/index-corporeum-mul-Zyyy.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- _includes/index-corporeum-mul-Zyyy.html -->
<section>
<div>
<article>
<h2 id="api">API</h2>
{% for globum in site.data.hapi.globum %}
Expand All @@ -17,43 +17,49 @@ <h4 id="{{ xapi.url | slugify }}">
<a href="#{{ xapi.url | slugify }}">🔗</a>
{{ xapi.lid | default: xapi['datum']['lid'] }}
</h4>
<div class="row row-cols-1 row-cols-md-2 g-4">
<div class="row">
{% for api_alt in xapi.alternativum %}
{% if api_alt.url == xapi.url %}
{% continue %}
{% endif %}
<div class="col">
<div class="col-12 col-xxl-6 pb-3">
<article class="card">
<div class="card-header">
<small>{{ api_alt.linguam }}</small>
<small>🗣{{ api_alt.linguam }}🗣</small>
{% if api_alt.opus_in_progressu %}
<small>{% _🗣️ opus_in_progressu_emoji_nomen 🗣️_ %}</small>
{% endif %}
</div>
<div class="card-body">
<h5 class="card-title" id="{{ api_alt.url | slugify }}" >{{ api_alt.title }}</h5>
<h5 class="card-title" id="{{ api_alt.url | slugify }}" >
{{ api_alt.title }}
</h5>
<p class="card-text">

{{ api_alt.description | default: "<mark>_[por] TODO: adicionar descrição [por]_</mark>" }}
</p>
<a href="{{ api_alt.url }}" hreflang="{{ api_alt.hreflang }}" class="btn btn-primary">
<a href="{{ api_alt.url }}" hreflang="{{ api_alt.hreflang }}"
class="btn btn-primary">
API Interativa
</a>
<a href="{{ api_alt.datum.openapi_filum }}" hreflang="{{ api_alt.hreflang }}" class="btn btn-default">
<a href="{{ api_alt.datum.openapi_filum }}"
hreflang="{{ api_alt.hreflang }}" class="btn btn-default">
OpenAPI
</a>
</div>
<div class="card-footer">
<small class="text-muted">
{% _🗣️ commune_agnitionem_et_gratiam_nomen 🗣️_ %}: <br>
<mark>_[por] TODO: adicionar lista de colaboradores [por]_</mark>
</small>
<small class="text-muted">
{% _🗣️ commune_agnitionem_et_gratiam_nomen 🗣️_ %}: <br>
<mark>_[por] TODO: adicionar lista de colaboradores [por]_</mark>
</small>
</div>
</article>
</div>
{% endfor %}
</div>
<!-- {{ xapi | inspect }} -->

</article>
{% endfor %}
<!-- {{ globum | inspect }} -->
<br>
</article>
{% endfor %}
Expand Down Expand Up @@ -83,19 +89,25 @@ <h2 id="tm" lang="la">Trānslātiōnem memoriam</h2>
</article>

<aside>
<h2 id="agnitionem">{% _🗣️ commune_agnitionem_et_gratiam_nomen 🗣️_ %}</h2>
<h3 id="agnitionem-voluntarius">{% _🗣️ commune_voluntarius_auxilio_tuo_nomen 🗣️_ %}</h3>
<h2 id="agnitionem">
{% _🗣️ commune_agnitionem_et_gratiam_nomen 🗣️_ %}
</h2>
<h3 id="agnitionem-voluntarius">
{% _🗣️ commune_voluntarius_auxilio_tuo_nomen 🗣️_ %}
</h3>
<ul>
{% for humanum in site.data.agnitionem.humanum -%}
<li>{{ humanum.namen.baptismum }}</li>
{%- endfor %}
</ul>
<h3 id="agnitionem-communitatem">{% _🗣️ commune_agnitionem_communitatem_nomen 🗣️_ %}</h3>
<h3 id="agnitionem-communitatem">
{% _🗣️ commune_agnitionem_communitatem_nomen 🗣️_ %}
</h3>
<ul>
{% for communitatem in site.data.agnitionem.communitatem -%}
<li>{{ communitatem.namen.baptismum }}</li>
{%- endfor %}
</ul>
</aside>

</section>
</div>
128 changes: 94 additions & 34 deletions _includes/index-corporeum.html
Original file line number Diff line number Diff line change
@@ -1,53 +1,113 @@
<!-- _includes/api-corporeum-ltr.html -->
<!-- trivia: corporeum, https://en.wiktionary.org/wiki/corporeus#Latin -->

{% assign r_gid = site.data.referens['gid'] %}

<article>
<!-- _includes/index-corporeum.html -->
<<div>
<article>
<h2 id="api">API</h2>
<p>👷🏽 TODO 👷🏽</p>
{% for api_gid in site.data.referens['api_gid'] -%}
<h3 id="{{ r_gid[api_gid]['hashtag']['api'] }}">
{{ api_gid }}
</h3>
{%- endfor %}
{% for globum in site.data.hapi.globum %}
<article>
<header>
<h3 id="api-{{ globum.gid | slugify }}">
{{ globum.namen }}
</h3>
{{ globum.descriptionem | default: '<mark>_[lat] Ignotum textum. Adiuva me 🥺[lat]_</mark> '}}
</header>

{% for xapi in globum.collectionem_xapi %}
<article style="padding: 1em">
<h4 id="{{ xapi.url | slugify }}">
<a href="#{{ xapi.url | slugify }}">🔗</a>
{{ xapi.lid | default: xapi['datum']['lid'] }}
</h4>
<div class="row">
{% for api_alt in xapi.alternativum %}
{% if api_alt.url == xapi.url %}
{% continue %}
{% endif %}
<div class="col-12 col-xxl-6 pb-3">
<article class="card">
<div class="card-header">
<small>🗣{{ api_alt.linguam }}🗣</small>
{% if api_alt.opus_in_progressu %}
<small>{% _🗣️ opus_in_progressu_emoji_nomen 🗣️_ %}</small>
{% endif %}
</div>
<div class="card-body">
<h5 class="card-title" id="{{ api_alt.url | slugify }}" >
{{ api_alt.title }}
</h5>
<p class="card-text">

{{ api_alt.description | default: "<mark>_[por] TODO: adicionar descrição [por]_</mark>" }}
</p>
<a href="{{ api_alt.url }}" hreflang="{{ api_alt.hreflang }}"
class="btn btn-primary">
API Interativa
</a>
<a href="{{ api_alt.datum.openapi_filum }}"
hreflang="{{ api_alt.hreflang }}" class="btn btn-default">
OpenAPI
</a>
</div>
<div class="card-footer">
<small class="text-muted">
{% _🗣️ commune_agnitionem_et_gratiam_nomen 🗣️_ %}: <br>
<mark>_[por] TODO: adicionar lista de colaboradores [por]_</mark>
</small>
</div>
</article>
</div>
{% endfor %}
</div>

</article>
{% endfor %}
<br>
</article>
{% endfor %}
</article>
<article>
<h2 id="schemam" lang="la">Schemam</h2>
<div class="alert alert-info" role="alert">
<p>{% _🗣️ 📝lat-Latn📝 opus_in_progressu_emoji_nomen 📝lat-Latn📝 🗣️_ %}</p>
<p>{% _🗣️ 📝eng-Latn📝 opus_in_progressu_emoji_nomen 📝eng-Latn📝 🗣️_ %}</p>
<p>{% _🗣️ 📝por-Latn📝 opus_in_progressu_emoji_nomen 📝por-Latn📝 🗣️_ %}</p>
<p>{% _🗣️ 📝spa-Latn📝 opus_in_progressu_emoji_nomen 📝spa-Latn📝 🗣️_ %}</p>
</div>
{% include temporarium/scheman.html %}


</article>
<article>
<h2 id="schema">Schema</h2>
<p>👷🏽 TODO 👷🏽</p>
{% for schema_gid in site.data.referens['schema_gid'] -%}
<h3 id="#{{ r_gid[schema_gid]['hashtag']['api'] }}">
{{ r_gid[schema_gid]['namen'] }}
</h3>
<article>
{% for schema in site.data.schema -%}
<h4 id="{{ schema['hashtag'] }}">
{{ schema['namen'] }}
</h4>
{%- endfor %}
</article>
{%- endfor %}
<h2 id="tm" lang="la">Trānslātiōnem memoriam</h2>
<div class="alert alert-info" role="alert">
<p>{% _🗣️ 📝lat-Latn📝 opus_in_progressu_emoji_nomen 📝lat-Latn📝 🗣️_ %}</p>
<p>{% _🗣️ 📝eng-Latn📝 opus_in_progressu_emoji_nomen 📝eng-Latn📝 🗣️_ %}</p>
<p>{% _🗣️ 📝por-Latn📝 opus_in_progressu_emoji_nomen 📝por-Latn📝 🗣️_ %}</p>
<p>{% _🗣️ 📝spa-Latn📝 opus_in_progressu_emoji_nomen 📝spa-Latn📝 🗣️_ %}</p>
</div>

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

<aside>
<h2 id="agnitionem">{% _🗣️ commune_agnitionem_et_gratiam_nomen 🗣️_ %}</h2>
<h3 id="agnitionem-voluntarius">{% _🗣️ commune_voluntarius_auxilio_tuo_nomen 🗣️_ %}</h3>
<h2 id="agnitionem">
{% _🗣️ commune_agnitionem_et_gratiam_nomen 🗣️_ %}
</h2>
<h3 id="agnitionem-voluntarius">
{% _🗣️ commune_voluntarius_auxilio_tuo_nomen 🗣️_ %}
</h3>
<ul>
{% for humanum in site.data.agnitionem.humanum -%}
<li>{{ humanum.namen.baptismum }}</li>
{%- endfor %}
</ul>
<h3 id="agnitionem-communitatem">{% _🗣️ commune_agnitionem_communitatem_nomen 🗣️_ %}</h3>
<h3 id="agnitionem-communitatem">
{% _🗣️ commune_agnitionem_communitatem_nomen 🗣️_ %}
</h3>
<ul>
{% for communitatem in site.data.agnitionem.communitatem -%}
<li>{{ communitatem.namen.baptismum }}</li>
{%- endfor %}
</ul>
</aside>
<footer>
<h2 id="licentiam">{% _🗣️ licentiam_nomen 🗣️_ %}</h2>
{% de_markdown %}{% _🗣️ Hapi_licentiam_Hapi_descriptionem 🗣️_ %}{% endde_markdown %}
</footer>
</article>

</div>
3 changes: 3 additions & 0 deletions _layouts/defallo-ltr.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,19 @@

<header class="container">
<h1>{{ page.titulum | default: page.title }}</h1>
<p>{{ page.description | markdownify }}</p>
{% if page.speciale_html %}
{{ page.speciale_html | liquify }}
{% endif %}
{% if page.toc %}
<hr>
<nav id="mensam-de-contentis-in-eode">
<h2 style="font-size: 1.2em;" lang="la">
{% _🗣️ mensam_de_contentis_in_eodem_nomen 🗣️_ %}
</h2>
{{ content | toc_only }}
</nav>
<hr>
{% endif %}
</header>

Expand Down
1 change: 1 addition & 0 deletions _layouts/defallo-mul-Zyyy.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<body>
<header class="container">
<h1>{{ page.titulum | default: page.title }}</h1>
<p>{{ page.description | markdownify }}</p>
{% if page.speciale_html %}
{{ page.speciale_html | liquify }}
{% endif %}
Expand Down
1 change: 1 addition & 0 deletions _plugins/hapi/utilitatem.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def expandendum_api_datum(apis, referens)
# puts api['uid']
# api['openapi_filum'] = openapi_filum_de_api(api)
# api = expandendum_api_datum_jekyll_page(api)
# puts api
expandendum_api_datum_jekyll_page(api, referens)
end

Expand Down
11 changes: 9 additions & 2 deletions _plugins/jekyll_hapi_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ def generate(site) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
# _[eng] Subclass of `Jekyll::Page` with custom method definitions. [eng]_
# _[eng] Subclasse de `Jekyll::Page` com customizações nos métodos [eng]_
class ApiPaginam < Jekyll::Page
attr_accessor :datum, :gid, :uid, :xdefallo, :xdefallo_est, :alternativum
attr_accessor :datum, :gid, :uid, :xdefallo, :xdefallo_est, :alternativum,
:opus_in_progressu

# Attributes for Liquid templates
ATTRIBUTES_FOR_LIQUID = %w[
Expand All @@ -60,6 +61,7 @@ class ApiPaginam < Jekyll::Page
titulum
namen
summarius
opus_in_progressu
xdefallo
xdefallo_est
content
Expand Down Expand Up @@ -101,7 +103,8 @@ def initialize(site, api_datum, _debug) # rubocop:disable Metrics/AbcSize,Metric
@uid = api_datum['uid']
@xdefallo = api_datum['xdefallo']
@xdefallo_est = !!api_datum['xdefallo_est']
# puts ' api_datum'
@opus_in_progressu = !!api_datum['opus_in_progressu']
# puts api_datum['opus_in_progressu']
# puts api_datum
# @trivum = 'teste'

Expand Down Expand Up @@ -176,6 +179,10 @@ def openapi_filum
@datum['jekyll-page']['openapi_filum2']
end

def opus_in_progressu
!!@opus_in_progressu
end

# TODO: remove obsolete parts
def summarius
@summarius || @datum['jekyll-page']['summarius'] || '<mark lang="la">Nulla summarius. Adiuva me 🥺</mark>'
Expand Down

0 comments on commit 02f2c08

Please sign in to comment.