iugu-docs-theme 0.1.6 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1caba429ca8b2cd60632a4e32e566842531374894747363e4dfd5f2e6814e15d
4
- data.tar.gz: 71d022498bf80f67c1c7f6883590d1a33b310655e1c2502b6a3b7c5a014c5c81
3
+ metadata.gz: 076473a2c1c8115f9270f5f3c44cf8dc59685240d63635e1126b5bde837850e7
4
+ data.tar.gz: 91d1bd0f38610cfc95a0dcd686bee4e14dbb63b53788beb68859ba4d9570609e
5
5
  SHA512:
6
- metadata.gz: e8934908a3686879a17e8b38fa8aee11021b3d13147923071d915a8f5acbc8e29f13bcc6a1c0665e3f7a0e61bef30a1e5e19099a042f7e2f7f4f13d1879a7edd
7
- data.tar.gz: c432f9a39b466ffed57904564a6a3f1aee0673a1a301759dd09d0d520e4df8fe33454dd812817b34d842d375b0552ff511b094599267f4ded3aa2f38440a374d
6
+ metadata.gz: 171d56988bdf4ea22020fc92a84a7f792ea074ae0a2115bd94516c7e27440afc47f58402116e0a01035f2d19c0a3f278b197d80e772b1fd85e6b24e55671e788
7
+ data.tar.gz: b356e5a4e5c98162b9b0bf7d5f7d917db7f8e8c6622124dea9a2a8eeb9cbdd57cda426414f09d4a4c04115074189ab04160980119751dcec31616cecc013aa18
data/_config.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  plugins:
2
2
  - jekyll-toc
3
- - jekyll-multiple-languages-plugin
3
+ - jekyll-polyglot
4
4
  - navigation_widget
5
5
  - button_processor
6
6
  - check_required_filter
@@ -33,3 +33,6 @@ toc:
33
33
  max_level: 3
34
34
 
35
35
  languages: ["pt-BR", "en"]
36
+ exclude_from_localization: ["assets", "public"]
37
+ default_lang: "pt-BR"
38
+ lang_from_path: true
@@ -0,0 +1,38 @@
1
+ alerts:
2
+ auth: Auth
3
+ danger: Danger
4
+ description: Description
5
+ financial: Financial
6
+ info: Info
7
+ money: Money
8
+ success: Success
9
+ warning: Warning
10
+ params:
11
+ card:
12
+ required: Required
13
+ request:
14
+ body_example:
15
+ example: Example
16
+ copy: Copy
17
+ list:
18
+ query_params: Query Params
19
+ header_params: Header Params
20
+ path_params: Path Params
21
+ cookie_params: Cookie Params
22
+ response:
23
+ table:
24
+ responses: Responses
25
+ schema:
26
+ table:
27
+ content_type: Content Type
28
+ required: Required
29
+ auth_data:
30
+ authorizations: Authorizations
31
+ navigation_wizard:
32
+ back: Back
33
+ forward: Forward
34
+ header:
35
+ search: Search
36
+ this_page: This page
37
+ search_modal:
38
+ search: Search
data/_data/locale.yml ADDED
@@ -0,0 +1,39 @@
1
+ alerts:
2
+ auth: Auth
3
+ danger: Perigo
4
+ description: Descrição
5
+ financial: Financeiro
6
+ info: Informação
7
+ money: Dinheiro
8
+ success: Sucesso
9
+ warning: Aviso
10
+ wip: Em desenvolvimento
11
+ params:
12
+ card:
13
+ required: Obrigatório
14
+ request:
15
+ body_example:
16
+ example: Exemplo
17
+ copy: Copiar
18
+ list:
19
+ query_params: Parâmetros de Query
20
+ header_params: Parâmetros no Cabeçalho
21
+ path_params: Parâmetros de Path
22
+ cookie_params: Parâmetros de Cookie
23
+ response:
24
+ table:
25
+ responses: Respostas
26
+ schema:
27
+ table:
28
+ content_type: Tipo de conteúdo
29
+ required: Obrigatório
30
+ auth_data:
31
+ authorizations: Autorizações
32
+ navigation_wizard:
33
+ back: Voltar
34
+ forward: Avançar
35
+ header:
36
+ search: Buscar
37
+ this_page: Nesta página
38
+ search_modal:
39
+ search: Buscar
@@ -1,7 +1,8 @@
1
1
  {% capture file_name %}icons/{{type}}.liquid{% endcapture %}
