|
@@ -26,9 +26,9 @@ def subtitle(content: str) -> ui.markdown:
|
|
|
return ui.markdown(content).classes('text-xl sm:text-2xl md:text-3xl leading-7')
|
|
|
|
|
|
|
|
|
-def example_link(title: str, description: str) -> None:
|
|
|
+def example_link(title: str, description: str, *, filename: str = 'main.py') -> None:
|
|
|
name = title.lower().replace(' ', '_')
|
|
|
- with ui.link(target=f'https://github.com/zauberzeug/nicegui/tree/main/examples/{name}/main.py') \
|
|
|
+ with ui.link(target=f'https://github.com/zauberzeug/nicegui/tree/main/examples/{name}/{filename}') \
|
|
|
.classes('bg-[#5898d420] p-4 self-stretch rounded flex flex-col gap-2') \
|
|
|
.style('box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1)'):
|
|
|
ui.label(title).classes(replace='text-black font-bold')
|