Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close button doesn't appear, Sidebar remains open without collapsing #205

Open
kalebtekle opened this issue Jun 8, 2020 · 1 comment
Open

Comments

@kalebtekle
Copy link

kalebtekle commented Jun 8, 2020

I included the javascript and css files for sidebar-V2 without npm, but the close button doesn't appear and sidebar remains open without an option to collapse or close.

@nathanvda
Copy link

An old question, so probably no longer an issue. For future readers, remember this is impossible to answer/solve without you showing how you built your html.

Anyway: your html of the definition of the sidebar content (the panes) should look something like this:

            <div class="sidebar-content">
              <div class="sidebar-pane active" id="home">
                <h1 class="sidebar-header">
                  Home-title
                  <span class="sidebar-close">
                    <i class="fa fa-chevron-left"></i>
                  </span>
                </h1>
                <p>
                  Add some content here ...
                </p>
              </div>
              <div class="sidebar-pane" id="search">
                <h1 class="sidebar-header">
                  Search
                  <span class="sidebar-close">
                    <i class="fas fa-menu-left"></i>
                  </span>
                </h1>
                <p>Add a search form</p>
...

In short: Inside the h1.sidebar-header you define a span.sidebar-close and what you add inside that span is entirely up to you. In this case I used a font-awesome icon called chevron-left.

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

No branches or pull requests

2 participants