-
-
Notifications
You must be signed in to change notification settings - Fork 108
モバイル版のDojo一覧を地域ごとにアコーディオンにまとめるようにする #188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
yasulab
merged 3 commits into
coderdojo-japan:master
from
zephiransas:feature-accordion
Nov 10, 2017
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
$ -> | ||
$('.collapse').on 'shown.bs.collapse', -> | ||
$(this).parent().find(".fa-chevron-right").removeClass("fa-chevron-right").addClass("fa-chevron-down") | ||
$('.collapse').on 'hidden.bs.collapse', -> | ||
$(this).parent().find(".fa-chevron-down").removeClass("fa-chevron-down").addClass("fa-chevron-right") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<li class="dojo"> | ||
<header> | ||
<a href="<%= dojo.url %>"> | ||
<span class="dojo-picture" style="background-image: url(<%= dojo.logo %>);"></span> | ||
<span class="dojo-name"><%= dojo.name %></span> | ||
</a> | ||
</header> | ||
<ul class="tags"> | ||
<% dojo.tags.each do |tag| %> | ||
<li><%= tag %></li> | ||
<% end %> | ||
</ul> | ||
<p><%= dojo.description %></p> | ||
</li> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true"> | ||
|
||
<% @regions_and_dojos.each_with_index do |(region, dojos), index| %> | ||
<div class="panel panel-default"> | ||
<div class="panel-heading" role="tab" id="<%= "heading#{index}" %>"> | ||
<h4 class="panel-title"> | ||
<a role="button" data-toggle="collapse" data-parent="#accordion" href="#<%= "collapse#{index}" %>"> | ||
<i class="fa fa-chevron-right" aria-hidden="true"></i> | ||
<%= region %> - <%= dojos.count %> Dojos | ||
</a> | ||
</h4> | ||
</div> | ||
<div id="<%= "collapse#{index}" %>" class="panel-collapse collapse" role="tabpanel"> | ||
<div class="panel-body grayscale-bg"> | ||
<%= render partial: 'dojo', collection: dojos %> | ||
</div> | ||
</div> | ||
</div> | ||
<% end %> | ||
|
||
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<ul class="loaded"> | ||
<%= render partial: 'dojo', collection: @regions_and_dojos.values.flatten %> | ||
</ul> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
</section> | ||
|
||
<section class="introduction text-center list"> | ||
<p>CoderDojo は7〜17歳の子どもを対象にしたプログラミング道場です。2011年にアイルランドで始まり、世界では<%= Dojo::NUM_OF_COUNTRIES %>カ国・<%= Dojo::NUM_OF_WHOLE_DOJOS %>の道場、日本では全国に<b><%= @dojos.count %></b>以上の道場があります。これまでに<b><%= Dojo::NUM_OF_WHOLE_EVENTS %></b>回以上のイベントが開催されました。</p> | ||
<p>CoderDojo は7〜17歳の子どもを対象にしたプログラミング道場です。2011年にアイルランドで始まり、世界では<%= Dojo::NUM_OF_COUNTRIES %>カ国・<%= Dojo::NUM_OF_WHOLE_DOJOS %>の道場、日本では全国に<b><%= @dojo_count %></b>以上の道場があります。これまでに<b><%= Dojo::NUM_OF_WHOLE_EVENTS %></b>回以上のイベントが開催されました。</p> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
<p>CoderDojo で学べる内容は道場ごとに異なります。例えば、次の内容を学べる道場があります。</p> | ||
<ul> | ||
<li>Scratch, Hour of Code</li> | ||
|
@@ -84,24 +84,9 @@ | |
<br /> | ||
<h2>全国の道場</h2> | ||
<br /> | ||
<ul class="loaded"> | ||
<% @dojos.each do |dojo| %> | ||
<li class="dojo"> | ||
<header> | ||
<a href="<%= dojo.url %>"> | ||
<span class="dojo-picture" style="background-image: url(<%= dojo.logo %>);"></span> | ||
<span class="dojo-name"><%= dojo.name %></span> | ||
</a> | ||
</header> | ||
<ul class="tags"> | ||
<% dojo.tags.each do |tag| %> | ||
<li><%= tag %></li> | ||
<% end %> | ||
</ul> | ||
<p><%= dojo.description %></p> | ||
</li> | ||
<% end %> | ||
</ul> | ||
|
||
<%= render 'dojos' %> | ||
|
||
</section> | ||
|
||
<section class="text-center"> | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ページを参照している端末が、スマホかそうでないかの判定に使用します