Skip to content

Conversation

@ldez
Copy link
Contributor

@ldez ldez commented Aug 24, 2025

As the item has a parameter icon, it must be handled before icon only item.
To avoid repetition, I moved the code related to links into a dedicated partial.
I made a commit only for that; it can help the review.

The icon is supported for "normal" link and "menu" (parent/children) links.

Screenshot 2025-08-24 at 18-06-20 Introduction – Hextra Screenshot 2025-08-24 at 18-05-30 Introduction – Hextra

Closes #359

@netlify
Copy link

netlify bot commented Aug 24, 2025

Deploy Preview for hugo-hextra ready!

Name Link
🔨 Latest commit 4c9b2ce
🔍 Latest deploy log https://app.netlify.com/projects/hugo-hextra/deploys/68ab8322e07f650008d207c7
😎 Deploy Preview https://deploy-preview-781--hugo-hextra.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ldez ldez force-pushed the feat/navbar-link-icon-item branch from e20bf84 to 11f7b5f Compare August 24, 2025 16:04
Copy link
Owner

@imfing imfing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. did some minor alignment adjustments.

Image

@ldez
Copy link
Contributor Author

ldez commented Aug 24, 2025

Do you want me to add some icons to the example site?

ldez and others added 2 commits August 24, 2025 23:07
@imfing
Copy link
Owner

imfing commented Aug 24, 2025

Do you want me to add some icons to the example site?

sure, we can do this for one nested + one regular, too many icons might be overwhelming.

diff --git a/exampleSite/hugo.yaml b/exampleSite/hugo.yaml
index 79ecca0..e72889b 100644
--- a/exampleSite/hugo.yaml
+++ b/exampleSite/hugo.yaml
@@ -85,6 +85,9 @@ menu:
       name: Showcase
       pageRef: /showcase
       weight: 5
+      params:
+        icon: collection
+        type: link
     - name: Search
       weight: 6
       params:
@@ -98,6 +101,9 @@ menu:
       name: Development ↗
       url: https://imfing.github.io/hextra/versions/latest/
       parent: versions
+      params:
+        icon: beaker
+        type: link
     - identifier: v0.9
       name: v0.9 ↗
       url: https://imfing.github.io/hextra/versions/v0.9/

@imfing imfing merged commit fee0481 into imfing:main Aug 24, 2025
4 checks passed
@ldez ldez deleted the feat/navbar-link-icon-item branch August 24, 2025 21:46
@imfing imfing mentioned this pull request Aug 25, 2025
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants