groc icon indicating copy to clipboard operation
groc copied to clipboard

Force single column for README or other pages?

Open Sigfried opened this issue 11 years ago • 9 comments

Having all the text pushed over to the left for things like README pages seems suboptimal. Is there a way to control that that I'm missing?

And, BTW, just started with groc and mostly loving it so far. Thanks!

Sigfried avatar Dec 18 '13 21:12 Sigfried

I like to see this happen.

You can make the div containing the documentation (the left-hand side) to be resizable via http://jqueryui.com/resizable/ or expand/collapse (also via jquery).

dashed avatar Dec 27 '13 06:12 dashed

Groc's output already collapses to a single-colum, if you make the browser-window smaller (or use a mobile device). There is also a branch: https://github.com/sjorek/groc/tree/feature-collapsible-columns that adds a button to the top-pane to switch between the single- and two-column layout. It stores it's state in a cookie and you can choose how to start by tweaking the templates <html class="…">-attribute.

Cheers & Merry X-Mas !

sjorek avatar Dec 27 '13 12:12 sjorek

Pardon my cluelessness, but how do I install that branch? Git cloning doesn't seem to work because I think it's not installed as an npm module. I know there's a way to npm install a specific branch, but I haven't figured out how to do it here. But thanks so much. This is exactly what I need.

Sigfried avatar Dec 28 '13 12:12 Sigfried

If I get you right, the following steps should work:

git clone -b feature-collapsible-columns https://github.com/sjorek/groc.git
cd groc

Local install/usage: Issue npm install once in groc's folder from above and use it like PATH=/path/to/groc/bin:$PATH groc

Gobal install/usage: Issue npm install -g once in groc's folder from above and run groc wherever you want, as it should be in your PATH now.

sjorek avatar Dec 28 '13 12:12 sjorek

… but I cannot promise that this “collapsible-collumns” branch will stay alive … it is what it is, a quick ~~'n'dirty~~ implementation. :smirk:

sjorek avatar Dec 28 '13 13:12 sjorek

It'd be great if it's merged as a separate 'style' from default.

dashed avatar Dec 28 '13 13:12 dashed

… I don't think that this will happen.

sjorek avatar Dec 28 '13 13:12 sjorek

It's attractive and useful. Is there something about it that goes against groc's overall goals?

On Sat, Dec 28, 2013 at 8:47 AM, Stephan Jorek [email protected]:

… I don't think that this will happen.

— Reply to this email directly or view it on GitHubhttps://github.com/nevir/groc/issues/148#issuecomment-31296853 .

Sigfried avatar Dec 28 '13 13:12 Sigfried

… no, I think the github diff-stats say everything:

Showing 43 changed files with 619 additions and 150 deletions.

Who will ever keep this in sync with upcoming changes in the default-style ? … keeping this draft-solution in sync with groc's default-style is a time-consuming and cumbersome task, at the current stage at least … :sweat_smile:

sjorek avatar Dec 29 '13 02:12 sjorek