holoviz / panel

Panel: The powerful data exploration & web app framework for Python
https://panel.holoviz.org
BSD 3-Clause "New" or "Revised" License
4.77k stars 519 forks source link

Make it easier to use SlidesTemplate #7293

Open MarcSkovMadsen opened 1 month ago

MarcSkovMadsen commented 1 month ago

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

Workaround

You can manually adjust the font size via

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

pn.extension(raw_css=[STYLE_SHEET])
MarcSkovMadsen commented 1 month ago

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])
ahuang11 commented 1 month ago

I see great potential in using Slides as a pipeline https://github.com/holoviz/panel/issues/4902

MarcSkovMadsen commented 1 month ago

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](https://github.com/user-attachments/assets/0d3b0749-4353-4c9e-8f3b-8657b36671b3)

[Check out example on py.cafe](https://py.cafe/snippet/panel/v1#c=H4sIAOz_9GYAA41SS2sCMRD-K2FOCuuiFltY8NJS8FxLPbiC0YzdQDZJs1G7yP73TvbRB1V0c9mZ-R7zhZxgawRCAjK3xnlmuUbFeMGsTumEIZuyFOqj5yZHFnphtl6vbekzQ7_nyVbH-OlRF9LoXr_t1JheCjNUyrCFcUr04wLdgW8UBhTJBmhnWZM85lZxj_FcSYHFa1v2Us3oy7nU02VYa5Xq32IQgcOPvXSYo_YFpazdU00DX9oQu25Qya19k3iExLs9RoBC-mcdVCDZcVVQq8kaKKURtMXgMIzH9_GIyIqXZu8hOcEBXUgLyZisjfEvhiRPnZmjKoJtJpVwSKDl98TzTYGehkcpfAbJaDKMIJd60ZR3TTVD-Z6RTyilINpOKnwkVYr8ZLSne0B3wSFAB5sGSxDLgy5Ataqi_1tcWPGHR9cV2_Iv-4Z01xO1G15L0wU5v37Wqo4eJrd4enTU5uqaaYcLruFUUX2r9K6Wq-oLgI_xZEkDAAA)