Skip to content

Commit

Permalink
mvp-tema-i18n (#9): removido Google Analytics (não precisamos disso);…
Browse files Browse the repository at this point in the history
… refatoração parcial das paginas em ingles
  • Loading branch information
fititnt committed May 14, 2021
1 parent 8900b86 commit 2a32b91
Show file tree
Hide file tree
Showing 11 changed files with 138 additions and 68 deletions.
Empty file added _data/L10n-devel.yml
Empty file.
6 changes: 0 additions & 6 deletions _includes/custom-head.html

This file was deleted.

17 changes: 11 additions & 6 deletions _includes/meta-caput.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,16 @@
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-wEmeIV1mKuiNpC+IOBjI7aAzPcEZeedi5yW5f2yOq55WWLwNGmvvx4Um1vskeMj0" crossorigin="anonymous">

{%- feed_meta -%}
{%- if jekyll.environment == 'production' and site.google_analytics -%}
{%- include google-analytics.html -%}
{%- endif -%}
{% if page.layout contains 'api' %}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/swagger-ui.css"
integrity="sha384-EsNi7oBa+y4MD5KbpC28MUDGgPo3qn7XURKXTbKQwPyzE/vkRHg+1LEJAnuWqe8g" crossorigin="anonymous">
<style>
/* Hide some strange SVG not loading */
.swagger-ui>div>svg {
display: none;
}
</style>
{% endif %}

{%- include custom-head.html -%}

{%- feed_meta -%}
</head>
59 changes: 21 additions & 38 deletions _includes/pedem.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,25 @@
integrity="sha384-p34f1UUtsS3wqzfto5wAAmdvj+osOnFyQFpp4Ua3gs/ZVWx6oOypYoCJhGGScy+8"
crossorigin="anonymous"></script>

<!--
<footer class="site-footer h-card">
<data class="u-url" href="{{ "/" | relative_url }}"></data>
<div class="container">
<div class="footer-col-wrapper">
<div class="footer-col">
<p class="feed-subscribe">
<a href="{{ 'feed.xml' | relative_url }}">
<svg class="svg-icon orange">
<use xlink:href="{{ 'assets/minima-social-icons.svg#rss' | relative_url }}"></use>
</svg><span>Subscribe</span>
</a>
</p>
{%- if site.author %}
<ul class="contact-list">
{% if site.author.name -%}
<li class="p-name">{{ site.author.name | escape }}</li>
{% endif -%}
{% if site.author.email -%}
<li><a class="u-email" href="mailto:{{ site.author.email }}">{{ site.author.email }}</a></li>
{%- endif %}
</ul>
{%- endif %}
</div>
<div class="footer-col">
<p>{{ site.description | escape }}</p>
</div>
</div>
<div class="social-links">
{%- include social.html -%}
</div>
</div>
{% if page.layout contains 'api' %}
<script src="//unpkg.com/swagger-ui-dist@3/swagger-ui-bundle.js"></script>
<script src="https://unpkg.com/rapipdf/dist/rapipdf-min.js"></script>
<script>

</footer>
-->
function render() {
var ui = SwaggerUIBundle({
// url: `path/to/my/swagger.yaml`,
// url: `https://hapi.etica.ai/api/BR/portais-ckan-brasil/por/openapi.yaml`,
url: `{{ page.openapi_filum }}`,
dom_id: '#swagger-ui',
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIBundle.SwaggerUIStandalonePreset
]
});
}
window.onload = function () {
render()
}
</script>
{% endif %}
76 changes: 76 additions & 0 deletions _layouts/api.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
layout: defallo
---

<div style="border-style: dotted; border-width: 2px; border-color: #ccc">

{% case page.linguam %}
{% when 'por' %}
<h2 style="text-align: center;">API interativa documentada em português</h2>
{% when 'eng' %}
<h2 style="text-align: center;">Interactive API documented in English</h2>
{% endcase %}

<div id="swagger-ui"></div>

{% case page.linguam %}
{% when 'por' %}
<aside style="max-width: 800px; margin: 0 auto;">
<h3>Salvar como PDF</h3>
<rapi-pdf style="width:700px; height:40px; font-size:18px;" spec-url="openapi.yaml"
button-bg="#b44646">
</rapi-pdf>
</aside>

