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

Make it easier to use SlidesTemplate #7293

Open
MarcSkovMadsen opened this issue Sep 18, 2024 · 3 comments
Open

Make it easier to use SlidesTemplate #7293

MarcSkovMadsen opened this issue Sep 18, 2024 · 3 comments
Labels
type: enhancement Minor feature or improvement to an existing feature
Milestone

Comments

@MarcSkovMadsen
Copy link
Collaborator

MarcSkovMadsen commented Sep 18, 2024

Font-Size

The SlidesTemplate comes with a default, general --font-size of 12px. This is very small and not useful for slides. The documentation contains an example of increasing the font size via styles for a specific Markdown pane. But its quite cumbersome to set the font-size per component. Instead the default, general --font-size should be set correctly from the beginning.

Please

  • Set a better default font size (reveal js uses 42px).
  • document how to adjust the general font-size.

Workaround

You can manually adjust the font size via

STYLE_SHEET = """
:host {
    --font-size: 42px;
}
"""

pn.extension(raw_css=[STYLE_SHEET])
@MarcSkovMadsen MarcSkovMadsen added the TRIAGE Default label for untriaged issues label Sep 18, 2024
@MarcSkovMadsen MarcSkovMadsen changed the title Make it easier to use relevant font-size in SlidesTemplate Make it easier to use SlidesTemplate Sep 18, 2024
@MarcSkovMadsen
Copy link
Collaborator Author

MarcSkovMadsen commented Sep 18, 2024

Black Theme has black text color

When using the reveal_theme="black", then the text color is black and thus not visible. Please change the default color for the black reveal_theme to white.

Workaround

You can manually adjust the text color via.

STYLE_SHEET = """

:host,:root {
    --background-text-color: white;
    --design-background-text-color: white;
}
"""

pn.extension(raw_css=[STYLE_SHEET])

@MarcSkovMadsen MarcSkovMadsen added type: enhancement Minor feature or improvement to an existing feature and removed TRIAGE Default label for untriaged issues labels Sep 18, 2024
@MarcSkovMadsen MarcSkovMadsen added this to the Wishlist milestone Sep 18, 2024
@ahuang11
Copy link
Contributor

I see great potential in using Slides as a pipeline
#4902

@MarcSkovMadsen
Copy link
Collaborator Author

MarcSkovMadsen commented Sep 26, 2024

Code Formatting

Code formatting is not working. And text is aligned center which is not useful.

import panel as pn

code = """
Some code

```python
import panel as pn

pn.extension()

pn.panel("Hello World).servable()
```

"""

pn.template.SlidesTemplate(
    main=[code]
).servable()

image

Check out example on py.cafe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Minor feature or improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants