Skip to content

Commit ccb62ba

Browse files
committed
📚 資料集とニュースページの改善
- 資料集とニュースページにカバー画像を追加 - ページタイトルを h2 から h1 タグに変更(SEO改善) - タイトルに絵文字を追加して視認性向上 - 資料集: 📚 を追加 - ニュース: 📰 に統一 - ニュースページ下部にCoderDojoオブジェクト画像を追加 新規追加ファイル: - app/assets/images/docs_cover.jpg - app/assets/images/news_cover.jpg - public/coderdojo_object.webp
1 parent 30fb3d3 commit ccb62ba

File tree

8 files changed

+20
-6
lines changed

8 files changed

+20
-6
lines changed

app/assets/images/docs_cover.jpg

174 KB
Loading

app/assets/images/news_cover.jpg

385 KB
Loading

app/controllers/docs_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
class DocsController < ApplicationController
22
def index
3-
@title = 'CoderDojo 資料集'
3+
@title = '📚 CoderDojo 資料集'
44
@desc = 'CoderDojo に関する資料を<br class="ignore-pc">トピック毎にまとめたページです。'
55
@url = request.url
66
@docs = Document.all.delete_if.each do |doc|
@@ -25,7 +25,7 @@ def show
2525
@doc.content.gsub! "{{ NUM_OF_TOTAL_EVENTS }}", Dojo::NUM_OF_TOTAL_EVENTS
2626
@doc.content.gsub! "{{ NUM_OF_TOTAL_NINJAS }}", Dojo::NUM_OF_TOTAL_NINJAS
2727
end
28-
28+
2929
# INACTIVE_THRESHOLD を日本語の期間表記に変換
3030
if @doc.content.include? "INACTIVE_THRESHOLD"
3131
# 1.year → "1年間", 6.months → "6ヶ月間" のように変換

app/controllers/news_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
class NewsController < ApplicationController
22
def index
3-
@title = '️ CoderDojo ニュース 📰'
3+
@title = '📰️ CoderDojo ニュース'
44
@desc = 'CoderDojo に関するお知らせの一覧ページです。'
55
@url = request.url
66

app/views/docs/index.html.erb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
<% provide :url, @url %>
44
<% provide :meta_image, "/img/ogp-docs.jpeg" %>
55

6+
<section class="cover">
7+
<%= lazy_image_tag 'docs_cover.jpg', alt: 'Cover Photo on Docs', min: false %>
8+
</section>
9+
610
<div class='container'>
711
<section class='docs' style='padding: 50px 0px;'>
8-
<h2 class='text-center'><%= @title.html_safe %></h2>
12+
<h1 class='text-center'><%= @title.html_safe %></h1>
913

1014
<p class='text-center' style='padding-bottom: 50px;'>
1115
<%= @desc.html_safe %>

app/views/events/index.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<% provide(:meta_image, '/img/ogp-events.jpeg') %>
55

66
<section class="cover">
7-
<%= lazy_image_tag '/events_cover.jpg', alt: 'Cover Photo on Upcoming Events', min: true %>
7+
<%= lazy_image_tag '/events_cover.jpg', alt: 'Cover Photo on Docs', min: true %>
88
</section>
99

1010
<section id="events" class="text-center">

app/views/news/index.html.erb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
<% provide :url, @url %>
44
<% provide :meta_image, "/img/ogp-news.jpeg" %>
55

6+
<section class="cover">
7+
<%= lazy_image_tag 'news_cover.jpg', alt: 'Cover Photo on News', min: false %>
8+
</section>
9+
610
<div class='container'>
711
<section class='news' style='padding: 50px 0px 0px;'>
8-
<h2 class='text-center'><%= @title.html_safe %></h2>
12+
<h1 class='text-center'><%= @title.html_safe %></h1>
913

1014
<p class='text-center' style='padding-top: 30px;'>
1115
<%= @desc.html_safe %>
@@ -36,7 +40,13 @@
3640
<p class="text-center">現在、ニュース記事はありません。</p>
3741
<% end %>
3842
</section>
43+
</div>
3944

45+
<section class="cover">
46+
<%= lazy_image_tag '/coderdojo_object.webp', alt: 'CoderDojo Object' %>
47+
</section>
48+
49+
<div class='container'>
4050
<section class="text-center list" style='margin-bottom: 100px;'>
4151
<%= render 'shared/dojo_letter_signup' %>
4252
<%= render 'shared/social_buttons' %>

public/coderdojo_object.webp

62.5 KB
Loading

0 commit comments

Comments
 (0)