2
2
  <div class="dark:border-y-neutral-800 dark:border-r-neutral-800 border border-l-2 lg:border-l-4 shadow {{border_color}} my-3 py-3 px-4 rounded-md">
3
3
  <p class="my-0 items-center flex gap-1.5 text-lg font-bold {{text_color}}">
4
- {% include {{file_name}} %}{% t alerts.{{type}} %}
4
+ {% include {{file_name}} %}{{ site.data.locale.alerts[type] }}
5
5
  </p>
6
6
  <span class="font-semibold">{{content}}</span>
7
7
  </div>
8
+
@@ -4,7 +4,7 @@
4
4
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="11" height="11" class="inline-block">
5
5
  <path fill="currentColor" d="M18 10V6A6 6 0 0 0 6 6v4H3v14h18V10h-3zM8 6c0-2.206 1.794-4 4-4s4 1.794 4 4v4H8V6zm11 16H5V12h14v10z"></path>
6
6
  </svg>
7
- {% t auth_data.authorizations %}
7
+ {{ site.data.locale.auth_data.authorizations }}
8
8
  </span>
9
9
  {% collapse_hidden_content %}
10
10
  {% for data in auth_data %}
@@ -21,7 +21,7 @@
21
21
  <path d="m19 19-3.5-3.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
22
22
  <circle cx="11" cy="11" r="6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></circle>
23
23
  </svg>
24
- <span>{% t header.search %}</span>
24
+ <span>{{ site.data.locale.header.search }}</span>
25
25
  </button>
26
26
  </div>
27
27
  <div class="hidden md:flex justify-center lg:justify-end">
@@ -71,7 +71,7 @@
71
71
  x-transition:leave-start="opacity-100"
72
72
  x-transition:leave-end="opacity-0"
73
73
  class="sidebar-toc z-40 p-4 w-full h-full overflow-y-auto fixed top-32 bg-white dark:bg-neutral-950 md:right-0 md:border-l md:border-l-gray-10 md:dark:border-l-neutral-800 md:w-full md:max-w-[22ch] md:top-16 md:block md:opacity-100">
74
- <h1 class="mb-1 uppercase font-normal dark:text-gray-200 text-gray-400 text-sm">{% t header.this_page %}</h1>
74
+ <h1 class="mb-1 uppercase font-normal dark:text-gray-200 text-gray-400 text-sm">{{ site.data.locale.header.this_page }}</h1>
75
75
  {{ content | toc_only }}
76
76
  </section>
77
77
  </div>
@@ -1,13 +1,13 @@
1
1
  <div class="mx-4 my-8 grid h-16 grid-cols-2 gap-8">
2
2
  {% if previous_doc %}
3
3
  <a href="{{ site.baseurl }}{{previous_doc.url}}" class="col-start-1 ring-1 no-underline ring-gray-200 hover:ring-gray-500 hover:ring-2 dark:ring-gray-500 dark:hover:ring-gray-200 rounded-lg p-2">
4
- <p class="m-0 text-gray-400">{% t navigation_wizard.back %}</p>
4
+ <p class="m-0 text-gray-400">{{ site.data.locale.navigation_wizard.back }}</p>
5
5
  <span>{{ previous_doc.title }}</span>
6
6
  </a>
7
7
  {% endif %}
8
8
  {% if next_doc %}
