Skip to content

Commit

Permalink
Split languages and simplify selection
Browse files Browse the repository at this point in the history
  • Loading branch information
olanod committed Jul 12, 2024
1 parent a86b2a6 commit a9d164a
Show file tree
Hide file tree
Showing 14 changed files with 643 additions and 632 deletions.
3 changes: 1 addition & 2 deletions _cobalt_en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ site:
base_url: https://virto.network/en
data:
lang: en
t: _data/tr.yml
calendly: https://calendly.com/katherinelopezvirto/45min
apply: https://apply.virto.network/
pages:
Expand All @@ -17,4 +16,4 @@ posts:
dir: blog
rss: rss.xml
default:
layout: post.liquid
layout: post.liquid
2 changes: 0 additions & 2 deletions _cobalt_es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ destination: ./_site/es
site:
description: Tu billetera multimoneda para gestionar fondos en grupo y tomar decisiones rápidas mediante un sistema de votación.
base_url: https://virto.network/es

data:
lang: es
t: _data/trans.yml
calendly: https://calendly.com/katherinelopezvirto/45min
apply: https://apply.virto.network/
pages:
Expand Down
306 changes: 306 additions & 0 deletions _data/en.yml

Large diffs are not rendered by default.

307 changes: 307 additions & 0 deletions _data/es.yml

Large diffs are not rendered by default.

614 changes: 0 additions & 614 deletions _data/tr.yml

This file was deleted.

Binary file removed _includes/.DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions _includes/footer.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
</a>
<nav>
<ul class="nav-links bolder">
{% for footer in site.data.tr[site.data.lang].footer %}
{% for footer in site.data[site.data.lang].footer %}
<li><a href={{ footer.route }} >{{ footer.link }}</a></li>
{% endfor %}
</ul>
</nav>
<a id="scroll-up" class="scroll-up-link lightest-lavender-text center-arrow">{{ site.data.tr[site.data.lang].globals.go-up }}
<a id="scroll-up" class="scroll-up-link lightest-lavender-text center-arrow">{{ site.data[site.data.lang].globals.go-up }}
<figure class="link-arrow">
{% include "up.svg" %}
</figure>
Expand Down
6 changes: 3 additions & 3 deletions _includes/nav.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<a class="menu-item" href="/" id="virto-logo" role="menuitem" aria-label="Inicio">
{% include "virto_logo.svg" %}
</a>
{% for nav in site.data.tr[site.data.lang].nav %}
{% for nav in site.data[site.data.lang].nav %}
<a class="{{ nav.class }} {% if page.data.route == '{{ nav.route }}'%}current{% endif %}" href={{ nav.route }} role="menuitem" aria-label={{ nav.link }}>
{{ nav.link }}
</a>
Expand All @@ -23,7 +23,7 @@
</a>
<nav id="menu-dropdown" aria-label="Secundaria">
<a id="close-menu" class="close-menu" aria-label="Cerrar menú"></a>
{% for nav in site.data.tr[site.data.lang].nav %}
{% for nav in site.data[site.data.lang].nav %}
<a class="{{ nav.class }} {% if page.data.route == '{{ nav.route }}'%}current{% endif %}" href={{ nav.route }} role="menuitem" aria-label={{ nav.link }}>
{{ nav.link }}
</a>
Expand Down Expand Up @@ -53,4 +53,4 @@ document.addEventListener('DOMContentLoaded', function() {
});
});
});
</script>
</script>
4 changes: 2 additions & 2 deletions _layouts/index.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<div id="modal-message" class="center"></div>
</dialog>
<main>{{ page.content }}</main>
<a href="#footer" class="scroll-down-link white-text center-arrow"> {{ site.data.tr[site.data.lang].globals.go-down }}
<a href="#footer" class="scroll-down-link white-text center-arrow"> {{ site.data[site.data.lang].globals.go-down }}
<figure class="link-arrow">
{% include "down.svg" %}
</figure>
Expand Down Expand Up @@ -109,4 +109,4 @@ mailForm.addEventListener('submit', async (event) => {
</script>
</body>
</html>
</html>
4 changes: 2 additions & 2 deletions about.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ section > article {
</style>
<body>
{% for about in site.data.tr[site.data.lang].about_us %}
{% for about in site.data[site.data.lang].about_us %}

<section {% if about.id == "hero" %} id="hero" class="left dark-olive-text">
<article class="animated">
Expand Down Expand Up @@ -223,4 +223,4 @@ section > article {
{% endif %}

{% endfor %}
</body>
</body>
4 changes: 2 additions & 2 deletions index.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ data:
route: /
---

{% for home_section in site.data.tr[site.data.lang].home_sections %}
{% for home_section in site.data[site.data.lang].home_sections %}
<section {% if home_section.id == "home" %} id="home">
<article class="max animated">
<div class="text-section lightest-lavender-text">
Expand Down Expand Up @@ -204,4 +204,4 @@ questionButtons.forEach(button => {
});
});
</script>
</script>
15 changes: 15 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
lang := "es" # for english run `just *command* lang=en`

# default
build-all:
lang=es just build
lang=en just build

build: clean
cobalt build --config _cobalt_{{ lang }}.yml

clean:
cobalt clean --config _cobalt_{{ lang }}.yml

serve:
cobalt serve --config _cobalt_{{ lang }}.yml
2 changes: 1 addition & 1 deletion services.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ section {
</style>

{% for service in site.data.tr[site.data.lang].services %}
{% for service in site.data[site.data.lang].services %}
<section {% if service.id == "intro" %} id="intro" class="services-section">
<article class="services-section__content max animated">
<div class="text-section lightest-lavender-text">
Expand Down
4 changes: 2 additions & 2 deletions usecases.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ article h3 a {
}
</style>

{% for use_case in site.data.tr[site.data.lang].use_cases %}
{% for use_case in site.data[site.data.lang].use_cases %}
<section {% if use_case.id == "hero" %} id="hero" class="white-bg" >
<article class="animated">
<h1 class="dark-lavender-text">{{ use_case.title }}</h1>
Expand Down Expand Up @@ -183,4 +183,4 @@ document.addEventListener("DOMContentLoaded", function() {
}
});
});
</script>
</script>

0 comments on commit a9d164a

Please sign in to comment.