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 bb493f6 commit e8475ea
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/assets/stylesheets/home.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the home controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: https://sass-lang.com/
15 changes: 15 additions & 0 deletions app/controllers/home_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

#
# Muffin - Coding Playground Platform.
#
# Copyright 2021 Clivern. All rights reserved.
# Use of this source code is governed by the MIT
# license that can be found in the LICENSE file.
#

class HomeController < ApplicationController
def show
render 'home'
end
end
2 changes: 2 additions & 0 deletions app/helpers/home_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module HomeHelper
end
38 changes: 38 additions & 0 deletions app/views/home/home.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

<!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>
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#

Rails.application.routes.draw do
get '/', to: 'home#show'
get '_health', to: 'health#index'

# Option Routes
Expand Down
7 changes: 7 additions & 0 deletions test/controllers/home_controller_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require "test_helper"

class HomeControllerTest < ActionDispatch::IntegrationTest
# test "the truth" do
# assert true
# end
end

0 comments on commit e8475ea

Please sign in to comment.