Skip to content

Commit

Permalink
HXL-CPLP/forum#58, hapi-t9n-alpha (#13), mvp-l10n-schemas (#7): inici…
Browse files Browse the repository at this point in the history
…ando correções para antever problemas que pessoal do frontend teria
  • Loading branch information
fititnt committed Jun 8, 2021
1 parent e658790 commit 215f8fc
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 169 deletions.
3 changes: 3 additions & 0 deletions _data/referens.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ gid:
UN:
gid: UN
namen: "🇺🇳 UN 🇺🇳"
descriptionen: "{% _🗣️ nomen_spatium_UN_summarius 🗣️_ %}"
hashtag:
api: "api-UN"
schema: "schema-UN"
Expand All @@ -42,13 +43,15 @@ gid:
XZ:
gid: XZ
namen: "🌐 XZ 🌐"
descriptionen: "{% _🗣️ nomen_spatium_XZ_summarius 🗣️_ %}"
hashtag:
api: "api-XZ"
schema: "schema-XZ"

BR:
gid: BR
namen: "🇧🇷 BR 🇧🇷"
descriptionen: "{% _🗣️ nomen_spatium_BR_summarius 🗣️_ %}"
hashtag:
api: "api-BR"
schema: "schema-BR"
Expand Down
5 changes: 4 additions & 1 deletion _data/tm/commune.tm.hxl.csv
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,7 @@ patriam_079_nomen,Q155,1,locum,patriam,,079,,,,nomen,,Brasilia,∅,Brasil,∅,Br
patriam_079_emoji,Q155,1,locum,patriam,,079,,,,emoji,,🇧🇷,∅,🇧🇷,∅,🇧🇷,∅,🇧🇷,∅
SOS_nomen,Q214266,0,,,,,,SOS,,nomen,,,∅,,∅,,∅,,∅
translationem_memoriam_nomen,Q333761,1,L10N,,,,,translationem_memoriam,,nomen,,Trānslātiōnem memoriam,∅,Memória de tradução,∅,Translation memory,∅,,∅
translationem_memoriam_emoji,Q333761,0,L10N,,,,,translationem_memoriam,,emoji,,💾🗣️💭,,,,,,,
translationem_memoriam_emoji,Q333761,0,L10N,,,,,translationem_memoriam,,emoji,,💾🗣️💭,∅,,∅,,∅,,∅
nomen_spatium_UN_summarius,Q1065,1,,,nomen_spatium,UN,,,,summarius,,Nationes Unitae (nomen spatium),∅,Espaço de nomes das Nações Unidas,∅,United nations namespace,∅,,∅
nomen_spatium_XZ_summarius,Q25855,1,,,nomen_spatium,XZ,,,,summarius,,Internātiōnāle aquam (nomen spatium),∅,Espaço de nomes de águas internacionais (nenhum território ou multiplos territórios),∅,International waters namespace (no territories or multiple territories),∅,,∅
nomen_spatium_BR_summarius,Q155,1,,,nomen_spatium,BR,,,,summarius,,Brasilia (nomen spatium),∅,Espaço de nomes do Brasil,∅,Brazil namespace,∅,,∅
4 changes: 4 additions & 0 deletions _plugins/hapi/drops/globum_drop.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ def namen
@optionem['namen']
end

def descriptionem
@optionem['descriptionem']
end

def collectionem_api
@optionem['collectionem_api'] || []
end
Expand Down
5 changes: 5 additions & 0 deletions _plugins/hapi/drops/xdefallo_api_drop.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ def to_s
"<#{self.class} @item=#{@optionem.keys}>"
end

def lid
puts 'lid'
@optionem['lid'] || @optionem['datum']['lid']
end

def gid
@optionem['gid']
end
Expand Down
7 changes: 4 additions & 3 deletions _plugins/hapi/hic_sunt_dracones.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,14 @@ def api_gid_xdefallo?(api_collectionem = nil) # rubocop:disable Metrics/AbcSize,

referens_gid.each do |clavem_gid, valendum|
puts "api_gid_xdefallo [#{clavem_gid}] [#{valendum}]"
puts ''
res = valendum
res['collectionem_api'] = []
apis.each do |api|
res['collectionem_api'].append(api) if api.xdefallo_est? && api.gid_est?(clavem_gid)
# resultatum[clavem] = valendum
end
resultatum.append(res)
# resultatum.append(res)
drop = Hapi::Drops::HapiGlobumDrop.new(res)
resultatum.append(drop)
end
Expand Down Expand Up @@ -207,7 +208,7 @@ def globum?(api_collectionem = nil, _schemam_collectionem = nil) # rubocop:disab
resultatum = []

