From 738bc76790331782173c9664c728d94f8fcbbb3c Mon Sep 17 00:00:00 2001 From: Yohei Yasukawa Date: Thu, 18 Dec 2025 14:43:58 +0900 Subject: [PATCH 1/6] =?UTF-8?q?=E2=9C=A8=20/news=20=E3=83=9A=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=97=E3=81=A6=E3=83=8B?= =?UTF-8?q?=E3=83=A5=E3=83=BC=E3=82=B9=E8=A8=98=E4=BA=8B=E4=B8=80=E8=A6=A7?= =?UTF-8?q?=E3=82=92=E8=A1=A8=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - NewsController#indexアクションを実装 - 既存のNewsモデル(ActiveRecord)を使用 - すべてのニュース記事を最新順に表示するビューを作成 - /news ルーティングを追加 - テスト(spec/requests/news_spec.rb)を追加 /docsと同様に、ニュース記事の一覧ページを提供 --- app/controllers/news_controller.rb | 10 +++++ app/views/news/index.html.erb | 47 ++++++++++++++++++++++ config/routes.rb | 1 + spec/requests/news_spec.rb | 62 ++++++++++++++++++++++++++++++ 4 files changed, 120 insertions(+) create mode 100644 app/controllers/news_controller.rb create mode 100644 app/views/news/index.html.erb create mode 100644 spec/requests/news_spec.rb diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb new file mode 100644 index 00000000..9fba4a41 --- /dev/null +++ b/app/controllers/news_controller.rb @@ -0,0 +1,10 @@ +class NewsController < ApplicationController + def index + @title = 'CoderDojo ニュース' + @desc = 'CoderDojo に関する最新のニュースや
お知らせをまとめたページです。' + @url = request.url + + # データベースからニュースデータを取得(最新順) + @news_items = News.recent + end +end \ No newline at end of file diff --git a/app/views/news/index.html.erb b/app/views/news/index.html.erb new file mode 100644 index 00000000..35b11954 --- /dev/null +++ b/app/views/news/index.html.erb @@ -0,0 +1,47 @@ +<% provide :title, strip_tags(@title) %> +<% provide :desc, strip_tags(@desc) %> +<% provide :url, @url %> +<% provide :meta_image, "/img/ogp-news.jpeg" %> + +
+
+

<%= @title.html_safe %>

+ +

+ <%= @desc.html_safe %> +

+ + <% if @news_items.any? %> +
+ <% @news_items.each do |news| %> +
+

+ <%= link_to news.title, news.url, target: '_blank', rel: 'noopener' %> +

+

+ + <%= l(news.published_at.to_date, format: :long) if news.published_at %> +

+
+ <% end %> +
+ <% else %> +

現在、ニュース記事はありません。

+ <% end %> +
+ +
+

+ + 最新情報は + CoderDojo Japan ブログ や + Facebook グループ + でも配信しています! 📰✨ + +

