Giter Site home page Giter Site logo

phoenix-active-link's Issues

Add ability to set different tags for wrapper vs link

Bootstrap expects active links like this

<li class="nav-item active">
  <a class="nav-link" href="/about">About</a>
</li>

But when you set the active tag like this

<%= active_link(@conn, "About", to: page_path(@conn, :about), wrap_tag: :li, class_active: "active nav-item", class_inactive: "nav-item") %>

The output isn't correct. I want apply nav-link to the inner link and no other classes.

<li class="active nav-item">
  <a class="active nav-item" href="/about">About</a>
</li>

Pass options forward to link

I have a use case where I need to set some attributes on an active_link.

At the moment, phoenix-active-link doesn't pass these options forward to link.

It doesn't work like the README says

If I use active_link by it's own I get undefined function active_link/3.
However it works if I specify the mondule name PhoenixActiveLink.active_link.
Is there any missing step?

Cannot deps.get

Trying to install, but getting this error:

Failed to use "phoenix_html" (version 3.2.0) because
phoenix_active_link (version 0.2.1) requires ~> 2.10
phoenix_ecto (version 4.4.0) requires ~> 2.14.2 or ~> 3.0
phoenix_live_view (version 0.17.9) requires ~> 3.1
mix.lock specifies 3.2.0

running phoenix 1.6.7

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.