9
9
  <a href="{{ site.baseurl }}{{next_doc.url}}" class="col-start-2 ring-1 no-underline ring-gray-200 hover:ring-gray-500 hover:ring-2 dark:ring-gray-500 dark:hover:ring-gray-200 rounded-lg p-2 text-right">
10
- <p class="m-0 text-gray-400">{% t navigation_wizard.forward %}</p>
10
+ <p class="m-0 text-gray-400">{{ site.data.locale.navigation_wizard.forward }}</p>
11
11
  <span>{{ next_doc.title }}</span>
12
12
  </a>
13
13
  {% endif %}
@@ -5,7 +5,7 @@
5
5
  <i class="ml-2 arrow right" :class="{ down: Alpine.store('{{include.name}}Open'), right: !Alpine.store('{{include.name}}Open')}"></i>
6
6
  {% endif %}
7
7
  {% if include.item_required or include.param_required %}
8
- <p class='pt-2 text-xs text-red-500'>{% t params.card.required %}</p>
8
+ <p class='pt-2 text-xs text-red-500'>{{ site.data.locale.params.card.required }}</p>
9
9
  {% endif %}
10
10
  </div>
11
11
  <div class="py-2 border-b mix-blend-multiply dark:mix-blend-screen dark:border-neutral-700 w-2/3">
@@ -1,13 +1,13 @@
1
1
  <div class="text-neutral-200 rounded-lg truncate bg-neutral-700 shadow">
2
2
  <div class="flex justify-between px-6 py-3 font-semibold text-xl items-center">
3
- <span>{% t request.body_example.example %}</span>
3
+ <span>{{ site.data.locale.request.body_example.example }}</span>
4
4
  <button type="button" onclick="copyToClipboard()" class="overflow-hidden font-medium">
5
5
  <span aria-hidden="false" class="text-sm flex items-center hover:bg-neutral-800/25 active:bg-neutral-800 pr-1 py-0.5 rounded-md">
6
6
  <svg viewBox="0 0 20 20" aria-hidden="true" class="h-5 w-5 fill-neutral-700 stroke-white">
7
7
  <path stroke-width="0" d="M5.5 13.5v-5a2 2 0 0 1 2-2l.447-.894A2 2 0 0 1 9.737 4.5h.527a2 2 0 0 1 1.789 1.106l.447.894a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-5a2 2 0 0 1-2-2Z"></path>
8
8
  <path fill="none" stroke-linejoin="round" d="M12.5 6.5a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-5a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2m5 0-.447-.894a2 2 0 0 0-1.79-1.106h-.527a2 2 0 0 0-1.789 1.106L7.5 6.5m5 0-1 1h-3l-1-1"></path>
9
9
  </svg>
10
- {% t request.body_example.copy %}
10
+ {{ site.data.locale.request.body_example.copy }}
11
11
  </span>
12
12
  </button>
13
13
  </div>
@@ -4,7 +4,7 @@
4
4
  {% assign cookie = content.parameters | where: 'in', 'cookie' %}
5
5
 
6
6
  {% if path != empty %}
7
- <p class="text-xl py-3 font-semibold">{% t request.list.path_params %}</p>
7
+ <p class="text-xl py-3 font-semibold">{{ site.data.locale.request.list.path_params }}</p>
8
8
  <ul class="mb-5 px-2">
9
9
  {% for param in path %}
10
10
  <li class="dark:border-neutral-800">
@@ -15,7 +15,7 @@
15
15
  {% endif %}
16
16
 
17
17
  {% if query != empty %}
18
- <p class="text-xl py-3 font-semibold">{% t request.list.query_params %}</p>
18
+ <p class="text-xl py-3 font-semibold">{{ site.request.list.query_params }}</p>
19
19
  <ul class="mb-5 px-2">
20
20
  {% for param in query %}
21
21
  <li class="dark:border-neutral-800">
@@ -26,7 +26,7 @@
26
26
  {% endif %}
