Giter VIP home page Giter VIP logo

kirby-navigation's People

Contributors

afbora avatar chrisbeluga avatar luigimannoni avatar malunopeleke avatar ronaldtorres avatar sean-oshea avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kirby-navigation's Issues

Relative Links and Multi Lang Menus

I prepared my menu locally with a different domain and ended up with non working links after deploying.

I tried to solve it in my template something like this: $navigation->id() ?? $navigation->url() but for external links id() is an index number, so that's not working. (I guess one could test against the current host)

Is there a better way to work around that?

And how to handle multi lang menus? Building two?

Target for custom links

Hello,

first of all nice Plugin!

We are currently looking into using this plugin for a client-project. The only thing we would love to see changed or change ourselfs is the option to define a target for custom links.

4.0 Compatibility

Currently the plugin is not compatible with 4.0 (as of writing this issue: Beta 1):

The API route isn't working
image

The select isn't styled correctly
image

Aria-current ?

Can you add this:

<?php e($navigation->isOpen(), ' aria-current') ?>

Thank you.

Info on how to require this package using composer?

Hi, I am using a docker container with an automated composer install on build, I am trying to avoid git cloning on my container to keep the image size at a minimum size (I have a very limited hosting space) so I'd like to install this package through composer like I did with other plugins, I tried the follow to no avail, and wondering if the package naming is actually correct.

bash-5.1# composer require chrisbeluga/kirby-navigation

In PackageDiscoveryTrait.php line 364:
                                                                                                                                                                                                                  
  Could not find a matching version of package chrisbeluga/kirby-navigation. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-sta  
  bility (stable).                                                                                                                                                                                                
                                                                                                                                                                                                                  

bash-5.1# composer require chrisbeluga/kirby-navigation@^3.0

In PackageDiscoveryTrait.php line 364:
                                                                                                                                                                                                                  
  Could not find a matching version of package chrisbeluga/kirby-navigation@^3.0. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimu  
  m-stability (stable).                                                                                                                                                                                           
                                                                                                                                                                                                                 

The readme on the repo doesn't have any instructions and I've seen in the closed issues someone mentioned for composer support since v1, but I am yet to figure out what is the package name.

Thanks!

Third level menu display

Hello

How is it possible to display a submenu within a submenu?
I'm using the menu as below but I also need a submenu within the <ul class="menu vertical nested">

  <div id="responsive-menu">
    <div class="top-bar">
      <ul class="dropdown vertical medium-horizontal menu" data-responsive-menu="drilldown medium-dropdown" data-auto-height="true" data-animate-height="true">
      <?php foreach($site->mainnavigation()->toStructure() as $navigation): ?>
        <li><a aria-label="<?php echo $navigation->text() ?>" href="<?php echo $navigation->url(); ?>"><?php echo $navigation->text() ?></a>
          <?php if($navigation->children()->isNotEmpty()): ?>
            <ul class="menu vertical nested">
              <?php foreach($navigation->children()->toStructure() as $children): ?>
                <li><a aria-label="<?php echo $children->text() ?>" href="<?php echo $children->url() ?>"><?php echo $children->text() ?></a></li>
              <?php endforeach ?>
            </ul>
          <?php endif ?>
        </li>
      <?php endforeach ?>
    </ul>
    </div>

Thanks for your help

Highlight active menu item

Hey,

thanks for the awesome plugin.
Is it possible to highlight the active menu item?

I use:

<?php foreach($site->navigation()->toStructure() as $navigation): ?>
  <li>
    <a <?php e($navigation->isOpen(), 'aria-current') ?> id="<?php echo $navigation->id() ?>"  href="<?php echo $navigation->url(); ?>" <?php echo $navigation->popup()->toBool() ? 'rel="noopener noreferrer" target="_blank"' : '' ?>>
  <?php echo $navigation->text() ?>
    </a>
  </li>
 <?php endforeach ?>

and insert in the a-Tag this

<?php e($navigation->isOpen(), 'aria-current') ?>

Than all items are highlighted.
What am I doing wrong?

Thanks for your help!

Composer install doesn't work

I tried to add it in a section of a tab like this but got a message that navigation is not n available section type:

      - width: 1/2
        sections:
          navigation:
            label: Navigation
            type: navigation
            levels: 5
            help: Description of menu or where it is used

I am using Kirby 3.6.0-beta.1 and kirby-navigation 2.0.0 via composer.

Navigation Items appear blank with Kirby 3.6

Hi
I have been using your navigation plugin with Kirby 3.5 and it works perfectly.
I'm just trying it out with Kirby 3.6 and I get no titles or no ability to edit each navigation item, as per the attached image.
Is there anything I need to do to get this working again?
kirby-navigation-plugin

Many Thanks

Would Multiple Menus Be Possible?

Hi, I would like to create multiple different menus for a website I am building, would this be something that is possible with your plugin?
I normally have the main menu and footer menu for privacy and terms of use pages and then a sitemap menu which is a list of all pages on the website.

Kirby 3.7 issue

Kirby version: 3.7.0.1
kirby-navigation version: 2.1.2

This plug-in seem to have a Kirby 3.7 issue. When adding new "Kirby Link" item, the page selection modal is blank

Screenshot 2022-06-30 121112

No errors in browser console (Microsoft Edge and Firefox) nor in Kirby logs

Install via Composer

Hi,

do you plan to publish it as an composer package?
Would be awesome and much easier to install/update.

Thank your for your work.
This is a super helpful plugin.

UI/UX Improvement Suggestion

The current implementation for the details modal has this footer right here with the remove button on the bottom right which is where kirby usually has the button to confirm the changes.

Screenshot 2022-08-01 at 10 46 35 AM

Since this is similar in spirit to the structure form I'd suggest you implement something more similar to the footer for the structure field entry so confirm button on the bottom right and a discard changes to the left. This is because muscle memory inside the panel makes it so that you immediately go in the bottom right to confirm the changes.

Screenshot 2022-08-01 at 10 47 45 AM

The delete action is already present in the dropdown menu so I don't think it is necessary to have it in the edit modal.

Screenshot 2022-08-01 at 10 46 45 AM

Make open/close more easy Double click to open and close menu item

Thank you for the great plugin, it already helped a lot with menu building and replaced my previous setup using structure fields nested inside structure fields ❤️

It might be on purpose that the label is not edible inline and expanded only by click in menu (three dots + edit).
But actually it is very cumbersome to edit multiple menu entries this way.

Please consider the following suggestions:

  1. Add double click to open and close the menu item again (still two clicks but without mouse movement in between)
  2. Move the "edit" button out of the options dropdown menus directly into the menu item head next to the three dots (only one instead of two clicks)
  3. Leave duplicate and delete in the options dropdown and remove the bottom bar when toggled open completely

Also I wanted to note that the open and close icons are misleading in my opinion (looks like add and delete when considering the icon usage in other aspects of Kirby)
So I would suggest to use pencil icon to edit/open + check for closing or toggle the up / down icons in the bar (like in most accordions)

Bildschirmfoto von 2021-11-02 16-11-52

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.