Claude commited on
Commit
0ea2020
·
unverified ·
1 Parent(s): 5d91810

いいねボタンのハートを絵文字からフラットなテキスト文字に変更

Browse files

❤️(絵文字)→ ♥(U+2665)に変更し端末依存のレンダリングを排除。
♡/♥ ともに CSS カラー(#bf283a)で統一した見た目に。

https://claude.ai/code/session_018sq37X4VGvDxwtnyyvQmFv

Files changed (1) hide show
  1. templates/blog_detail.html +3 -3
templates/blog_detail.html CHANGED
@@ -85,7 +85,7 @@
85
  <div class="flex justify-center mb-8">
86
  <button id="like-btn" onclick="likeArticle('{{ article_id }}')"
87
  class="w-20 h-20 rounded-full border-2 border-[#e09099] dark:border-[#c07080] flex flex-col items-center justify-center gap-0.5 hover:bg-[#fdf0f2] dark:hover:bg-[#3d1a20] transition group">
88
- <span id="like-icon" class="text-2xl transition-transform group-hover:scale-110 leading-none">♡</span>
89
  <span id="like-count" class="text-xs font-bold text-[#bf283a] dark:text-[#f08090] leading-none">{{ article.get("likes", 0) or 0 }}</span>
90
  </button>
91
  </div>
@@ -181,7 +181,7 @@ async function likeArticle(articleId) {
181
  btn.classList.remove('bg-[#fdf0f2]', 'dark:bg-[#3d1a20]');
182
  } else {
183
  localStorage.setItem(key, '1');
184
- document.getElementById('like-icon').textContent = '❤️';
185
  btn.classList.add('bg-[#fdf0f2]', 'dark:bg-[#3d1a20]');
186
  }
187
  document.getElementById('like-count').textContent = data.likes;
@@ -197,7 +197,7 @@ function showMsg(el, text, cls) {
197
  (function() {
198
  const articleId = '{{ article.get("id","") if article else "" }}';
199
  if (articleId && localStorage.getItem(`liked_${articleId}`)) {
200
- document.getElementById('like-icon').textContent = '❤️';
201
  const btn = document.getElementById('like-btn');
202
  if (btn) btn.classList.add('bg-[#fdf0f2]', 'dark:bg-[#3d1a20]');
203
  }
 
85
  <div class="flex justify-center mb-8">
86
  <button id="like-btn" onclick="likeArticle('{{ article_id }}')"
87
  class="w-20 h-20 rounded-full border-2 border-[#e09099] dark:border-[#c07080] flex flex-col items-center justify-center gap-0.5 hover:bg-[#fdf0f2] dark:hover:bg-[#3d1a20] transition group">
88
+ <span id="like-icon" class="text-2xl transition-transform group-hover:scale-110 leading-none text-[#bf283a] dark:text-[#f08090]">♡</span>
89
  <span id="like-count" class="text-xs font-bold text-[#bf283a] dark:text-[#f08090] leading-none">{{ article.get("likes", 0) or 0 }}</span>
90
  </button>
91
  </div>
 
181
  btn.classList.remove('bg-[#fdf0f2]', 'dark:bg-[#3d1a20]');
182
  } else {
183
  localStorage.setItem(key, '1');
184
+ document.getElementById('like-icon').textContent = '♥';
185
  btn.classList.add('bg-[#fdf0f2]', 'dark:bg-[#3d1a20]');
186
  }
187
  document.getElementById('like-count').textContent = data.likes;
 
197
  (function() {
198
  const articleId = '{{ article.get("id","") if article else "" }}';
199
  if (articleId && localStorage.getItem(`liked_${articleId}`)) {
200
+ document.getElementById('like-icon').textContent = '♥';
201
  const btn = document.getElementById('like-btn');
202
  if (btn) btn.classList.add('bg-[#fdf0f2]', 'dark:bg-[#3d1a20]');
203
  }