-
Notifications
You must be signed in to change notification settings - Fork 56
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
Deploy a sample Shiny app that uses ITables #276
Comments
I have a working example here: https://github.com/fredguth/shinyduck/blob/main/express-itables-mwe.py |
.dt-container {
font-size: small;
}
.dataTable th {
font-weight: bolder;
background-color: #e1e6ec;
color: #120051;
text-align: center !important;
}
.dataTable tbody {
background-color: white;
color: #120051;
}
/* Left-align the first visible column (index) */
.dataTable td:first-child,
.dataTable th:first-child {
text-align: left !important;
}
/* Center-align all other columns */
.dataTable td:not(:first-child),
.dataTable th:not(:first-child) {
text-align: center !important;
}
""" often within ipython notebooks I can do this to apply to all tables
|
It may not be of much help, but this is my function I use in Shiny core.
```
def build_ui():
return ui.page_fillable(
ui.tags.link(href="am.css", rel="stylesheet"),
ui.layout_sidebar(
left_sidebar(),
ui.layout_sidebar(
right_sidebar(),
center_panel(),
border=False),
border_radius=False,
class_=f"{NO_SPACING}"),
title=APPLICATION_TITLE,
class_=f"{NO_SPACING}")
from my globals:
NO_SPACING = "m-0 p-0 g-0"
This is all used in my web.py
from pathlib import Path
from shiny import App
from dex.gui.server import server
from dex.gui.view.ui import build_ui
app_ui = build_ui()
app = App(app_ui, server, static_assets=Path(__file__).parent.joinpath("static"))
And desktop app:
app_ui = build_ui()
app = App(app_ui, server, static_assets=Path(__file__).parent.joinpath("static"))
kwargs = {"app": app, "port": 8000, "log_config": logger.configuration()}
FlaskUI(app=app, server="fastapi", width=1600, height=950, server_kwargs=kwargs).run()
```
|
@micboat to include your custom css, you could save it under
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This can be done using https://shiny.posit.co/py/docs/shinylive.html.
See also https://www.appsilon.com/post/shiny-for-python-deploy-github-pages
The text was updated successfully, but these errors were encountered: