Skip to content

Commit

Permalink
Merge pull request #268 from ansforge/manage_versions
Browse files Browse the repository at this point in the history
add version 2
  • Loading branch information
zilliw authored Dec 16, 2024
2 parents 58fdb7a + e191093 commit acbb2df
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 30 deletions.
7 changes: 7 additions & 0 deletions docs/_data/menu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ header:
- page: Stockage
url: /pages/guide/version-1/advanced/storage.html
title: Stockage
- page: Version 2
url: /pages/guide/version-1/getting-started/introduction.html
title: Version 2
subfolderitems:
- page: Démarrage rapide
url: /pages/guide/version-2/getting-started/introduction.html
title: Démarrage rapide
- title: Cas d'utilisation
subfolderitems:
- page: Synchronisation complète
Expand Down
4 changes: 2 additions & 2 deletions docs/_layouts/documentation.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
<!-- ---
layout: base
---
<div class="row no-gutters">
Expand Down Expand Up @@ -39,4 +39,4 @@ <h1 class="page-heading">{{ page.title }}</h1>
</div>
</main>
</div>
</div>
</div> -->
73 changes: 49 additions & 24 deletions docs/_layouts/menu-version-2.html
Original file line number Diff line number Diff line change
@@ -1,30 +1,55 @@
---
layout: base
---
<div id="sidebar-container" class="sidebar-expanded col-3 d-none d-md-block left-menu">
<ul class="navbar-nav nav-lvl-1">
{% assign guides_menu = site.data.menu.header | where: "title", "Guides" | first %}
{% assign version_2_menu = guides_menu.subfolderitems | where: "title", "Version 2" | first %}

<!-- Titre de la version -->
<li class="nav-item common-nav-item">
<a href="{{ version_2_menu.url | relative_url }}">{{ version_2_menu.title }}</a>
<ul class="navbar-nav nav-lvl-2">
{% for item in version_2_menu.subfolderitems %}
<div class="row no-gutters">
<div id="sidebar-container" class="sidebar-expanded col-3 d-none d-md-block left-menu">
<ul class="navbar-nav nav-lvl-1">
{% assign guides_menu = site.data.menu.header | where: "title", "Guides" | first %}
{% if guides_menu %}
{% assign version_2_menu = guides_menu.subfolderitems | where: "page", "Version 2" | first %}
{% if version_2_menu %}
<li class="nav-item common-nav-item">
<a href="{{ item.url | relative_url }}">{{ item.title }}</a>
{% if item.subfolderitems %}
<ul class="navbar-nav nav-lvl-3">
{% for subitem in item.subfolderitems %}
<li class="nav-item common-nav-item {% if subitem.url == page.url %}active{% endif %}">
<a href="{{ subitem.url | relative_url }}">{{ subitem.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
<a>{{ version_2_menu.page }}</a>
<ul class="navbar-nav nav-lvl-1">
{% for item in version_2_menu.subfolderitems %}
<li class="nav-item common-nav-item">
<a href="{{ item.url | relative_url }}">{{ item.title }}</a>
{% if item.subfolderitems %}
<ul class="navbar-nav nav-lvl-2">
{% for subitem in item.subfolderitems %}
<li class="nav-item common-nav-item {% if subitem.url == page.url %}active{% endif %}">
<a href="{{ subitem.url | relative_url }}">{{ subitem.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
</li>
</ul>
{% else %}
<li>Erreur : Menu "Version 2" introuvable.</li>
{% endif %}
{% else %}
<li>Erreur : Menu principal "Guides" introuvable.</li>
{% endif %}
</ul>
</div>
<div class="col">
<main>
<div class="container container-content">
{%- if page.title -%}
{%- if page.subTitle -%}
<p class="sub-title">{{ page.subTitle }}</p>
{%- endif -%}
<h1 class="page-heading">{{ page.title }}</h1>
{%- endif -%}

<!-- Inclusion du contenu principal -->
{{ content }}

{% include next-resource.html %}
</div>
</main>
</div>
</div>
2 changes: 1 addition & 1 deletion docs/pages/guide/version-2/getting-started/api-basics.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: menu-version-1
layout: menu-version-2
title: Bases de l'API
subTitle: Démarrage rapide
---
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/guide/version-2/getting-started/get-api-key.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: menu-version-1
layout: menu-version-2
title: Obtenir une clé API
subTitle: Démarrage rapide
---
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/guide/version-2/getting-started/introduction.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: menu-version-1
layout: menu-version-2
title: Introduction
subTitle: Démarrage rapide
---
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/guide/version-2/getting-started/test-api.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: menu-version-1
layout: menu-version-2
title: Tester l'API
subTitle: Démarrage rapide
---
Expand Down

0 comments on commit acbb2df

Please sign in to comment.