mirror of
https://github.com/litruv/Docs-Viewer.git
synced 2026-07-24 02:36:07 +10:00
update to use .md's instead of static generated html
This commit is contained in:
319
styles.css
Normal file
319
styles.css
Normal file
@@ -0,0 +1,319 @@
|
||||
:root {
|
||||
--doc-sidebar-width: 300px;
|
||||
--doc-outline-width: 240px;
|
||||
--ifm-color-primary: #2196f3;
|
||||
--ifm-color-primary-dark: #1976d2;
|
||||
--ifm-background-color: #1a1a1a;
|
||||
--ifm-background-surface-color: #252526;
|
||||
--ifm-color-content: #e0e0e0;
|
||||
--ifm-color-content-secondary: #a0a0a0;
|
||||
--ifm-link-color: #2196f3;
|
||||
--ifm-border-color: #404040;
|
||||
--title-bar-height: 48px;
|
||||
--sidebar-transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
|
||||
background: var(--ifm-background-color);
|
||||
color: var(--ifm-color-content);
|
||||
}
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.title-bar {
|
||||
height: var(--title-bar-height);
|
||||
background-color: var(--ifm-background-surface-color);
|
||||
border-bottom: 1px solid var(--ifm-border-color);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 1rem;
|
||||
font-size: 1.1rem;
|
||||
font-weight: 500;
|
||||
color: var(--ifm-color-content);
|
||||
flex-shrink: 0;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.menu-button {
|
||||
display: none;
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--ifm-color-content);
|
||||
padding: 8px;
|
||||
cursor: pointer;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
.menu-button:hover {
|
||||
color: var(--ifm-color-primary);
|
||||
}
|
||||
|
||||
.content-container {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
background-color: var(--ifm-background-surface-color);
|
||||
color: var(--ifm-color-content);
|
||||
overflow-y: auto;
|
||||
border-color: var(--ifm-border-color);
|
||||
height: calc(100vh - var(--title-bar-height));
|
||||
}
|
||||
|
||||
.left-sidebar {
|
||||
width: var(--doc-sidebar-width);
|
||||
border-right: 1px solid var(--ifm-border-color);
|
||||
}
|
||||
|
||||
.right-sidebar {
|
||||
width: var(--doc-outline-width);
|
||||
border-left: none;
|
||||
background-color: var(--ifm-background-color);
|
||||
}
|
||||
|
||||
.content {
|
||||
flex: 1;
|
||||
background-color: var(--ifm-background-color);
|
||||
padding: 2rem 3rem;
|
||||
overflow-y: auto;
|
||||
min-width: 0; /* Fix flexbox content overflow */
|
||||
color: var(--ifm-color-content);
|
||||
}
|
||||
|
||||
#file-index a, #document-outline a {
|
||||
color: var(--ifm-color-content);
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
padding: 0.4rem 0.8rem;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
#file-index a:hover, #document-outline a:hover {
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
color: var(--ifm-color-primary);
|
||||
}
|
||||
|
||||
#document-outline a {
|
||||
color: var(--ifm-color-content-secondary);
|
||||
border-left: 2px solid transparent;
|
||||
margin: 2px 0;
|
||||
}
|
||||
|
||||
#document-outline a:hover {
|
||||
background-color: transparent;
|
||||
color: var(--ifm-color-primary);
|
||||
border-left: 2px solid var(--ifm-color-primary);
|
||||
}
|
||||
|
||||
/* Markdown content styling */
|
||||
.markdown-content {
|
||||
line-height: 1.7;
|
||||
font-size: 1rem;
|
||||
max-width: 75ch;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.markdown-content h1 {
|
||||
font-size: 2.5rem;
|
||||
font-weight: 700;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.markdown-content h2 {
|
||||
font-size: 1.8rem;
|
||||
margin-top: 2.5rem;
|
||||
margin-bottom: 1rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown-content h3 {
|
||||
font-size: 1.5rem;
|
||||
margin-top: 2rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown-content a {
|
||||
color: var(--ifm-link-color);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.markdown-content a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.markdown-content p {
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
.markdown-content img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.markdown-content table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
margin: 1em 0;
|
||||
font-size: 0.9rem;
|
||||
border-color: var(--ifm-border-color);
|
||||
}
|
||||
|
||||
.markdown-content th,
|
||||
.markdown-content td {
|
||||
border: 1px solid var(--ifm-border-color);
|
||||
padding: 0.75rem;
|
||||
}
|
||||
|
||||
.markdown-content th {
|
||||
background-color: var(--ifm-background-surface-color);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown-content code:not([class*="language-"]) {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
padding: 0.2em 0.4em;
|
||||
border-radius: 1px;
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
||||
font-size: 0.9em;
|
||||
color: #e0e0e0;
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.markdown-content blockquote {
|
||||
border-left: 4px solid var(--ifm-color-primary);
|
||||
margin: 1rem 0;
|
||||
padding: 0.5rem 1rem;
|
||||
background-color: var(--ifm-background-surface-color);
|
||||
border-radius: 4px;
|
||||
color: var(--ifm-color-content-secondary);
|
||||
}
|
||||
|
||||
.markdown-content video {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
margin: 1rem 0;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
.markdown-content hr {
|
||||
margin: 3rem 0;
|
||||
border: none;
|
||||
border-bottom: 1px solid var(--ifm-border-color);
|
||||
}
|
||||
|
||||
.error {
|
||||
color: #ff6b6b;
|
||||
padding: 20px;
|
||||
border: 1px solid #ff6b6b;
|
||||
border-radius: 4px;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
/* Custom Scrollbar */
|
||||
::-webkit-scrollbar {
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background: var(--ifm-background-color);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: #505050;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background-color: #606060;
|
||||
}
|
||||
|
||||
/* Completely remove scrollbar buttons */
|
||||
::-webkit-scrollbar-button {
|
||||
display: none !important;
|
||||
width: 0 !important;
|
||||
height: 0 !important;
|
||||
background: transparent !important;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-corner {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/* Firefox scrollbar - hide buttons */
|
||||
* {
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: #505050 var(--ifm-background-color);
|
||||
}
|
||||
|
||||
/* Highlight animation */
|
||||
@keyframes highlight {
|
||||
0% { background-color: rgba(33, 150, 243, 0.2); }
|
||||
100% { background-color: transparent; }
|
||||
}
|
||||
|
||||
.markdown-content h1.highlight,
|
||||
.markdown-content h2.highlight,
|
||||
.markdown-content h3.highlight,
|
||||
.markdown-content h4.highlight,
|
||||
.markdown-content h5.highlight,
|
||||
.markdown-content h6.highlight {
|
||||
animation: highlight 2s ease-out;
|
||||
}
|
||||
|
||||
@media (max-width: 1000px) {
|
||||
.menu-button {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.left-sidebar {
|
||||
position: fixed;
|
||||
left: -100%;
|
||||
top: var(--title-bar-height);
|
||||
bottom: 0;
|
||||
z-index: 100;
|
||||
transition: var(--sidebar-transition);
|
||||
}
|
||||
|
||||
.right-sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.left-sidebar.show {
|
||||
left: 0;
|
||||
box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.title-text {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.title-text .brand {
|
||||
color: var(--ifm-color-primary);
|
||||
font-weight: 800;
|
||||
letter-spacing: -0.01em;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
.title-text .divider,
|
||||
.title-text .page-title {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
Reference in New Issue
Block a user