Skip to content

Commit

Permalink
updated web app layoug
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoTz committed Apr 5, 2024
1 parent 81d7ea9 commit 1a2e04d
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 12 deletions.
4 changes: 2 additions & 2 deletions web-app/StringFormat.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ envToStr :: Environment -> String
envToStr env = do
let tys = getTypes (MkModule "") env
let tyStrs = (\(nm,ty) -> replStr (show nm) <> "::" <> replStr (show ty)) <$> tys
intercalate "<br/>" tyStrs
intercalate "\n" tyStrs

traceToStr :: [Command] -> String
traceToStr cmds = intercalate "<br />" (replStr . show <$> cmds)
traceToStr cmds = intercalate "\n" (replStr . show <$> cmds)

repl :: Char -> String
repl '<' = "&lt;"
Expand Down
12 changes: 7 additions & 5 deletions web-app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ <h1>One Sided Sequent Calculus</h1>
</div>
<div class="results">
<h2>Results</h2>
<div id="resultStr"></div>
Types: <br/>
<div id="typesStr"></div>
Trace: <br/>
<div id="traceStr"></div>
Result: <div class="code" id="resultStr"></div>
<br/>
Types in Program: <br/>
<textarea readonly id="typesStr"></textarea>
<br/>
Evaluation Trace: <br/>
<textarea readonly id="traceStr"></textarea>
</div>
<div id="examples">
<div id="tuple">
Expand Down
30 changes: 25 additions & 5 deletions web-app/main.css
Original file line number Diff line number Diff line change
@@ -1,30 +1,50 @@
body {
font-family: "Noto", sans-serif
font-family: "Noto Sans", sans-serif;
background-color: #505060;
color: #dddddd;
}
textarea {
width: 100%;
height: 8em;
resize:none;
font-family: "DejaVu Sans Mono", sans-serif;
background-color:#505050;
color: #eeeeff;
border-radius:10px;
line-height: 1.3;
}

#progInput {
width:100%;
height:90%
height:90%;
background-color: #505050;
color: #eeeeee;
}

#runButton {
width:5%;
height:2em;
border-radius:2px;
}

#examples {
display:none
}

#typesStr {
width: 100%;
height: 5em;
}

.evalSucc {
color: green
color: #00ff55;
}

.evalError {
color: red
color: #ff0033;
}

.prog {
height:40em
}


0 comments on commit 1a2e04d

Please sign in to comment.