UNPKG

@fjell/docs-template

Version:

Shared documentation template for Fjell projects

868 lines (746 loc) 17.1 kB
:root { /* Base Colors */ --color-primary: #2D3748; --color-secondary: #4A5568; --color-accent: #667EEA; --color-accent-light: #764BA2; --color-background: #FAFAFA; --color-surface: #FFFFFF; --color-border: #E2E8F0; --color-text: #2D3748; --color-text-light: #718096; --color-text-muted: #A0AEC0; /* Surface Variants */ --surface-01: #FFFFFF; --surface-02: #F7FAFC; --surface-03: #EDF2F7; /* Border Variants */ --border-secondary: #CBD5E0; /* Accent Variants */ --accent-primary: #667EEA; --accent-secondary: #764BA2; /* Text Variants */ --text-secondary: #718096; /* Gradients */ --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%); --gradient-text: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%); --gradient-subtle: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%); --gradient-mystery: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(45, 55, 72, 0.8) 50%, rgba(0, 0, 0, 0.6) 100%); /* Typography */ --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif; --font-display: 'SF Pro Display', -apple-system, BlinkMacSystemFont, system-ui, sans-serif; /* Layout */ --sidebar-width: 320px; --header-height: 160px; --content-max-width: 1000px; /* Transitions */ --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); --transition-mystery: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Brand Background Image - default, can be overridden */ --brand-background-image: url('./pano.png'); } * { box-sizing: border-box; } html { scroll-behavior: smooth; } body { margin: 0; padding: 0; font-family: var(--font-primary); background: var(--color-background); color: var(--color-text); line-height: 1.7; font-weight: 400; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; } .docs-app { min-height: 100vh; display: flex; flex-direction: column; position: relative; } /* ===== ANIMATIONS ===== */ @keyframes pan-landscape { 0% { background-position: center 0%; } 100% { background-position: center 15%; } } @keyframes mystery-fade-in { 0% { opacity: 0; transform: translateY(30px); } 100% { opacity: 1; transform: translateY(0); } } @keyframes mystery-glow { 0%, 100% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.3); } 50% { box-shadow: 0 0 30px rgba(102, 126, 234, 0.5); } } @keyframes spinner { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } /* ===== BACKGROUND ===== */ .header-background { position: fixed; top: 0; left: 0; right: 0; height: var(--header-height); background-image: var(--brand-background-image); background-size: cover; background-position: center 0%; background-repeat: no-repeat; z-index: 999; animation: pan-landscape 60s ease-in-out infinite alternate; pointer-events: none; } .header-background::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: var(--gradient-mystery); backdrop-filter: blur(2px); z-index: 1; } /* ===== HEADER ===== */ .header { position: fixed; top: 0; left: 0; right: 0; height: var(--header-height); border-bottom: 1px solid rgba(255, 255, 255, 0.2); z-index: 1000; transition: var(--transition-smooth); overflow: hidden; background: transparent; pointer-events: auto; } .header-container { height: 100%; max-width: 1400px; margin: 0 auto; padding: 0 2rem; display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1001; } .brand { display: flex; flex-direction: column; gap: 0.5rem; animation: mystery-fade-in 1.2s ease-out 0.3s both; margin-left: 1rem; } .brand-title { margin: 0; font-family: var(--font-display); font-size: 2.5rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); } .brand-fjell { color: rgba(255, 255, 255, 0.95); } .brand-default { background: var(--gradient-text); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; color: transparent; } .brand-tagline { margin: 0; font-size: 1rem; color: rgba(255, 255, 255, 0.8); font-weight: 400; letter-spacing: 0.02em; text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); } .header-actions { display: flex; align-items: center; gap: 1.5rem; animation: mystery-fade-in 1.2s ease-out 0.6s both; } .header-link { padding: 0.75rem 1.5rem; text-decoration: none; color: rgba(255, 255, 255, 0.9); font-weight: 500; font-size: 0.875rem; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 2rem; transition: var(--transition-fast); letter-spacing: 0.01em; backdrop-filter: blur(10px); background: rgba(255, 255, 255, 0.1); } .header-link:hover { border-color: rgba(240, 147, 251, 0.8); color: #f093fb; background: rgba(255, 255, 255, 0.9); transform: translateY(-2px); box-shadow: 0 8px 32px rgba(240, 147, 251, 0.3); } .header .version-badge { padding: 0.5rem 1rem; text-decoration: none; color: rgba(255, 255, 255, 0.95); font-weight: 600; font-size: 0.8rem; border: 1px solid rgba(102, 126, 234, 0.5); border-radius: 1.5rem; transition: var(--transition-fast); letter-spacing: 0.05em; backdrop-filter: blur(10px); background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%); font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace; position: relative; overflow: hidden; box-shadow: none; } .header .version-badge::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); transition: left 0.5s; } .header .version-badge:hover::before { left: 100%; } .header .version-badge:hover { border-color: rgba(102, 126, 234, 0.8); color: #667eea; background: rgba(255, 255, 255, 0.95); transform: translateY(-2px); box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4); } .menu-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 0.5rem; } .menu-line { width: 20px; height: 2px; background: rgba(255, 255, 255, 0.9); border-radius: 1px; transition: var(--transition-fast); } /* ===== LAYOUT ===== */ .layout { display: flex; margin-top: var(--header-height); min-height: calc(100vh - var(--header-height)); } /* ===== SIDEBAR ===== */ .sidebar { position: fixed; top: var(--header-height); left: 0; bottom: 0; width: var(--sidebar-width); background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(250, 250, 250, 0.9) 100%); backdrop-filter: blur(20px); border-right: 1px solid rgba(226, 232, 240, 0.5); display: flex; flex-direction: column; z-index: 100; transform: translateX(-100%); transition: var(--transition-smooth); box-shadow: 0 0 40px rgba(0, 0, 0, 0.1); } .sidebar-open { transform: translateX(0); } /* Sidebar header styles removed - navigation now starts at top */ /* ===== NAVIGATION ===== */ .sidebar-nav { flex: 1; overflow-y: auto; padding: 1.5rem 0; } .nav-sections { list-style: none; margin: 0; padding: 0; } .nav-sections li { margin: 0; } .nav-item { width: 100%; padding: 1rem 1.5rem; border: none; background: none; text-align: left; cursor: pointer; transition: var(--transition-fast); border-left: 3px solid transparent; display: flex; align-items: center; } .nav-item:hover { background: var(--surface-02); border-left-color: var(--color-accent); } .nav-item.active { background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.05) 100%); border-left-color: var(--color-accent); } .nav-item-content { display: flex; flex-direction: column; gap: 0.25rem; } .nav-title { font-weight: 600; color: var(--color-text); font-size: 0.95rem; } .nav-subtitle { font-size: 0.8rem; color: var(--color-text-light); line-height: 1.4; } /* Subsection navigation styles */ .nav-subsections { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--color-border); margin-left: 1.5rem; } .nav-subsections li { margin: 0; } .nav-subitem { width: 100%; padding: 0.75rem 1.5rem; border: none; background: none; text-align: left; cursor: pointer; transition: var(--transition-fast); border-left: 2px solid transparent; display: flex; align-items: center; } .nav-subitem:hover { background: var(--surface-01); border-left-color: var(--color-accent); } .nav-subitem.active { background: linear-gradient(90deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.03) 100%); border-left-color: var(--color-accent); } .nav-subitem-content { display: flex; flex-direction: column; gap: 0.15rem; } .nav-subitem .nav-subtitle { font-size: 0.85rem; font-weight: 500; color: var(--color-text); } .nav-description { font-size: 0.75rem; color: var(--color-text-light); line-height: 1.3; } .sidebar-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--color-border); background: var(--surface-02); } .footer-text { font-size: 0.75rem; color: var(--color-text-muted); text-align: center; } /* ===== MOBILE MENU ===== */ .mobile-menu-button { position: fixed; top: 1rem; left: 1rem; z-index: 200; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 8px; padding: 0.75rem; cursor: pointer; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); transition: var(--transition-fast); } .mobile-menu-button:hover { background: var(--surface-02); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2); } .hamburger { width: 20px; height: 16px; display: flex; flex-direction: column; justify-content: space-between; } .hamburger span { width: 100%; height: 2px; background: var(--color-text); border-radius: 1px; transition: var(--transition-fast); } .sidebar-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); z-index: 50; backdrop-filter: blur(4px); } /* ===== MAIN CONTENT ===== */ .main-content { margin-left: 0; min-height: calc(100vh - var(--header-height)); padding-top: 0; background: var(--color-background); transition: var(--transition-smooth); position: relative; z-index: 1; } .content { max-width: var(--content-max-width); margin: 0 auto; padding: 1rem 2rem 2rem 2rem; animation: mystery-fade-in 0.8s ease-out; position: relative; z-index: 1; } .content-header { margin-bottom: 2rem; } .breadcrumb { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; font-size: 0.9rem; color: var(--color-text-light); } .breadcrumb-project { font-weight: 600; } .breadcrumb-separator { color: var(--color-text-muted); } .breadcrumb-section { color: var(--color-accent); } .page-title { margin: 0 0 0.5rem 0; font-size: 2.5rem; font-weight: 700; background: var(--gradient-text); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-family: var(--font-display); letter-spacing: -0.02em; } .page-subtitle { margin: 0; font-size: 1.2rem; color: var(--color-text-light); font-weight: 400; } /* ===== LOADING ===== */ .loading-spinner { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4rem 2rem; gap: 1rem; } .spinner { width: 40px; height: 40px; border: 3px solid var(--color-border); border-top: 3px solid var(--color-accent); border-radius: 50%; animation: spinner 1s linear infinite; } .loading-spinner p { color: var(--color-text-light); font-weight: 500; } /* ===== FULLSCREEN IMAGE ===== */ .fullscreen-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.9); z-index: 1000; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(8px); animation: mystery-fade-in 0.3s ease-out; } .fullscreen-content { position: relative; max-width: 95vw; max-height: 95vh; } .fullscreen-image { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); } .close-fullscreen { position: absolute; top: -40px; right: 0; background: none; border: none; color: white; font-size: 2rem; cursor: pointer; padding: 0.5rem; line-height: 1; transition: var(--transition-fast); } .close-fullscreen:hover { transform: scale(1.1); opacity: 0.8; } /* ===== MARKDOWN CONTENT ===== */ .markdown-content { font-size: 1rem; line-height: 1.8; color: var(--color-text); } .markdown-content h1 { font-size: 2.5rem; font-weight: 700; margin: 3rem 0 1.5rem 0; background: var(--gradient-text); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-family: var(--font-display); } .markdown-content h2 { font-size: 2rem; font-weight: 600; margin: 2.5rem 0 1rem 0; color: var(--color-primary); font-family: var(--font-display); } .markdown-content h3 { font-size: 1.5rem; font-weight: 600; margin: 2rem 0 1rem 0; color: var(--color-secondary); } .markdown-content p { margin: 1rem 0; text-align: justify; } .markdown-content img { max-width: 100%; height: auto; border-radius: 8px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); margin: 1.5rem 0; transition: var(--transition-fast); } .markdown-content img:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15); } .markdown-content pre { background: var(--surface-02); border-radius: 8px; padding: 1.5rem; overflow-x: auto; margin: 1.5rem 0; font-size: 0.9em; } .markdown-content pre code { background: none; padding: 0; border-radius: 0; border: none; font-size: inherit; } .markdown-content code { background: var(--surface-02); padding: 0.2rem 0.4rem; border-radius: 4px; font-size: 0.9em; } .markdown-content blockquote { border-left: 4px solid var(--color-accent); margin: 1.5rem 0; padding: 1rem 1.5rem; background: var(--surface-02); border-radius: 0 8px 8px 0; } .markdown-content ul, .markdown-content ol { margin: 1rem 0; padding-left: 1.5rem; } .markdown-content li { margin: 0.5rem 0; } .markdown-content a { color: var(--color-accent); text-decoration: none; border-bottom: 1px solid transparent; transition: var(--transition-fast); } .markdown-content a:hover { border-bottom-color: var(--color-accent); } .markdown-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; background: var(--color-surface); border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); } .markdown-content th, .markdown-content td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border); } .markdown-content th { background: var(--surface-02); font-weight: 600; color: var(--color-primary); } /* ===== RESPONSIVE DESIGN ===== */ @media (min-width: 768px) { .sidebar { transform: translateX(0); } .mobile-menu-button { display: none; } .menu-toggle { display: none !important; } .main-content { margin-left: var(--sidebar-width); } .sidebar-overlay { display: none; } } @media (max-width: 767px) { .menu-toggle { display: flex !important; } .header-actions { display: none; } .brand { margin-left: 0; } .brand-title { font-size: 1.8rem; } .brand-tagline { font-size: 0.9rem; } .content { padding: 1rem; } .page-title { font-size: 2rem; } .markdown-content h1 { font-size: 2rem; } .markdown-content h2 { font-size: 1.5rem; } .markdown-content h3 { font-size: 1.25rem; } } /* * Theme System for Fjell Documentation Template * * Projects should define their own themes by creating CSS classes * with the pattern .brand-{theme-name} and overriding these variables: * * --color-accent: Primary accent color * --color-accent-light: Lighter accent color * --gradient-primary: Primary gradient for buttons/badges * --gradient-text: Text gradient for headings * * Example: * .brand-my-project { * --color-accent: #667EEA; * --color-accent-light: #764BA2; * --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%); * --gradient-text: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #9f7aea 100%); * } */ /* Example Theme - can be used as a reference */ .brand-example { --color-accent: #667EEA; --color-accent-light: #764BA2; --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%); --gradient-text: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #9f7aea 100%); }