+
+ +
+ <%= render 'shared/social_buttons' %> +
+
\ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index f756ff20..7c83b0ee 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -74,6 +74,7 @@ end end resources :docs, only: %i(index show) + resources :news, only: %i(index) resources :podcasts, only: %i(index show) resources :spaces, only: %i(index) diff --git a/spec/requests/news_spec.rb b/spec/requests/news_spec.rb new file mode 100644 index 00000000..b575a378 --- /dev/null +++ b/spec/requests/news_spec.rb @@ -0,0 +1,62 @@ +require 'rails_helper' + +RSpec.describe "News", type: :request do + describe "GET /news" do + before do + # テスト用のニュースデータを作成 + @news1 = News.create!( + title: "テストニュース1", + url: "https://example.com/news1", + published_at: 2.days.ago + ) + @news2 = News.create!( + title: "テストニュース2", + url: "https://example.com/news2", + published_at: 1.day.ago + ) + @news3 = News.create!( + title: "テストニュース3", + url: "https://example.com/news3", + published_at: 3.days.ago + ) + end + + it "正常にレスポンスを返す" do + get news_index_path + expect(response).to have_http_status(:success) + end + + it "適切なタイトルを表示する" do + get news_index_path + expect(response.body).to include("CoderDojo ニュース") + end + + it "ニュース記事を新しい順に表示する" do + get news_index_path + + # 新しい順に表示されることを確認 + news2_pos = response.body.index(@news2.title) + news1_pos = response.body.index(@news1.title) + news3_pos = response.body.index(@news3.title) + + expect(news2_pos).to be < news1_pos + expect(news1_pos).to be < news3_pos + end + + it "ニュースのタイトルとリンクを表示する" do + get news_index_path + + expect(response.body).to include(@news1.title) + expect(response.body).to include(@news1.url) + expect(response.body).to include(@news2.title) + expect(response.body).to include(@news2.url) + end + + it "ニュースがない場合は適切なメッセージを表示する" do + News.destroy_all + get news_index_path + + expect(response.body).to include("現在、ニュース記事はありません") + end + end +end \ No newline at end of file From b9bb70bafbf70cc96413b1b2c1e3c757c8106cd5 Mon Sep 17 00:00:00 2001 From: Yohei Yasukawa Date: Thu, 18 Dec 2025 14:47:08 +0900 Subject: [PATCH 2/6] =?UTF-8?q?=F0=9F=8E=A8=20/news=20=E3=83=9A=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E3=81=A7=E3=82=82format=5Fnews=5Ftitle=E3=83=98?= =?UTF-8?q?=E3=83=AB=E3=83=91=E3=83=BC=E3=82=92=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ホームページの#newsセクションと同じようにニュースタイトルを表示 - プリセット絵文字の自動追加機能を適用 - テストを更新して絵文字追加に対応 --- app/controllers/news_controller.rb | 4 ++-- app/views/news/index.html.erb | 2 +- spec/requests/news_spec.rb | 14 +++++++++----- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index 9fba4a41..c6e685f6 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -3,8 +3,8 @@ def index @title = 'CoderDojo ニュース' @desc = 'CoderDojo に関する最新のニュースや
お知らせをまとめたページです。' @url = request.url - + # データベースからニュースデータを取得(最新順) @news_items = News.recent end -end \ No newline at end of file +end diff --git a/app/views/news/index.html.erb b/app/views/news/index.html.erb index 35b11954..84f40b63 100644 --- a/app/views/news/index.html.erb +++ b/app/views/news/index.html.erb @@ -16,7 +16,7 @@ <% @news_items.each do |news| %>

- <%= link_to news.title, news.url, target: '_blank', rel: 'noopener' %> + <%= link_to format_news_title(news), news.url, target: '_blank', rel: 'noopener' %>

diff --git a/spec/requests/news_spec.rb b/spec/requests/news_spec.rb index b575a378..8fc928d9 100644 --- a/spec/requests/news_spec.rb +++ b/spec/requests/news_spec.rb @@ -35,9 +35,11 @@ get news_index_path # 新しい順に表示されることを確認 - news2_pos = response.body.index(@news2.title) - news1_pos = response.body.index(@news1.title) - news3_pos = response.body.index(@news3.title) + # format_news_title によってプリセット絵文字が追加される可能性があるため、 + # タイトルの主要部分で位置を確認 + news2_pos = response.body.index("テストニュース2") + news1_pos = response.body.index("テストニュース1") + news3_pos = response.body.index("テストニュース3") expect(news2_pos).to be < news1_pos expect(news1_pos).to be < news3_pos @@ -46,9 +48,11 @@ it "ニュースのタイトルとリンクを表示する" do get news_index_path - expect(response.body).to include(@news1.title) + # format_news_title によってプリセット絵文字が追加される可能性があるため、 + # タイトルの主要部分が含まれていることを確認 + expect(response.body).to include("テストニュース1") expect(response.body).to include(@news1.url) - expect(response.body).to include(@news2.title) + expect(response.body).to include("テストニュース2") expect(response.body).to include(@news2.url) end From 89c623dc87fb4084194742cd656fe9c9691454d2 Mon Sep 17 00:00:00 2001 From: Yohei Yasukawa Date: Thu, 18 Dec 2025 14:51:40 +0900 Subject: [PATCH 3/6] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Fat=20Helper=E3=82=92?= =?UTF-8?q?=E9=81=BF=E3=81=91=E3=81=A6News=E3=83=A2=E3=83=87=E3=83=AB?= =?UTF-8?q?=E3=81=AB=E3=83=A1=E3=82=BD=E3=83=83=E3=83=89=E3=82=92=E7=A7=BB?= =?UTF-8?q?=E5=8B=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - format_news_title → News#formatted_title に移動 - news_link_url → News#link_url に移動 - ApplicationHelperから News 関連のメソッドを削除 - ビューファイルをモデルメソッドを使用するように更新 - テストも適切な場所(spec/models/news_spec.rb)に移動 Single Responsibility Principleに従い、Newsリソースに関連する ロジックはNewsモデルに配置することでコードの保守性を向上 --- app/controllers/news_controller.rb | 4 +-- app/helpers/application_helper.rb | 30 ++----------------- app/models/news.rb | 25 ++++++++++++++++ app/views/home/show.html.erb | 2 +- app/views/news/index.html.erb | 2 +- spec/helpers/application_helper_spec.rb | 40 ++----------------------- spec/models/news_spec.rb | 39 ++++++++++++++++++++++++ 7 files changed, 73 insertions(+), 69 deletions(-) diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index c6e685f6..a8e1ff10 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -1,7 +1,7 @@ class NewsController < ApplicationController def index - @title = 'CoderDojo ニュース' - @desc = 'CoderDojo に関する最新のニュースや
お知らせをまとめたページです。' + @title = '☯️ CoderDojo ニュース ✉️' + @desc = 'CoderDojo に関するお知らせの一覧ページです。' @url = request.url # データベースからニュースデータを取得(最新順) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 47285052..44c9afa7 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -107,7 +107,7 @@ def prefecture_name_in_english(prefecture_name) # 都道府県名の英語表記を返す簡易マッピング # 「都」「府」「県」を除去してから検索 name_without_suffix = prefecture_name.gsub(/[都府県]$/, '') - + prefecture_names = { '北海道' => 'Hokkaido', '青森' => 'Aomori', @@ -157,7 +157,7 @@ def prefecture_name_in_english(prefecture_name) '鹿児島' => 'Kagoshima', '沖縄' => 'Okinawa' } - + prefecture_names[name_without_suffix] || prefecture_name end @@ -208,32 +208,8 @@ def translate_dojo_tag(tag_name) 'HTML' => 'HTML', 'CSS' => 'CSS' } - - tag_translations[tag_name] || tag_name - end - def format_news_title(news) - has_custom_emoji = news.title[0]&.match?(/[\p{Emoji}&&[^0-9#*]]/) - return news.title if has_custom_emoji - - # Add preset Emoji to its prefix if news.title does not have Emoji. - emoji = case news.url - when %r{/podcasts/\d+} - '📻' - when %r{prtimes\.jp} - '📢' - else - '📰' - end - "#{emoji} #{news.title}" + tag_translations[tag_name] || tag_name end - def news_link_url(news) - # Convert absolute podcast URLs to relative paths for local development - if news.url.match?(%r{^https://coderdojo\.jp/podcasts/\d+$}) - news.url.sub('https://coderdojo.jp', '') - else - news.url - end - end end diff --git a/app/models/news.rb b/app/models/news.rb index 0dd08cbc..0bd5fa84 100644 --- a/app/models/news.rb +++ b/app/models/news.rb @@ -6,4 +6,29 @@ class News < ApplicationRecord uniqueness: true, format: { with: /\Ahttps?:\/\/.*\z/i } validates :published_at, presence: true + + def formatted_title + has_custom_emoji = title[0]&.match?(/[\p{Emoji}&&[^0-9#*]]/) + return title if has_custom_emoji + + # Add preset Emoji to its prefix if title does not have Emoji. + emoji = case url + when %r{/podcasts/\d+} + '📻' + when %r{prtimes\.jp} + '📢' + else + '📰' + end + "#{emoji} #{title}" + end + + def link_url + # Convert absolute podcast URLs to relative paths for local development + if url.match?(%r{^https://coderdojo\.jp/podcasts/\d+$}) + url.sub('https://coderdojo.jp', '') + else + url + end + end end diff --git a/app/views/home/show.html.erb b/app/views/home/show.html.erb index 5b4626c1..706ea129 100644 --- a/app/views/home/show.html.erb +++ b/app/views/home/show.html.erb @@ -194,7 +194,7 @@

    <% @news_items.each do |news| %>
  • - <%= link_to format_news_title(news), news_link_url(news), target: '_blank' %> + <%= link_to news.formatted_title, news.link_url, target: '_blank' %>
  • <% end %>