<aside class="alert alert-info" style="margin-top: 2em" role="alert">
<p>
Nota: esta seção permite pré- visualizar de forma interativa arquivos OpenAPI
e até mesmo executar requisições do seu navegador sem sair do site hapi.etica.ai
(algumas API inclusive documentadas em mais de um idioma!). Algumas documentações,
seja pela API original ou por usarmos descrição original do site, podem ser escritas
em primeira pessoa que, <strong>obviamente</strong>, não se trata de voluntários
em compilar as documentações.
</p>
<p>
Exceção a esta regra são erros de tradução e/ou falhas em relação a atualizações mas APIs
informadas aqui. Nesse caso nos avise!
</p>
</aside>
{% when 'eng' %}
<aside style="max-width: 800px; margin: 0 auto;">
<h3>Save as PDF</h3>
<rapi-pdf style="width:700px; height:40px; font-size:18px;" spec-url="openapi.yaml"
button-bg="#b44646">
</rapi-pdf>
</aside>
<aside class="alert alert-info" style="margin-top: 2em" role="alert">
<p>
Note: this section allows you to interactively preview OpenAPI files
and even execute requests from your browser without leaving the
hapi.etica.ai website (some APIs even documented in more than one language!).
Some documentation, either by the original API or by using the original
description of the site, may be written in the first person, but obviously
this is not the volunteers compiling the documentation.
</p>

<p>
Exceptions to this rule are translation errors and / or failures
in relation to updates but APIs reported here.
In this case is our fault, not the API provider,
so let us know!
</p>
</aside>
{% endcase %}




{% if page.linguam == 'por' %}

{% endif %}

{% if page.linguam == 'eng' %}

{% endif %}

</div>
13 changes: 11 additions & 2 deletions documentum/debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,18 @@ description: "Debug, ignore"
locale: la
linguam: lat
permalink: /debug

published: false
tags: [index, index2]
# tags: ["classic", "hollywood"]
# published: false
sitemap:
exclude: yes
---

{{ page.tags | json }}

asdasd
{% if page.tags contains 'index' %}
aaa
{% endif %}

{{ page.layout }}
4 changes: 3 additions & 1 deletion documentum/eng/api/BR/brazilian-ckan-portals.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
---
layout: api-eng
tags: [api]
title: "Brazilian CKAN data portals"
description: |
See discussion at https://github.com/HXL-CPLP/COD-Services-API-doc/issues/4
locale: en
linguam: eng
permalink: /eng/api/BR/brazilian-ckan-portals
openapi_filum: /api/BR/brazilian-ckan-portals/eng/openapi.yaml
layout: api-eng

---
5 changes: 2 additions & 3 deletions documentum/eng/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ description: "[working-draft] Argumented documentation of common APIs for humani
locale: en
linguam: eng
permalink: /eng/
categories: index
tags:
- index
categories: [index]
tags: [index]
---

# Augmented documentation for Humanitarian APIs
Expand Down
12 changes: 7 additions & 5 deletions documentum/por/api/portais-arcgis-brasil.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
---
title: "Portais CKAN de dados abertos do Brasil"
description: |
Discussão em https://github.com/HXL-CPLP/COD-Services-API-doc/issues/4
locale: pt
layout: api-por
tags: [api]
linguam: por
locale: pt
permalink: /por/api/BR/portais-arcgis-brasil
openapi_filum: /api/BR/portais-arcgis-brasil/por/openapi.yaml
layout: api-por
title: "Portais ArcGIS de dados abertos do Brasil"
description: |
Discussão em https://github.com/HXL-CPLP/COD-Services-API-doc/issues/4
---
11 changes: 6 additions & 5 deletions documentum/por/api/portais-ckan-brasil.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
title: "Portais CKAN de dados abertos do Brasil"
description: |
Discussão em https://github.com/HXL-CPLP/COD-Services-API-doc/issues/4
locale: pt
layout: api
tags: [api]
linguam: por
locale: pt
permalink: /por/api/BR/portais-ckan-brasil
openapi_filum: /api/BR/portais-ckan-brasil/por/openapi.yaml
layout: api-por
title: "Portais CKAN de dados abertos do Brasil"
description: |
Discussão em https://github.com/HXL-CPLP/COD-Services-API-doc/issues/4
---
3 changes: 1 addition & 2 deletions documentum/por/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ description: "[rascunho] Documentação argumentada de APIs comuns para ajuda hu
locale: pt
linguam: por
permalink: /por/
categories:
- index
categories: [index]

---

Expand Down

0 comments on commit 2a32b91

Please sign in to comment.