Integrate HTML into Obsidian Portal page?

Heronator
Heronator

I'm running a campaign where characters use multiple parallel character sheets (Mutants & Masterminds, where a character can exist at multiple PLs). I'd like to insert some HTML so I can have some radio buttons to select a PL and have the page display that sheet, rather than have the whole page be an accordion. Is this possible?

Comments

  • vadercomplex
    vadercomplex
    Posts: 93

    Hi @Heronator! Fantastic question. :~) I'm reviewing this with my team and we'll get back to you ASAP!

    Obsidian Portal Support Druid | [email protected]

  • thaen
    thaen
    Posts: 1,090 edited April 12

    @Heronator, short of using Custom JavaScript, or a specialized DST, I can't think of a way to get actual radio buttons into your Character pages.

    But, you might still be able to use the Accordion to get close to what you want with some Custom CSS.

    You would create the Accordion. The "title" would be what you would want the "radio button" labels to be. And the "content" would be each of the parallel Character sheets. (I'm assuming these are just typed in and not DSTs?)

    Then, you could use Custom CSS to have the Accordion "buttons" (titles) be at the top of the page like set them to "display: inline", and maybe set their width too. So they would look like a row of buttons that you can click to show whichever sheet.

    Then you could use a bit more Custom CSS to position the "content" panes to be below the buttons. I think you'd want "position: absolute", and probably some margin-top to shift them down a bit.

    That way when you click on a "title", the corresponding "content" would show on the page below all of the buttons. So it would be kind of like the tabs at the top of the Campaign Settings page.

    One thing to note is the selected "radio button" wouldn't stay selected if you refreshed the page. It would always be the first one that showed when you first visited the page. I don't know if you're expecting it to stay set or not.

    If that sounds like it might work for you, but you need help with the CSS, feel free to say, and I or someone else here can help to hash out the details more clearly, or create an example.

    Post edited by thaen on

    Obsidian Portal Developer

Sign In or Register to comment.

June 2024
The Planewalker’s Guild

Read the feature post on the blog
Return to Obsidian Portal

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Discussions