Skip to content

Commit e83efd3

Browse files
Create custom.css
1 parent e243be6 commit e83efd3

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

_static/custom.css

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/* In _static/custom.css */
2+
3+
/* --- 1. Color Palette & Main Theme --- */
4+
/* This section sets the primary colors for the entire site using theme variables. */
5+
:root {
6+
--pst-color-primary: #B39DDB; /* Main link and accent color (deep lavender) */
7+
--pst-color-secondary: #e1bee7; /* Lighter accent for hover effects (light lavender) */
8+
--pst-color-background: #FFFFFF; /* Page background (white) */
9+
--pst-color-surface: #f8f9fa; /* Card and code block background (very light grey) */
10+
--pst-color-text-base: #333333; /* Main text color (dark grey for readability) */
11+
--pst-color-text-muted: #6c757d; /* Muted text for captions, etc. */
12+
--pst-color-border: #e9ecef; /* Borders and dividers */
13+
14+
/* Custom sidebar colors */
15+
--pst-color-sidebar-background: #fdfcff; /* A very faint lavender for the sidebar */
16+
--pst-color-sidebar-link-active: #7E57C2; /* A deeper purple for the active link */
17+
}
18+
19+
20+
/* --- 2. Typography & Layout --- */
21+
/* We'll keep using the Vazirmatn font from the RTL setup for a consistent, professional look. */
22+
body {
23+
font-family: 'Vazirmatn', sans-serif !important;
24+
line-height: 1.7;
25+
}
26+
27+
h1, h2, h3, h4, h5, h6 {
28+
font-weight: 500; /* Slightly lighter headings for a modern feel */
29+
border-bottom-color: var(--pst-color-secondary);
30+
}
31+
32+
/* Add a subtle shadow to content cards and admonitions (notes/warnings) */
33+
.sd-card, .admonition {
34+
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
35+
border-radius: 6px;
36+
border: 1px solid var(--pst-color-border);
37+
}
38+
39+
40+
/* --- 3. Code Block Styling --- */
41+
/* Style the code cells to match the new theme */
42+
.cell .cell_input, pre, code {
43+
background-color: var(--pst-color-surface);
44+
border: 1px solid var(--pst-color-border);
45+
border-radius: 6px;
46+
}
47+
48+
/* Jupyter Book syntax highlighting color overrides */
49+
.highlight .n { color: #212529; } /* Name */
50+
.highlight .s2 { color: #7E57C2; } /* String */
51+
.highlight .k { color: #c678dd; } /* Keyword (like 'def', 'for', 'import') */
52+
.highlight .mi { color: #d19a66; } /* Number */
53+
.highlight .c1 { color: #9da5b4; } /* Comment */
54+
.highlight .o { color: #56b6c2; } /* Operator */

0 commit comments

Comments
 (0)