diff --git a/app/views/news/index.html.erb b/app/views/news/index.html.erb index 84f40b63..ed75f67e 100644 --- a/app/views/news/index.html.erb +++ b/app/views/news/index.html.erb @@ -16,7 +16,7 @@ <% @news_items.each do |news| %>

- <%= link_to format_news_title(news), news.url, target: '_blank', rel: 'noopener' %> + <%= link_to news.formatted_title, news.link_url, target: '_blank', rel: 'noopener' %>

diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index 9304ff07..f1bbd147 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -1,42 +1,6 @@ require 'rails_helper' RSpec.describe ApplicationHelper, type: :helper do - describe '#format_news_title' do - it '先頭文字が絵文字ならそのまま返す' do - news = double('news', title: '🔔 新着', url: 'https://news.coderdojo.jp/123') - expect(helper.format_news_title(news)).to eq '🔔 新着' - end - - context '先頭文字が絵文字でない場合' do - it 'ポッドキャストのURLには📻を付与する' do - news = double('news', title: 'エピソード33', url: 'https://coderdojo.jp/podcasts/33') - expect(helper.format_news_title(news)).to eq '📻 エピソード33' - end - - it 'PR TIMESのURLには📢を付与する' do - news = double('news', title: 'プレスリリース', url: 'https://prtimes.jp/main/html/rd/p/000000001.000038935.html') - expect(helper.format_news_title(news)).to eq '📢 プレスリリース' - end - - it 'その他のURLには📰を付与する' do - news = double('news', title: '更新情報', url: 'https://news.coderdojo.jp/2025/12/06/dojoletter') - expect(helper.format_news_title(news)).to eq '📰 更新情報' - end - end - end - - describe '#news_link_url' do - it 'ポッドキャストの絶対URLを相対パスに変換する' do - news = double('news', url: 'https://coderdojo.jp/podcasts/33') - expect(helper.news_link_url(news)).to eq '/podcasts/33' - end - - it 'その他のURLはそのまま返す' do - news = double('news', url: 'https://news.coderdojo.jp/2025/12/06/dojoletter') - expect(helper.news_link_url(news)).to eq 'https://news.coderdojo.jp/2025/12/06/dojoletter' - - news2 = double('news', url: 'https://prtimes.jp/main/html/rd/p/000000001.000038935.html') - expect(helper.news_link_url(news2)).to eq 'https://prtimes.jp/main/html/rd/p/000000001.000038935.html' - end - end + # News関連のメソッドはNewsモデルに移動しました + # spec/models/news_spec.rb を参照 end diff --git a/spec/models/news_spec.rb b/spec/models/news_spec.rb index 3beba335..e3691be4 100644 --- a/spec/models/news_spec.rb +++ b/spec/models/news_spec.rb @@ -76,4 +76,43 @@ end end end + + describe '#formatted_title' do + it '先頭文字が絵文字ならそのまま返す' do + news = build(:news, title: '🔔 新着', url: 'https://news.coderdojo.jp/123') + expect(news.formatted_title).to eq '🔔 新着' + end + + context '先頭文字が絵文字でない場合' do + it 'ポッドキャストのURLには📻を付与する' do + news = build(:news, title: 'エピソード33', url: 'https://coderdojo.jp/podcasts/33') + expect(news.formatted_title).to eq '📻 エピソード33' + end + + it 'PR TIMESのURLには📢を付与する' do + news = build(:news, title: 'プレスリリース', url: 'https://prtimes.jp/main/html/rd/p/000000001.000038935.html') + expect(news.formatted_title).to eq '📢 プレスリリース' + end + + it 'その他のURLには📰を付与する' do + news = build(:news, title: '更新情報', url: 'https://news.coderdojo.jp/2025/12/06/dojoletter') + expect(news.formatted_title).to eq '📰 更新情報' + end + end + end + + describe '#link_url' do + it 'ポッドキャストの絶対URLを相対パスに変換する' do + news = build(:news, url: 'https://coderdojo.jp/podcasts/33') + expect(news.link_url).to eq '/podcasts/33' + end + + it 'その他のURLはそのまま返す' do + news = build(:news, url: 'https://news.coderdojo.jp/2025/12/06/dojoletter') + expect(news.link_url).to eq 'https://news.coderdojo.jp/2025/12/06/dojoletter' + + news2 = build(:news, url: 'https://prtimes.jp/main/html/rd/p/000000001.000038935.html') + expect(news2.link_url).to eq 'https://prtimes.jp/main/html/rd/p/000000001.000038935.html' + end + end end From 6b55517e415d4d9004fa50acdbec50f43d198788 Mon Sep 17 00:00:00 2001 From: Yohei Yasukawa Date: Thu, 18 Dec 2025 15:07:10 +0900 Subject: [PATCH 4/6] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20DojoLetter=E7=99=BB?= =?UTF-8?q?=E9=8C=B2=E3=83=95=E3=82=A9=E3=83=BC=E3=83=A0=E3=82=92=E3=83=91?= =?UTF-8?q?=E3=83=BC=E3=82=B7=E3=83=A3=E3=83=AB=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - shared/_dojo_letter_signup パーシャルを作成(Rails命名規則に従う) - ホームページの#newsセクションでパーシャルを使用 - /newsページでも同じパーシャルを使用 - コードの重複を削除してDRY原則を適用 --- app/controllers/news_controller.rb | 2 +- app/views/home/show.html.erb | 19 ++----------------- app/views/news/index.html.erb | 2 ++ app/views/shared/_dojo_letter_signup.html.erb | 17 +++++++++++++++++ 4 files changed, 22 insertions(+), 18 deletions(-) create mode 100644 app/views/shared/_dojo_letter_signup.html.erb diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index a8e1ff10..8c2dba7e 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -1,6 +1,6 @@ class NewsController < ApplicationController def index - @title = '☯️ CoderDojo ニュース ✉️' + @title = '☯️ CoderDojo ニュース 📰' @desc = 'CoderDojo に関するお知らせの一覧ページです。' @url = request.url diff --git a/app/views/home/show.html.erb b/app/views/home/show.html.erb index 706ea129..090b2186 100644 --- a/app/views/home/show.html.erb +++ b/app/views/home/show.html.erb @@ -198,23 +198,8 @@ <% end %> -

