Skip to content

Commit a484df6

Browse files
committed
Add /debug to test embedded Google slides from Mobile
1 parent de7df70 commit a484df6

File tree

3 files changed

+289
-0
lines changed

3 files changed

+289
-0
lines changed

app/controllers/home_controller.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,9 @@ def show
33
@dojo_count = Dojo.active_dojos_count
44
@regions_and_dojos = Dojo.group_by_region_on_active
55
end
6+
7+
def debug
8+
@dojo_count = Dojo.active_dojos_count
9+
@regions_and_dojos = Dojo.group_by_region_on_active
10+
end
611
end

app/views/home/debug.html.haml

Lines changed: 281 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,281 @@
1+
#top.title.text-center
2+
%i.cd.cd-logo
3+
%h1 CoderDojo Japan
4+
%p 子どものためのプログラミング道場
5+
%br
6+
7+
%section.cover
8+
= image_tag "/coderdojo-japan_cover.min.jpg", alt: 'CoderDojo Japan カバー画像', class: 'lazyload',
9+
"data-src" => "/coderdojo-japan_cover.jpg", loading: 'lazy'
10+
11+
%section.introduction.text-center.list
12+
%p
13+
CoderDojo は7〜17歳を対象とした非営利のプログラミング道場です。2011年にアイルランドで始まり、世界では#{Dojo::NUM_OF_COUNTRIES}カ国・#{Dojo::NUM_OF_WORLD_DOJOS}の道場、日本には
14+
%b>= @dojo_count
15+
以上の道場があります。
16+
%br
17+
%p
18+
CoderDojo で学べる内容は道場ごとに様々で、例えば次のような内容です。
19+
%ul
20+
%li Scratch, micro:bit, Webサイト
21+
%li Raspberry Pi, Minecraft
22+
%li Python, Ruby, JavaScript
23+
%li Viscuit, PHP, 電子工作など
24+
%br
25+
%p 内容も規模もそれぞれ異なりますが、どの道場でも主体的に学ぶ姿勢が大切です。
26+
%br
27+
%p#welcome
28+
詳細は次のスライドをお読みください。
29+
.text-center
30+
.home-point-slides
31+
%iframe{allowfullscreen: "true", mozallowfullscreen: "true", webkitallowfullscreen: "true",
32+
frameborder: "0", marginheight: "0", marginwidth: "0", scrolling: "no", src: "https://docs.google.com/presentation/d/e/2PACX-1vSfSoYY3Iw6o0DL4Ki6-JNhgIOb61pktNZMRAYQZ4QdvORYb5ryBmOshmoDwe6M1BA8O-_-dzXOTReP/embed?start=false&loop=false", width: "595", height: "350"}
33+
%div{style: "margin-bottom:5px; color: grey;"}
34+
スライドが見えない場合は
35+
%a{href: "https://bit.ly/coderdojo-guidance-2021", target: "_blank", rel: "external noopener", title: "CoderDojo ガイダンス <一般・ボランティア向け資料>"}<>
36+
コチラ
37+
%p#youtube{style: "margin-top: 60px;"}
38+
さらに詳しい様子については、
39+
%br.ignore-pc<>
40+
次の動画や記事をぜひ!😆
41+
42+
%div.home-point-thumbnail{style: "margin-top: 30px; margin-bottom: 30px;"}
43+
= link_to image_tag("/video-thumbnail.min.jpg", alt: 'Promotion Video by CoderDojo Kashiwa', class: 'lazyload', loading: 'lazy', 'data-src' => '/video-thumbnail.jpg'), 'https://www.youtube.com/watch?v=gLDue2xb1j8', target: "_blank", rel: "external noopener"
44+
/%div.home-point-video
45+
/ %iframe{allowfullscreen: "", frameborder: "0", height: "315", width: "560",
46+
/ src: "https://www.youtube.com/embed/gLDue2xb1j8?rel=0"}
47+
%ul{style: "margin-bottom:30px;"}
48+
%li
49+
%a{href: "http://bakemono.jp/reading/blog/web/2256/", target: "_blank", rel: "external noopener"} CoderDojoとは? 運営者に話を聞いてみた!
50+
%small (バケモノ.jp)
51+
%li
52+
%a{href: "http://ict-enews.net/zoomin/17coderdojo/", target: "_blank", rel: "external noopener"} CoderDojoをはじめてみませんか
53+
%small (ICT教育ニュース)
54+
%li
55+
%a{href: "https://takadanobaba.keizai.biz/column/1/", target: "_blank", rel: "external noopener"} CoderDojo Japan 特集インタビュー
56+
%small (高田馬場経済新聞)
57+
58+
%div.text-center{style: 'margin-top: 0px; margin-left: -17px;'}
59+
%div.g-ytsubscribe{"data-channelid" => "UCal5GuoCDCMDQe07w69TuJA", "data-layout" => "full", "data-count" => "default"}
60+
%script{src: "https://apis.google.com/js/platform.js"}
61+
%br
62+
= render partial: 'shared/social_buttons'
63+
64+
/
65+
%section#events.detail-introduction.text-center
66+
%h2 🆕 イベントのお知らせ
67+
%p.event-notice{style: "margin-top: 30px; margin-bottom: 60px;"}
68+
%a{href: "https://bit.ly/pokemon-special-workshop-in-kashiwa", target: "_blank", rel: "external noopener"} プログラミングでポケモンをうごかしてみよう
69+
%br
70+
%small
71+
5月16日 (日) 10am〜、オンライン開催
72+
73+
/
74+
%ol.bxslider{style: "list-style: none; margin-left: -40px; margin-top: 30px;"}
75+
%li
76+
= link_to image_tag("dojocon_japan_2020.png", alt: "DojoCon Japan 2020", style: "margin-bottom: 15px;", class: 'lazyload', loading: 'lazy'), "https://dojocon2020.coderdojo.jp/", target: "_blank", rel: "external noopener"
77+
78+
%p
79+
12月27日に
80+
%a{href: "https://dojocon2020.coderdojo.jp/", target: "_blank", rel: "external noopener"} DojoCon Japan 2020
81+
オンライン開催! 早めにお申し込みください 😆🎫✨
82+
83+
84+
%section.dojos.text-center.grayscale-bg#dojos
85+
%br
86+
%h2{style: "color: dimgray;"} 🗾 日本各地の道場
87+
%br
88+
%p{style: "margin: 0 30px 20px 30px;"}
89+
近くの道場を探してみましょう!
90+
%br.ignore-sp<>
91+
参加方法は各道場のWebサイトに記載されています
92+
.btn-cover{style: "margin-bottom: 40px;"}
93+
%a.btn-blue{href: "/events"}<>
94+
%i.far.fa-calendar-alt
95+
近日開催から探す
96+
%a.btn-blue{href: "https://zen.coderdojo.com/find", target: "_blank", rel: "external noopener"}<>
97+
%i.far.fa-map-marked
98+
地図情報から探す
99+
= render partial: 'shared/dojos', locals: { regions_and_dojos: @regions_and_dojos }
100+
101+
%section#timeline.text-center{style: 'margin-bottom: 50px;'}
102+
%br
103+
%h3.text-center{style: 'margin-bottom: 30px;'}
104+
%a{href: "https://twitter.com/search?vertical=default&q=dojocon%20OR%20coderdojo%20OR%20%E3%82%B3%E3%83%BC%E3%83%80%E3%83%BC%E9%81%93%E5%A0%B4%20lang%3Aja", target: "_blank", rel: "external noopener"}
105+
%i.fab.fa-twitter
106+
最近の CoderDojo
107+
%a.twitter-timeline{href: "https://twitter.com/CoderDojoJapan", target: "_blank",
108+
rel: "external noopener", 'data-lang' => "ja", "data-dnt" => "true",
109+
"data-chrome" => "noheader nofooter noborders", "data-width" => "500",
110+
"data-tweet-limit" => "5"} @CoderDojoJapan アカウントのタイムライン
111+
%script{async: "", await: "", src: "https://platform.twitter.com/widgets.js", charset: "utf-8"}
112+
113+
/ Start with 'div' not 'section' due to grayscale-bg area
114+
.text-center.grayscale-bg
115+
%section.detail-introduction.list
116+
%br
117+
%h2#kata{style: "color: dimgray;"} 📚 もっと詳しく知る
118+
%br
119+
%p
120+
%a{href: "/podcast"}🎧 Podcast
121+
122+
%a{href: "https://www.youtube.com/CoderDojoJapan",
123+
target: "_blank", rel: "external noopener"} 📺 YouTube
124+
など、様々な方法で CoderDojo の最新情報を発信しています。お好みの方法で最新情報をキャッチしてみよう!
125+
126+
%ul{style: "list-style: none;"}
127+
%li
128+
%a{href: "/kata"} 📑 Kata (型)
129+
%span{style: 'font-size: 65%'} (Wiki)
130+
%li
131+
%a{href: "/podcast"} 🎧 DojoCast
132+
%span{style: 'font-size: 65%'} (Podcast)
133+
%li
134+
%a{href: "#news"} 📰 DojoLetter
135+
%span{style: 'font-size: 65%'} (Newsletter)
136+
%li
137+
%a{href: "https://www.youtube.com/CoderDojoJapan",
138+
target: "_blank", rel: "external noopener"} 📺 DojoChannel
139+
%span{style: 'font-size: 65%'} (YouTube)
140+
%li
141+
%a{href: "https://twitter.com/CoderDojoJapan",
142+
target: "_blank", rel: "external noopener"} 📣 CoderDojo Japan
143+
%span{style: 'font-size: 65%'} (Twitter)
144+
%li
145+
%a{href: "https://www.facebook.com/groups/coderdojo.jp",
146+
target: "_blank", rel: "external noopener"} 👥 CoderDojo Japan
147+
%span{style: 'font-size: 65%'} (Facebook)
148+
%li
149+
%a{href: "https://coderdojo.com/",
150+
target: "_blank", rel: "external noopener"} 🌐 CoderDojo Foundation
151+
%span{style: 'font-size: 65%'} (海外)
152+
%br
153+
%p
154+
%a{href: "/kata"} 📑 Kata
155+
では運営に役立つ情報を、
156+
%a{href: "https://twitter.com/CoderDojoJapan",
157+
target: "_blank", rel: "external noopener"}<> 📣 Twitter
158+
\ では最近の活動状況を、
159+
%a{href: "https://coderdojo.com/",
160+
target: "_blank", rel: "external noopener"}<> 🌐 CoderDojo Foundation
161+
\ では海外の雰囲気を知ることができます。
162+
%br
163+
%p
164+
『地元で道場を立ち上げてみたい』『道場向けの各種支援を知りたい』という場合は
165+
%a{href: "/kata"}< 📑 Kata
166+
\ の
167+
%a{href: "/kata#startup"}<> 『立ち上げる』
168+
169+
%a{href: "/kata#support"}<> 『支援』
170+
をお読みください。
171+
%div.kata
172+
= link_to image_tag("/kata_cover.min.jpg", alt: 'Kata カバー画像', class: 'lazyload',
173+
'data-src' => '/kata_cover.jpg', loading: 'lazy',
174+
style: 'margin-bottom: 15px;'), '/kata'
175+
%a.button-to-details{href: '/kata'} Kata を読む
176+
177+
%section.detail-introduction.partners_logo.text-center#partners{style: "padding-top: 50px;"}
178+
%h2{style: "color: dimgray;"} 🤝 パートナー法人
179+
%p{style: "margin: 50px 0px 20px 0px;"}
180+
様々な法人が CoderDojo の取り組みを支援しています。
181+
182+
= render partial: 'shared/partners'
183+
%div.kata{style: 'margin-top: 60px; margin-bottom: 150px;'}
184+
%a.button-to-details{href: '/partnership'} 法人向け資料を読む
185+
186+
187+
/ Start with 'div' not 'section' due to grayscale-bg area
188+
.text-center.grayscale-bg{style: "padding-top: 20px; padding-bottom: 50px;"}
189+
%section.detail-introduction#news
190+
%br
191+
%h2{style: "color: dimgray;"} 📰 ニュースレター購読
192+
%br
193+
%p
194+
最新情報をメールで受け取ってみませんか?毎月配信しています。
195+
%br.ignore-sp<>
196+
%small
197+
(
198+
%a{:href => 'https://news.coderdojo.jp/category/dojoletter%e3%83%90%e3%83%83%e3%82%af%e3%83%8a%e3%83%b3%e3%83%90%e3%83%bc/', :target => '_blank'}<>
199+
過去の配信を読んでみる
200+
)
201+
= render partial: 'shared/newsletter'
202+
203+
%section#faq.detail-introduction#contact{style: "padding-top: 30px;"}
204+
%br
205+
%h2.text-center{style: "color: dimgray;"} ✅ よくある質問と回答
206+
%br
207+
208+
%ul{style: "list-style: none; margin-left: -30px;"}
209+
%li
210+
%p
211+
Q.CoderDojo ってなんですか?
212+
%br
213+
A.
214+
%a{href: '#welcome'}<> 📜 イラスト付きスライド
215+
があるので、ぜひチェックしてみてください 👀
216+
%li
217+
%p
218+
Q.CoderDojo ってどんな雰囲気?
219+
%br
220+
A.
221+
%a{href: '#youtube'}<> 📺 YouTube 動画
222+
を用意しました!よければご視聴ください 😆
223+
224+
%li
225+
%p
226+
Q.初めてです。どうしたらよい?
227+
%br
228+
A.
229+
%a{href: '#dojos'}<> 🗾 全国の道場
230+
から興味のある道場を探し、開催情報を調べてみましょう 🔍
231+
%li
232+
%p
233+
Q.直近の開催情報をありますか?
234+
%br
235+
A.
236+
%a{href: '/events'}<> 📅 近日開催の道場
237+
があります。オンライン開催もあります ⚡️
238+
%li
239+
%p
240+
Q.詳しい資料はありますか?
241+
%br
242+
A.
243+
%a{href: '/kata'}<> 📚 道場情報まとめ
244+
にあります!運営に関わってみたい方はぜひ 😉
245+
246+
%section.detail-introduction.text-center
247+
%br
248+
%h2{style: "color: dimgray;"} 📮 お問い合わせ
249+
%br
250+
%p
251+
取材や支援などのお問い合わせについては下記からご連絡ください 📨
252+
%br
253+
%br
254+
/ Contact Form via Wufoo
255+
#wufoo-qkjthoy0qpuvg9{style: "margin-top: -10px"}
256+
%a{href: "https://yasslab.wufoo.com/forms/qkjthoy0qpuvg9",
257+
target: "_blank", rel: "external noopener"}> 問い合わせフォーム
258+
:javascript
259+
var qkjthoy0qpuvg9;(function(d, t) {
260+
var s = d.createElement(t), options = {
261+
'userName':'yasslab',
262+
'formHash':'qkjthoy0qpuvg9',
263+
'autoResize':true,
264+
'height':'497',
265+
'async':true,
266+
'host':'wufoo.com',
267+
'header':'show',
268+
'ssl':true
269+
};
270+
s.src = ('https:' == d.location.protocol ? 'https://' : 'http://') + 'www.wufoo.com/scripts/embed/form.js';
271+
s.onload = s.onreadystatechange = function() {
272+
var rs = this.readyState; if (rs) if (rs != 'complete') if (rs != 'loaded') return;
273+
try {
274+
qkjthoy0qpuvg9 = new WufooForm();qkjthoy0qpuvg9.initialize(options);qkjthoy0qpuvg9.display();
275+
} catch (e) {}
276+
};
277+
var scr = d.getElementsByTagName(t)[0], par = scr.parentNode; par.insertBefore(s, scr);
278+
})(document, 'script');
279+
280+
%br
281+
%br

config/routes.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
root "home#show"
66

7+
# Debug URL
8+
get "/debug" => "home#debug"
9+
710
# Render legal documents by using Keiyaku CSS
811
# https://github.com/cognitom/keiyaku-css
912
#get "/docs/code_of_conduct", to: redirect('/docs/code-of-conduct')

0 commit comments

Comments
 (0)