0 votes
by (2.2k points)
edited by
First of all, I've read a lot of things on the old forum but it's not working and I think it's because I'm using the new twine and harlowe, but I have no idea, ever. Things like #box and .passage and such don't work, I don't know why that is. I'm also unsure of why but html doesn't work for me either, it takes the < and > as errors and won't run anything.

Second of all, are side bars even possible to customize in harlowe 2.0.1?

I want to put a button like thing on the side where the player can save and load games, but I don't really understand how to code it. The example given in the wiki seems to be for in the passage, but if it's in the sidebar, then the coding for it can't be in a passage, can it? Or do I need to create a separate passage that saves crap like that? I have a passage called StoryMenu because I read in sugarcube that works and such, but that seems to not be the case.

Also, can I put the content of a passage in the sidebar?

Thank you.

1 Answer

0 votes
by (156k points)
selected by
 
Best answer

background:
Harlowe doesn't actually have a side-bar, it has a special Passage header that it uses CSS to re-position above the left blank margin of the centred Passage content. The contents of this special Passage header is actually part of the current Passage's HTML contents and is destroyed and recreated each time passage transition occurs.

While the above comment may sound a little pedantic understanding how the 'side-bar' works is important if you plan to either extend it's contents or create one of your own.

So to answer your questions:

a. Can you modify the contents of the existing Harlowe 'side-bar'?

Yes, you can use Javascript to modify the HTML contents of the HTML tw-sidebar element but those modifications will be destroyed during passage transition.

b. Can I put the contents of a passage in the Harlowe 'side-bar'?

Yes, you can include an invisible footer tagged special passage in your story and then use Javascript to move the generated HTML elements from the footer into the tw-sidebar element but again these elements will be destroyed during passage transition

c. [inferred] Can I display the contents of a passage in my own custom 'side-bar'?

This comment in the Right-oriented sidebar in Harlowe thread on the old forums contains three links to threads related to creating a right 'side-bar' using a re-positioned header/footer tagged special passage. The same techniques can be used to create your own custom left side-bar as well.

by (2.2k points)
edited by
I'm running into the problem of the sidebar not showing up, do you know why that might be? The arrows show up but the content I'm trying to put into it isn't there.
by (156k points)

Without knowing exactly how you are adding additional content to the tw-sidebar element and what CSS you are using to style that additional content it is difficult to suggest why either of those two processes may not be working. *smile*

by (2.2k points)
True. Thank you for your help.
Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.
...