Login  Register

Re: Asciidoctor 0.1.4 is released!

Posted by mojavelinux on Sep 11, 2013; 8:10pm
URL: https://discuss.asciidoctor.org/Asciidoctor-0-1-4-is-released-tp553p571.html

I think we should make this change in Asciidoctor. I propose between 768px and 1280px (the two desktop-size break points in the Foundation framework), we shrink the width of the sidebar by 5em, reduce the list indentation by .25em and reduce the font-size by 10%. That way, the sidebar will fit reasonably well and there is limited chance for horizontal scrolling in the main content.

Down the road, I'd like for us to implement a mobile sidebar like in Cardinal CSS [1].

-Dan

[1] http://cardinalcss.com/


On Wed, Sep 11, 2013 at 1:48 PM, Dan Allen <[hidden email]> wrote:
Aha! I finally figured out why we are seeing different results. I was leaving out an important piece of information when communicating how the sidebar works.

The sidebar is "responsive", which means it behaves differently depending on the screensize. Below the "break point" width (1280px), the sidebar gives up its position and returns to the flow of the document (center position). I'm almost certain your screen at home, or the width of the browser window on that screen, is below the break point.

Here's the definition in the stylesheet that controls this behavior:

```css

@media only screen and (min-width: 1280px) {
  body.toc2 {
    padding-left: 20em;
  }
  #toc.toc2 {
    position: fixed;
    width: 20em;
    left: 0;
    top: 0;
    ...
  }
  ...
}

```

We may decide that this break point is too soon, or just slim down the sidebar below 1280px and return it to the center at the next lower width (break point).

If you want to change this behavior, you can copy the toc2 styles into a docinfo.html file and modify the min-width [1]. That should override the behavior. You can also build a stylesheet to your liking using the stylesheet factory [2].

I'm so glad that we had this discussion because this is absolutely a missing piece of information in the documentation.

Thanks!

-Dan

[1] http://asciidoctor.org/docs/user-manual/#docinfo-files
[2] http://asciidoctor.org/docs/produce-custom-themes-using-asciidoctor-stylesheet-factory/


On Wed, Sep 11, 2013 at 12:47 PM, neontapir [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I'm seeing the correct behavior now on the sample site (whew!), but I didn't last night when I posted. When I get home, I'll retry my document generation and see if I obtain similar success.

Thanks, Sarah!


On Wed, Sep 11, 2013 at 9:34 AM, graphitefriction [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi Chuck,

I'm also using Chrome. I followed the theme preview link Dan posted.

The first theme, Asciidoctor, with the toc positioned to the left (see the little drop down menu in the right bottom corner of the image) shows up this way in Chrome for me:



When I select "right" in the drop down menu, it moves to the right, as seen in the image below:



If Chrome is not displaying this change when you toggle between the themes and toc placements on the showcase page, we've definitely got some debugging to do .

Next up, the default behaviour of toc2 in Asciidoctor should be the same as in AsciiDoc; therefore, you should just have to set the attribute as :toc2:. You do not need to add the value of 'left'.  (On a side note, setting :toc2: is the same as setting :toc: left).

Let me know if the theme showcase isn't showing you images like the ones I embedded above, and if when you set :toc2: it does not display the ToC as a sidebar on the left.  We'll get to the bottom of this !

-Sarah



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Asciidoctor-0-1-4-is-released-tp553p568.html
To unsubscribe from Asciidoctor 0.1.4 is released!, click here.
NAML




If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Asciidoctor-0-1-4-is-released-tp553p569.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML






--
Dan Allen | http://google.com/profiles/dan.j.allen