Skip to content

Commit 009294b

Browse files
committed
Add debug page for Kata in Docs resources
1 parent b1783d0 commit 009294b

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

app/controllers/docs_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ def index
66
@url = request.url
77
end
88

9+
def kata; end
10+
911
def show
1012
@doc = Document.new(params[:id])
1113
redirect_to root_url unless @doc.exists?

app/views/docs/kata.html.haml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
- provide(:meta_image, "/img/ogp-kata.jpeg")
2+
3+
%body
4+
/ Set your background image for this header on the line below.
5+
%header.kata-header{class: 'lazyload', loading: 'lazy', style: "padding-top: 100px; background-image: url('/img/kata-cover.png')"}
6+
.container
7+
.row
8+
.col-lg-8.col-lg-offset-2.col-md-10.col-md-offset-1
9+
.kata-heading
10+
%h1 CoderDojo Kata
11+
%h2.kata-subheading 道場情報まとめ
12+
13+
/ Post Content
14+
%section.kata
15+
.container
16+
.row
17+
.col-lg-8.col-lg-offset-2.col-md-10.col-md-offset-1.fontsize-bigger
18+
/ Navigator
19+
%p{style: "margin-top: -35px; padding-bottom: 20px;"}
20+
%a{href: "/"}トップ
21+
→ Kata
22+
/ Scrivito contents: = scrivito_tag :div, @obj, :body
23+
%p TBD: Migate contents here.
24+
%hr/
25+
%p{align: "right", style: "color: grey; padding-bottom: 50px;"}
26+
/ 更新日: = @obj.last_changed.strftime("%Y年%m月%d日")
27+
更新日: 2021年9月4日

config/routes.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
get "/join-in-board-2017" => "docs#show", id: 'join-in-board-2017'
4242
get "/thanks" => "docs#show", id: 'thanks'
4343
get "/signup" => "docs#show", id: 'signup'
44+
get "/debug/kata" => "docs#kata"
4445

4546
resources :docs, only: %i(index show)
4647
resources :podcasts, only: %i(index show)

0 commit comments

Comments
 (0)