|
189 | 189 | 3. 記事詳細ページ |
190 | 190 | ========================================================================== */ |
191 | 191 | .post-detail { |
192 | | - max-width: 50rem; |
193 | | - margin: 0 auto; |
194 | 192 | background: var(--color-panel); |
195 | 193 | border-radius: var(--radius-lg); |
196 | 194 | padding: 3rem; |
|
202 | 200 | margin-bottom: 2.5rem; |
203 | 201 | padding-bottom: 2rem; |
204 | 202 | border-bottom: 1px solid var(--color-border-soft); |
205 | | - text-align: center; /* タイトル周りを中央寄せに */ |
| 203 | + text-align: center; |
206 | 204 | } |
207 | 205 |
|
208 | 206 | .post-detail__meta { |
|
501 | 499 | } |
502 | 500 | .post-detail { |
503 | 501 | padding: 1.5rem; /* スマホでは余白を詰める */ |
504 | | - border-radius: 0; /* 画面幅いっぱいの場合は角丸なしも一案だが、page-shellがあるので維持 */ |
| 502 | + border-radius: 0; |
505 | 503 | border-left: none; |
506 | 504 | border-right: none; |
507 | | - box-shadow: none; /* シンプルに */ |
508 | | - background: transparent; /* 背景を抜いて馴染ませる手もあるが、ここではpanel維持 */ |
| 505 | + box-shadow: none; |
509 | 506 | background: var(--color-panel); |
510 | 507 | } |
511 | 508 | .post-detail__title { |
|
523 | 520 | } |
524 | 521 |
|
525 | 522 | /* ========================================================================== |
526 | | - 6. ページネーション |
527 | | - ========================================================================== */ |
| 523 | + 6. ページネーション |
| 524 | + ========================================================================== */ |
528 | 525 | .pagination { |
529 | 526 | display: flex; |
530 | 527 | justify-content: center; |
|
575 | 572 | /* ========================================================================== |
576 | 573 | 7. 記事詳細のナビゲーション |
577 | 574 | ========================================================================== */ |
578 | | - |
579 | 575 | .post-detail__nav--bottom { |
580 | 576 | margin-top: 3rem; |
581 | 577 | margin-bottom: 0; |
|
607 | 603 | 8. パンくずリスト |
608 | 604 | ========================================================================== */ |
609 | 605 | .breadcrumb { |
610 | | - margin-bottom: 2rem; |
| 606 | + margin-bottom: 1.5rem; |
611 | 607 | font-size: 0.9rem; |
612 | 608 | color: var(--color-text-muted); |
| 609 | + white-space: nowrap; /* Prevent wrapping */ |
| 610 | + overflow-x: auto; /* Allow horizontal scrolling if needed */ |
| 611 | + -webkit-overflow-scrolling: touch; /* Smooth scrolling on touch devices */ |
| 612 | + scrollbar-width: none; /* Hide scrollbar for Firefox */ |
| 613 | +} |
| 614 | +.breadcrumb::-webkit-scrollbar { |
| 615 | + display: none; /* Hide scrollbar for Chrome, Safari */ |
| 616 | +} |
| 617 | + |
| 618 | +.breadcrumb__list { |
| 619 | + list-style: none; |
| 620 | + padding: 0; |
| 621 | + margin: 0; |
| 622 | + display: flex; |
| 623 | + align-items: center; |
| 624 | +} |
| 625 | + |
| 626 | +.breadcrumb__item:not(:last-child)::after { |
| 627 | + content: ">"; |
| 628 | + margin: 0 0.75rem; |
| 629 | + color: var(--color-text-muted); |
| 630 | + opacity: 0.5; |
613 | 631 | } |
614 | 632 |
|
615 | 633 | .breadcrumb a { |
|
623 | 641 | text-decoration: underline; |
624 | 642 | } |
625 | 643 |
|
626 | | -.breadcrumb-separator { |
627 | | - margin: 0 0.5rem; |
| 644 | +.breadcrumb__item[aria-current="page"] { |
| 645 | + font-weight: 600; |
| 646 | + color: var(--color-text); |
| 647 | +} |
| 648 | + |
| 649 | +/* ========================================================================== |
| 650 | + 9. 記事詳細レイアウト(2カラム) |
| 651 | + ========================================================================== */ |
| 652 | +.post-layout { |
| 653 | + display: grid; |
| 654 | + grid-template-columns: 1fr; |
| 655 | + gap: 2rem; |
| 656 | +} |
| 657 | + |
| 658 | +.post-content { |
| 659 | + min-width: 0; |
| 660 | +} |
| 661 | + |
| 662 | +.post-sidebar { |
| 663 | + display: none; |
| 664 | +} |
| 665 | + |
| 666 | +@media (min-width: 1000px) { |
| 667 | + .post-layout { |
| 668 | + grid-template-columns: minmax(0, 1fr) 250px; |
| 669 | + gap: 1rem; |
| 670 | + } |
| 671 | + .post-sidebar { |
| 672 | + display: block; |
| 673 | + } |
| 674 | + |
| 675 | + body[data-page="blog"] .main-container { |
| 676 | + max-width: 1180px; |
| 677 | + } |
| 678 | +} |
| 679 | + |
| 680 | +/* ========================================================================== |
| 681 | + 10. 目次 (TOC) |
| 682 | + ========================================================================== */ |
| 683 | +.toc-sticky-container { |
| 684 | + position: sticky; |
| 685 | + top: 6rem; /* ヘッダーの高さ + 余白 */ |
| 686 | +} |
| 687 | + |
| 688 | +.toc { |
| 689 | + background: var(--color-surface); |
| 690 | + border-radius: var(--radius-lg); |
| 691 | + padding: 1.5rem; |
| 692 | + border: 1px solid var(--color-border); |
| 693 | +} |
| 694 | + |
| 695 | +.toc__title { |
| 696 | + font-size: 1.2rem; |
| 697 | + font-weight: 700; |
| 698 | + color: var(--color-heading); |
| 699 | + margin-top: 0; |
| 700 | + margin-bottom: 1rem; |
| 701 | + padding-bottom: 0.8rem; |
| 702 | + border-bottom: 1px solid var(--color-border-soft); |
| 703 | +} |
| 704 | + |
| 705 | +.toc-list { |
| 706 | + list-style: none; |
| 707 | + padding: 0; |
| 708 | + margin: 0; |
| 709 | + max-height: calc(100vh - 12rem); |
| 710 | + overflow-y: auto; |
| 711 | +} |
| 712 | + |
| 713 | +.toc-item { |
| 714 | + margin-bottom: 0.5rem; |
| 715 | +} |
| 716 | + |
| 717 | +.toc-item a { |
| 718 | + color: var(--color-text-muted); |
| 719 | + text-decoration: none; |
| 720 | + font-size: 0.9rem; |
| 721 | + line-height: 1.5; |
| 722 | + transition: var(--transition-smooth); |
| 723 | + display: block; |
| 724 | +} |
| 725 | + |
| 726 | +.toc-item a:hover { |
| 727 | + color: var(--color-accent); |
| 728 | + transform: translateX(4px); |
| 729 | +} |
| 730 | + |
| 731 | +.toc-item--level-3 { |
| 732 | + padding-left: 1.2rem; |
628 | 733 | } |
629 | 734 |
|
630 | | -.breadcrumb-current { |
| 735 | +.toc-item--level-3 a { |
| 736 | + font-size: 0.85rem; |
| 737 | + position: relative; |
| 738 | +} |
| 739 | + |
| 740 | +.toc-item--level-3 a::before { |
| 741 | + content: ""; |
| 742 | + position: absolute; |
| 743 | + left: -1rem; |
| 744 | + top: 50%; |
| 745 | + transform: translateY(-50%); |
| 746 | + width: 4px; |
| 747 | + height: 4px; |
| 748 | + border-radius: 50%; |
| 749 | + background-color: var(--color-border); |
| 750 | +} |
| 751 | + |
| 752 | +.toc-item a.is-active { |
| 753 | + color: var(--color-accent); |
631 | 754 | font-weight: 600; |
632 | | - color: var(--color-text); |
633 | 755 | } |
0 commit comments