|
757 | 757 | color: var(--color-accent); |
758 | 758 | font-weight: 600; |
759 | 759 | } |
| 760 | + |
| 761 | +/* ========================================================================== |
| 762 | + TOC Drawer Menu for Responsive |
| 763 | + ========================================================================== */ |
| 764 | +.toc-toggle { |
| 765 | + display: none; /* PCでは非表示 */ |
| 766 | + position: fixed; |
| 767 | + bottom: 2rem; |
| 768 | + right: 1.5rem; |
| 769 | + z-index: 100; |
| 770 | + width: 56px; |
| 771 | + height: 56px; |
| 772 | + padding: 0; |
| 773 | + border: none; |
| 774 | + border-radius: 50%; |
| 775 | + background: var(--color-accent); |
| 776 | + color: #fff; |
| 777 | + cursor: pointer; |
| 778 | + transition: all 0.2s ease-in-out; |
| 779 | + box-shadow: var(--shadow-lg); |
| 780 | + justify-content: center; |
| 781 | + align-items: center; |
| 782 | + gap: 0.5rem; |
| 783 | +} |
| 784 | + |
| 785 | +.toc-toggle span { |
| 786 | + display: none; |
| 787 | +} |
| 788 | + |
| 789 | +.toc-toggle:hover { |
| 790 | + background: var(--color-accent-dark); |
| 791 | + transform: translateY(-3px); |
| 792 | +} |
| 793 | + |
| 794 | +.toc-overlay { |
| 795 | + position: fixed; |
| 796 | + top: 0; |
| 797 | + left: 0; |
| 798 | + width: 100%; |
| 799 | + height: 100%; |
| 800 | + background: rgba(0, 0, 0, 0.6); |
| 801 | + z-index: 101; |
| 802 | + opacity: 0; |
| 803 | + visibility: hidden; |
| 804 | + transition: |
| 805 | + opacity 0.3s ease, |
| 806 | + visibility 0s 0.3s; |
| 807 | +} |
| 808 | + |
| 809 | +@media (max-width: 999px) { |
| 810 | + .toc-toggle { |
| 811 | + display: flex; /* SP/Tabletで表示 */ |
| 812 | + } |
| 813 | + |
| 814 | + .post-sidebar { |
| 815 | + position: fixed; |
| 816 | + top: 0; |
| 817 | + right: 0; |
| 818 | + width: 100%; |
| 819 | + max-width: 320px; |
| 820 | + height: 100vh; |
| 821 | + height: 100dvh; |
| 822 | + background: var(--color-surface); |
| 823 | + z-index: 102; |
| 824 | + transform: translateX(100%); |
| 825 | + transition: transform 0.3s |
| 826 | + cubic-bezier(0.16, 1, 0.3, 1); |
| 827 | + display: block; /* display:noneを解除 */ |
| 828 | + box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3); |
| 829 | + overflow-y: auto; |
| 830 | + } |
| 831 | + |
| 832 | + .post-sidebar.is-open { |
| 833 | + transform: translateX(0); |
| 834 | + } |
| 835 | + |
| 836 | + .toc-overlay.is-open { |
| 837 | + opacity: 1; |
| 838 | + visibility: visible; |
| 839 | + transition-delay: 0s; |
| 840 | + } |
| 841 | + |
| 842 | + .toc-sticky-container { |
| 843 | + position: static; |
| 844 | + padding: 2rem 1.5rem; |
| 845 | + } |
| 846 | + |
| 847 | + .toc { |
| 848 | + border: none; |
| 849 | + padding: 0; |
| 850 | + } |
| 851 | + |
| 852 | + .toc-list { |
| 853 | + max-height: none; |
| 854 | + } |
| 855 | +} |
0 commit comments