27
27
 
28
28
  {% if header != empty %}
29
- <p class="text-xl py-3 font-semibold">{% t request.list.header_params %}</p>
29
+ <p class="text-xl py-3 font-semibold">{{ site.data.locale.request.list.header_params }}</p>
30
30
  <ul class="mb-5 px-2">
31
31
  {% for param in header %}
32
32
  <li class="dark:border-neutral-800">
@@ -37,7 +37,7 @@
37
37
  {% endif %}
38
38
 
39
39
  {% if cookie != empty %}
40
- <p class="text-xl py-3 font-semibold">{% t request.list.cookie_params %}</p>
40
+ <p class="text-xl py-3 font-semibold">{{ site.data.locale.request.list.cookie_params }}</p>
41
41
  <ul class="mb-5 px-2">
42
42
  {% for param in cookie %}
43
43
  <li class="dark:border-neutral-800">
@@ -5,7 +5,7 @@
5
5
  <thead>
6
6
  <tr>
7
7
  <th colspan='2' class='border-b dark:border-neutral-800 bg-neutral-100 dark:bg-neutral-800 font-medium py-3 dark:text-slate-200 text-left'>
8
- <p class="text-xl pl-6 font-semibold">{% t response.table.responses %}</p>
8
+ <p class="text-xl pl-6 font-semibold">{{ site.data.locale.response.table.responses }}</p>
9
9
  </th>
10
10
  </tr>
11
11
  </thead>
@@ -14,10 +14,10 @@
14
14
  <p class="text-xl pb-2 font-semibold">
15
15
  {{ include.title | default: "Schema" }}
16
16
  {% if include.request_required %}
17
- <i class='pt-2 text-xs text-red-500'>{% t schema.table.required %}</i>
17
+ <i class='pt-2 text-xs text-red-500'>{{ site.data.locale.schema.table.required }}</i>
18
18
  {% endif %}
19
19
  </p>
20
- <p class="italic">{% t schema.table.content_type %}: {{ include.type }}</p>
20
+ <p class="italic">{{ site.data.locale.schema.table.content_type }}: {{ include.type }}</p>
21
21
  </th>
22
22
  </tr>
23
23
  </thead>
@@ -1,6 +1,6 @@
1
1
  <div id="buttonmodal" class="bg-black/50 fixed hidden top-0 justify-center z-50 w-full h-full">
2
2
  <div class="modal pt-32 h-32 w-1/3">
3
- <input type="text" placeholder="{% t search_modal.search %}" onfocus="this.value=''" name="search" id="searchInput" class="bg-neutral-100 w-full block rounded-md text-left px-4 py-1.5 outline-none shadow-md text-neutral-500">
3
+ <input type="text" placeholder="{{ site.data.locale.search_modal.search }}" onfocus="this.value=''" name="search" id="searchInput" class="bg-neutral-100 w-full block rounded-md text-left px-4 py-1.5 outline-none shadow-md text-neutral-500">
4
4
  <div class="pt-1" id="searchResults">
5
5
  </div>
6
6
  </div>
@@ -3141,6 +3141,10 @@ div.mermaid{
3141
3141
  visibility: visible;
3142
3142
  }
3143
3143
 
3144
+ .invisible{
3145
+ visibility: hidden;
3146
+ }
3147
+
3144
3148
  .collapse{
3145
3149
  visibility: collapse;
3146
3150
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iugu-docs-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Negri
@@ -81,7 +81,7 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: jekyll-multiple-languages-plugin
84
+ name: jekyll-polyglot
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
@@ -133,6 +133,8 @@ files:
133
133
  - README.md
134
134
  - _config.yml
135
135
  - _data/contentful/spaces/iugu.yaml
136
+ - _data/en/locale.yml
137
+ - _data/locale.yml
136
138
  - _data/method-colors.yml
137
139
  - _includes/alert.liquid
138
140
  - _includes/auth_data.liquid