Skip to content

Commit d02f3a5

Browse files
committed
Embed demo app on docs home page
1 parent 8a653d0 commit d02f3a5

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

docs/index.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ Learn more in [Getting Started](./getting_started.md)
1919

2020
## Example app
2121

22-
```python
23-
--8<-- "mesop/examples/text_io.py"
24-
```
22+
=== "Code"
23+
24+
```python
25+
--8<-- "mesop/examples/text_io.py"
26+
```
27+
28+
=== "Demo"
29+
30+
<iframe class="demo" src="https://mesop-y677hytkra-uc.a.run.app/text_io"></iframe>

docs/stylesheets/extra.css

+9
Original file line numberDiff line numberDiff line change
@@ -159,3 +159,12 @@
159159
[data-md-color-scheme='mesop-dark'] .md-logo {
160160
filter: invert(1);
161161
}
162+
163+
.demo {
164+
width: 100%;
165+
height: 400px;
166+
border: 0;
167+
margin-top: -16px;
168+
border: 1px solid rgba(0, 0, 0, 0.2);
169+
border-radius: 4px;
170+
}

mkdocs.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ extra_css:
9898
markdown_extensions:
9999
- pymdownx.highlight:
100100
anchor_linenums: true
101-
auto_title: true
102-
101+
- pymdownx.tabbed:
102+
alternate_style: true
103103
- pymdownx.superfences
104104
- pymdownx.snippets
105105

0 commit comments

Comments
 (0)