Skip to content

Commit

Permalink
HXL-CPLP/forum#58, hapi-t9n-alpha (#13), mvp-l10n-schemas (#7): pagin…
Browse files Browse the repository at this point in the history
…as de index agora exibem página exata (se existir) em vez de todas as opções; adicionado licença nas novas paginas internas de API
  • Loading branch information
fititnt committed Jun 11, 2021
1 parent c67f46e commit da1960f
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 14 deletions.
9 changes: 9 additions & 0 deletions _includes/index-corporeum-mul-Zyyy.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,13 @@ <h3 id="agnitionem-communitatem">
</ul>
</aside>

<section>
<h2>{% _🗣️ licentiam_nomen 🗣️_ %}</h2>
<a href="https://unlicense.org/">
<img src="https://i.creativecommons.org/p/zero/1.0/88x31.png"
alt="{% _🗣️ dominium_publicum_nomen 🗣️_ %}">
</a>
{% de_markdown %}{% _🗣️ Hapi_licentiam_Hapi_descriptionem 🗣️_ %}{% endde_markdown %}
</section>

</div>
43 changes: 43 additions & 0 deletions _includes/index-corporeum.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,40 @@ <h3 id="api-{{ globum.gid | slugify }}">

{% for xapi in globum.collectionem_xapi %}
<article style="padding: 1em">
{% if xapi.alternativum_linguam contains page.linguam %}
{% assign api_alt = xapi.alternativum | where: 'linguam', page.linguam | first %}
<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>
{% else %}
<h4 id="{{ xapi.url | slugify }}">
<a href="#{{ xapi.url | slugify }}">🔗</a>
{{ xapi.lid | default: xapi['datum']['lid'] }}
Expand Down Expand Up @@ -57,6 +91,7 @@ <h5 class="card-title" id="{{ api_alt.url | slugify }}" >
</div>
{% endfor %}
</div>
{% endif %}
</article>
{% endfor %}
<br>
Expand Down Expand Up @@ -103,4 +138,12 @@ <h3 id="agnitionem-communitatem">
</ul>
</aside>

<section>
<h2>{% _🗣️ licentiam_nomen 🗣️_ %}</h2>
<a href="https://unlicense.org/">
<img src="https://i.creativecommons.org/p/zero/1.0/88x31.png"
alt="{% _🗣️ dominium_publicum_nomen 🗣️_ %}">
</a>
{% de_markdown %}{% _🗣️ Hapi_licentiam_Hapi_descriptionem 🗣️_ %}{% endde_markdown %}
</section>
</div>
14 changes: 14 additions & 0 deletions _layouts/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,18 @@ <h3>{% _🗣️ PDF_archivum_salvandum_nomen 🗣️_ %}</h3>
{% _🗣️ Hapi_paginam_API_commentarium_2 🗣️_ %}
</p>
</aside>

</div>

<section>
<h2>{% _🗣️ licentiam_nomen 🗣️_ %}</h2>
<a href="https://unlicense.org/">
<img src="https://i.creativecommons.org/p/zero/1.0/88x31.png"
alt="{% _🗣️ dominium_publicum_nomen 🗣️_ %}">
</a>
{% de_markdown %}{% _🗣️ Hapi_licentiam_Hapi_descriptionem 🗣️_ %}{% endde_markdown %}
</section>

{%- include pedem.html -%}

{%- include peritum-modum/instrumentum-balteum.html -%}
46 changes: 32 additions & 14 deletions _plugins/hapi/drops/xdefallo_api_drop.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,27 @@ def global
# direct access to specific alternative, if exists
# [eng]_
# @see https://github.com/jekyll/jekyll/blob/master/lib/jekyll/drops/drop.rb
def [](key)
if self.class.invokable? key
public_send key
elsif key != 'url' && @optionem['alternativum']
# TODO: _[eng] about the key != 'url'
# sometimes we may try to access URL process, and
# with raw YAML data (not the actuall ApiPaginam)
# this will raise error
# [eng]_
@optionem['alternativum'].each do |apt_alt|
return apt_alt if apt_alt['linguam'] && apt_alt['linguam'] == key
end
end
# def [](key)
# # puts key
# # puts !!@optionem['alternativum']
# if self.class.invokable? key
# public_send key
# elsif key == 'url' || key == 'datum'
# # TODO: _[eng] about the key != 'url'
# # sometimes we may try to access URL process, and
# # with raw YAML data (not the actuall ApiPaginam)
# # this will raise error
# # [eng]_
# nil
# elsif @optionem['alternativum'] && key.length >= 8

# puts "[] #{key}"
# @optionem['alternativum'].each do |apt_alt|
# # puts 'achou!'
# puts apt_alt['linguam'] && apt_alt['linguam'] == key
# return apt_alt if apt_alt['linguam'] && apt_alt['linguam'] == key
# end
# end

# if @optionem['alternativum']
# puts @optionem['alternativum'].class
Expand All @@ -57,7 +65,7 @@ def [](key)
# # end

# end
end
# end

def alternativum
# puts ''
Expand Down Expand Up @@ -94,6 +102,16 @@ def linguam
@optionem['linguam']
end

def alternativum_linguam
resultatum = []
@optionem['alternativum'].each do |apt_alt|
# puts 'achou!'
resultatum.append(apt_alt['linguam'])
end

resultatum
end

def linguam_est
@optionem['linguam']
end
Expand Down
2 changes: 2 additions & 0 deletions documentum/eng-Latn/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ iso6393: eng
# iso6393: spa
iso15924: Latn

toc: true


translationem_modum: html
# translationem_modum: markdown
Expand Down

0 comments on commit da1960f

Please sign in to comment.