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

Love Paloma, but would love to customize the story format #2

Open
mcdemarco opened this issue Jul 6, 2020 · 0 comments
Open

Love Paloma, but would love to customize the story format #2

mcdemarco opened this issue Jul 6, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@mcdemarco
Copy link
Owner

mcdemarco commented Jul 6, 2020

I'm no coder but have some comfort with HTML and CSS.

I really like your Paloma format for Twine2 and I've been playing around with using the combo to create interactive decision trees.

Mostly I really need to enable visited passage links to be clickable AND need the ability to restart the decision tree and not append passages to the bottom...

Do you have any ideas on how I can accomplish this?

[There was a small sample story attached, which can't be attached in GitHub due to the file type (Twine compiled to HTML).]

[Issue created by benduffy: 2018-07-10]
[Last updated on bitbucket: 2018-07-15]

[Comment created by mcdemarco: 2018-07-11]
To restart, you can link to a passage that says this:

#!javascript
<script>
window.location.reload(false);
</script>

[Comment created by benduffy: 2018-07-11]
The window.location.reload trick worked like a charm! I link all branch ends to a single passage Start Again that has the code in it and that meets my needs.

I missed that documentation you provided below the Story Format link. Thanks for pointing me to it.

$('#phistory') did not work and provided error when inserted as Story JS.

Uncaught SyntaxError: missing ) after argument list (chrome-extension://jbeclgngiacjdjjokiegbkjcpibcdcic/index.html#!/stories/99da0291-d6eb-4750-be55-a61fe4314ec9/play: 5)

[Comment created by mcdemarco: 2018-07-11]
You can change those behaviors within a story using the story stylesheet and javascript passages. I have some examples of css restyling of past links at my site: http://www.mcdemarco.net/tools/scree/paloma/

For reactivating the links with JavaScript, use something like this:

#!javascript

$('#phistory').on('click', 'a[data-passage]', function (e) {
			story.show(_.unescape(
				$(e.target).closest('[data-passage]')
			));
		});




If instead you want to alter and rebuild the story format itself, there’s just a check or two on whether a link is in the phistory section that you can easily remove, as well as any of the history-specific CSS that you don’t want.

[Comment created by mcdemarco: 2018-07-11]
Sorry, there was a parenthesis missing at the end; I added it.

[Comment created by mcdemarco: 2018-07-15]
The enhancement would be to build in the restart functionality, though that's not entirely in the minimalist Snowman spirit. For the moment I am documenting it on the Paloma web page.

@mcdemarco mcdemarco added the enhancement New feature or request label Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant