Skip to content

Commit

Permalink
related workflows: Add className to st.link and consolidate markdown …
Browse files Browse the repository at this point in the history
…block
  • Loading branch information
devxpy committed Jul 26, 2024
1 parent 968bce9 commit d146dca
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions daras_ai_v2/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -980,22 +980,19 @@ def _render(page_cls: typing.Type[BasePage]):
state = root_run.saved_run.to_dict()
preview_image = page.get_explore_image()

with st.link(to=page.app_url()):
with st.link(to=page.app_url(), className="text-decoration-none"):
st.html(
# language=html
f"""
<div class="w-100 mb-2" style="height:150px; background-image: url({preview_image}); background-size:cover; background-position-x:center; background-position-y:30%; background-repeat:no-repeat;"></div>
"""
)
st.markdown(
f"###### {root_run.title or page.title}",
)
with st.link(to=page.app_url(), className="text-decoration-none"):
st.markdown(f"###### {root_run.title or page.title}")
st.caption(
truncate_text_words(
root_run.notes or page.preview_description(state),
maxlen=210,
),
)
)

grid_layout(4, page_clses, _render)
Expand Down

0 comments on commit d146dca

Please sign in to comment.