Skip to content

Commit 1d1a9aa

Browse files
author
y-yamasaki
committed
いいね機能追加
1 parent 056a2db commit 1d1a9aa

40 files changed

Lines changed: 1043 additions & 29 deletions

WebSite/assets/css/blog.css

Lines changed: 43 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@
387387
color: var(--color-text-muted);
388388
}
389389
/* スマホなどで崩れる場合は縦並びに */
390-
@media (max-width: 600px) {
390+
@media (max-width: 768px) {
391391
.markdown-body dl {
392392
display: block;
393393
}
@@ -584,9 +584,8 @@
584584
/* ==========================================================================
585585
7. 記事詳細のナビゲーション
586586
========================================================================== */
587-
/* Navigation: desktop = equal-width row; mobile = stacked column */
588587
.post-detail__nav--bottom {
589-
margin-top: 3rem;
588+
margin-top: 2rem;
590589
margin-bottom: 0;
591590
display: flex;
592591
justify-content: center;
@@ -665,7 +664,7 @@
665664
}
666665

667666
/* モバイル: ボタンを縦積み(タップしやすく、順序が明確) */
668-
@media (max-width: 600px) {
667+
@media (max-width: 768px) {
669668
.post-detail__nav--bottom {
670669
flex-direction: column;
671670
gap: 0.6rem;
@@ -759,7 +758,7 @@
759758
display: none;
760759
}
761760

762-
@media (min-width: 1000px) {
761+
@media (min-width: 768px) {
763762
.post-layout {
764763
grid-template-columns: minmax(0, 1fr) 250px;
765764
gap: 1rem;
@@ -902,7 +901,7 @@
902901
visibility 0s 0.3s;
903902
}
904903

905-
@media (max-width: 999px) {
904+
@media (max-width: 768px) {
906905
.toc-toggle {
907906
display: flex; /* SP/Tabletで表示 */
908907
}
@@ -954,16 +953,16 @@
954953
Share Buttons
955954
========================================================================== */
956955
.share-buttons {
957-
margin: 2rem 0;
956+
margin: 1rem 0;
958957
text-align: center;
959958
}
960959

961960
.share-buttons__title {
962-
margin-bottom: 1rem;
963-
font-size: 0.8rem;
961+
font-size: 0.7rem;
964962
font-weight: 700;
965963
color: var(--color-text-muted);
966964
letter-spacing: 0.1em;
965+
margin: 0.3rem 0;
967966
}
968967

969968
.share-buttons__list {
@@ -1073,7 +1072,7 @@
10731072
}
10741073

10751074
/* 小さい画面での調整 */
1076-
@media (max-width: 640px) {
1075+
@media (max-width: 768px) {
10771076
.section--comments {
10781077
margin-top: 2rem;
10791078
}
@@ -1087,6 +1086,40 @@
10871086
.giscus-placeholder {
10881087
min-height: 150px;
10891088
}
1089+
1090+
.share-buttons {
1091+
margin: 1rem 0;
1092+
text-align: left;
1093+
}
1094+
1095+
.share-buttons__title {
1096+
font-size: 0.7rem;
1097+
font-weight: 700;
1098+
color: var(--color-text-muted);
1099+
letter-spacing: 0.1em;
1100+
margin: 0.3rem 0;
1101+
}
1102+
1103+
.share-buttons__list {
1104+
display: inline-flex;
1105+
gap: 1rem;
1106+
list-style: none;
1107+
padding: 0;
1108+
margin: 0;
1109+
}
1110+
1111+
.share-buttons__link {
1112+
display: flex;
1113+
justify-content: center;
1114+
align-items: center;
1115+
width: 44px;
1116+
height: 44px;
1117+
border-radius: 50%;
1118+
background-color: var(--color-surface);
1119+
color: var(--color-text);
1120+
transition: var(--transition-smooth);
1121+
border: 1px solid var(--color-border);
1122+
}
10901123
}
10911124

10921125
/* ダークモード対応(CSS変数を使用しているため基本的には自動対応) */
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
/* post-interactions.css
2+
- いいね / ブックマーク用の最小スタイル
3+
- blog.css のボタン群と雰囲気を合わせて作成
4+
*/
5+
6+
.post-actions {
7+
display: inline-flex;
8+
gap: 0.6rem;
9+
align-items: center;
10+
justify-content: center;
11+
}
12+
13+
/* アイコンボタン共通 */
14+
.btn--icon {
15+
display: inline-flex;
16+
align-items: center;
17+
gap: 0.5rem;
18+
padding: 0.45rem 0.8rem;
19+
border-radius: var(--radius-md);
20+
background: var(--color-surface);
21+
border: 1px solid var(--color-border);
22+
color: var(--color-text);
23+
cursor: pointer;
24+
font-weight: 600;
25+
transition: var(--transition-smooth);
26+
}
27+
28+
.btn--icon .icon-like,
29+
.btn--icon .icon-bookmark {
30+
font-size: 1rem;
31+
line-height: 1;
32+
}
33+
34+
/* いいねカウント */
35+
.btn--icon .like-count {
36+
display: inline-block;
37+
min-width: 2ch;
38+
text-align: left;
39+
font-weight: 700;
40+
color: var(--color-text-muted);
41+
}
42+
43+
/* liked / bookmarked 状態 */
44+
.btn--icon.is-liked {
45+
background: linear-gradient(
46+
90deg,
47+
var(--color-accent),
48+
var(--color-accent-dark)
49+
);
50+
color: #fff;
51+
border-color: transparent;
52+
box-shadow: var(--shadow-glow);
53+
}
54+
.btn--icon.is-bookmarked {
55+
background: var(--color-accent-soft);
56+
color: var(--color-heading);
57+
border-color: var(--color-accent);
58+
}
59+
60+
/* hover 効果 */
61+
.btn--icon:hover {
62+
transform: translateY(-2px);
63+
}
64+
65+
/* モバイルで少し大きめに */
66+
@media (max-width: 600px) {
67+
.post-actions {
68+
justify-content: flex-start;
69+
}
70+
.btn--icon {
71+
padding: 0.6rem 1rem;
72+
font-size: 0.95rem;
73+
}
74+
}

0 commit comments

Comments
 (0)