@Dalloway
As I understand it, you want to have a story continuously build by adding pictures and text below what’s already displayed.
You could “build” your story by using links that call the (display:) macro.
In your story’s style sheet
passage:
html { scroll-behavior: smooth; }
The first passage will look like:
<div name="passage-top"></div>
Picture 1 & Text
(link-reveal: "2nd")[
(t8n: 'dissolve')[(display: "Passage 2")]{<script>
let elements = document.getElementsByName("passage-top");
let count = elements.length;
elements[ count - 1 ].scrollIntoView();
</script>}]
…and your second passage (labelled “Passage 2” in this case) would look like this:
<div name="passage-top"></div>
Picture 2 & Text
(link-reveal: "3rd")[
(t8n: 'dissolve')[(display: "Passage 3")]{<script>
let elements = document.getElementsByName("passage-top");
let count = elements.length;
elements[ count - 1 ].scrollIntoView();
</script>}]
…and so on. It uses a little HTML,CSS and JavaScript to make the content scroll smoothly into view. The CSS ensures a smooth scrolling action when the JavaScript calls the .scrollIntoView()
command. The HTML gives the scrolling an actual target to hit. Because multiple <div name="passage-top">
tags are created (all with the same name), the JavaScript figures out the last one in the list of possible matches before scrolling it into view.
I had to create a <div>
tag at the top of each passage because simply scrolling to the bottom of the page won’t work if the passage content is taller that the visible area. The top of the content would be cut off. Not desirable at all.
Note: A custom macro should be created for the links eventually to clean up the required code in your passages, but I’m heading off to bed now. Oh, and be careful not to put extraneous empty lines below your passage code.
Hopefully, this nudges you in the right direction. If it’s not what you were looking for, I had fun figuring it out at least.
I might use this for my own IF one day. It works really well.
You can also play around with having everything in one passage and using the (link:)[==
method. https://twine2.neocities.org/#macro_link