referens_gid.each do |clavem_gid, valendum|
puts "api_gid_xdefallo [#{clavem_gid}] [#{valendum}]"
# puts "api_gid_xdefallo [#{clavem_gid}] [#{valendum}]"
res = valendum
res['collectionem_api'] = []
res['collectionem_xapi'] = []
Expand All @@ -216,7 +217,7 @@ def globum?(api_collectionem = nil, _schemam_collectionem = nil) # rubocop:disab
res['collectionem_xapi'].append(api) if api.xdefallo_est? && api.gid_est?(clavem_gid)
# resultatum[clavem] = valendum
end
resultatum.append(res)
# resultatum.append(res)
drop = Hapi::Drops::HapiGlobumDrop.new(res)
resultatum.append(drop)
end
Expand Down
222 changes: 57 additions & 165 deletions documentum/mul-Zyyy/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,83 +38,75 @@ <h1 lang="la">Mappam Situm - Auxilium Humanitarium API documentōrum</h1>
<p>{% _🗣️ 📝eng-Latn📝 opus_in_progressu_emoji_nomen 📝eng-Latn📝 🗣️_%}</p>
<p>{% _🗣️ 📝spa-Latn📝 opus_in_progressu_emoji_nomen 📝spa-Latn📝 🗣️_%}</p>
</div>
<nav>
<h2>{% _🗣️ mensam_de_contentis_in_eodem_nomen 🗣️_ %}</h2>
<ol class="list-unstyled">
<li>
<a href="#api">API</a>
<ul>
{% for globum in site.data.hapi.globum %}
<li>
<a href="#api-{{ globum.gid | slugify }}">{{ globum.namen }}</a>
<ul>
{% for xapi in globum.collectionem_xapi %}
<li>
<a href="#{{ xapi.url | slugify }}">{{ xapi.lid | default: xapi['datum']['lid'] }}</a>
<ul>
{% for api_alt in xapi.alternativum %}
<li>
<a href="#{{ api_alt.url | slugify }}">{{ api_alt.title }}</a>
</li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
</li>

{% endfor %}
</ul>
</li>
</ol>
</nav>
</div>
</header>
<main>
<div class="container">
<aside>
<h2>Trivia</h2>
<p>
<ul>
<li><samp>situm</samp>
<ul>
<li><a href="https://en.wiktionary.org/wiki/situs#Latin">https://en.wiktionary.org/wiki/situs#Latin</a></li>
</ul>
</li>
<li><samp>mappam</samp>
<ul>
<li><a href="https://en.wiktionary.org/wiki/mappa#Latin">https://en.wiktionary.org/wiki/mappa#Latin</a></li>
</ul>
</li>
<li><samp>pāginam</samp>
<ul>
<li><a href="https://en.wiktionary.org/wiki/pagina#Latin">https://en.wiktionary.org/wiki/pagina#Latin</a></li>
</ul>
</li>
</ul>
</p>
</aside>
<section>
<article>
<h2>API</h2>
{% for item_group in site.data.hapi.api_xdefallo %}
<article>
<h3>{{ item_group.title }}</h3>
<dl>
<dt>{% _🗣️ abbreviationem_XZ_URL_canonicum_nomen 🗣️_ %}</dt>
<dd><a href="{{ item_group.url }}">{{ item_group.url }}</a></dd>
</dl>
{% for item_alt in item_group.alternativum %}
{% if item_alt.url != item_group.url %}
<article>
<h4>{{ item_alt.title | default: item_alt.namen }}</h4>
<dl>
<dt>{% _🗣️ abbreviationem_XZ_URL_canonicum_nomen 🗣️_ %}</dt>
<dd><a href="{{ item_alt.url }}">{{ item_alt.url }}</a></dd>
</dl>
</article>
{% endif %}
{% endfor %}
</article>
{% endfor %}
</article>
<article>
<h2>API per gid</h2>
<h2 id="api">API</h2>
{% for globum in site.data.hapi.globum %}
<article>
<h3 id="api-{{ globum.gid | slugify }}">
<a href="#api-{{ globum.gid | slugify }}">🔗</a>
{{ globum.namen }}
</h3>
<header>
<h3 id="api-{{ globum.gid | slugify }}">
{{ globum.namen }}
</h3>
{{ globum.descriptionem | default: '<mark>_[lat] Ignotum textum. Adiuva me 🥺[lat]_</small> '}}
</header>

