From 81240be0d1558298b8f087a1980903bf4be69802 Mon Sep 17 00:00:00 2001 From: Kuroneko Date: Mon, 10 Jun 2024 21:57:15 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=E3=83=96=E3=83=AD=E3=82=B0=E3=81=AEX?= =?UTF-8?q?=E5=85=B1=E6=9C=89=E6=99=82=E3=81=AB=E3=82=BF=E3=82=A4=E3=83=88?= =?UTF-8?q?=E3=83=AB=E3=81=8C=E3=83=84=E3=82=A4=E3=83=BC=E3=83=88=E3=81=AB?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E3=81=95=E3=82=8C=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/articles/_share_button_x.html.erb | 2 +- app/views/articles/_share_buttons.html.slim | 4 ++-- app/views/articles/show.html.slim | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/articles/_share_button_x.html.erb b/app/views/articles/_share_button_x.html.erb index a56c8745c09..0d14a2881b2 100644 --- a/app/views/articles/_share_button_x.html.erb +++ b/app/views/articles/_share_button_x.html.erb @@ -1,5 +1,5 @@ diff --git a/app/views/articles/_share_buttons.html.slim b/app/views/articles/_share_buttons.html.slim index dc82491a03e..abc2f5a16f9 100644 --- a/app/views/articles/_share_buttons.html.slim +++ b/app/views/articles/_share_buttons.html.slim @@ -3,6 +3,6 @@ li.share-buttons__item.is-x = render 'share_button_x', article: article li.share-buttons__item - = render 'share_button_facebook', article: article + = render 'share_button_facebook', article: article.id li.share-buttons__item - = render 'share_button_hatena', article: article + = render 'share_button_hatena', article: article.id diff --git a/app/views/articles/show.html.slim b/app/views/articles/show.html.slim index d434ed0f7cf..93f4547ea07 100644 --- a/app/views/articles/show.html.slim +++ b/app/views/articles/show.html.slim @@ -46,7 +46,7 @@ ruby: = l(@article.created_at) - else = l(@article.published_at) - = render 'share_buttons', article: @article.id + = render 'share_buttons', article: @article - if @article.display_thumbnail_in_body? - if @article.prepared_thumbnail? = image_tag @article.prepared_thumbnail_url, class: 'article__image' @@ -55,7 +55,7 @@ ruby: .article__body .js-markdown-view.a-long-text.is-md = @article.body - = render 'share_buttons', article: @article.id + = render 'share_buttons', article: @article - if admin_or_mentor_login? hr.a-border .card-footer From 98b4819e585acbc54d6525279960bd4b04dd2abf Mon Sep 17 00:00:00 2001 From: Kuroneko Date: Fri, 14 Jun 2024 18:28:29 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A4=89=E6=95=B0=E5=90=8D=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit article.idのみをerbに渡しているため、erb側の変数をわかりやすくarticle_idに修正 --- app/views/articles/_share_button_facebook.html.erb | 4 ++-- app/views/articles/_share_button_hatena.html.erb | 2 +- app/views/articles/_share_buttons.html.slim | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/articles/_share_button_facebook.html.erb b/app/views/articles/_share_button_facebook.html.erb index d492e338d7d..6d081ee3d95 100644 --- a/app/views/articles/_share_button_facebook.html.erb +++ b/app/views/articles/_share_button_facebook.html.erb @@ -1,8 +1,8 @@
-
+ diff --git a/app/views/articles/_share_button_hatena.html.erb b/app/views/articles/_share_button_hatena.html.erb index 93a91d28ab3..b11847908ca 100644 --- a/app/views/articles/_share_button_hatena.html.erb +++ b/app/views/articles/_share_button_hatena.html.erb @@ -1,5 +1,5 @@ このエントリーをはてなブックマークに追加 diff --git a/app/views/articles/_share_buttons.html.slim b/app/views/articles/_share_buttons.html.slim index abc2f5a16f9..0b41262d317 100644 --- a/app/views/articles/_share_buttons.html.slim +++ b/app/views/articles/_share_buttons.html.slim @@ -3,6 +3,6 @@ li.share-buttons__item.is-x = render 'share_button_x', article: article li.share-buttons__item - = render 'share_button_facebook', article: article.id + = render 'share_button_facebook', article_id: article.id li.share-buttons__item - = render 'share_button_hatena', article: article.id + = render 'share_button_hatena', article_id: article.id