- 最新情報はメールで受け取れます。 -
- (毎月配信) -

- -
-
-
- - - -
-
-
+ + <%= render 'shared/dojo_letter_signup' %>
diff --git a/app/views/news/index.html.erb b/app/views/news/index.html.erb index ed75f67e..594e5d51 100644 --- a/app/views/news/index.html.erb +++ b/app/views/news/index.html.erb @@ -30,6 +30,8 @@ <% end %> + <%= render 'shared/dojo_letter_signup' %> +

diff --git a/app/views/shared/_dojo_letter_signup.html.erb b/app/views/shared/_dojo_letter_signup.html.erb new file mode 100644 index 00000000..4d8c2920 --- /dev/null +++ b/app/views/shared/_dojo_letter_signup.html.erb @@ -0,0 +1,17 @@ +

+ 最新情報はメールで受け取れます。 +
+ (毎月配信) +

+ +
+
+
+ + + +
+
+
\ No newline at end of file From a8a99a7eb3c4b8672629fc682ecfa46ecc737b70 Mon Sep 17 00:00:00 2001 From: Yohei Yasukawa Date: Thu, 18 Dec 2025 15:08:57 +0900 Subject: [PATCH 5/6] =?UTF-8?q?=F0=9F=94=97=20=E3=83=88=E3=83=83=E3=83=97?= =?UTF-8?q?=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=AE=E3=80=8C=E9=81=8E=E5=8E=BB?= =?UTF-8?q?=E3=81=AE=E8=A8=98=E4=BA=8B=E3=82=92=E8=AA=AD=E3=82=80=E3=80=8D?= =?UTF-8?q?=E3=83=AA=E3=83=B3=E3=82=AF=E3=82=92=20/news=20=E3=81=AB?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 外部サイト(news.coderdojo.jp)ではなく内部の /news ページへリンク - news_url ヘルパーの代わりに news_index_path を使用 --- app/views/home/show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/home/show.html.erb b/app/views/home/show.html.erb index 090b2186..38e5a0e8 100644 --- a/app/views/home/show.html.erb +++ b/app/views/home/show.html.erb @@ -202,7 +202,7 @@ <%= render 'shared/dojo_letter_signup' %>
- + 過去の記事を読む From 5964b03c7a44f17f67cc3815a909638d3fc7f8a0 Mon Sep 17 00:00:00 2001 From: Yohei Yasukawa Date: Thu, 18 Dec 2025 15:18:03 +0900 Subject: [PATCH 6/6] =?UTF-8?q?=F0=9F=94=97=20=E3=83=98=E3=83=83=E3=83=80?= =?UTF-8?q?=E3=83=BC=E3=81=A8=E3=83=95=E3=83=83=E3=82=BF=E3=83=BC=E3=81=AE?= =?UTF-8?q?News=E3=83=AA=E3=83=B3=E3=82=AF=E3=82=92=E5=86=85=E9=83=A8=20/n?= =?UTF-8?q?ews=20=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=B8=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ヘッダーのNews リンク: '/#news' → news_index_path - フッターのNews リンク: '/#news' → '/news' - フッターのNews アイコン: news_url → news_index_path これにより、すべてのNewsリンクが外部サイト(news.coderdojo.jp)ではなく 内部の /news ページを指すように統一されました --- app/views/news/index.html.erb | 33 +++++++++++++------------------ app/views/shared/_footer.html.erb | 4 ++-- app/views/shared/_header.html.erb | 2 +- 3 files changed, 17 insertions(+), 22 deletions(-) diff --git a/app/views/news/index.html.erb b/app/views/news/index.html.erb index 594e5d51..5e95242e 100644 --- a/app/views/news/index.html.erb +++ b/app/views/news/index.html.erb @@ -4,13 +4,20 @@ <% provide :meta_image, "/img/ogp-news.jpeg" %>
-
+

