core icon indicating copy to clipboard operation
core copied to clipboard

collapsible menu at the left side

Open wilzbach opened this issue 8 years ago • 6 comments

this is just an idea, but I feel more structured in this way.

image

live

Optionally we make the entire menu collapse/ toggle-able.

wilzbach avatar May 13 '16 08:05 wilzbach

Rust uses Git Book which also has this nice grouping:

image

http://rustbyexample.com/hello.html

wilzbach avatar Jun 04 '16 02:06 wilzbach

@wilzbach Do have any experience with vertical side bars already in other frameworks? I feel like this getting a more and more important priority with new content coming up and user input. I just would like to prevent to write the CSS etc. stuff from scratch :-)

stonemaster avatar Jun 25 '16 16:06 stonemaster

Unfortunately not really. Well I guess we have to throw away most parts of the dlang menu css, but apart from the mobile view, it shouldn't be that difficult.

Most css frameworks I know support such menu bar, but they come with rather heavy dependencies. However I am happy if you find something.

wilzbach avatar Jun 25 '16 18:06 wilzbach

The previous version of dlang.org had vetical sidebar, btw.

PetarKirov avatar Jun 26 '16 05:06 PetarKirov

The previous version of dlang.org had vetical sidebar, btw.

There are a couple of pages still online with it, e.g. http://erdani.com/d/

(but of course we should go for a bit more modern menu)

wilzbach avatar Aug 13 '16 12:08 wilzbach

I just gave this a quick try and I think it will get a bit messy, because we have to hack the CSS ourselves, but it seems doable :)

Open questions:

  • mobile view (imho one of the bigger isuees))
  • show we use this change to apply #54 too (fixed height for text and code)
  • I think we need to make the menu categories collapsible (except the current one), because otherwise there's to much content
  • should the menu bar itself be toggle-able? (like for the Rust Tour)

image

quick & dirty css overwrite styles (in case someone wants to continue this attempt):

#top {
    left: 0;
    width: 250px;
    display: inline-block;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

#top #cssmenu > ul > li {
     float: none;
}

body .row {
    display: inline-block;
    position: absolute;
}

#top #cssmenu .expand-container > * {
    display: block;
}

#top #cssmenu > ul > li > ul {
    position: inherit;
    border: none;
    background: none;
    -webkit-box-shadow: none;
    box-shadow: none;
}


#top > .helper {
     padding-left: 5px;
     padding-right: 5px;
}

#top a:hover, #top #cssmenu li.open > a, #top #cssmenu li.active > a {
     background: inherit;
}

.expand-content li {
    padding-left: 5px;
}

wilzbach avatar Aug 25 '16 02:08 wilzbach