patat icon indicating copy to clipboard operation
patat copied to clipboard

Allow configuring specific headers in theme

Open jaspervdj opened this issue 2 years ago • 2 comments

In addition to header, individual headers can now also be customized. The configuration blocks under headers accepts a style list, a prefix string and an underline string that is repeated match the width of the header.

For example:

patat:
  theme:
    headers:
      h3:
        style: [vividRed]
        prefix: '### '
        underline: '-~-~'

See #81

jaspervdj avatar Jan 30 '24 18:01 jaspervdj

@halloleo Would this work for your use case? Are there other parameters that you think would be useful?

jaspervdj avatar Apr 27 '25 11:04 jaspervdj

Ah, I see, there is a new attribute "headers"! Cool!

@halloleo Would this work for your use case?

Yes, it certainly would. (I'd just set prefix: '')

Are there other parameters that you think would be useful?

Well, one thing I really would like is the option to center the headers (but just the headers). My headers are often rather short, so that they make the slides "left-heavy".

(For my current presentation I center the whole slide deck, just because of this visual imbalance, but I really only want to center the headers,)

halloleo avatar Apr 27 '25 12:04 halloleo

I would appreciate this change as well!

tacerus avatar Aug 05 '25 14:08 tacerus

Thanks for the gentle nudge. I wanted to add centered headers to this as well before merging. I added the implementation for that just now. It just needs a few more doc/tests bump and then I will merge and put this in a release.

jaspervdj avatar Aug 06 '25 14:08 jaspervdj

Thanks for the great work. :)

tacerus avatar Aug 06 '25 14:08 tacerus

This is included in v0.15.2.0.

jaspervdj avatar Aug 06 '25 18:08 jaspervdj

Thanks @jaspervdj for doing this. Will certainly use it.

halloleo avatar Aug 07 '25 02:08 halloleo