Skip to content

Commit 716ae3c

Browse files
committed
♻️ 外部リンクアイコンのスタイルを CSS クラスで管理
- <small> タグを削除し、external-link-icon CSS クラスを追加 - トップページと /news ページの両方で統一されたスタイルを適用 - フォントサイズ 0.7em、マージン、透明度を CSS で制御
1 parent 763d83f commit 716ae3c

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

app/assets/stylesheets/custom.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,3 +1106,10 @@ section {
11061106
background-color: #ffe5e5; /* 薄い赤背景 */
11071107
}
11081108
}
1109+
1110+
// News section external link icon
1111+
.external-link-icon {
1112+
font-size: 0.7em;
1113+
margin-left: 0.2em;
1114+
opacity: 0.9;
1115+
}

app/views/home/show.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@
201201
<% else %>
202202
<%= link_to news.link_url, target: '_blank' do %>
203203
<%= news.formatted_title %>
204-
<small><small><i class="far fa-external-link"></i></small></small>
204+
<i class="far fa-external-link external-link-icon"></i>
205205
<% end %>
206206
<% end %>
207207
</li>

app/views/news/index.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<% else %>
3434
<%= link_to news.link_url, target: '_blank' do %>
3535
<%= news.formatted_title %>
36-
<small><i class="far fa-external-link"></i></small>
36+
<i class="far fa-external-link external-link-icon"></i>
3737
<% end %>
3838
<% end %>
3939
</h3>

0 commit comments

Comments
 (0)