Skip to content

Commit

Permalink
docs: use markdown to show code
Browse files Browse the repository at this point in the history
  • Loading branch information
hustcc committed Jan 10, 2024
1 parent d18dfad commit 4fcff6f
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 32 deletions.
3 changes: 1 addition & 2 deletions example/pages/10_ Funnel.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@

g2(options=options)

source = st.expander("Source Code")
source.markdown("""
st.markdown("""
```py
import streamlit as st
from streamlit_g2 import g2
Expand Down
3 changes: 1 addition & 2 deletions example/pages/11_Boxplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@

g2(options=options)

source = st.expander("Source Code")
source.markdown("""
st.markdown("""
```py
import streamlit as st
from streamlit_g2 import g2
Expand Down
3 changes: 1 addition & 2 deletions example/pages/12_Histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@

g2(options=options)

source = st.expander("Source Code")
source.markdown("""
st.markdown("""
```py
import streamlit as st
from streamlit_g2 import g2
Expand Down
9 changes: 3 additions & 6 deletions example/pages/1_Bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@

g2(options=options)

source = st.expander("Source Code")
source.markdown("""
st.markdown("""
```py
import streamlit as st
from streamlit_g2 import g2
Expand Down Expand Up @@ -97,8 +96,7 @@

g2(options=options)

source = st.expander("Source Code")
source.markdown("""
st.markdown("""
```py
import streamlit as st
from streamlit_g2 import g2
Expand Down Expand Up @@ -178,8 +176,7 @@

g2(options=options)

source = st.expander("Source Code")
source.markdown("""
st.markdown("""
```py
import streamlit as st
from streamlit_g2 import g2
Expand Down
9 changes: 3 additions & 6 deletions example/pages/2_Column.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@

g2(options=options)

source = st.expander("Source Code")
source.markdown("""
st.markdown("""
```py
import streamlit as st
from streamlit_g2 import g2
Expand Down Expand Up @@ -112,8 +111,7 @@

g2(options=options)

source = st.expander("Source Code")
source.markdown("""
st.markdown("""
```py
import streamlit as st
from streamlit_g2 import g2
Expand Down Expand Up @@ -203,8 +201,7 @@

g2(options=options)

source = st.expander("Source Code")
source.markdown("""
st.markdown("""
```py
import streamlit as st
from streamlit_g2 import g2
Expand Down
3 changes: 1 addition & 2 deletions example/pages/3_Line.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@

g2(options=options)

source = st.expander("Source Code")
source.markdown("""
st.markdown("""
```py
import streamlit as st
from streamlit_g2 import g2
Expand Down
3 changes: 1 addition & 2 deletions example/pages/4_Area.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@

g2(options=options)

source = st.expander("Source Code")
source.markdown("""
st.markdown("""
```py
import streamlit as st
from streamlit_g2 import g2
Expand Down
3 changes: 1 addition & 2 deletions example/pages/5_Pie.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@

g2(options=options)

source = st.expander("Source Code")
source.markdown("""
st.markdown("""
```py
import streamlit as st
from streamlit_g2 import g2
Expand Down
3 changes: 1 addition & 2 deletions example/pages/6_Scatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@

g2(options=options)

source = st.expander("Source Code")
source.markdown("""
st.markdown("""
```py
import streamlit as st
from streamlit_g2 import g2
Expand Down
3 changes: 1 addition & 2 deletions example/pages/7_DualAxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,7 @@

g2(options=options)

source = st.expander("Source Code")
source.markdown("""
st.markdown("""
```py
import streamlit as st
from streamlit_g2 import g2
Expand Down
3 changes: 1 addition & 2 deletions example/pages/8_Liquid.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@

g2(options=options)

source = st.expander("Source Code")
source.markdown("""
st.markdown("""
```py
import streamlit as st
from streamlit_g2 import g2
Expand Down
3 changes: 1 addition & 2 deletions example/pages/9_Ring.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@

g2(options=options)

source = st.expander("Source Code")
source.markdown("""
st.markdown("""
```py
import streamlit as st
from streamlit_g2 import g2
Expand Down

0 comments on commit 4fcff6f

Please sign in to comment.