<%= @title.html_safe %>

-

+

<%= @desc.html_safe %>

- +
+ +
+ <%= render 'shared/dojo_letter_signup' %> + <%= render 'shared/social_buttons' %> +
+ +
<% if @news_items.any? %>
<% @news_items.each do |news| %> @@ -30,20 +37,8 @@ <% end %>
- <%= render 'shared/dojo_letter_signup' %> - -
-

- - 最新情報は - CoderDojo Japan ブログ や - Facebook グループ - でも配信しています! 📰✨ - -

-
- -
+
+ <%= render 'shared/dojo_letter_signup' %> <%= render 'shared/social_buttons' %> -
-
\ No newline at end of file + +
diff --git a/app/views/shared/_footer.html.erb b/app/views/shared/_footer.html.erb index 5b304963..fea784bb 100644 --- a/app/views/shared/_footer.html.erb +++ b/app/views/shared/_footer.html.erb @@ -2,7 +2,7 @@

Top | Kata - | News + | News | 資料 | 憲章 | 統計 @@ -16,7 +16,7 @@

- <%= link_to news_url do %> + <%= link_to news_index_path do %> <% end %> <%= link_to facebook_page_url do %> diff --git a/app/views/shared/_header.html.erb b/app/views/shared/_header.html.erb index 96868778..e06800a0 100644 --- a/app/views/shared/_header.html.erb +++ b/app/views/shared/_header.html.erb @@ -21,7 +21,7 @@ <%= link_to '最近の活動', '/#news' %>