Skip to content

Commit 82c931e

Browse files
traducciones
1 parent 11844d1 commit 82c931e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

_includes/item/child/compound-item-download-buttons.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
{%- endcomment -%}
88
<div class="btn-group my-3" role="group" aria-label="Item options">
99
{% if page.object_transcript %}<button class="btn btn-outline-primary" type="button" data-bs-toggle="collapse" data-bs-target="#collapseTranscript" aria-expanded="false" aria-controls="collapseExample">Transcripción</button>{% endif %}
10+
{% if page.traduccion %}<button class="btn btn-outline-primary" type="button" data-bs-toggle="collapse" data-bs-target="#collapseTraduccion" aria-expanded="false" aria-controls="collapseExample">Traducción</button>{% endif %}
1011
{% if page.date %}{%- capture year -%}{% if page.date contains "-" %}{{ page.date | split: "-" | first }}{% elsif page.date contains "/" %}{{ page.date | split: "/" | last }}{% else %}{{ page.date }}{% endif %}{%- endcapture -%}
1112
<a href="{{ year | strip | prepend: '/timeline.html#y' | relative_url }}" class="btn btn-outline-primary">Ver en la cronología</a>{% endif %}
1213
{% if page.latitude and page.longitude %}
@@ -44,4 +45,18 @@
4445
{% endif %}
4546
</div>
4647
</div>
48+
{% endif %}
49+
{% if page.traduccion %}
50+
<div class="collapse mt-3" id="collapseTraduccion">
51+
<div class="card card-body text-start">
52+
{% assign traduccion_type = page.traduccion | slice: 0,1 %}
53+
{% if traduccion_type == '/' %}
54+
{% assign traduccion_location = page.traduccion | remove_first: '/' %}
55+
{% assign traduccion = site.pages | where: 'path', traduccion_location | first %}
56+
{{ traduccion.content | markdownify }}
57+
{% else %}
58+
{{ page.traduccion | markdownify }}
59+
{% endif %}
60+
</div>
61+
</div>
4762
{% endif %}

0 commit comments

Comments
 (0)