Skip to content

Commit

Permalink
Menu catégories
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaden ACHAIN committed Nov 29, 2024
1 parent e08657b commit 9b3da9b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 17 deletions.
6 changes: 5 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ plugins:
- jekyll-feed
- jekyll-sitemap
- jekyll-seo-tag
- jekyll-date-localization

# Permalink
permalink: ":categories/:title/"
Expand All @@ -66,7 +67,10 @@ compress_html:
clippings: all

# I18n
date_locale: fr
date_locale: "fr"

locales: ["fr"]
locale: "fr"

# Defaults
defaults:
Expand Down
32 changes: 16 additions & 16 deletions _includes/dropdown.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{% assign items_categories = "Fiche,Réflexion,Recherche,Écriture" | split: "," %}

{% assign categories = site.categories %}

<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link">
MORE
</a>
<div class="navbar-dropdown has-background-black is-left">
{% for sitepage in site.html_pages %}
{% unless sitepage.url == '/' or sitepage.url == '/404' or sitepage.url == '/blog' %}
<a href="{{sitepage.url | absolute_url}}"
class="navbar-item has-text-grey-light {% if page.url == sitepage.url | absolute_url %}is-active{% endif %}">
{{sitepage.title}}
<a class="navbar-link">
Catégories
</a>
<div class="navbar-dropdown has-background-black is-left">
{% for category in categories %}
{% if category %}
<a href="{{site.baseurl}}/{{category | slugify: 'latin'}}"
class="navbar-item">
{{category}}
</a>
{% endunless %}
{% endfor %}
<!-- <hr class="navbar-divider">
<a class="navbar-item">
Report an issue
</a> -->
</div>
{% endif %}
{% endfor %}
</div>
</div>
1 change: 1 addition & 0 deletions _includes/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
</div> -->
<!-- navbar items | right side -->
<div class="navbar-end">
{% include dropdown.html %}
<a class="navbar-item" href="{{site.url}}{{site.baseurl}}/carte-lyon">Carte de Lyon</a>
<a class="navbar-item" href="{{site.url}}{{site.baseurl}}/dictionnaire">Dictionnaire</a>
<a class="navbar-item" href="{{site.url}}{{site.baseurl}}/calendrier">Calendrier</a>
Expand Down

0 comments on commit 9b3da9b

Please sign in to comment.