Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Clivern committed Nov 3, 2021
1 parent e8475ea commit 4461a2e
Show file tree
Hide file tree
Showing 5 changed files with 222 additions and 43 deletions.
Binary file added app/assets/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
187 changes: 187 additions & 0 deletions app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,190 @@
*= require_tree .
*= require_self
*/

html {
height: 100%;
}
body {
color: black;
padding: 0;
margin: 0;
width: 100%;
height: 100%;
}
a {
color: #009;
}
#wrap,
#about {
padding: 5px;
margin: 0;

position: absolute;
top: 50px;
bottom: 25%;
left: 0;
right: 0;

background: #FFD;
}
#about {
display: none;
z-index: 1;
padding: 10px 40px;
font-size: 16px;
font-family: sans-serif;
overflow: auto;
}
#about p {
max-width: 520px;
}
#about ul {
max-width: 480px;
}
#about li {
margin-bottom: 1em;
}
#code, #output, pre, .lines {
/* The default monospace font on OS X is ugly, so specify Menlo
* instead. On other systems the default monospace font will be used. */
font-family: Menlo, monospace;
font-size: 11pt;
}

#code {
color: black;
background: inherit;

width: 100%;
height: 100%;
padding: 0; margin: 0;
border: none;
outline: none;
resize: none;
wrap: off;
float: right;
}
#output {
position: absolute;
top: 75%;
bottom: 0;
left: 0;
right: 0;
padding: 8px;
}
#output .system, #output .loading {
color: #999;
}
#output .stderr, #output .error {
color: #900;
}
#output pre {
margin: 0;
}
#banner {
display: flex;
flex-wrap: wrap;
align-items: center;
position: absolute;
left: 0;
right: 0;
top: 0;
height: 50px;
background-color: lightgray;
}
#banner > * {
margin-top: 10px;
margin-bottom: 10px;
margin-right: 5px;
border-radius: 5px;
box-sizing: border-box;
height: 30px;
}
#head {
padding-left: 10px;
padding-right: 20px;
padding-top: 5px;
font-size: 20px;
font-family: sans-serif;
}
#aboutButton {
margin-left: auto;
margin-right: 15px;
}
input[type=button],
#importsBox {
height: 30px;
border: 1px solid #375EAB;
font-size: 16px;
font-family: sans-serif;
background: #375EAB;
color: white;
position: static;
top: 1px;
border-radius: 5px;
cursor: pointer;
-webkit-appearance: none;
}
#importsBox {
padding: 0.25em 7px;
}
#importsBox input {
flex: none;
height: 11px;
width: 11px;
margin: 0 5px 0 0;
}
#importsBox label {
display: flex;
align-items: center;
line-height: 1.2;
}
#shareURL {
width: 280px;
font-size: 16px;
border: 1px solid #ccc;
background: #eee;
color: black;
}
#embedLabel {
font-family: sans-serif;
padding-top: 5px;
}
#banner > select {
font-size: 0.875rem;
border: 0.0625rem solid #375EAB;
}
.lines {
float: left;
overflow: hidden;
text-align: right;
}
.lines div {
padding-right: 5px;
color: lightgray;
}
.lineerror {
color: red;
background: #FDD;
}
.exit {
color: lightgray;
}

.embedded #banner {
display: none;
}
.embedded #wrap {
top: 0;
}
#embedRun {
display: none;
}
.embedded #embedRun {
display: block;
position: absolute;
z-index: 1;
top: 10px;
right: 10px;
}
3 changes: 0 additions & 3 deletions app/assets/stylesheets/home.scss

This file was deleted.

71 changes: 33 additions & 38 deletions app/views/home/home.html.erb
Original file line number Diff line number Diff line change
@@ -1,38 +1,33 @@

<!doctype html>
<html>
<head>
<title>Muffin - Coding Playground</title>
<link rel="stylesheet" href="https://play.golang.org/static/style.css">
</head>
<body itemscope itemtype="http://schema.org/CreativeWork">
<input type="button" value="Run" id="embedRun">
<div id="banner">
<div id="head" itemprop="name">Muffin - Coding Playground</div>
<input type="button" value="Run" id="run">
<input type="button" value="Share" id="share">
<input type="text" id="shareURL">
<select>
<option value="python">Python</option>
<option value="php">PHP</option>
<option value="ruby">Ruby</option>
<option value="golang">Golang</option>
<option value="java">Java</option>
</select>
<input type="button" value="About" id="aboutButton">
</div>
<div id="wrap">
<textarea itemprop="description" id="code" name="code" autocorrect="off" autocomplete="off" autocapitalize="off" spellcheck="false">package main

import (
&#34;fmt&#34;
)

func main() {
fmt.Println(&#34;Hello, playground&#34;)
}
</textarea>
</div>
<div id="output"></div>
</body>
</html>
<input type="button" value="Run" id="embedRun">
<div id="banner">
<div id="head" itemprop="name">Muffin Coding Playground</div>
<input type="button" value="Run" id="run">
<input type="button" value="Share" id="share">
<input type="text" id="shareURL">
<select>
<option value="python-3.6">Python 3.6</option>
<option value="python-3.7">Python 3.7</option>
<option value="python-3.8">Python 3.8</option>
<option value="python-3.9">Python 3.9</option>
<option value="php-7.4">PHP 7.4</option>
<option value="php-8.0">PHP 8.0</option>
<option value="ruby-2.6.8">Ruby 2.6.8</option>
<option value="ruby-2.7.4">Ruby 2.7.4</option>
<option value="ruby-3.0.2">Ruby 3.0.2</option>
<option value="golang-1.13">Golang 1.13</option>
<option value="golang-1.14">Golang 1.14</option>
<option value="golang-1.15">Golang 1.15</option>
<option value="golang-1.16">Golang 1.16</option>
<option value="golang-1.17">Golang 1.17</option>
<option value="java-1.8">Java 1.8</option>
<option value="java-1.9">Java 1.9</option>
<option value="java-1.10">Java 1.10</option>
<option value="java-1.11">Java 1.11</option>
<option value="rust-1.56.1">Rust 1.56.1</option>
</select>
<input type="button" value="About" id="aboutButton">
</div>
<div id="wrap">
<textarea itemprop="description" id="code" name="code" autocorrect="off" autocomplete="off" autocapitalize="off" spellcheck="false">print("Hello World!")</textarea>
</div>
<div id="output"></div>
4 changes: 2 additions & 2 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>Muffin</title>
<title>Muffin Coding Playground</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= favicon_link_tag 'logo.png' %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
</head>
Expand Down

0 comments on commit 4461a2e

Please sign in to comment.