diff --git a/assets/css/main.css b/assets/css/main.css new file mode 100644 index 0000000..94c0bc7 --- /dev/null +++ b/assets/css/main.css @@ -0,0 +1,710 @@ +/* ============================================ + Variables & Reset + ============================================ */ +:root { + --primary-color: #2563eb; + --primary-dark: #1e40af; + --secondary-color: #10b981; + --text-primary: #1f2937; + --text-secondary: #6b7280; + --text-light: #9ca3af; + --bg-primary: #ffffff; + --bg-secondary: #f9fafb; + --bg-tertiary: #f3f4f6; + --border-color: #e5e7eb; + --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05); + --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1); + --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1); + --radius: 8px; + --radius-lg: 12px; + --transition: all 0.3s ease; + --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; + --font-mono: 'JetBrains Mono', 'Courier New', monospace; +} + +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +html { + scroll-behavior: smooth; +} + +body { + font-family: var(--font-sans); + color: var(--text-primary); + background-color: var(--bg-primary); + line-height: 1.6; + font-size: 16px; +} + +/* ============================================ + Container + ============================================ */ +.container { + max-width: 1400px; + margin: 0 auto; + padding: 0 20px; +} + +/* ============================================ + Header + ============================================ */ +.site-header { + background: var(--bg-primary); + border-bottom: 1px solid var(--border-color); + position: sticky; + top: 0; + z-index: 100; + box-shadow: var(--shadow-sm); + backdrop-filter: blur(10px); + background-color: rgba(255, 255, 255, 0.95); +} + +.header-content { + display: flex; + align-items: center; + justify-content: space-between; + padding: 1rem 0; + gap: 2rem; +} + +.logo-section { + display: flex; + align-items: center; + gap: 1rem; +} + +.logo-link { + display: flex; + align-items: center; + gap: 1rem; + text-decoration: none; + color: var(--text-primary); + transition: var(--transition); +} + +.logo-link:hover { + opacity: 0.8; +} + +.logo-img { + width: 50px; + height: 50px; + border-radius: var(--radius); +} + +.site-title { + font-size: 1.5rem; + font-weight: 700; + margin: 0; +} + +.header-actions { + display: flex; + align-items: center; + gap: 1.5rem; + flex: 1; + justify-content: flex-end; +} + +.search-container { + position: relative; + flex: 1; + max-width: 500px; +} + +.search-icon { + position: absolute; + left: 1rem; + top: 50%; + transform: translateY(-50%); + color: var(--text-secondary); + pointer-events: none; +} + +.search-input { + width: 100%; + padding: 0.75rem 1rem 0.75rem 3rem; + border: 2px solid var(--border-color); + border-radius: var(--radius); + font-size: 1rem; + transition: var(--transition); + background: var(--bg-secondary); +} + +.search-input:focus { + outline: none; + border-color: var(--primary-color); + background: var(--bg-primary); + box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); +} + +.search-clear { + position: absolute; + right: 0.5rem; + top: 50%; + transform: translateY(-50%); + background: none; + border: none; + color: var(--text-secondary); + cursor: pointer; + padding: 0.5rem; + border-radius: var(--radius); + transition: var(--transition); +} + +.search-clear:hover { + color: var(--text-primary); + background: var(--bg-tertiary); +} + +.github-link { + display: flex; + align-items: center; + gap: 0.5rem; + padding: 0.75rem 1.5rem; + background: var(--bg-secondary); + color: var(--text-primary); + text-decoration: none; + border-radius: var(--radius); + transition: var(--transition); + font-weight: 500; + white-space: nowrap; +} + +.github-link:hover { + background: var(--bg-tertiary); + transform: translateY(-1px); + box-shadow: var(--shadow-md); +} + +.github-text { + display: none; +} + +/* ============================================ + Search Results + ============================================ */ +.search-results { + background: var(--bg-secondary); + border-bottom: 1px solid var(--border-color); + padding: 2rem 0; +} + +.search-results-content h2 { + margin-bottom: 1.5rem; + color: var(--text-primary); +} + +#search-results-list { + display: grid; + gap: 1rem; +} + +.search-result-item { + background: var(--bg-primary); + padding: 1.5rem; + border-radius: var(--radius); + border: 1px solid var(--border-color); + transition: var(--transition); +} + +.search-result-item:hover { + box-shadow: var(--shadow-md); + transform: translateY(-2px); +} + +.search-result-item h3 { + margin-bottom: 0.5rem; + color: var(--primary-color); +} + +.search-result-item a { + color: var(--primary-color); + text-decoration: none; + font-weight: 500; +} + +.search-result-item a:hover { + text-decoration: underline; +} + +/* ============================================ + Hero Section + ============================================ */ +.hero-section { + background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%); + color: white; + padding: 4rem 0; + margin-bottom: 3rem; +} + +.hero-content { + text-align: center; + max-width: 800px; + margin: 0 auto; +} + +.hero-title { + font-size: 3rem; + font-weight: 700; + margin-bottom: 1rem; + display: flex; + align-items: center; + justify-content: center; + gap: 1rem; +} + +.hero-icon { + font-size: 3.5rem; +} + +.hero-description { + font-size: 1.25rem; + margin-bottom: 1rem; + opacity: 0.95; +} + +.hero-subtitle { + font-size: 1rem; + opacity: 0.9; + margin-bottom: 2rem; +} + +.hero-subtitle a { + color: white; + text-decoration: underline; +} + +.hero-badges { + display: flex; + justify-content: center; + gap: 1rem; +} + +.badge img { + height: 30px; +} + +/* ============================================ + Content Section + ============================================ */ +.content-section { + padding: 2rem 0 4rem; +} + +.content-wrapper { + display: grid; + grid-template-columns: 280px 1fr; + gap: 3rem; + align-items: start; +} + +/* ============================================ + Sidebar + ============================================ */ +.sidebar { + position: sticky; + top: 100px; + max-height: calc(100vh - 120px); + overflow-y: auto; +} + +.sidebar-sticky { + background: var(--bg-secondary); + padding: 1.5rem; + border-radius: var(--radius-lg); + border: 1px solid var(--border-color); +} + +.sidebar-title { + font-size: 1.1rem; + font-weight: 600; + margin-bottom: 1rem; + display: flex; + align-items: center; + gap: 0.5rem; + color: var(--text-primary); +} + +.toc-nav { + list-style: none; +} + +.toc-nav ul { + list-style: none; + margin-left: 1rem; +} + +.toc-nav li { + margin-bottom: 0.5rem; +} + +.toc-nav a { + color: var(--text-secondary); + text-decoration: none; + font-size: 0.9rem; + display: block; + padding: 0.25rem 0.5rem; + border-radius: 4px; + transition: var(--transition); +} + +.toc-nav a:hover { + color: var(--primary-color); + background: var(--bg-tertiary); +} + +.toc-nav a.active { + color: var(--primary-color); + background: var(--bg-tertiary); + font-weight: 500; +} + +/* ============================================ + Main Article + ============================================ */ +.main-article { + background: var(--bg-primary); + padding: 2rem; + border-radius: var(--radius-lg); + border: 1px solid var(--border-color); +} + +.markdown-content { + line-height: 1.8; +} + +.markdown-content h1 { + font-size: 2.5rem; + margin: 2rem 0 1rem; + color: var(--text-primary); + border-bottom: 2px solid var(--border-color); + padding-bottom: 0.5rem; +} + +.markdown-content h2 { + font-size: 2rem; + margin: 2rem 0 1rem; + color: var(--text-primary); + border-bottom: 1px solid var(--border-color); + padding-bottom: 0.5rem; +} + +.markdown-content h3 { + font-size: 1.5rem; + margin: 1.5rem 0 1rem; + color: var(--text-primary); +} + +.markdown-content h4 { + font-size: 1.25rem; + margin: 1.25rem 0 0.75rem; + color: var(--text-primary); +} + +.markdown-content p { + margin-bottom: 1rem; + color: var(--text-primary); +} + +.markdown-content ul, +.markdown-content ol { + margin: 1rem 0; + padding-left: 2rem; +} + +.markdown-content li { + margin-bottom: 0.5rem; + color: var(--text-primary); +} + +.markdown-content a { + color: var(--primary-color); + text-decoration: none; + transition: var(--transition); + border-bottom: 1px solid transparent; +} + +.markdown-content a:hover { + border-bottom-color: var(--primary-color); +} + +.markdown-content code { + background: var(--bg-secondary); + padding: 0.2rem 0.4rem; + border-radius: 4px; + font-family: var(--font-mono); + font-size: 0.9em; + color: var(--primary-dark); +} + +.markdown-content pre { + background: var(--bg-secondary); + padding: 1rem; + border-radius: var(--radius); + overflow-x: auto; + margin: 1rem 0; + border: 1px solid var(--border-color); +} + +.markdown-content pre code { + background: none; + padding: 0; + color: var(--text-primary); +} + +.markdown-content img { + max-width: 100%; + height: auto; + border-radius: var(--radius); + margin: 1rem 0; +} + +.markdown-content blockquote { + border-left: 4px solid var(--primary-color); + padding-left: 1rem; + margin: 1rem 0; + color: var(--text-secondary); + font-style: italic; +} + +.markdown-content table { + width: 100%; + border-collapse: collapse; + margin: 1rem 0; +} + +.markdown-content th, +.markdown-content td { + padding: 0.75rem; + border: 1px solid var(--border-color); + text-align: left; +} + +.markdown-content th { + background: var(--bg-secondary); + font-weight: 600; +} + +/* ============================================ + Footer + ============================================ */ +.site-footer { + background: var(--bg-secondary); + border-top: 1px solid var(--border-color); + padding: 3rem 0 1.5rem; + margin-top: 4rem; +} + +.footer-content { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); + gap: 2rem; + margin-bottom: 2rem; +} + +.footer-section h3 { + margin-bottom: 1rem; + color: var(--text-primary); +} + +.footer-section p { + color: var(--text-secondary); + margin-bottom: 0.5rem; +} + +.footer-links { + list-style: none; +} + +.footer-links li { + margin-bottom: 0.5rem; +} + +.footer-link, +.footer-links a { + color: var(--text-secondary); + text-decoration: none; + display: inline-flex; + align-items: center; + gap: 0.5rem; + transition: var(--transition); +} + +.footer-link:hover, +.footer-links a:hover { + color: var(--primary-color); +} + +.license-link { + display: inline-block; + text-align: center; + color: var(--text-secondary); + text-decoration: none; +} + +.license-img { + margin-bottom: 0.5rem; +} + +.footer-bottom { + text-align: center; + padding-top: 2rem; + border-top: 1px solid var(--border-color); + color: var(--text-light); + font-size: 0.9rem; +} + +/* ============================================ + Responsive Design + ============================================ */ +@media (max-width: 1024px) { + .content-wrapper { + grid-template-columns: 1fr; + } + + .sidebar { + position: relative; + top: 0; + max-height: none; + } + + .sidebar-sticky { + position: sticky; + top: 100px; + } +} + +@media (max-width: 768px) { + .header-content { + flex-direction: column; + align-items: stretch; + } + + .header-actions { + flex-direction: column; + } + + .search-container { + max-width: 100%; + } + + .github-text { + display: inline; + } + + .hero-title { + font-size: 2rem; + flex-direction: column; + } + + .hero-icon { + font-size: 2.5rem; + } + + .hero-description { + font-size: 1.1rem; + } + + .main-article { + padding: 1.5rem; + } + + .markdown-content h1 { + font-size: 2rem; + } + + .markdown-content h2 { + font-size: 1.75rem; + } + + .footer-content { + grid-template-columns: 1fr; + } +} + +@media (max-width: 480px) { + .container { + padding: 0 15px; + } + + .hero-section { + padding: 2rem 0; + } + + .main-article { + padding: 1rem; + } +} + +/* ============================================ + Scrollbar Styling + ============================================ */ +.sidebar::-webkit-scrollbar { + width: 6px; +} + +.sidebar::-webkit-scrollbar-track { + background: var(--bg-tertiary); + border-radius: 3px; +} + +.sidebar::-webkit-scrollbar-thumb { + background: var(--text-light); + border-radius: 3px; +} + +.sidebar::-webkit-scrollbar-thumb:hover { + background: var(--text-secondary); +} + +/* ============================================ + Highlighting for search + ============================================ */ +.highlight { + background: yellow; + padding: 0.1rem 0.2rem; + border-radius: 3px; + font-weight: 500; +} + +/* ============================================ + Loading and Error States + ============================================ */ +.loading-state, +.error-state { + text-align: center; + padding: 3rem 2rem; + color: var(--text-secondary); +} + +.loading-state i { + font-size: 2rem; + margin-bottom: 1rem; + color: var(--primary-color); +} + +.error-state i { + font-size: 2rem; + margin-bottom: 1rem; + color: #ef4444; +} + +.error-state a { + color: var(--primary-color); + text-decoration: underline; +} + +.search-section { + font-size: 0.85rem; + color: var(--text-light); + margin-top: 0.5rem; + display: flex; + align-items: center; + gap: 0.5rem; +} +