{% for xapi in globum.collectionem_xapi %}
<article style="padding-right: 2em; padding-left: 2em;">
<article style="padding: 1em">
<h4 id="{{ xapi.url | slugify }}">
<a href="#{{ xapi.url | slugify }}">🔗</a>
{{ xapi.uid }}
{{ xapi.lid | default: xapi['datum']['lid'] }}
</h4>
{% for api_alt in xapi.alternativum %}
<article style="padding-right: 1em; padding-left: 1em;">
<h5 id="{{ api_alt.url | slugify }}">
<a href="#{{ api_alt.url | slugify }}">🔗</a>
{{ api_alt.title }}
</h5>
<dl>
<dt>{% _🗣️ abbreviationem_XZ_URL_canonicum_nomen 🗣️_ %}</dt>
<dd><a href="{{ api_alt.url }}">{{ api_alt.url }}</a></dd>
</dl>
<!-- {{ api_alt | inspect }} -->
</article>
{% endfor %}
<div class="list-group">
{% for api_alt in xapi.alternativum %}
<a href="{{ api_alt.url }}" hreflang="{{ api_alt.hreflang }}"
class="list-group-item list-group-item-action">
<article>
<div class="d-flex w-100 justify-content-between">
<h5 id="{{ api_alt.url | slugify }}" class="mb-1">
{{ api_alt.title }}
</h5>
<small>{{ api_alt.linguam }}</small>
</div>
<p class="mb-1">{{ api_alt.description | default: "<mark>_[por] TODO: adicionar descrição [por]_</mark>" }}</p>
<small>{% _🗣️ commune_agnitionem_et_gratiam_nomen 🗣️_ %}: <mark>_[por] TODO: adicionar lista de colaboradores [por]_</small></small>
</article>
</a>
{% endfor %}
</div>
<!-- {{ xapi | inspect }} -->

</article>
Expand All @@ -124,107 +116,7 @@ <h5 id="{{ api_alt.url | slugify }}">
</article>
{% endfor %}
</article>

<article>
<h2>Categoriam</h2>
{% for cat in site.data.hapi.categoriam %}
<article>
<h3>{{ cat.title }}</h3>
</article>
{% endfor %}
</article>

<article>
<h2>Tags</h2>
{% for tag in site.data.hapi.pittacium %}
<article>
<h3>{{ tag.title }}</h3>
</article>
{% endfor %}
</article>

</section>
<div>
<h2>Testum</h2>


<div>
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
{% assign links = site.data.l10n.mappam-situml10n.grupum %}
{% for link in links %}
{% assign class = nil %}
{% if page.url contains link.url %}
{% assign class = 'active' %}
{% endif %}
{% if link.descendens %}
<li class="nav-item dropdown {{ class }}">
<a class="nav-link dropdown-toggle"
data-bs-toggle="dropdown" aria-expanded="false"
id="navigationem-descendens-{{ forloop.index0 }}" href="#">
{% if link.titulum %}
<abbr title="{{ link.titulum | liquify | strip_html }}">{{ link.namen }}</abbr>
{% else %}
{{ link.namen | liquify }}
{% endif %}
</a>
<ul class="dropdown-menu"
aria-labelledby="navigationem-descendens-{{ forloop.index0 }}">
{% for sublink in link.descendens %}
{% if sublink.namen == 'separator' %}
<li role="separator" class="divider"></li>
{% elsif sublink.debile %}
<li class="nav-item">
<a class="nav-link disabled" tabindex="-1"
aria-disabled="true" href="#">
{{ sublink.namen | liquify }}
</a>
</li>
{% else %}
<li>
<a class="dropdown-item"
href="{{ site.url }}{{ site.baseurl }}{{ sublink.url | liquify | strip_html }}">
{% if sublink.titulum %}
<abbr title="{{ sublink.titulum | liquify | strip_html }}">{{ sublink.namen }}</abbr>
{% else %}
{{ sublink.namen | liquify }}
{% endif %}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
</li>
{% else %}
<li class="nav-item {{ class }}">
<a class="nav-link"
href="{{ site.url }}{{ site.baseurl }}{{ link.url | liquify | strip_html }}">
{% if link.titulum %}
<abbr title="{{ link.titulum | liquify | strip_html }}">{{ link.namen }}</abbr>
{% else %}
{{ link.namen | liquify }}
{% endif %}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
<h2>Debug</h2>
<h3>etc</h3>

<p>https://talk.jekyllrb.com/t/category-page-need-a-page-with-a-link-to-all-posts-of-a-category/2997/2<p>
<p>https://talk.jekyllrb.com/t/collect-items-from-multiple-collections-and-organize-by-tag/1645/5<p>
<pre>{{ site.categories }}</pre>
<pre>{{ site.categories }}</pre>
<pre>{{ page.categories }}</pre>
<pre>{{ site.tags }}</pre>
<pre>{{ page.tags }}</pre>
<pre>{{ site.keys | bellum_json }}</pre>
<h3>mappam-situm.l10n</h3>
<pre>{{ site.data.l10n.mappam-situml10n.grupum | bellum_json }}</pre>
<h3>mappam-situm</h3>
<pre>{{ site.data.mappam-situm.grupum | bellum_json }}</pre>
<h2>Pāginam</h2>
</div>
</main>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
Expand Down

0 comments on commit 215f8fc

Please sign in to comment.