diff --git a/Gemfile b/Gemfile
index b43629dc5..ce08fc84d 100644
--- a/Gemfile
+++ b/Gemfile
@@ -16,6 +16,7 @@ gem "bootstrap-sass"
gem 'sass-rails'
gem 'uglifier'
gem 'font-awesome-rails'
+gem 'haml-rails'
# For redirection
gem 'rack-host-redirect'
diff --git a/Gemfile.lock b/Gemfile.lock
index 51c87f93a..c9abd11ba 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -75,6 +75,7 @@ GEM
debug_inspector (0.0.3)
diff-lcs (1.3)
erubi (1.7.0)
+ erubis (2.7.0)
ethon (0.11.0)
ffi (>= 1.3.0)
execjs (2.7.0)
@@ -94,7 +95,21 @@ GEM
net-http-pipeline
globalid (0.4.1)
activesupport (>= 4.2.0)
+ haml (5.0.4)
+ temple (>= 0.8.0)
+ tilt
+ haml-rails (1.0.0)
+ actionpack (>= 4.0.1)
+ activesupport (>= 4.0.1)
+ haml (>= 4.0.6, < 6.0)
+ html2haml (>= 1.0.1)
+ railties (>= 4.0.1)
highline (1.7.8)
+ html2haml (2.2.0)
+ erubis (~> 2.7.0)
+ haml (>= 4.0, < 6)
+ nokogiri (>= 1.6.0)
+ ruby_parser (~> 3.5)
hyp_diff (0.0.5)
diff-lcs (~> 1.2, >= 1.2.5)
nokogiri (~> 1.6, >= 1.6.5)
@@ -224,6 +239,8 @@ GEM
rspec-core (~> 3.3)
rspec-support (3.7.0)
ruby_dep (1.5.0)
+ ruby_parser (3.10.1)
+ sexp_processor (~> 4.9)
rubyzip (1.2.1)
sass (3.5.3)
sass-listen (~> 4.0.0)
@@ -273,6 +290,7 @@ GEM
selenium-webdriver (3.6.0)
childprocess (~> 0.5)
rubyzip (~> 1.0)
+ sexp_processor (4.10.0)
simple_grid_rails (0.1.0)
spring (2.0.2)
activesupport (>= 4.2)
@@ -284,6 +302,7 @@ GEM
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.3.13)
+ temple (0.8.0)
thor (0.20.0)
thread_safe (0.3.6)
tilt (2.0.8)
@@ -327,6 +346,7 @@ DEPENDENCIES
faraday
faraday_middleware (= 0.10)
font-awesome-rails
+ haml-rails
jbuilder
jquery-rails
koala
diff --git a/app/views/blog_post_page/details.html.erb b/app/views/blog_post_page/details.html.erb
deleted file mode 100644
index 66d9ad914..000000000
--- a/app/views/blog_post_page/details.html.erb
+++ /dev/null
@@ -1,9 +0,0 @@
-<%= scrivito_details_for 'Permalink' do %>
- <%= scrivito_tag :div, @obj, :_permalink %>
-<% end %>
-
-<%= scrivito_medium_dialog do %>
- <%= scrivito_details_for "Title" do %>
- <%= scrivito_tag :div, @obj, :title %>
- <% end %>
-<% end %>
diff --git a/app/views/blog_post_page/details.html.haml b/app/views/blog_post_page/details.html.haml
new file mode 100644
index 000000000..9bfb7d5f4
--- /dev/null
+++ b/app/views/blog_post_page/details.html.haml
@@ -0,0 +1,5 @@
+= scrivito_details_for 'Permalink' do
+ = scrivito_tag :div, @obj, :_permalink
+= scrivito_medium_dialog do
+ = scrivito_details_for "Title" do
+ = scrivito_tag :div, @obj, :title
diff --git a/app/views/blog_post_page/index.html.erb b/app/views/blog_post_page/index.html.erb
deleted file mode 100644
index 57a0e7bd2..000000000
--- a/app/views/blog_post_page/index.html.erb
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
- <%= scrivito_tag_list :ul, @obj, :toclist do |list, child| %>
- <%= list.tag :li do %>
- <%= link_to child.display_title, scrivito_path(child) %>
- <% end %>
- <% end %>
-
- <%= scrivito_tag :h1, @obj, :title %>
- <%= scrivito_tag :div, @obj, :abstract %>
- <%= scrivito_image_tag @obj, :image, class: "img-responsive" %>
- <%= scrivito_tag :div, @obj, :body %>
-
- <%= content_tag :div, scrivito_value(@obj.last_changed.strftime("更新日: %Y年%m月%d日")),
- class: "text-muted text-right h5" %>
-
- <%= render 'shared/sitemap_sotechsha' if @sts_posts %>
-
-
-
-
-
diff --git a/app/views/blog_post_page/index.html.haml b/app/views/blog_post_page/index.html.haml
new file mode 100644
index 000000000..d3361d82c
--- /dev/null
+++ b/app/views/blog_post_page/index.html.haml
@@ -0,0 +1,16 @@
+%article
+ .container
+ .row
+ .col-lg-8.col-lg-offset-2.col-md-10.col-md-offset-1
+ .fontsize-bigger
+ = scrivito_tag_list :ul, @obj, :toclist do |list, child|
+ = list.tag :li do
+ = link_to child.display_title, scrivito_path(child)
+ = scrivito_tag :h1, @obj, :title
+ = scrivito_tag :div, @obj, :abstract
+ = scrivito_image_tag @obj, :image, class: "img-responsive"
+ = scrivito_tag :div, @obj, :body
+ %hr/
+ = content_tag :div, scrivito_value(@obj.last_changed.strftime("更新日: %Y年%m月%d日")), class: "text-muted text-right h5"
+ %div{:style => "margin-left: 0px; padding-bottom: 30px;"}
+ = render 'shared/sitemap_sotechsha' if @sts_posts
diff --git a/app/views/blog_post_page/thumbnail.html.erb b/app/views/blog_post_page/thumbnail.html.erb
deleted file mode 100644
index 8cd2e718c..000000000
--- a/app/views/blog_post_page/thumbnail.html.erb
+++ /dev/null
@@ -1 +0,0 @@
-<%= scrivito_thumbnail BlogPostPage.description_for_editor, :content %>
diff --git a/app/views/blog_post_page/thumbnail.html.haml b/app/views/blog_post_page/thumbnail.html.haml
new file mode 100644
index 000000000..45fd206fe
--- /dev/null
+++ b/app/views/blog_post_page/thumbnail.html.haml
@@ -0,0 +1 @@
+= scrivito_thumbnail BlogPostPage.description_for_editor, :content
diff --git a/app/views/docs/index.html.erb b/app/views/docs/index.html.erb
deleted file mode 100644
index ec830d939..000000000
--- a/app/views/docs/index.html.erb
+++ /dev/null
@@ -1,13 +0,0 @@
-<% provide(:title, @title) %>
-<% provide(:url, @url ) %>
-
-
-
- <%= @title %>
-
- <% @docs.each do |doc| %>
- - <%= link_to doc.title, doc.url %>
- <% end %>
-
-
-
diff --git a/app/views/docs/index.html.haml b/app/views/docs/index.html.haml
new file mode 100644
index 000000000..aeb73d5c1
--- /dev/null
+++ b/app/views/docs/index.html.haml
@@ -0,0 +1,8 @@
+- provide(:title, @title)
+- provide(:url, @url )
+.container{:style => "line-height: 2.2em;"}
+ %section.keiyaku{:style => "padding: 50px 0px 50px 0px;"}
+ %h2{:style => "text-align: center; padding-bottom: 50px;"}= @title
+ %ul{:style => "font-size: 120%"}
+ - @docs.each do |doc|
+ %li= link_to doc.title, doc.url
diff --git a/app/views/docs/show.html.erb b/app/views/docs/show.html.erb
deleted file mode 100644
index 0659fbfa5..000000000
--- a/app/views/docs/show.html.erb
+++ /dev/null
@@ -1,8 +0,0 @@
-<% provide(:title, @doc.title) %>
-<% provide(:url, @url) %>
-
-
-
-
diff --git a/app/views/docs/show.html.haml b/app/views/docs/show.html.haml
new file mode 100644
index 000000000..3621c997f
--- /dev/null
+++ b/app/views/docs/show.html.haml
@@ -0,0 +1,5 @@
+- provide(:title, @doc.title)
+- provide(:url, @url)
+.container{:style => "line-height: 1.9em;"}
+ %section.keiyaku{:style => "padding: 50px 0px 100px 0px;"}
+ = raw @content
diff --git a/app/views/download/details.html.erb b/app/views/download/details.html.erb
deleted file mode 100644
index 37e48d630..000000000
--- a/app/views/download/details.html.erb
+++ /dev/null
@@ -1,11 +0,0 @@
-<%= scrivito_medium_dialog do %>
- <%= scrivito_details_for do %>
- <%= scrivito_tag :div, @obj, :blob do %>
- <%= link_to @obj.description_for_editor, scrivito_path(@obj), :target => :blank %>
- <% end %>
- <% end %>
-
- <%= scrivito_details_for do %>
- <%= number_to_human_size @obj.meta_data[:content_length] %>
- <% end %>
-<% end %>
diff --git a/app/views/download/details.html.haml b/app/views/download/details.html.haml
new file mode 100644
index 000000000..5026492ca
--- /dev/null
+++ b/app/views/download/details.html.haml
@@ -0,0 +1,6 @@
+= scrivito_medium_dialog do
+ = scrivito_details_for do
+ = scrivito_tag :div, @obj, :blob do
+ = link_to @obj.description_for_editor, scrivito_path(@obj), :target => :blank
+ = scrivito_details_for do
+ = number_to_human_size @obj.meta_data[:content_length]
diff --git a/app/views/footer_widget/details.html.erb b/app/views/footer_widget/details.html.erb
deleted file mode 100644
index 5f01b0679..000000000
--- a/app/views/footer_widget/details.html.erb
+++ /dev/null
@@ -1,4 +0,0 @@
-<%= scrivito_medium_dialog do %>
- <%= scrivito_details_for FooterWidget.description_for_editor do %>
- <% end %>
-<% end %>
diff --git a/app/views/footer_widget/details.html.haml b/app/views/footer_widget/details.html.haml
new file mode 100644
index 000000000..fd177aa3a
--- /dev/null
+++ b/app/views/footer_widget/details.html.haml
@@ -0,0 +1,2 @@
+= scrivito_medium_dialog do
+ = scrivito_details_for FooterWidget.description_for_editor do
diff --git a/app/views/footer_widget/show.html.erb b/app/views/footer_widget/show.html.erb
deleted file mode 100644
index 6d1d66f36..000000000
--- a/app/views/footer_widget/show.html.erb
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
- <%= scrivito_tag :h5, widget, :headline, class:'cover-text-white', style:'padding-top:20px;' %>
- <%= scrivito_tag :p, widget, :paragraph, class:'cover-text-white', style:'padding-bottom:60; padding-top:20px;' %>
-
-
-
diff --git a/app/views/footer_widget/show.html.haml b/app/views/footer_widget/show.html.haml
new file mode 100644
index 000000000..7bff9c129
--- /dev/null
+++ b/app/views/footer_widget/show.html.haml
@@ -0,0 +1,4 @@
+.col-12
+ .col-3.cover-bg-blue
+ = scrivito_tag :h5, widget, :headline, class:'cover-text-white', style:'padding-top:20px;'
+ = scrivito_tag :p, widget, :paragraph, class:'cover-text-white', style:'padding-bottom:60; padding-top:20px;'
diff --git a/app/views/footer_widget/thumbnail.html.erb b/app/views/footer_widget/thumbnail.html.erb
deleted file mode 100644
index 5ad9f425e..000000000
--- a/app/views/footer_widget/thumbnail.html.erb
+++ /dev/null
@@ -1 +0,0 @@
-<%= scrivito_thumbnail FooterWidget.description_for_editor %>
diff --git a/app/views/footer_widget/thumbnail.html.haml b/app/views/footer_widget/thumbnail.html.haml
new file mode 100644
index 000000000..b2cecc467
--- /dev/null
+++ b/app/views/footer_widget/thumbnail.html.haml
@@ -0,0 +1 @@
+= scrivito_thumbnail FooterWidget.description_for_editor
diff --git a/app/views/headline_widget/details.html.erb b/app/views/headline_widget/details.html.erb
deleted file mode 100644
index a3c41fd4f..000000000
--- a/app/views/headline_widget/details.html.erb
+++ /dev/null
@@ -1,5 +0,0 @@
-<%= scrivito_small_dialog do %>
- <%= scrivito_details_for 'Anchor' do %>
- <%= scrivito_tag(:div, widget, :anchor) %>
- <% end %>
-<% end %>
diff --git a/app/views/headline_widget/details.html.haml b/app/views/headline_widget/details.html.haml
new file mode 100644
index 000000000..c134a9d2a
--- /dev/null
+++ b/app/views/headline_widget/details.html.haml
@@ -0,0 +1,3 @@
+= scrivito_small_dialog do
+ = scrivito_details_for 'Anchor' do
+ = scrivito_tag(:div, widget, :anchor)
diff --git a/app/views/headline_widget/show.html.erb b/app/views/headline_widget/show.html.erb
deleted file mode 100644
index 52baf6072..000000000
--- a/app/views/headline_widget/show.html.erb
+++ /dev/null
@@ -1,2 +0,0 @@
-
-<%= scrivito_tag :h2, widget, :headline, class: "headline" %>
diff --git a/app/views/headline_widget/show.html.haml b/app/views/headline_widget/show.html.haml
new file mode 100644
index 000000000..276d39e68
--- /dev/null
+++ b/app/views/headline_widget/show.html.haml
@@ -0,0 +1,2 @@
+.headline-anchor{:id => "#{widget.anchor}"}
+= scrivito_tag :h2, widget, :headline, class: "headline"
diff --git a/app/views/headline_widget/thumbnail.html.erb b/app/views/headline_widget/thumbnail.html.erb
deleted file mode 100644
index 1b0913d3b..000000000
--- a/app/views/headline_widget/thumbnail.html.erb
+++ /dev/null
@@ -1,3 +0,0 @@
-<%= scrivito_thumbnail HeadlineWidget.description_for_editor, :headline do %>
- A headline widget with an Anchor ID attribute.
-<% end %>
diff --git a/app/views/headline_widget/thumbnail.html.haml b/app/views/headline_widget/thumbnail.html.haml
new file mode 100644
index 000000000..8ca380602
--- /dev/null
+++ b/app/views/headline_widget/thumbnail.html.haml
@@ -0,0 +1,2 @@
+= scrivito_thumbnail HeadlineWidget.description_for_editor, :headline do
+ A headline widget with an Anchor ID attribute.
diff --git a/app/views/image/details.html.erb b/app/views/image/details.html.erb
deleted file mode 100644
index 7d485ad5d..000000000
--- a/app/views/image/details.html.erb
+++ /dev/null
@@ -1,17 +0,0 @@
-<%= scrivito_medium_dialog do %>
- <%= scrivito_details_for do %>
- <%= scrivito_image_tag @obj %>
- <% end %>
-
- <%= scrivito_details_for do %>
- <% if @obj.meta_data[:width] && @obj.meta_data[:height]%>
-
- <%= @obj.meta_data[:width] %> × <%= @obj.meta_data[:height] %> px
-
- <% end %>
-
-
- <%= number_to_human_size @obj.meta_data[:content_length] %>
-
- <% end %>
-<% end %>
diff --git a/app/views/image/details.html.haml b/app/views/image/details.html.haml
new file mode 100644
index 000000000..62f304e65
--- /dev/null
+++ b/app/views/image/details.html.haml
@@ -0,0 +1,10 @@
+= scrivito_medium_dialog do
+ = scrivito_details_for do
+ = scrivito_image_tag @obj
+ = scrivito_details_for do
+ - if @obj.meta_data[:width] && @obj.meta_data[:height]
+ %div
+ = @obj.meta_data[:width]
+ × #{@obj.meta_data[:height]} px
+ %div
+ = number_to_human_size @obj.meta_data[:content_length]
diff --git a/app/views/image_widget/show.html.erb b/app/views/image_widget/show.html.erb
deleted file mode 100644
index 2dbeece5c..000000000
--- a/app/views/image_widget/show.html.erb
+++ /dev/null
@@ -1,2 +0,0 @@
-<%= scrivito_image_tag widget, :image, style:'padding-top:-50px;',
- :class => "img-responsive" %>
diff --git a/app/views/image_widget/show.html.haml b/app/views/image_widget/show.html.haml
new file mode 100644
index 000000000..7b11f9ecf
--- /dev/null
+++ b/app/views/image_widget/show.html.haml
@@ -0,0 +1 @@
+= scrivito_image_tag widget, :image, style:'padding-top:-50px;', class: "img-responsive"
diff --git a/app/views/image_widget/thumbnail.html.erb b/app/views/image_widget/thumbnail.html.erb
deleted file mode 100644
index 4f9179464..000000000
--- a/app/views/image_widget/thumbnail.html.erb
+++ /dev/null
@@ -1,3 +0,0 @@
-<%= scrivito_thumbnail ImageWidget.description_for_editor, :image do %>
- A widget with an image.
-<% end %>
diff --git a/app/views/image_widget/thumbnail.html.haml b/app/views/image_widget/thumbnail.html.haml
new file mode 100644
index 000000000..7d47435fd
--- /dev/null
+++ b/app/views/image_widget/thumbnail.html.haml
@@ -0,0 +1,2 @@
+= scrivito_thumbnail ImageWidget.description_for_editor, :image do
+ A widget with an image.
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
deleted file mode 100644
index b259804fb..000000000
--- a/app/views/layouts/application.html.erb
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
-
-
-
- <%= full_title(yield(:title)) %>
-
- <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
- <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
- <%= csrf_meta_tags %>
- <%= scrivito_head_tags if using_scrivito? %>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <% flash.each do |message_type, message| %>
- <%= message %>
- <% end %>
- <%= yield %>
- <%= scrivito_body_tags if using_scrivito? %>
- <%= render 'shared/footer' %>
-
-
-
-
-
-
-
-
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
new file mode 100644
index 000000000..7158d06c4
--- /dev/null
+++ b/app/views/layouts/application.html.haml
@@ -0,0 +1,75 @@
+!!!
+%html
+ %head
+ %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/
+ %meta{:charset => "utf-8"}/
+ %meta{:content => "IE=edge", "http-equiv" => "X-UA-Compatible"}/
+ %meta{:content => "width=device-width, initial-scale=1,\n\t\t minimum-scale=1, maximum-scale=1, user-scalable=no", :name => "viewport"}/
+ %title= full_title(yield(:title))
+ = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
+ = javascript_include_tag 'application', 'data-turbolinks-track' => true
+ = csrf_meta_tags
+ = scrivito_head_tags if using_scrivito?
+ %meta{:content => "715330868", :property => "fb:admins"}/
+ %meta{:content => "805184859580207", :property => "fb:app_id"}/
+ %meta{:content => "#{full_title(yield(:title))}", :property => "og:title"}/
+ %meta{:content => "#{full_url(yield(:url))}", :property => "og:url"}/
+ %meta{:content => "#{meta_description(yield(:meta_description))}", :name => "description"}/
+ %meta{:content => "#{meta_description(yield(:meta_description))}", :property => "og:description"}/
+ %meta{:content => "website", :property => "og:type"}/
+ %meta{:content => "https://coderdojo.jp/og-image.png", :property => "og:image"}/
+ %meta{:content => "image/png", :property => "og:image:type"}/
+ %meta{:content => "CoderDojo Japan", :property => "og:site_name"}/
+ %meta{:content => "summary", :name => "twitter:card"}/
+ %meta{:content => "@CoderDojoJapan", :name => "twitter:site"}/
+ %meta{:content => "#{full_title(yield(:title))}", :name => "twitter:title"}/
+ %meta{:content => "#{meta_description(yield(:meta_description))}", :name => "twitter:description"}/
+ %meta{:content => "https://coderdojo.jp/og-image.png", :name => "twitter:image"}/
+ %meta{:content => "#{full_url(yield(:url))}", :name => "twitter:url"}/
+ %link{:href => "/img/apple-icon-57x57.png", :rel => "apple-touch-icon", :sizes => "57x57"}/
+ %link{:href => "/img/apple-icon-60x60.png", :rel => "apple-touch-icon", :sizes => "60x60"}/
+ %link{:href => "/img/apple-icon-72x72.png", :rel => "apple-touch-icon", :sizes => "72x72"}/
+ %link{:href => "/img/apple-icon-76x76.png", :rel => "apple-touch-icon", :sizes => "76x76"}/
+ %link{:href => "/img/apple-icon-114x114.png", :rel => "apple-touch-icon", :sizes => "114x114"}/
+ %link{:href => "/img/apple-icon-120x120.png", :rel => "apple-touch-icon", :sizes => "120x120"}/
+ %link{:href => "/img/apple-icon-144x144.png", :rel => "apple-touch-icon", :sizes => "144x144"}/
+ %link{:href => "/img/apple-icon-152x152.png", :rel => "apple-touch-icon", :sizes => "152x152"}/
+ %link{:href => "/img/apple-icon-180x180.png", :rel => "apple-touch-icon", :sizes => "180x180"}/
+ %link{:href => "/img/android-icon-192x192.png", :rel => "icon", :sizes => "192x192", :type => "image/png"}/
+ %link{:href => "/img/favicon-16x16.png", :rel => "icon", :sizes => "16x16", :type => "image/png"}/
+ %link{:href => "/img/favicon-32x32.png", :rel => "icon", :sizes => "32x32", :type => "image/png"}/
+ %link{:href => "/img/favicon-96x96.png", :rel => "icon", :sizes => "96x96", :type => "image/png"}/
+ %link{:href => "/manifest.json", :rel => "manifest"}/
+ %link{:color => "#1373ce", :href => "/img/safari-pinned-tab.svg", :rel => "mask-icon"}/
+ %meta{:content => "#ffffff", :name => "msapplication-TileColor"}/
+ %meta{:content => "/img/ms-icon-144x144.png", :name => "msapplication-TileImage"}/
+ %meta{:content => "#ffffff", :name => "theme-color"}/
+ %link{:href => "https://fonts.googleapis.com/css?family=Fjalla+One", :rel => "stylesheet", :type => "text/css"}/
+ / HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries
+ / WARNING: Respond.js doesn't work if you view the page via file://
+ /[if lt IE 9]
+
+
+ %body
+ - flash.each do |message_type, message|
+ %div{:class => "alert alert-#{message_type}"}= message
+ = yield
+ = scrivito_body_tags if using_scrivito?
+ = render 'shared/footer'
+ #fb-root
+ :javascript
+ (function(d, s, id) {
+ var js, fjs = d.getElementsByTagName(s)[0];
+ if (d.getElementById(id)) return;
+ js = d.createElement(s); js.id = id;
+ js.src = "//connect.facebook.net/ja_JP/sdk.js#xfbml=1&version=v2.8&appId=805184859580207";
+ fjs.parentNode.insertBefore(js, fjs);
+ }(document, 'script', 'facebook-jssdk'));
+ :javascript
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+ })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
+
+ ga('create', 'UA-62337761-1', 'auto');
+ ga('send', 'pageview');
diff --git a/app/views/layouts/scrivito_dialog.html.erb b/app/views/layouts/scrivito_dialog.html.erb
deleted file mode 100644
index 9443040f5..000000000
--- a/app/views/layouts/scrivito_dialog.html.erb
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
- <%= scrivito_head_tags %>
- <%= stylesheet_link_tag 'application', media: 'all' %>
- <%= csrf_meta_tags %>
-
-
- <%= scrivito_body_tags %>
- <%= yield %>
- <%= javascript_include_tag 'application' %>
-
-
diff --git a/app/views/layouts/scrivito_dialog.html.haml b/app/views/layouts/scrivito_dialog.html.haml
new file mode 100644
index 000000000..ab08c07fb
--- /dev/null
+++ b/app/views/layouts/scrivito_dialog.html.haml
@@ -0,0 +1,11 @@
+!!!
+%html
+ %head
+ %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/
+ = scrivito_head_tags
+ = stylesheet_link_tag 'application', media: 'all'
+ = csrf_meta_tags
+ %body.scrivito_dialog
+ = scrivito_body_tags
+ = yield
+ = javascript_include_tag 'application'
diff --git a/app/views/login_page/details.html.erb b/app/views/login_page/details.html.erb
deleted file mode 100644
index c28b0daa5..000000000
--- a/app/views/login_page/details.html.erb
+++ /dev/null
@@ -1,5 +0,0 @@
-<%= scrivito_medium_dialog do %>
- <%= scrivito_details_for "Title" do %>
- <%= scrivito_tag :div, @obj, :title %>
- <% end %>
-<% end %>
diff --git a/app/views/login_page/details.html.haml b/app/views/login_page/details.html.haml
new file mode 100644
index 000000000..0e17ad433
--- /dev/null
+++ b/app/views/login_page/details.html.haml
@@ -0,0 +1,3 @@
+= scrivito_medium_dialog do
+ = scrivito_details_for "Title" do
+ = scrivito_tag :div, @obj, :title
diff --git a/app/views/login_page/index.html.erb b/app/views/login_page/index.html.erb
deleted file mode 100644
index e5e3c946e..000000000
--- a/app/views/login_page/index.html.erb
+++ /dev/null
@@ -1,23 +0,0 @@
-<%= scrivito_tag :h1, @obj, :title %>
-<%= scrivito_tag :div, @obj, :body %>
-
-<%= form_tag session_path, role: 'form' do %>
-
- <%= label_tag :email, 'メールアドレス' %>
- <%= text_field_tag :email, '', class: 'form-control', placeholder: '' %>
-
-
- <%= label_tag :password, 'パスワード' %>
- <%= password_field_tag :password, '', class: 'form-control', placeholder: '' %>
-
-
-<% end %>
-
-<% if Rails.env.development? %>
-
- <%= scrivito_tag_list :ul, @obj, :toclist do |list, child| %>
- <%= list.tag :li do %>
- <%= link_to child.display_title, scrivito_path(child) %>
- <% end %>
- <% end %>
-<% end %>
diff --git a/app/views/login_page/index.html.haml b/app/views/login_page/index.html.haml
new file mode 100644
index 000000000..0bfad5764
--- /dev/null
+++ b/app/views/login_page/index.html.haml
@@ -0,0 +1,15 @@
+= scrivito_tag :h1, @obj, :title
+= scrivito_tag :div, @obj, :body
+= form_tag session_path, role: 'form' do
+ .form-group
+ = label_tag :email, 'メールアドレス'
+ = text_field_tag :email, '', class: 'form-control', placeholder: ''
+ .form-group
+ = label_tag :password, 'パスワード'
+ = password_field_tag :password, '', class: 'form-control', placeholder: ''
+ %button.btn.btn-default{:type => "submit"} ログイン
+- if Rails.env.development?
+ %hr/
+ = scrivito_tag_list :ul, @obj, :toclist do |list, child|
+ = list.tag :li do
+ = link_to child.display_title, scrivito_path(child)
diff --git a/app/views/login_page/thumbnail.html.erb b/app/views/login_page/thumbnail.html.erb
deleted file mode 100644
index b1e2ae408..000000000
--- a/app/views/login_page/thumbnail.html.erb
+++ /dev/null
@@ -1 +0,0 @@
-<%= scrivito_thumbnail LoginPage.description_for_editor, :content %>
diff --git a/app/views/login_page/thumbnail.html.haml b/app/views/login_page/thumbnail.html.haml
new file mode 100644
index 000000000..c81f69e4c
--- /dev/null
+++ b/app/views/login_page/thumbnail.html.haml
@@ -0,0 +1 @@
+= scrivito_thumbnail LoginPage.description_for_editor, :content
diff --git a/app/views/plain_page/details.html.erb b/app/views/plain_page/details.html.erb
deleted file mode 100644
index 66d9ad914..000000000
--- a/app/views/plain_page/details.html.erb
+++ /dev/null
@@ -1,9 +0,0 @@
-<%= scrivito_details_for 'Permalink' do %>
- <%= scrivito_tag :div, @obj, :_permalink %>
-<% end %>
-
-<%= scrivito_medium_dialog do %>
- <%= scrivito_details_for "Title" do %>
- <%= scrivito_tag :div, @obj, :title %>
- <% end %>
-<% end %>
diff --git a/app/views/plain_page/details.html.haml b/app/views/plain_page/details.html.haml
new file mode 100644
index 000000000..9bfb7d5f4
--- /dev/null
+++ b/app/views/plain_page/details.html.haml
@@ -0,0 +1,5 @@
+= scrivito_details_for 'Permalink' do
+ = scrivito_tag :div, @obj, :_permalink
+= scrivito_medium_dialog do
+ = scrivito_details_for "Title" do
+ = scrivito_tag :div, @obj, :title
diff --git a/app/views/plain_page/index.html.erb b/app/views/plain_page/index.html.erb
deleted file mode 100644
index b5d8c43d3..000000000
--- a/app/views/plain_page/index.html.erb
+++ /dev/null
@@ -1,75 +0,0 @@
-<% if @obj && !@obj.permalink.nil? %>
-
-
-
-
-
-
-
-
-
-
-
-
- <%= scrivito_tag :div, @obj, :body %>
-
-
更新日: <%= @obj.last_changed.strftime("%Y年%m月%d日") %>
-
-
-
-
-
-<% else %>
- <%= scrivito_tag :div, @obj, :body %>
-<% end %>
-
diff --git a/app/views/plain_page/index.html.haml b/app/views/plain_page/index.html.haml
new file mode 100644
index 000000000..72ec99d55
--- /dev/null
+++ b/app/views/plain_page/index.html.haml
@@ -0,0 +1,49 @@
+%body
+ - if @obj && !@obj.permalink.nil?
+ / Navigation
+ %nav.navbar.navbar-default.navbar-custom.navbar-fixed-top
+ .container-fluid
+ / Brand and toggle get grouped for better mobile display
+ .navbar-header.page-scroll
+ %button.navbar-toggle{"data-target" => "#bs-example-navbar-collapse-1", "data-toggle" => "collapse", :type => "button"}
+ %span.sr-only Toggle navigation
+ 目次
+ %i.fa.fa-bars
+ %a.navbar-brand{:href => "#top"} CoderDojo Kata
+ / Collect the nav links, forms, and other content for toggling
+ #bs-example-navbar-collapse-1.collapse.navbar-collapse
+ %ul.nav.navbar-nav.navbar-right
+ %li
+ %a{:href => "#README"} はじめに
+ %li
+ %a{:href => "#learn"} 学ぶ
+ %li
+ %a{:href => "#challenge"} 腕試し
+ %li
+ %a{:href => "#startup"} 立ち上げる
+ %li
+ %a{:href => "#support"} 支援
+ %li
+ %a{:href => "#faq"} FAQ
+ / /.navbar-collapse
+ / /.container
+ / Page Header
+ / Set your background image for this header on the line below.
+ %header.intro-header{:style => "padding-top: 100px; background-image: url('img/kata-cover.png')"}
+ .container
+ .row
+ .col-lg-8.col-lg-offset-2.col-md-10.col-md-offset-1
+ .post-heading
+ %h1 CoderDojo Kata
+ %h2.subheading 道場情報まとめ
+ / Post Content
+ %article
+ .container
+ .row
+ .col-lg-8.col-lg-offset-2.col-md-10.col-md-offset-1.fontsize-bigger
+ = scrivito_tag :div, @obj, :body
+ %hr/
+ %p{:align => "right", :style => "color: grey; padding-bottom: 50px;"}
+ 更新日: #{@obj.last_changed.strftime("%Y年%m月%d日")}
+ - else
+ = scrivito_tag :div, @obj, :body
diff --git a/app/views/plain_page/thumbnail.html.erb b/app/views/plain_page/thumbnail.html.erb
deleted file mode 100644
index f69c54e5c..000000000
--- a/app/views/plain_page/thumbnail.html.erb
+++ /dev/null
@@ -1 +0,0 @@
-<%= scrivito_thumbnail PlainPage.description_for_editor, :content %>
diff --git a/app/views/plain_page/thumbnail.html.haml b/app/views/plain_page/thumbnail.html.haml
new file mode 100644
index 000000000..892668430
--- /dev/null
+++ b/app/views/plain_page/thumbnail.html.haml
@@ -0,0 +1 @@
+= scrivito_thumbnail PlainPage.description_for_editor, :content
diff --git a/app/views/shared/_footer.html.erb b/app/views/shared/_footer.html.erb
deleted file mode 100644
index 5696e04dd..000000000
--- a/app/views/shared/_footer.html.erb
+++ /dev/null
@@ -1,28 +0,0 @@
-
diff --git a/app/views/shared/_footer.html.haml b/app/views/shared/_footer.html.haml
new file mode 100644
index 000000000..1334e1d8b
--- /dev/null
+++ b/app/views/shared/_footer.html.haml
@@ -0,0 +1,38 @@
+%footer#footer.footer-bottom.text-center
+ %h2{:style => "line-height: 30px;"}
+ %a.footer-link{:href => "/"} ホーム
+ |
+ %a.footer-link{:href => "/kata"} Kata (Wiki)
+ |
+ %a.footer-link{:href => "/docs/charter"} 憲章
+ |
+ %a.footer-link{:href => "/docs/teikan"} 定款
+ |
+ %a.footer-link{:href => "/docs/join-in-board"} 理事募集
+ |
+ %a.footer-link{:href => "/sotechsha"} 公式ブック
+ |
+ %a.footer-link{:href => "http://dojocast.coderdojo.jp/"} Podcast
+ %h2
+ %a{:href => "https://github.com/coderdojo-japan"}
+ %i.fa.fa-github.fa-3x.fa-fw{"aria-hidden" => "true"}
+ %a{:href => "https://www.facebook.com/coderdojo.jp/"}
+ %i.fa.fa-facebook.fa-3x.fa-fw{"aria-hidden" => "true"}
+ %a{:href => "https://twitter.com/CoderDojoJapan"}
+ %i.fa.fa-twitter.fa-3x.fa-fw{"aria-hidden" => "true"}
+ %a{:href => "https://www.youtube.com/channel/UCal5GuoCDCMDQe07w69TuJA"}
+ %i.fa.fa-youtube.fa-3x.fa-fw{"aria-hidden" => "true"}
+ %a{:href => "http://dojocast.coderdojo.jp/"}
+ %i.fa.fa-podcast.fa-3x.fa-fw{"aria-hidden" => "true"}
+ %p
+ 本サイトのソースコードや社団法人の定款などは
+ %a.footer-link{:href => "https://github.com/coderdojo-japan/"} GitHub
+ 上で公開されています。
+ %br/
+ 本サイトのプライバシーポリシーは
+ %a.footer-link{:href => "/docs/privacy"}> こちら
+ をご参照ください。
+ %p
+ Copyright © 2012-2017 一般社団法人 CoderDojo Japan
+ %br/
+ 東京都新宿区高田馬場1-28-10 三慶ビル4F CASE Shinjuku
diff --git a/app/views/shared/_sitemap_sotechsha.html.erb b/app/views/shared/_sitemap_sotechsha.html.erb
deleted file mode 100644
index b6ef9d914..000000000
--- a/app/views/shared/_sitemap_sotechsha.html.erb
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
diff --git a/app/views/shared/_sitemap_sotechsha.html.haml b/app/views/shared/_sitemap_sotechsha.html.haml
new file mode 100644
index 000000000..eefa6bb04
--- /dev/null
+++ b/app/views/shared/_sitemap_sotechsha.html.haml
@@ -0,0 +1,14 @@
+%nav.navbar
+ %ul.nav.navbar-nav
+ - @sts_posts.each do |sts_post|
+ %li
+ %span.list-group
+ = link_to(scrivito_value(sts_post.title), scrivito_path(sts_post), :class => "list-group-item list-group-item-success text-center")
+%hr/
+%br/
+/
+
+ トップ |
+ 正誤表 |
+ 全国の道場
+
diff --git a/app/views/shared/_social_buttons.html.erb b/app/views/shared/_social_buttons.html.erb
deleted file mode 100644
index 1289385c2..000000000
--- a/app/views/shared/_social_buttons.html.erb
+++ /dev/null
@@ -1,38 +0,0 @@
-
- <% if @obj %>
- -
-
-
- 
- <% else %>
- -
-
-
- 
- <% end %>
- -
-
-
-
diff --git a/app/views/shared/_social_buttons.html.haml b/app/views/shared/_social_buttons.html.haml
new file mode 100644
index 000000000..40339f0dd
--- /dev/null
+++ b/app/views/shared/_social_buttons.html.haml
@@ -0,0 +1,31 @@
+%ol.snsb{:style => "margin-left: 0px;"}
+ - if @obj
+ %li
+ .fb-like{"data-action" => "like", "data-href" => "#{@obj.binary_url}", "data-layout" => "button_count", "data-share" => "true", "data-show-faces" => "true"}
+ %li
+ %a.twitter-share-button{"data-hashtags" => "CoderDojo", "data-lang" => "ja", "data-text" => "#{@obj.display_title}", "data-url" => "#{@obj.binary_url}", "data-via" => "CoderDojoJapan", :href => "https://twitter.com/share", :width => "100"} Tweet
+ :javascript
+ !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');
+ %li
+ %a.hatena-bookmark-button{"data-hatena-bookmark-lang" => "ja", "data-hatena-bookmark-layout" => "standard-balloon", "data-hatena-bookmark-title" => "#{@obj.display_title}", :href => "https://b.hatena.ne.jp/entry/#{@obj.binary_url}", :title => "このエントリーをはてなブックマークに追加"}
+ %img{:alt => "このエントリーをはてなブックマークに追加", :height => "20", :src => "https://b.st-hatena.com/images/entry-button/button-only@2x.png", :style => "border: none;", :width => "20"}/
+ %script{:async => "async", :charset => "utf-8", :src => "https://b.st-hatena.com/js/bookmark_button.js", :type => "text/javascript"}
+ - else
+ %li
+ .fb-like{"data-action" => "like", "data-href" => "https://coderdojo.jp/sotechsha", "data-layout" => "button_count", "data-share" => "true", "data-show-faces" => "true"}
+ %li
+ %a.twitter-share-button{"data-hashtags" => "CoderDojo", "data-lang" => "ja", "data-text" => "CoderDojo Japan - コーダー道場ジャパン", "data-url" => "https://coderdojo.jp/sotechsha", "data-via" => "CoderDojoJapan", :href => "https://twitter.com/share", :width => "100"} Tweet
+ :javascript
+ !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');
+ %li
+ %a.hatena-bookmark-button{"data-hatena-bookmark-lang" => "ja", "data-hatena-bookmark-layout" => "standard-balloon", "data-hatena-bookmark-title" => "CoderDojo Japan - コーダー道場ジャパン", :href => "https://b.hatena.ne.jp/entry/coderdojo.jp/sotechsha", :title => "このエントリーをはてなブックマークに追加"}
+ %img{:alt => "このエントリーをはてなブックマークに追加", :height => "20", :src => "https://b.st-hatena.com/images/entry-button/button-only@2x.png", :style => "border: none;", :width => "20"}/
+ %script{:async => "async", :charset => "utf-8", :src => "https://b.st-hatena.com/js/bookmark_button.js", :type => "text/javascript"}
+ %li
+ .g-plusone{"data-lang" => "ja", "data-size" => "medium"}
+ :javascript
+ (function() {
+ var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
+ po.src = 'https://apis.google.com/js/plusone.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
+ })();
diff --git a/app/views/sotechsha_overview_page/details.html.erb b/app/views/sotechsha_overview_page/details.html.erb
deleted file mode 100644
index 66d9ad914..000000000
--- a/app/views/sotechsha_overview_page/details.html.erb
+++ /dev/null
@@ -1,9 +0,0 @@
-<%= scrivito_details_for 'Permalink' do %>
- <%= scrivito_tag :div, @obj, :_permalink %>
-<% end %>
-
-<%= scrivito_medium_dialog do %>
- <%= scrivito_details_for "Title" do %>
- <%= scrivito_tag :div, @obj, :title %>
- <% end %>
-<% end %>
diff --git a/app/views/sotechsha_overview_page/details.html.haml b/app/views/sotechsha_overview_page/details.html.haml
new file mode 100644
index 000000000..9bfb7d5f4
--- /dev/null
+++ b/app/views/sotechsha_overview_page/details.html.haml
@@ -0,0 +1,5 @@
+= scrivito_details_for 'Permalink' do
+ = scrivito_tag :div, @obj, :_permalink
+= scrivito_medium_dialog do
+ = scrivito_details_for "Title" do
+ = scrivito_tag :div, @obj, :title
diff --git a/app/views/sotechsha_overview_page/index.html.erb b/app/views/sotechsha_overview_page/index.html.erb
deleted file mode 100644
index c42e3102d..000000000
--- a/app/views/sotechsha_overview_page/index.html.erb
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
- <%= image_tag "sotechsha-1_book-cover.png",
- class: "img-responsive center-block",
- alt: "Scratchでつくる! たのしむ! プログラミング道場",
- style: "width: 90%"
- %>
-
-
- <%= scrivito_tag :div, @obj, :body, class: "img-responsive center-block" %>
-
-
-
- <% @sts_posts.each do |sts_post| %>
-
<%= content_tag(:strong, scrivito_value(sts_post.title)) %>
- <%= content_tag(:p, truncate(scrivito_value(sts_post.abstract),
- :length => 250, :escape => false)) %>
- <%= link_to("もっと見る", scrivito_path(sts_post), :class => "btn btn-warning btn-block") %>
-
- <% end %>
-
- <%= render 'shared/social_buttons' %>
- <%= render 'shared/sitemap_sotechsha' %>
-
-
-
diff --git a/app/views/sotechsha_overview_page/index.html.haml b/app/views/sotechsha_overview_page/index.html.haml
new file mode 100644
index 000000000..448e836ae
--- /dev/null
+++ b/app/views/sotechsha_overview_page/index.html.haml
@@ -0,0 +1,13 @@
+.container-fluid
+ #top.col-md-6
+ = image_tag "sotechsha-1_book-cover.png", class: "img-responsive center-block", alt: "Scratchでつくる! たのしむ! プログラミング道場", style: "width: 90%"
+ %div{:style => "text-align: center; font-size: 19.2px;"}
+ = scrivito_tag :div, @obj, :body, class: "img-responsive center-block"
+ .col-md-6
+ - @sts_posts.each do |sts_post|
+ %h3= content_tag(:strong, scrivito_value(sts_post.title))
+ = content_tag(:p, truncate(scrivito_value(sts_post.abstract), :length => 250, :escape => false))
+ = link_to("もっと見る", scrivito_path(sts_post), :class => "btn btn-warning btn-block")
+ %hr/
+ = render 'shared/social_buttons'
+ = render 'shared/sitemap_sotechsha'
diff --git a/app/views/sotechsha_overview_page/thumbnail.html.erb b/app/views/sotechsha_overview_page/thumbnail.html.erb
deleted file mode 100644
index dbbc1878b..000000000
--- a/app/views/sotechsha_overview_page/thumbnail.html.erb
+++ /dev/null
@@ -1 +0,0 @@
-<%= scrivito_thumbnail SotechshaOverviewPage.description_for_editor, :content %>
diff --git a/app/views/sotechsha_overview_page/thumbnail.html.haml b/app/views/sotechsha_overview_page/thumbnail.html.haml
new file mode 100644
index 000000000..89f5c04f4
--- /dev/null
+++ b/app/views/sotechsha_overview_page/thumbnail.html.haml
@@ -0,0 +1 @@
+= scrivito_thumbnail SotechshaOverviewPage.description_for_editor, :content
diff --git a/app/views/static_pages/_dojo.html.erb b/app/views/static_pages/_dojo.html.erb
deleted file mode 100644
index fc42c4756..000000000
--- a/app/views/static_pages/_dojo.html.erb
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
- <%= dojo.description %>
-
diff --git a/app/views/static_pages/_dojo.html.haml b/app/views/static_pages/_dojo.html.haml
new file mode 100644
index 000000000..72b6866ff
--- /dev/null
+++ b/app/views/static_pages/_dojo.html.haml
@@ -0,0 +1,9 @@
+%li.dojo
+ %header
+ %a{:href => "#{dojo.url}"}
+ %span.dojo-picture{:style => "background-image: url(#{dojo.logo});"}
+ %span.dojo-name= dojo.name
+ %ul.tags
+ - dojo.tags.each do |tag|
+ %li= tag
+ %p= dojo.description
diff --git a/app/views/static_pages/_dojos.html+smartphone.erb b/app/views/static_pages/_dojos.html+smartphone.erb
deleted file mode 100644
index 40a54be72..000000000
--- a/app/views/static_pages/_dojos.html+smartphone.erb
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
- <% regions_and_dojos.each_with_index do |(region, dojos), index| %>
-
-
-
" class="panel-collapse collapse" role="tabpanel">
-
- <%= render partial: 'dojo', collection: dojos %>
-
-
-
- <% end %>
-
-
diff --git a/app/views/static_pages/_dojos.html+smartphone.haml b/app/views/static_pages/_dojos.html+smartphone.haml
new file mode 100644
index 000000000..93987d6ce
--- /dev/null
+++ b/app/views/static_pages/_dojos.html+smartphone.haml
@@ -0,0 +1,12 @@
+#accordion.panel-group{"aria-multiselectable" => "true", :role => "tablist"}
+ - regions_and_dojos.each_with_index do |(region, dojos), index|
+ .panel.panel-default
+ .panel-heading{:id => "heading#{index}", :role => "tab"}
+ %h4.panel-title
+ %a{"data-parent" => "#accordion", "data-toggle" => "collapse", :href => "##{"collapse#{index}"}", :role => "button"}
+ %i.fa.fa-chevron-right{"aria-hidden" => "true"}
+ = region
+ \- #{dojos.count} Dojos
+ .panel-collapse.collapse{:id => "collapse#{index}", :role => "tabpanel"}
+ .panel-body.grayscale-bg
+ = render partial: 'dojo', collection: dojos
diff --git a/app/views/static_pages/_dojos.html.erb b/app/views/static_pages/_dojos.html.erb
deleted file mode 100644
index 8f7f81e12..000000000
--- a/app/views/static_pages/_dojos.html.erb
+++ /dev/null
@@ -1,3 +0,0 @@
-
- <%= render partial: 'dojo', collection: regions_and_dojos.values.flatten %>
-
diff --git a/app/views/static_pages/_dojos.html.haml b/app/views/static_pages/_dojos.html.haml
new file mode 100644
index 000000000..ef26e3e10
--- /dev/null
+++ b/app/views/static_pages/_dojos.html.haml
@@ -0,0 +1,2 @@
+%ul.loaded
+ = render partial: 'dojo', collection: regions_and_dojos.values.flatten
diff --git a/app/views/static_pages/home.html.erb b/app/views/static_pages/home.html.erb
deleted file mode 100644
index e99523337..000000000
--- a/app/views/static_pages/home.html.erb
+++ /dev/null
@@ -1,209 +0,0 @@
-
-
-
CoderDojo Japan
-
子どものためのプログラミング道場
-
-
-
- <%= image_tag "coderdojo-japan_cover.jpg", class: "cursor-default" %>
-
-
-
- CoderDojo は7〜17歳の子どもを対象にしたプログラミング道場です。2011年にアイルランドで始まり、世界では<%= Dojo::NUM_OF_COUNTRIES %>カ国・<%= Dojo::NUM_OF_WHOLE_DOJOS %>の道場、日本では全国に<%= @dojo_count %>以上の道場があります。これまでに<%= Dojo::NUM_OF_WHOLE_EVENTS %>回以上のイベントが開催されました。
- CoderDojo で学べる内容は道場ごとに異なります。例えば、次の内容を学べる道場があります。
-
- - Scratch, Hour of Code
- - HTML, CSS, JavaScript
- - PHP, Python, Ruby, Unity
- - Arduino, Raspberry Pi など
-
-
- 道場ごとに内容も規模も異なりますが、どの道場でも主体的に学ぶ姿勢はとても大切です。
- 道場の特徴については、次のガイダンスを参考にしてください。
-
- さらに詳しい様子については、次の記事や動画をご参照ください。
-
-
-
-
- CoderDojo Kashiwa が制作した動画です。道場の雰囲気が伝われば幸いです ;)
-
-
- -
-
- -
-
- 
- -
-
-
-
-
-
-
-
-
-
-
-
- 全国の道場
-
-
- <%= render partial: 'dojos', locals: { regions_and_dojos: @regions_and_dojos } %>
-
-
-
-
-
-
-
- もっと詳しく知りたい
- 下記ウェブサイトから、CoderDojo の詳細や最新の情報にアクセスできます。
-
-
-
- 本家サイトである CoderDojo (英語) では世界中の活動の様子が見れます。また、Facebook の CoderDojo Japan では日本全国の活動の様子を知ることができます。
- 「これまでの成り立ちを知りたい」「地元で道場を立ち上げてみたい」といった場合には CoderDojo Kata を参照してみてください。
- <%= link_to image_tag("coderdojo-kata_cover.png", alt: 'CoderDojo Kata',
- class: 'cursor-pointer', style: 'margin-bottom: 15px;'), '/kata'%>
-
-
-
-
-
- パートナー
-
-
- - <%= link_to image_tag('logos/case-shinjuku.png', alt: 'CASE Shinjuku',
- height: '110px',
- data: { toggle: 'tooltip', placement: 'bottom' },
- title: 'オフィスの提供'),
- 'https://case-shinjuku.com/' %>
- - <%= link_to image_tag("logos/osscafe.png", alt: "下北沢オープンソースCafe",
- data: { toggle: 'tooltip', placement: 'bottom' },
- title: 'ドメイン代の支援'),
- 'http://www.osscafe.net/' %>
- - <%= link_to image_tag('logos/scrivito.png', alt: 'Scrivito',
- data: { toggle: 'tooltip', placement: 'bottom' },
- title: 'Cloud-Based CMS の提供'),
- 'https://scrivito.com/' %>
- - <%= link_to image_tag('logos/yasslab.png', alt: 'YassLab',
- data: { toggle: 'tooltip', placement: 'bottom' },
- title: 'Web開発およびサーバー代の支援'),
- 'https://yasslab.jp/' %>
- - <%= link_to image_tag('logos/mitou-foundation.png', alt: 'Mitou Foundation',
- style: 'margin-top: 20px; margin-bottom: 140px',
- data: { toggle: 'tooltip', placement: 'bottom' },
- title: '活動資金の継続的な支援'),
- 'http://www.mitou.org/' %>
- - <%= link_to image_tag('logos/magikcraft.png', alt: 'magiccraft',
- style: 'margin-top: 0px; margin-bottom: 135px',
- data: { toggle: 'tooltip', placement: 'bottom' },
- title: 'サーバー環境(Minecraft)の提供'),
- 'https://www.magikcraft.io/' %>
- - <%= link_to image_tag('logos/JetBrains.svg', alt: 'JetBrains', height: '110px',
- style: 'margin-top: -30px; margin-bottom: 150px',
- data: { toggle: 'tooltip', placement: 'bottom' },
- title: '統合開発環境 (IDE) の提供'),
- 'http://www.jetbrains.com/' %>
- - <%= link_to image_tag('logos/esa.png', alt: 'esa LLC',
- style: 'margin-top: -40px; margin-bottom: 150px',
- data: { toggle: 'tooltip', placement: 'bottom' },
- title: 'ドキュメント共有サービスの提供'),
- 'https://esa.io/' %>
- - <%= link_to image_tag('logos/sakura-internet.png', alt: 'さくらインターネット',
- style: 'margin-top: -40px; margin-bottom: 150px',
- data: { toggle: 'tooltip', placement: 'bottom' },
- title: 'サーバー環境(クラウド)の提供'),
- 'https://www.sakura.ad.jp/' %>
-
-
-
-
-
- お問い合わせ
- 取材や支援などのお問い合わせについては、下記からご連絡ください 📨
- メールの場合は担当の安川まで (info@coderdojo.jp) ご連絡ください。
-
-
-
-
- HTML Forms powered by
Wufoo.
-
-
-
-
diff --git a/app/views/static_pages/home.html.haml b/app/views/static_pages/home.html.haml
new file mode 100644
index 000000000..9306c51c0
--- /dev/null
+++ b/app/views/static_pages/home.html.haml
@@ -0,0 +1,161 @@
+#top.title.text-center
+ %i.cd.cd-logo
+ %h1 CoderDojo Japan
+ %p 子どものためのプログラミング道場
+ %br/
+%section.cover
+ = image_tag "coderdojo-japan_cover.jpg", class: "cursor-default"
+%section.introduction.text-center.list
+ %p
+ CoderDojo は7〜17歳の子どもを対象にしたプログラミング道場です。2011年にアイルランドで始まり、世界では#{Dojo::NUM_OF_COUNTRIES}カ国・#{Dojo::NUM_OF_WHOLE_DOJOS}の道場、日本では全国に
+ %b>= @dojo_count
+ 以上の道場があります。これまでに
+ %b>= Dojo::NUM_OF_WHOLE_EVENTS
+ 回以上のイベントが開催されました。
+ %p CoderDojo で学べる内容は道場ごとに異なります。例えば、次の内容を学べる道場があります。
+ %ul
+ %li Scratch, Hour of Code
+ %li HTML, CSS, JavaScript
+ %li PHP, Python, Ruby, Unity
+ %li Arduino, Raspberry Pi など
+ %br/
+ %p 道場ごとに内容も規模も異なりますが、どの道場でも主体的に学ぶ姿勢はとても大切です。
+ %p 道場の特徴については、次のガイダンスを参考にしてください。
+ .text-center
+ %iframe{:allowfullscreen => "", :frameborder => "0", :height => "388", :marginheight => "0", :marginwidth => "0", :scrolling => "no", :src => "https://www.slideshare.net/slideshow/embed_code/key/FAXoW4pBq172mQ", :style => "border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;", :width => "595"}
+ %div{:style => "margin-bottom:5px; color: grey;"}
+ スライドが見えない場合は
+ %a{:href => "https://www.slideshare.net/togazo/coderdojo-introduction-jp", :target => "_blank", :title => "CoderDojoガイダンス(最新版)"}<>
+ コチラ
+ %p{:style => "margin-top:10px;"} さらに詳しい様子については、次の記事や動画をご参照ください。
+ %ul{:style => "margin-bottom:30px;"}
+ %li
+ %a{:href => "https://www.youtube.com/watch?v=VEcFnEYT6mQ"} CoderDojoってなんかのおぅ?
+ (YouTube)
+ %li
+ %a{:href => "http://bakemono.jp/reading/blog/web/2256/"} CoderDojoとは? 運営者に話を聞いてみた!
+ (バケモノ.jp)
+ %li
+ %a{:href => "http://ict-enews.net/zoomin/17coderdojo/"} CoderDojoをはじめてみませんか
+ (ICT教育ニュース)
+ .home-point-video
+ %iframe{:allowfullscreen => "", :frameborder => "0", :height => "315", :src => "https://www.youtube.com/embed/gLDue2xb1j8?rel=0", :width => "560"}
+ %p
+ %a{:href => "http://www.coderdojo-kashiwa.com/"} CoderDojo Kashiwa
+ が制作した動画です。道場の雰囲気が伝われば幸いです ;)
+ %ol{:style => "list-style: none; margin-top: 30px;"}
+ %li{:style => "display: inline-block; line-height: 11px; margin-left: -35px;"}
+ .fb-like{"data-action" => "like", "data-href" => "#{full_url(yield(:url))}", "data-layout" => "button_count", "data-share" => "true", "data-show-faces" => "true"}
+ %li{:style => "display: inline-block;"}
+ %a.twitter-share-button{"data-hashtags" => "CoderDojo", "data-lang" => "ja", "data-text" => "#{full_title(yield(:title))}", "data-url" => "#{full_url(yield(:url))}", "data-via" => "CoderDojoJapan", :href => "https://twitter.com/share", :width => "100"} Tweet
+ :javascript
+ !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');
+ %li{:style => "display: inline-block;"}
+ %a.hatena-bookmark-button{"data-hatena-bookmark-lang" => "ja", "data-hatena-bookmark-layout" => "standard-balloon", "data-hatena-bookmark-title" => "#{full_title(yield(:title))}", :href => "http://b.hatena.ne.jp/entry/s/coderdojo.jp/", :title => "このエントリーをはてなブックマークに追加"}
+ %img{:alt => "このエントリーをはてなブックマークに追加", :height => "20", :src => "https://b.st-hatena.com/images/entry-button/button-only@2x.png", :style => "border: none;", :width => "20"}/
+ %script{:async => "async", :charset => "utf-8", :src => "https://b.st-hatena.com/js/bookmark_button.js", :type => "text/javascript"}
+ %li{:style => "display: inline-block;"}
+ .g-plusone{"data-lang" => "ja", "data-size" => "medium"}
+ :javascript
+ (function() {
+ var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
+ po.src = 'https://apis.google.com/js/plusone.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
+ })();
+/
+
+ 直近のイベント
+
+ -
+ link_to image_tag("decadojo_cover.png", alt: 'Upcoming Events',
+ class: 'cursor-pointer', style: 'margin-bottom: 15px;'),
+ \'https://peraichi.com/landing_pages/view/decadojo'
+
+ 5月7日に埼玉県所沢市ででかドージョーが開催されます! ぜひご参加ください ;)
+
+
+%section#events.detail-introduction.text-center
+%section#dojos.dojos.text-center.grayscale-bg
+ %br/
+ %h2 全国の道場
+ %br/
+ = render partial: 'dojos', locals: { regions_and_dojos: @regions_and_dojos }
+%section.text-center
+ %h2.text-center
+ %a{:href => "https://twitter.com/search?q=dojocon%20OR%20coderdojo%20OR%20%E3%82%B3%E3%83%BC%E3%83%80%E3%83%BC%E9%81%93%E5%A0%B4%20OR%20%22Coder%20Dojo%22%20OR%20%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0%E9%81%93%E5%A0%B4%20lang%3Aja"} 最近の話題
+ %a.twitter-timeline{"data-chrome" => "noheader nofooter noborders", "data-dnt" => "true", "data-partner" => "tweetdeck", "data-tweet-limit" => "5", "data-widget-id" => "838640822396465153", :href => "https://twitter.com/search?q=dojocon%20OR%20coderdojo%20OR%20%E3%82%B3%E3%83%BC%E3%83%80%E3%83%BC%E9%81%93%E5%A0%B4%20OR%20%22Coder%20Dojo%22%20lang%3Aja"} CoderDojoに関するつぶやき
+ :javascript
+ !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
+.text-center.grayscale-bg
+ %section.detail-introduction.list
+ %h2 もっと詳しく知りたい
+ %p 下記ウェブサイトから、CoderDojo の詳細や最新の情報にアクセスできます。
+ %ul
+ %li
+ %a{:href => "/kata"} CoderDojo Kata (Wiki)
+ %li
+ %a{:href => "https://www.facebook.com/groups/coderdojo.jp"} CoderDojo Japan (Facebook)
+ %li
+ %a{:href => "https://coderdojo.com/"} CoderDojo (英語)
+ %br/
+ %p 本家サイトである CoderDojo (英語) では世界中の活動の様子が見れます。また、Facebook の CoderDojo Japan では日本全国の活動の様子を知ることができます。
+ %p
+ 「これまでの成り立ちを知りたい」「地元で道場を立ち上げてみたい」といった場合には
+ %a{:href => "/kata"} CoderDojo Kata
+ を参照してみてください。
+ = link_to image_tag("coderdojo-kata_cover.png", alt: 'CoderDojo Kata', class: 'cursor-pointer', style: 'margin-bottom: 15px;'), '/kata'
+%section#partners.detail-introduction.partners_logo.text-center
+ %h2 パートナー
+ :javascript
+ $(function () {
+ $('[data-toggle="tooltip"]').tooltip();
+ })
+ %ul
+ %li= link_to image_tag('logos/case-shinjuku.png', alt: 'CASE Shinjuku', height: '110px', data: { toggle: 'tooltip', placement: 'bottom' }, title: 'オフィスの提供'), 'https://case-shinjuku.com/'
+ %li= link_to image_tag("logos/osscafe.png", alt: "下北沢オープンソースCafe", data: { toggle: 'tooltip', placement: 'bottom' }, title: 'ドメイン代の支援'), 'http://www.osscafe.net/'
+ %li= link_to image_tag('logos/scrivito.png', alt: 'Scrivito', data: { toggle: 'tooltip', placement: 'bottom' }, title: 'Cloud-Based CMS の提供'), 'https://scrivito.com/'
+ %li= link_to image_tag('logos/yasslab.png', alt: 'YassLab', data: { toggle: 'tooltip', placement: 'bottom' }, title: 'Web開発およびサーバー代の支援'), 'https://yasslab.jp/'
+ %li= link_to image_tag('logos/mitou-foundation.png', alt: 'Mitou Foundation', style: 'margin-top: 20px; margin-bottom: 140px', data: { toggle: 'tooltip', placement: 'bottom' }, title: '活動資金の継続的な支援'), 'http://www.mitou.org/'
+ %li= link_to image_tag('logos/magikcraft.png', alt: 'magiccraft', style: 'margin-top: 0px; margin-bottom: 135px', data: { toggle: 'tooltip', placement: 'bottom' }, title: 'サーバー環境(Minecraft)の提供'), 'https://www.magikcraft.io/'
+ %li= link_to image_tag('logos/JetBrains.svg', alt: 'JetBrains', height: '110px', style: 'margin-top: -30px; margin-bottom: 150px', data: { toggle: 'tooltip', placement: 'bottom' }, title: '統合開発環境 (IDE) の提供'), 'http://www.jetbrains.com/'
+ %li= link_to image_tag('logos/esa.png', alt: 'esa LLC', style: 'margin-top: -40px; margin-bottom: 150px', data: { toggle: 'tooltip', placement: 'bottom' }, title: 'ドキュメント共有サービスの提供'), 'https://esa.io/'
+ %li= link_to image_tag('logos/sakura-internet.png', alt: 'さくらインターネット', style: 'margin-top: -40px; margin-bottom: 150px', data: { toggle: 'tooltip', placement: 'bottom' }, title: 'サーバー環境(クラウド)の提供'), 'https://www.sakura.ad.jp/'
+.text-center.grayscale-bg
+ %section.detail-introduction
+ %h2 お問い合わせ
+ %p
+ 取材や支援などのお問い合わせについては、下記からご連絡ください 📨
+ %br/
+ メールの場合は担当の安川まで (
+ %i> info@coderdojo.jp
+ ) ご連絡ください。
+ / Contact Form via Wufoo
+ #contact
+ #wufoo-qkjthoy0qpuvg9{:style => "margin-top: -10px"}
+ %a{:href => "https://yasslab.wufoo.com/forms/qkjthoy0qpuvg9"}> 問い合わせフォーム
+ \.
+ #wuf-adv{:style => "font-family:inherit;font-size: small;color:#a7a7a7;text-align:center;display:block;"}
+ HTML Forms powered by
+ = succeed "." do
+ %a{:href => "https://www.wufoo.com"} Wufoo
+ :javascript
+ var qkjthoy0qpuvg9;(function(d, t) {
+ var s = d.createElement(t), options = {
+ 'userName':'yasslab',
+ 'formHash':'qkjthoy0qpuvg9',
+ 'autoResize':true,
+ 'height':'497',
+ 'async':true,
+ 'host':'wufoo.com',
+ 'header':'show',
+ 'ssl':true
+ };
+ s.src = ('https:' == d.location.protocol ? 'https://' : 'http://') + 'www.wufoo.com/scripts/embed/form.js';
+ s.onload = s.onreadystatechange = function() {
+ var rs = this.readyState; if (rs) if (rs != 'complete') if (rs != 'loaded') return;
+ try {
+ qkjthoy0qpuvg9 = new WufooForm();qkjthoy0qpuvg9.initialize(options);qkjthoy0qpuvg9.display();
+ } catch (e) {}
+ };
+ var scr = d.getElementsByTagName(t)[0], par = scr.parentNode; par.insertBefore(s, scr);
+ })(document, 'script');
diff --git a/app/views/static_pages/stats.html.erb b/app/views/static_pages/stats.html.erb
deleted file mode 100644
index d37a33683..000000000
--- a/app/views/static_pages/stats.html.erb
+++ /dev/null
@@ -1,51 +0,0 @@
-<% provide(:url, @url) %>
-<% provide(:title, '統計情報') %>
-<% provide(:meta_description, '全国の CoderDojo に関する統計情報をまとめています') %>
-
-
-
-
- <%= image_tag "coderdojo-stats_cover.png", class: "cursor-default" %>
-
-
-
-
- 統計情報
- 全国の道場
-
- <% @regions_and_dojos.each_with_index do |(region, dojos), index| %>
-
-
-
" class="panel-collapse collapse" role="tabpanel">
-
- <%= render partial: 'dojo', collection: dojos %>
-
-
-
- <% end %>
-
-
-開催回数
-<%= @sum_of_events %> 回
-
-参加者数 (延べ)
-<%= @sum_of_participants = EventHistory.sum(:participants) %> 人
-
-計測対象
-<%= @sum_of_dojos %> / <%= @dojo_count %> Dojos
-
-関連リンク
-
-
-
diff --git a/app/views/static_pages/stats.html.haml b/app/views/static_pages/stats.html.haml
new file mode 100644
index 000000000..bc8dd4787
--- /dev/null
+++ b/app/views/static_pages/stats.html.haml
@@ -0,0 +1,39 @@
+- provide(:url, @url)
+- provide(:title, '統計情報')
+- provide(:meta_description, '全国の CoderDojo に関する統計情報をまとめています')
+%section.cover
+ = image_tag "coderdojo-stats_cover.png", class: "cursor-default"
+%section#dojos.dojos.text-center
+ %bpr
+ %h1 統計情報
+ %h3 全国の道場
+ #accordion.panel-group{"aria-multiselectable" => "true", :role => "tablist"}
+ - @regions_and_dojos.each_with_index do |(region, dojos), index|
+ .panel.panel-default
+ .panel-heading{:id => "heading#{index}", :role => "tab"}
+ %h4.panel-title
+ %a{"data-parent" => "#accordion", "data-toggle" => "collapse", :href => "##{"collapse#{index}"}", :role => "button"}
+ %i.fa.fa-chevron-right{"aria-hidden" => "true"}
+ = region
+ \- #{dojos.count} Dojos
+ .panel-collapse.collapse{:id => "collapse#{index}", :role => "tabpanel"}
+ .panel-body.grayscale-bg
+ = render partial: 'dojo', collection: dojos
+ %h3 開催回数
+ = @sum_of_events
+ 回
+ %h3 参加者数 (延べ)
+ = @sum_of_participants = EventHistory.sum(:participants)
+ 人
+ %h3 計測対象
+ = @sum_of_dojos
+ \/ #{@dojo_count} Dojos
+ %h3 関連リンク
+ %ul{:style => "list-style: none; margin-left: -40px;"}
+ %li
+ %a{:href => "https://github.com/coderdojo-japan/coderdojo.jp/commit/b26fd9cdbf640aaa45f2a88238b13f0cbbe8a8b9"} Commit: Create /stats page for Proof of Concept
+ %li
+ %a{:href => "https://github.com/coderdojo-japan/coderdojo.jp/issues/12"} 各種イベント管理サービスのAPIで統計情報を集計したい #12
+ %li
+ %a{:href => "https://github.com/coderdojo-japan/coderdojo.jp/issues/206"} 統計情報を確認できる /stats ページの開発 #206
+%br/
diff --git a/app/views/text_widget/show.html.erb b/app/views/text_widget/show.html.erb
deleted file mode 100644
index 024466dee..000000000
--- a/app/views/text_widget/show.html.erb
+++ /dev/null
@@ -1,2 +0,0 @@
-<%= scrivito_tag :div, widget, :text %>
-
diff --git a/app/views/text_widget/show.html.haml b/app/views/text_widget/show.html.haml
new file mode 100644
index 000000000..e7847111d
--- /dev/null
+++ b/app/views/text_widget/show.html.haml
@@ -0,0 +1 @@
+= scrivito_tag :div, widget, :text
diff --git a/app/views/text_widget/thumbnail.html.erb b/app/views/text_widget/thumbnail.html.erb
deleted file mode 100644
index ac7a5d0fe..000000000
--- a/app/views/text_widget/thumbnail.html.erb
+++ /dev/null
@@ -1,3 +0,0 @@
-<%= scrivito_thumbnail TextWidget.description_for_editor, :text do %>
- A widget for HTML content.
-<% end %>
diff --git a/app/views/text_widget/thumbnail.html.haml b/app/views/text_widget/thumbnail.html.haml
new file mode 100644
index 000000000..e3b173596
--- /dev/null
+++ b/app/views/text_widget/thumbnail.html.haml
@@ -0,0 +1,2 @@
+= scrivito_thumbnail TextWidget.description_for_editor, :text do
+ A widget for HTML content.