Skip to content

Commit

Permalink
トップページを作る
Browse files Browse the repository at this point in the history
  • Loading branch information
fukmaru committed Apr 26, 2019
1 parent 5100b5c commit ede4d9a
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/controllers/pages_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class PagesController < ApplicationController
def home
end
end
3 changes: 3 additions & 0 deletions app/views/pages/home.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<%= render "components/page/page" do %>
<p>Wiki Top Page</p>
<% end %>
2 changes: 2 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Rails.application.routes.draw do
# get 'pages/home'
root to: "pages#home"
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
end
3 changes: 3 additions & 0 deletions frontend/components/page/_page.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div class="page">
<%= yield %>
</div>
4 changes: 4 additions & 0 deletions frontend/components/page/page.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.page {
background-color: blue;
color: white;
}
1 change: 1 addition & 0 deletions frontend/components/page/page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import "./page.css";
3 changes: 2 additions & 1 deletion frontend/packs/application.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
import "init";
import "init";
import "components/page/page"

0 comments on commit ede4d9a

Please sign in to comment.