| |
| |
| |
|
|
|
|
|
|
| :root {
|
|
|
| --breakpoint-mobile: 768px;
|
| --breakpoint-tablet: 1024px;
|
| --breakpoint-desktop: 1025px;
|
|
|
|
|
| --widget-gap-mobile: 0.75rem;
|
| --widget-gap-tablet: 1rem;
|
| --widget-gap-desktop: 1.25rem;
|
|
|
|
|
| --widget-animation-duration: 0.3s;
|
| --widget-animation-timing: ease-in-out;
|
|
|
|
|
| --sidebar-width-mobile: 100%;
|
| --sidebar-width-tablet: 280px;
|
| --sidebar-width-desktop: 320px;
|
|
|
|
|
| --widget-min-height: 60px;
|
| --widget-max-height-mobile: 200px;
|
| --widget-max-height-tablet: 300px;
|
| --widget-max-height-desktop: 400px;
|
| }
|
|
|
|
|
| #dynamic-sidebar {
|
| width: var(--sidebar-width-desktop);
|
| transition: all var(--widget-animation-duration) var(--widget-animation-timing);
|
| position: relative;
|
| }
|
|
|
|
|
| .widget-container {
|
| min-height: var(--widget-min-height);
|
| transition: all var(--widget-animation-duration) var(--widget-animation-timing);
|
| overflow: hidden;
|
| }
|
|
|
|
|
| .widget-container:hover {
|
| transform: translateY(-2px);
|
| box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
| }
|
|
|
| .widget-container.widget-hover {
|
| transform: translateY(-2px);
|
| box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
| }
|
|
|
|
|
| @media (max-width: 767px) {
|
| #dynamic-sidebar {
|
| width: var(--sidebar-width-mobile);
|
| padding: 0.5rem;
|
| }
|
|
|
| .sidebar-top-section,
|
| .sidebar-sticky-section {
|
| gap: var(--widget-gap-mobile);
|
| }
|
|
|
| .widget-container {
|
| max-height: var(--widget-max-height-mobile);
|
| }
|
|
|
|
|
| .widget-container[data-mobile-hidden="true"] {
|
| display: none;
|
| }
|
|
|
|
|
| .sidebar-sticky-section {
|
| position: static !important;
|
| top: auto !important;
|
| }
|
|
|
|
|
| .widget-container[data-widget-type="announcement"] {
|
| order: -1;
|
| }
|
|
|
| .widget-container[data-widget-type="categories"],
|
| .widget-container[data-widget-type="tags"] {
|
|
|
| max-height: 120px;
|
| overflow-y: auto;
|
| }
|
| }
|
|
|
|
|
| @media (min-width: 768px) and (max-width: 1023px) {
|
| #dynamic-sidebar {
|
| width: var(--sidebar-width-tablet);
|
| padding: 0.75rem;
|
| }
|
|
|
| .sidebar-top-section,
|
| .sidebar-sticky-section {
|
| gap: var(--widget-gap-tablet);
|
| }
|
|
|
| .widget-container {
|
| max-height: var(--widget-max-height-tablet);
|
| }
|
|
|
|
|
| .widget-container[data-tablet-hidden="true"] {
|
| display: none;
|
| }
|
|
|
|
|
| }
|
|
|
|
|
| @media (min-width: 1024px) {
|
| #dynamic-sidebar {
|
| width: var(--sidebar-width-desktop);
|
| padding: 1rem;
|
| }
|
|
|
| .sidebar-top-section,
|
| .sidebar-sticky-section {
|
| gap: var(--widget-gap-desktop);
|
| }
|
|
|
| .widget-container {
|
| max-height: var(--widget-max-height-desktop);
|
| }
|
|
|
|
|
| .widget-container[data-desktop-hidden="true"] {
|
| display: none;
|
| }
|
|
|
|
|
| .widget-container:hover {
|
| transform: translateY(-4px);
|
| box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
|
| }
|
| }
|
|
|
|
|
| @media (min-width: 1441px) {
|
| #dynamic-sidebar {
|
| width: 360px;
|
| }
|
|
|
| .widget-container {
|
| max-height: 500px;
|
| }
|
| }
|
|
|
|
|
| .sidebar-top-section {
|
|
|
| margin-bottom: 1rem;
|
| }
|
|
|
| .sidebar-sticky-section {
|
|
|
| position: sticky;
|
| top: 1rem;
|
| z-index: 10;
|
| }
|
|
|
|
|
|
|
|
|
| .widget-container[data-widget-type="profile"] {
|
|
|
| min-height: 120px;
|
| }
|
|
|
| @media (max-width: 767px) {
|
| .widget-container[data-widget-type="profile"] {
|
| min-height: 100px;
|
| }
|
| }
|
|
|
|
|
| .widget-container[data-widget-type="announcement"] {
|
|
|
| min-height: 80px;
|
| }
|
|
|
| @media (max-width: 767px) {
|
| .widget-container[data-widget-type="announcement"] {
|
| min-height: 60px;
|
| font-size: 0.875rem;
|
| }
|
| }
|
|
|
|
|
| .widget-container[data-widget-type="categories"],
|
| .widget-container[data-widget-type="tags"] {
|
|
|
| overflow-y: auto;
|
| scrollbar-width: thin;
|
| scrollbar-color: rgba(156, 163, 175, 0.5) transparent;
|
| }
|
|
|
| .widget-container[data-widget-type="categories"]::-webkit-scrollbar,
|
| .widget-container[data-widget-type="tags"]::-webkit-scrollbar {
|
| width: 4px;
|
| }
|
|
|
| .widget-container[data-widget-type="categories"]::-webkit-scrollbar-track,
|
| .widget-container[data-widget-type="tags"]::-webkit-scrollbar-track {
|
| background: transparent;
|
| }
|
|
|
| .widget-container[data-widget-type="categories"]::-webkit-scrollbar-thumb,
|
| .widget-container[data-widget-type="tags"]::-webkit-scrollbar-thumb {
|
| background-color: rgba(156, 163, 175, 0.5);
|
| border-radius: 2px;
|
| }
|
|
|
|
|
| .widget-container[data-widget-type="toc"] {
|
|
|
| max-height: 400px;
|
| overflow-y: auto;
|
| }
|
|
|
| @media (max-width: 767px) {
|
| .widget-container[data-widget-type="toc"] {
|
| display: none;
|
| }
|
| }
|
|
|
|
|
|
|
|
|
|
|
|
|
| @keyframes fadeIn {
|
| from {
|
| opacity: 0;
|
| transform: translateY(20px);
|
| }
|
| to {
|
| opacity: 1;
|
| transform: translateY(0);
|
| }
|
| }
|
|
|
|
|
| @keyframes slideIn {
|
| from {
|
| opacity: 0;
|
| transform: translateX(-30px);
|
| }
|
| to {
|
| opacity: 1;
|
| transform: translateX(0);
|
| }
|
| }
|
|
|
|
|
| @keyframes scaleIn {
|
| from {
|
| opacity: 0;
|
| transform: scale(0.8);
|
| }
|
| to {
|
| opacity: 1;
|
| transform: scale(1);
|
| }
|
| }
|
|
|
|
|
| .widget-animation-fade {
|
| animation: fadeIn var(--widget-animation-duration) var(--widget-animation-timing) forwards;
|
| }
|
|
|
| .widget-animation-slide {
|
| animation: slideIn var(--widget-animation-duration) var(--widget-animation-timing) forwards;
|
| }
|
|
|
| .widget-animation-scale {
|
| animation: scaleIn var(--widget-animation-duration) var(--widget-animation-timing) forwards;
|
| }
|
|
|
|
|
| .widget-container {
|
| opacity: 0;
|
| }
|
|
|
| .widget-container.widget-animated {
|
| opacity: 1;
|
| }
|
|
|
|
|
| .widget-loading {
|
| position: relative;
|
| overflow: hidden;
|
| }
|
|
|
| .widget-loading::before {
|
| content: '';
|
| position: absolute;
|
| top: 0;
|
| left: -100%;
|
| width: 100%;
|
| height: 100%;
|
| background: linear-gradient(
|
| 90deg,
|
| transparent,
|
| rgba(255, 255, 255, 0.2),
|
| transparent
|
| );
|
| animation: shimmer 1.5s infinite;
|
| }
|
|
|
| @keyframes shimmer {
|
| 0% {
|
| left: -100%;
|
| }
|
| 100% {
|
| left: 100%;
|
| }
|
| }
|
|
|
|
|
| .widget-error {
|
| border: 2px dashed #ef4444;
|
| background-color: #fef2f2;
|
| color: #dc2626;
|
| display: flex;
|
| align-items: center;
|
| justify-content: center;
|
| min-height: 80px;
|
| text-align: center;
|
| font-size: 0.875rem;
|
| }
|
|
|
|
|
| .widget-empty {
|
| border: 2px dashed #d1d5db;
|
| background-color: #f9fafb;
|
| color: #6b7280;
|
| display: flex;
|
| align-items: center;
|
| justify-content: center;
|
| min-height: 80px;
|
| text-align: center;
|
| font-size: 0.875rem;
|
| }
|
|
|
|
|
| @media (prefers-color-scheme: dark) {
|
| .widget-container:hover {
|
| box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
| }
|
|
|
| .widget-container.widget-hover {
|
| box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
|
| }
|
|
|
| .widget-error {
|
| border-color: #f87171;
|
| background-color: #450a0a;
|
| color: #fca5a5;
|
| }
|
|
|
| .widget-empty {
|
| border-color: #4b5563;
|
| background-color: #111827;
|
| color: #9ca3af;
|
| }
|
|
|
| .widget-loading::before {
|
| background: linear-gradient(
|
| 90deg,
|
| transparent,
|
| rgba(255, 255, 255, 0.1),
|
| transparent
|
| );
|
| }
|
| }
|
|
|
|
|
| @media (prefers-contrast: high) {
|
| .widget-container {
|
| border: 2px solid currentColor;
|
| }
|
|
|
| .widget-container:hover {
|
| border-width: 3px;
|
| }
|
| }
|
|
|
|
|
| @media (prefers-reduced-motion: reduce) {
|
| .widget-container,
|
| .widget-animation-fade,
|
| .widget-animation-slide,
|
| .widget-animation-scale {
|
| animation: none;
|
| transition: none;
|
| }
|
|
|
| .widget-container {
|
| opacity: 1;
|
| transform: none;
|
| }
|
|
|
| .widget-container:hover {
|
| transform: none;
|
| }
|
| }
|
|
|
|
|
| @media print {
|
| #dynamic-sidebar {
|
| display: none;
|
| }
|
| }
|
|
|
|
|
| @supports (container-type: inline-size) {
|
| #dynamic-sidebar {
|
| container-type: inline-size;
|
| }
|
|
|
| @container (max-width: 280px) {
|
| .widget-container {
|
| font-size: 0.875rem;
|
| }
|
|
|
| .widget-container[data-widget-type="categories"],
|
| .widget-container[data-widget-type="tags"] {
|
| max-height: 150px;
|
| }
|
| }
|
|
|
| @container (min-width: 360px) {
|
| .widget-container {
|
| padding: 1.25rem;
|
| }
|
| }
|
| }
|
|
|
|
|
| .widget-hidden {
|
| display: none !important;
|
| }
|
|
|
| .widget-visible {
|
| display: block !important;
|
| }
|
|
|
| .widget-compact {
|
| padding: 0.5rem !important;
|
| font-size: 0.875rem !important;
|
| }
|
|
|
| .widget-expanded {
|
| padding: 1.5rem !important;
|
| font-size: 1rem !important;
|
| }
|
|
|
|
|
| [data-debug="true"] .widget-container {
|
| border: 1px solid #3b82f6;
|
| position: relative;
|
| }
|
|
|
| [data-debug="true"] .widget-container::before {
|
| content: attr(data-widget-type) ' [' attr(data-widget-order) ']';
|
| position: absolute;
|
| top: -1px;
|
| left: -1px;
|
| background: #3b82f6;
|
| color: white;
|
| font-size: 10px;
|
| padding: 2px 4px;
|
| z-index: 1000;
|
| } |