Skip to content

Commit

Permalink
Merge pull request #260 from ansforge/manage_versions
Browse files Browse the repository at this point in the history
update menu version and menu yaml
  • Loading branch information
zilliw authored Dec 16, 2024
2 parents 2b17f0b + d31831e commit 63b8fe0
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 60 deletions.
6 changes: 3 additions & 3 deletions docs/_data/menu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ header:
url: /pages/guide/version-1/integration-fhir/integration-dotnet.html
- title: Utilisation de PHP
url: /pages/guide/version-1/integration-fhir/integration-php.html

- title: Ressources
url: /pages/guide/version-1/resources/practitioner.html
subfolderitems:
Expand All @@ -44,15 +44,15 @@ header:
url: /pages/guide/version-1/resources/device.html
- title: SearchParameter
url: /pages/guide/version-1/resources/search-params.html

- title: Techniques avancées
url: /pages/guide/version-1/advanced/link.html
subfolderitems:
- title: Lier plusieurs ressources
url: /pages/guide/version-1/advanced/link.html
- title: Stockage
url: /pages/guide/version-1/advanced/storage.html

- title: Version 2
url: /pages/guide/version-2/getting-started/introduction.html
subfolderitems:
Expand Down
39 changes: 9 additions & 30 deletions docs/_layouts/menu-version-1.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
---
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 version_1_menu = site.data.menu.header | where: "title", "Guides" | first %}
{% assign v1_menu = version_1_menu.subfolderitems | where: "page", "Version 1" | first %}

{% assign guides_menu = site.data.menu.header | where: "title", "Guides" | first %}
{% assign version_1_menu = guides_menu.subfolderitems | where: "title", "Version 1" | first %}

<!-- Titre de la version -->
<li class="nav-item common-nav-item">
<a>{{ v1_menu.title }}</a>
<ul class="navbar-nav nav-lvl-1">
{% for item in v1_menu.subfolderitems %}
<a href="{{ version_1_menu.url | relative_url }}">{{ version_1_menu.title }}</a>
<ul class="navbar-nav nav-lvl-2">
{% for item in version_1_menu.subfolderitems %}
<li class="nav-item common-nav-item">
<a>{{ item.title }}</a>
<a href="{{ item.url | relative_url }}">{{ item.title }}</a>
{% if item.subfolderitems %}
<ul class="navbar-nav nav-lvl-2">
<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>
Expand All @@ -27,22 +25,3 @@
</li>
</ul>
</div>
<div class="col">
<main>
<div class="container container-content">
<!-- Ajout du sous-titre si défini -->
{%- if page.subTitle -%}
<p class="sub-title">{{ page.subTitle }}</p>
{%- endif -%}

<!-- Titre de la page -->
<h1 class="page-heading">{{ page.title }}</h1>

<!-- Contenu principal -->
{{ content }}

<!-- Inclusion du composant suivant -->
{% include next-resource.html %}
</div>
</main>
</div>
36 changes: 9 additions & 27 deletions docs/_layouts/menu-version-2.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@
---
<div id="sidebar-container" class="sidebar-expanded col-3 d-none d-md-block left-menu">
<ul class="navbar-nav nav-lvl-1">
{% assign version_2_menu = site.data.menu.header | where: "title", "Guides" | first %}
{% assign v2_menu = version_2_menu.subfolderitems | where: "page", "Version 2" | first %}

{% 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>{{ v2_menu.title }}</a>
<ul class="navbar-nav nav-lvl-1">
{% for item in v2_menu.subfolderitems %}
<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 %}
<li class="nav-item common-nav-item">
<a>{{ item.title }}</a>
<a href="{{ item.url | relative_url }}">{{ item.title }}</a>
{% if item.subfolderitems %}
<ul class="navbar-nav nav-lvl-2">
<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>
Expand All @@ -27,22 +28,3 @@
</li>
</ul>
</div>
<div class="col">
<main>
<div class="container container-content">
<!-- Ajout du sous-titre si défini -->
{%- if page.subTitle -%}
<p class="sub-title">{{ page.subTitle }}</p>
{%- endif -%}

<!-- Titre de la page -->
<h1 class="page-heading">{{ page.title }}</h1>

<!-- Contenu principal -->
{{ content }}

<!-- Inclusion du composant suivant -->
{% include next-resource.html %}
</div>
</main>
</div>
1 change: 1 addition & 0 deletions docs/pages/guide/version-2/getting-started/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: menu-version-1
title: Introduction
subTitle: Démarrage rapide
version: v2
---

### Introduction
Expand Down

0 comments on commit 63b8fe0

Please sign in to comment.