diff --git a/public/index.html b/public/index.html index c5a08d8..07f8c14 100644 --- a/public/index.html +++ b/public/index.html @@ -39,6 +39,5 @@
- diff --git a/src/App.css b/src/App.css index f944fcf..166050e 100644 --- a/src/App.css +++ b/src/App.css @@ -2,13 +2,20 @@ @import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Serif:wght@200;400;700&display=swap'); body { - font-size:1.5em; - line-height:2em; - font-family: 'IBM Plex Sans', sans-serif; - color:#444; + font-size: 1.5em; + line-height: 2em; + font-family: 'IBM Plex Sans', sans-serif; + color: #444; +} + +.App--embedded { + background: #fff; + margin: 0 auto; + max-width: 500px; + padding: 1rem 0; } .expression { - font-weight:bold; - color:#222; + font-weight: bold; + color: #222; } diff --git a/src/App.js b/src/App.js index 4840cbf..224f563 100644 --- a/src/App.js +++ b/src/App.js @@ -36,14 +36,32 @@ const textVars = textFiles.reduce( ); function App() { - let { page } = useParams(); - if (!textVars[page]) return ; + const { page } = useParams(); + const embedded = new URLSearchParams(window.location.search).has('embed'); + + if (!textVars[page]) { + return ; + } + const [ast, astState, rawText] = textVars[page]; return ( -
-