HTML page for a possible try.perl6.org website
Screenshot: http://i.imgur.com/oXjpNkg.png
Screenshot: http://i.imgur.com/oXjpNkg.png
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <title>Try Perl 6 in Your Browser</title> | |
| <link rel="stylesheet" href="./style.css"> | |
| </head> | |
| <body> | |
| <div id="header"> | |
| <a id="logo" href="http://perl6.org">Perl 6</a> | |
| <h1>Try Perl 6 in Your Browser</h1> | |
| </div> | |
| <div id="content"> | |
| <form> | |
| <textarea id="input" autofocus>say 1 + 1</textarea> | |
| <input id="submit" type="submit" value="Evaluate"> | |
| </form> | |
| <div id="output">2</div> | |
| </div> | |
| <div id="footer">Copyright © perl6.org, 2015</div> | |
| </body> | |
| </html> |
| /*************/ | |
| /* Generic */ | |
| /*************/ | |
| body, div, p { | |
| color: #333333; | |
| font-family: "Dejavu Sans", sans-serif; | |
| font-size: 11pt; | |
| } | |
| a { color: #cc9a00; text-decoration: none } | |
| a:hover { color: #F5E09F } | |
| /*****************/ | |
| /* Main layout */ | |
| /*****************/ | |
| html, body { | |
| margin: 0; | |
| padding: 0; | |
| background: #eeebde; | |
| } | |
| html { | |
| width: 100%; | |
| position: relative; | |
| min-height: 100%; | |
| } | |
| body { | |
| width: auto; | |
| margin-bottom: 3em; /* max footer height */ | |
| } | |
| #header { | |
| background: #ae9422; | |
| color: #f1f1f1; | |
| padding: 0; | |
| margin: 0; | |
| } | |
| #content { | |
| text-align: center; | |
| padding: 2em 0 1em 0; | |
| margin: 0 auto; | |
| max-width: 600px; | |
| overflow: hidden; | |
| } | |
| #footer-wrapper { | |
| } | |
| #footer { | |
| background: #ae9422; | |
| color: #e7e6e1; | |
| text-align: center; | |
| padding: 0.5em; | |
| margin: 0; | |
| position: absolute; | |
| bottom: 0; | |
| width: 100%; | |
| overflow: hidden; | |
| max-height: 3em; /* max footer height */ | |
| /* Prevent the padding from messing with the width: */ | |
| -webkit-box-sizing: border-box; | |
| -moz-box-sizing: border-box; | |
| box-sizing: border-box; | |
| } | |
| /*********************/ | |
| /* Header elements */ | |
| /*********************/ | |
| #header h1 { | |
| padding: 0 0 20px 0; | |
| margin: -19px 0 0 0; | |
| text-align: center; | |
| } | |
| a#logo { | |
| background: #6c2e45; | |
| font-size: 13.2pt; | |
| padding: 4px 12px; | |
| display: inline-block; | |
| } | |
| a#logo:hover { background: #873956 } | |
| a#logo:before { | |
| content: ""; | |
| display: inline-block; | |
| vertical-align: middle; | |
| background: url(http://doc.perl6.org/images/camelia-small.png); | |
| background-size: 44px 34px; | |
| background-repeat: no-repeat; | |
| width: 44px; | |
| height: 34px; | |
| margin: 0 8px 0 0; | |
| position: relative; bottom: 2px; | |
| } | |
| /**********************/ | |
| /* Content elements */ | |
| /**********************/ | |
| #input, #output { | |
| font-family: "Dejavu Sans Mono", monospace; | |
| font-size: 11pt; | |
| text-align: left; | |
| white-space: nowrap; | |
| overflow: auto; | |
| padding: 0.8em; | |
| min-width: 100%; | |
| max-width: 100%; | |
| /* Prevent the padding from messing with the width: */ | |
| -webkit-box-sizing: border-box; | |
| -moz-box-sizing: border-box; | |
| box-sizing: border-box; | |
| } | |
| #input { | |
| background: url("http://i.imgur.com/l3vfGj1.png") | |
| no-repeat right 0.6em top 0.5em #E3E0D5; | |
| color: #333333; | |
| border: solid 1px #B5B09B; | |
| border-right-color: #FBF4D7; | |
| border-bottom-color: #FBF4D7; | |
| height: 12em; | |
| min-height: 5em; | |
| } | |
| #input:focus { | |
| background-color: #E7E4D9; | |
| } | |
| input[type=submit] { | |
| background: #b6a560; | |
| color: #e2e2e2; | |
| border: solid 2px #b6a560; | |
| -webkit-border-radius: 5px; | |
| border-radius: 5px; | |
| cursor: pointer; | |
| padding:5px 15px; | |
| margin: 8px; | |
| } | |
| input[type=submit]:hover { | |
| background: #ac963e; | |
| border: solid 2px #ac963e; | |
| } | |
| input[type=submit]:active { | |
| border: inset 1px #ac963e; | |
| margin: 9px; | |
| } | |
| #output { | |
| background: #383633; | |
| color: #dddddd; | |
| margin: 10px 0; | |
| min-height: 5em; | |
| } |
i'm looking to get a very early build of the try perl6 website onto hack and/or www, in the mean time, would you mind having a look over http://codemirror.net/doc/manual.html#styling ?
i changed the name of the input textarea to "editor", but styling that doesn't change anything, because codemirror "hides" that and replaces it with its own stuff. when i put the background image and stuff on .CodeMirror-code, there's a little gap at the top.
not to mention it doesn't fill the background all the way to the bottom of the editor and also the text ends up being centered, because codemirror uses div instead of textarea for the code 😄
it seems like there's a
oops, never mind, that was for the previous version ...