-
Notifications
You must be signed in to change notification settings - Fork 329
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
Table of Contents & Link to Page snippet breaking footnote borders #2885
Comments
If you want the page numbers to reset to some value on a given page, enter this into the Style Editor
.. where the EDIT: fixed the selector |
What I meant was to designate a new start point for the auto counter, so it would automatically apply it for every page from then on. This method only works for each individual page, and therefore would be just as much effort as typing them in manually page by page. 5e books don't count the front cover page (because it's "outside" the book") but Homebrewery does, and some other books don't start counting until the contents page or the page after. Is there a {{pageNumber,auto-1}} equivalent, where it subtracts a value from the counter? And any idea about Table of Contents removing the decorative border next to the page numbers? I really would like to have built in navigation for my players. |
If the border or link to page snippets conflicting with table of contents snippet issue can't be fixed, is there a way to manually add the border image into the page? Is that image available to users? I don't mind copy and pasting a line of code into my end of page sections. |
@ericscheid ’s suggestion will do what you ask— it will set the starting page for the count. So if you have 5 pages of fluff, and content starts on page 6, you can start “page 1” on the 6th page and just continue using the auto page number snippet |
That is actually how
If every page has the auto pagenumber snippet ( ![]() |
The decorative border that has the bubble to hold the page number is inserted by the
This is then styled via the (default) phb theme stylesheet via a rule on .page:after {
content: "";
position: absolute;
bottom: 0px;
left: 0px;
z-index: 100;
height: 50px;
width: 100%;
background-image: url('/assets/PHB_footerAccent.png');
background-size: cover
} This however is disabled if the page via this rule What you can do is re-apply the same style rule, but this time with a higher priority selector, like this (where .page#p9:after {
content: "";
position: absolute;
bottom: 0px;
left: 0px;
z-index: 100;
height: 50px;
width: 100%;
background-image: url('/assets/PHB_footerAccent.png');
background-size: cover
} |
This wasn't the issue I was having. I gave this a go, and I see you can add the border to cover pages. The problem I'm having is that the border is disappearing on non-cover pages that also have any Table of Contents snippets. I also tried adding this code to the pages being affected, in case any Contents Pages somehow were being treated as Cover Pages, but it does not seem to be a related issue. |
In the PHB, a Table of Contents page does not have the footer decoration, so it is not a bug that including a Table of Contents makes it disappear. This is by design. Rather than try to make a "miniature table of contents" to trick the Homebrewery into changing the color of the link, I would suggest just... changing the color of the link. For example, you could add this CSS to your Style tab to tell footers to just inherit the normal color from the footer, but still show an underline when you hover over with the mouse:
If you don't know CSS already, learning can get you quite a lot of customization out of the Homebrewery to do pretty much anything you want. |
Thank you! This is obviously the best solution, but not knowing any real code I was doing my best to use the built in tools, so sorry if my work around sounded ridiculous. This stops the footnote "breaking", which is perfect. I'm still unsure why my reassignment of page numbers isn't working though. |
The previous advice was slightly incorrect. You should use:
|
That worked. Thank you for your assistance. I have one final question, and then I can say this issue is totally solved. How would I apply the colour change and underline on hover code to other things? I intend to use it on headers and in spell lists. the .footnote part obviously points to the footnotes. With headers is there a particular phrase for each header size that replaces ".footnote"? And I am trying to do the same thing with spells on spell lists linking directly to the spell description page. So I have
So I tried the following to no avail.
The colour change is applied, but not the underline on hover part. |
I think we could probably be more explicit about the fact that adding I'm not sure which would be the better way forward. |
For headers, you would replace Depending on how you are adding the class to the header, you might need to use
|
Perhaps for v4, include this '.nofooter' class |
I think that's the best idea. I'm gonna mark this v4. |
Renderer
v3
Browser
Chrome
Operating System
Windows
What happened?
It appears having any Table of Contents tag on a page removes the decorative border around the footnote/page number. I know the contents page of 5e books don't tend to have page numbers but this doesn't explain why it breaks it when the two are on the same homebrewery page.
I'm trying to use the "Link to Page" snippet inside my footnotes and on my headers to help navigate around a very large document. Click to go back to the page with the next biggest header or click to go to the top of that section, etc. However it does mean it goes into the old school blue underlined hyperlink style, which is undesirable.
The same snippet is used and keeps its formatting inside of the table of contents snippet, so I have been able to make functional links that look normal by essentially making miniature tables of contents.
Unfortunately this seems to remove the decorative border. It doesn't matter if this toc code is used in a header, a footnote, or anywhere on the page.
I'm not sure what is causing this bug. Is this fixable, or is there another method to index/navigate my document this way?
Also if there is any way to still use Auto Page Numbers but set my own "Page 1", that would be amazing. A real pain to fill in hundreds of page numbers, but using auto numbers on a document with cover pages and contents basically starting on page 5 doesn't feel right.
Code
No response
The text was updated successfully, but these errors were encountered: