flask-vim-docs/app/static/css/style.css
2025-04-14 22:25:26 +02:00

691 lines
No EOL
12 KiB
CSS

/* Main CSS Variables */
:root {
--bg-color: #1a1a1a;
--bg-light: #2a2a2a;
--text-color: #f8f8f2;
--text-muted: #a0a0a0;
--border-color: #3a3a3a;
--accent-color: #8be9fd;
--primary-color: #50fa7b;
--danger-color: #ff5555;
--warning-color: #ffb86c;
--info-color: #8be9fd;
--caution-color: #f1fa8c;
--note-color: #bd93f9;
--sidebar-width: 280px;
--header-height: 64px;
--font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
/* Base styles */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: var(--font-family);
background-color: var(--bg-color);
color: var(--text-color);
line-height: 1.6;
height: 100vh;
overflow: hidden;
}
a {
color: var(--accent-color);
text-decoration: none;
}
button {
cursor: pointer;
background: none;
border: none;
color: inherit;
}
/* App layout */
.app-container {
display: flex;
height: 100vh;
overflow: hidden;
}
/* Sidebar */
.sidebar {
width: var(--sidebar-width);
background-color: var(--bg-light);
border-right: 1px solid var(--border-color);
height: 100vh;
overflow-y: auto;
transition: transform 0.3s ease;
}
.sidebar-header {
padding: 20px;
border-bottom: 1px solid var(--border-color);
}
.sidebar-header h1 {
font-size: 1.5rem;
display: flex;
align-items: center;
}
.sidebar-header h1 i {
margin-right: 10px;
color: var(--primary-color);
}
.sidebar-nav {
padding: 15px 0;
}
.sidebar-nav ul {
list-style: none;
}
.sidebar-nav li {
padding: 8px 20px;
}
.sidebar-nav li a {
display: flex;
align-items: center;
color: var(--text-color);
padding: 8px 12px;
border-radius: 6px;
transition: all 0.2s ease;
}
.sidebar-nav li a:hover {
color: var(--primary-color);
background-color: rgba(80, 250, 123, 0.1);
transform: translateX(4px);
}
.sidebar-nav li a.active {
color: var(--primary-color);
background-color: rgba(80, 250, 123, 0.15);
border-left: 3px solid var(--primary-color);
}
.sidebar-nav li a i {
margin-right: 10px;
}
.sidebar-section {
margin: 15px 0;
}
.sidebar-section > span {
display: block;
font-weight: bold;
color: var(--text-muted);
margin-bottom: 10px;
margin-top: 15px;
padding: 0 20px;
display: flex;
align-items: center;
}
.sidebar-section > span i {
margin-right: 10px;
}
.category-tree {
margin-left: 15px;
padding-left: 10px;
border-left: 1px dashed var(--border-color);
}
/* Main content area */
.content {
flex: 1;
overflow: hidden;
display: flex;
flex-direction: column;
}
.content-header {
height: var(--header-height);
border-bottom: 1px solid var(--border-color);
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20px;
background-color: var(--bg-light);
}
.header-left, .header-right {
display: flex;
align-items: center;
gap: 15px;
}
.header-left h2 {
margin-left: 10px;
font-weight: 500;
}
.content-body {
flex: 1;
overflow-y: auto;
padding: 30px;
}
/* Subcategories section styling */
.section-title {
font-size: 1.5rem;
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 1px solid var(--border-color);
display: flex;
align-items: center;
justify-content: space-between;
}
/* Category grid */
.category-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
gap: 20px;
margin-bottom: 40px;
}
.category-card {
border: 1px solid var(--border-color);
border-radius: 8px;
background-color: var(--bg-light);
padding: 20px;
transition: all 0.3s ease;
height: 100%;
display: flex;
flex-direction: column;
}
.category-card:hover {
transform: translateY(-4px);
box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}
.category-card a {
display: flex;
flex-direction: column;
color: var(--text-color);
text-decoration: none;
height: 100%;
}
.category-card i {
font-size: 2.5rem;
margin-bottom: 15px;
color: var(--primary-color);
}
.category-meta {
margin-top: 15px;
color: var(--text-muted);
font-size: 0.85rem;
display: flex;
flex-direction: column;
gap: 5px;
}
.add-card {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
cursor: pointer;
border-style: dashed;
height: 100%;
transition: all 0.3s ease;
}
.add-card:hover {
background-color: rgba(80, 250, 123, 0.1);
border-color: var(--primary-color);
}
.add-card i {
color: var(--text-muted);
transition: transform 0.3s ease, color 0.3s ease;
}
.add-card:hover i {
color: var(--primary-color);
transform: scale(1.2);
}
.add-card h4 {
color: var(--text-muted);
transition: color 0.3s ease;
}
.add-card:hover h4 {
color: var(--primary-color);
}
/* Current Category Indicator */
.current-category {
background-color: rgba(80, 250, 123, 0.1);
padding: 15px 20px;
margin: -30px -30px 20px -30px;
border-bottom: 1px solid var(--border-color);
display: flex;
align-items: center;
}
.current-category h3 {
font-size: 1.3rem;
margin: 0;
display: flex;
align-items: center;
}
.current-category h3 i {
margin-right: 10px;
color: var(--primary-color);
}
.current-category .category-path {
margin-left: auto;
color: var(--text-muted);
font-size: 0.9rem;
}
.current-category .category-path a {
color: var(--text-muted);
transition: color 0.2s ease;
}
.current-category .category-path a:hover {
color: var(--primary-color);
}
/* Document list */
.document-list {
display: flex;
flex-direction: column;
gap: 15px;
}
/* Button styles */
.button {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 8px 16px;
border-radius: 4px;
font-weight: 500;
transition: all 0.2s ease;
background-color: var(--bg-color);
border: 1px solid var(--border-color);
margin-left: 8px;
}
.button i {
margin-right: 8px;
}
.button:hover {
background-color: rgba(255, 255, 255, 0.1);
}
.button.primary {
background-color: var(--primary-color);
color: var(--bg-color);
border: none;
}
.button.primary:hover {
background-color: rgba(80, 250, 123, 0.8);
}
.icon-button {
display: flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
border-radius: 4px;
background-color: transparent;
transition: all 0.2s ease;
}
.icon-button:hover {
background-color: rgba(255, 255, 255, 0.1);
}
/* Dashboard */
.dashboard {
padding: 30px;
}
.dashboard-section {
margin-bottom: 40px;
}
.section-header {
margin-bottom: 20px;
display: flex;
align-items: center;
justify-content: space-between;
}
.section-header h3 {
display: flex;
align-items: center;
font-size: 1.4rem;
}
.section-header h3 i {
margin-right: 12px;
color: var(--primary-color);
}
/* Document card */
.document-card {
border: 1px solid var(--border-color);
border-radius: 8px;
background-color: var(--bg-light);
padding: 18px;
display: flex;
justify-content: space-between;
align-items: center;
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.document-card:hover {
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.document-info {
flex: 1;
}
.document-info h4 {
margin-bottom: 8px;
font-size: 1.1rem;
}
.document-info h4 a {
color: var(--text-color);
}
.document-meta {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 12px;
color: var(--text-muted);
font-size: 0.85rem;
}
.document-actions {
display: flex;
gap: 8px;
}
/* Empty states */
.empty-state {
padding: 60px;
text-align: center;
border: 1px dashed var(--border-color);
border-radius: 8px;
margin: 40px auto;
max-width: 600px;
}
.empty-state i {
font-size: 4rem;
color: var(--text-muted);
margin-bottom: 20px;
}
.empty-state p {
color: var(--text-muted);
font-size: 1.1rem;
}
/* Modal */
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.7);
z-index: 1000;
justify-content: center;
align-items: center;
}
.modal.active {
display: flex;
}
.modal-content {
background-color: var(--bg-light);
border-radius: 8px;
width: 90%;
max-width: 500px;
overflow: hidden;
}
.modal-header {
padding: 15px 20px;
border-bottom: 1px solid var(--border-color);
display: flex;
justify-content: space-between;
align-items: center;
}
.modal-body {
padding: 25px;
}
.close-modal {
font-size: 1.5rem;
background: none;
border: none;
color: var(--text-muted);
cursor: pointer;
transition: color 0.2s ease;
}
.close-modal:hover {
color: var(--text-color);
}
/* Form elements */
.form-group {
margin-bottom: 20px;
}
.form-group label {
display: block;
margin-bottom: 8px;
color: var(--text-muted);
font-weight: 500;
}
.form-group input,
.form-group select,
.form-group textarea {
width: 100%;
padding: 10px;
border: 1px solid var(--border-color);
border-radius: 4px;
background-color: var(--bg-color);
color: var(--text-color);
font-family: inherit;
font-size: 1rem;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
outline: none;
border-color: var(--accent-color);
}
.form-actions {
display: flex;
justify-content: flex-end;
gap: 10px;
margin-top: 25px;
}
.icon-selector {
display: flex;
align-items: center;
}
.icon-preview {
margin-left: 15px;
width: 36px;
height: 36px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.5rem;
}
/* Tag styles */
.document-tag.small {
font-size: 10px;
padding: 1px 5px;
}
/* Document view styles */
.document-view {
padding: 30px;
max-width: 1200px;
margin: 0 auto;
}
.document-metadata {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 15px;
margin-bottom: 25px;
padding-bottom: 15px;
border-bottom: 1px solid var(--border-color);
}
/* Editor specific styles */
.editor-container {
display: flex;
height: calc(100vh - 130px); /* Account for header + document info */
overflow: hidden;
}
.editor-pane, .preview-pane {
flex: 1;
height: 100%;
overflow: auto;
}
.editor-pane {
position: relative;
}
.preview-pane {
padding: 0;
border-left: 1px solid var(--border-color);
background-color: #fff;
}
/* Markdown preview enhancements */
.markdown-body {
box-sizing: border-box;
min-width: 200px;
max-width: 1100px;
margin: 0 auto;
padding: 40px 30px;
}
.markdown-body blockquote {
padding: 0.5em 1em;
color: #555;
border-left: 0.25em solid #dfe2e5;
background-color: #f7f7f7;
margin: 1em 0;
}
.markdown-body blockquote[data-type="info"],
.markdown-body blockquote[data-type="note"] {
background-color: #f0f8ff;
border-left-color: var(--info-color);
}
.markdown-body blockquote[data-type="warning"] {
background-color: #fef9e7;
border-left-color: var(--warning-color);
}
.markdown-body blockquote[data-type="danger"],
.markdown-body blockquote[data-type="important"] {
background-color: #fff0f0;
border-left-color: var(--danger-color);
}
.markdown-body blockquote[data-type="caution"] {
background-color: #fdfae5;
border-left-color: var(--caution-color);
}
.markdown-body blockquote[data-type="tip"] {
background-color: #effaf5;
border-left-color: var(--primary-color);
}
.markdown-body a {
color: #0366d6;
text-decoration: none;
}
.markdown-body a:hover {
text-decoration: underline;
}
.markdown-body table {
border-collapse: collapse;
margin: 1em 0;
overflow: auto;
width: 100%;
}
.markdown-body table th,
.markdown-body table td {
border: 1px solid #dfe2e5;
padding: 8px 12px;
}
.markdown-body table th {
background-color: #f6f8fa;
font-weight: 600;
}
/* Mobile responsiveness */
@media (max-width: 768px) {
.sidebar {
position: fixed;
z-index: 100;
transform: translateX(-100%);
}
.sidebar.open {
transform: translateX(0);
}
.category-grid {
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
}