custom.css 4.78 KB
Newer Older
jerrrrry's avatar
jerrrrry committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
/* Make the documentation use full screen width */
.wy-nav-content {
    max-width: none !important;
    width: 100% !important;
    padding: 1.618em 3.236em !important;
}

/* Adjust the content wrapper - will be set by JavaScript */
.wy-nav-content-wrap {
    margin-left: 300px;
    transition: margin-left 0.2s ease;
    width: auto !important;
    position: relative !important;
    background: white !important;
    min-height: 100vh !important;
}

/* Make the main content area responsive */
.rst-content {
    max-width: none !important;
    width: 100% !important;
}

/* Optional: Adjust table widths to prevent overflow */
.rst-content table.docutils {
    width: 100% !important;
    table-layout: auto !important;
}

/* Optional: Better code block width handling */
.rst-content .highlight {
    width: 100% !important;
}

/* Content area positioning already handled above */

/* Optional: Improve readability with some margin on very wide screens */
@media (min-width: 1400px) {
    .wy-nav-content {
        max-width: none !important;
        margin: 0 auto !important;
    }
}

/* Resizable sidebar styles */
.wy-nav-side {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 300px;
    min-width: 200px;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    z-index: 200 !important;
}

/* Ensure sidebar header (logo, search) adapts to width */
.wy-side-nav-search {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0.809em 0.809em !important;
}

.wy-side-nav-search input[type="text"] {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Make logo/title area responsive */
.wy-side-nav-search > div.version {
    width: 100% !important;
}

.wy-side-nav-search > a {
    width: 100% !important;
    display: block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Responsive adjustments for narrow sidebar */
@media (max-width: 300px) {
    .wy-side-nav-search > a {
        font-size: 0.9em !important;
    }
    
    .wy-side-nav-search input[type="text"] {
        font-size: 0.8em !important;
    }
}

/* Ensure search input doesn't overflow */
.wy-side-nav-search form {
    width: 100% !important;
    margin: 0 !important;
}

/* Make search icon responsive */
.wy-side-nav-search .wy-dropdown {
    width: 100% !important;
}

/* Adjust search results dropdown width */
.wy-side-nav-search .wy-dropdown-menu {
    width: 100% !important;
    max-width: none !important;
    left: 0 !important;
    right: 0 !important;
}

/* Resize handle is created by JavaScript */

/* Make sure the sidebar content doesn't overflow */
.wy-side-scroll {
    width: 100% !important;
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-right: 10px !important;
    box-sizing: border-box !important;
    scroll-behavior: auto !important; /* Prevent smooth scrolling on sidebar itself */
}

/* Ensure proper scroll behavior for main content area */
html {
    scroll-behavior: smooth !important;
}

/* Ensure anchor links work properly in main content */
.wy-nav-content-wrap {
    scroll-behavior: smooth !important;
}

/* Fix scroll to target for anchor links */
.rst-content {
    scroll-behavior: smooth !important;
}

/* Fix anchor scroll offset to account for fixed header */
.rst-content .section {
    scroll-margin-top: 60px;
}

/* Fix anchor scroll offset for headers */
.rst-content h1, .rst-content h2, .rst-content h3, .rst-content h4, .rst-content h5, .rst-content h6 {
    scroll-margin-top: 60px;
}

/* Fix anchor scroll offset for specific scroll targets */
.rst-content .headerlink {
    scroll-margin-top: 60px;
}

/* Fix sidebar navigation styling */
.wy-menu-vertical {
    width: 100% !important;
}

.wy-menu-vertical li {
    width: 100% !important;
}

.wy-menu-vertical a {
    width: 100% !important;
    word-wrap: break-word !important;
    white-space: normal !important;
}

/* Content area margin is handled by JavaScript */

/* Custom drag handle (more visible) */
.resize-handle {
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 100%;
    background: #ccc;
    cursor: col-resize;
    z-index: 1001;
    opacity: 0.3;
    transition: opacity 0.2s ease;
}

.resize-handle:hover {
    opacity: 0.8;
    background: #999;
}

.resize-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 20px;
    background: #666;
    transform: translate(-50%, -50%);
    border-radius: 1px;
}

.resize-handle:hover::before {
    background: #333;
}

/* Ensure smooth resizing */
.wy-nav-side.resizing {
    user-select: none;
    pointer-events: none;
}

.wy-nav-side.resizing .wy-side-scroll {
    overflow: hidden;
}