Skip to content

Commit 55a7fb7

Browse files
committed
fix: create completely custom layout without external theme
- Remove dependency on external Jekyll themes that override custom layouts - Create fully custom layout with embedded CSS - Ensure sidebar navigation persists across all pages - Add comprehensive styling for all markdown elements - Improve active link detection JavaScript - Fix theme conflicts that were causing sidebar to disappear - Create self-contained layout that works reliably on GitHub Pages
1 parent 365f1c9 commit 55a7fb7

2 files changed

Lines changed: 85 additions & 6 deletions

File tree

_config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ description: Security-focused LLM memory storage with intelligence gathering, re
77
url: "https://rainmana.github.io"
88
baseurl: "/tinybrain"
99

10-
# Theme Configuration
11-
theme: jekyll-theme-minimal
10+
# Custom Theme - No external theme
11+
# theme: minima
1212

1313
# Override theme layout
1414
layout: default

_layouts/default.html

Lines changed: 83 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,22 @@
88
<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
99
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
1010

11-
<link rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}">
1211
<link rel="canonical" href="{{ page.url | replace:'index.html','' | relative_url }}">
1312
<link rel="alternate" type="application/rss+xml" title="{{ site.title | escape }}" href="{{ '/feed.xml' | relative_url }}">
1413

15-
<!-- Custom CSS for sidebar -->
14+
<!-- Custom CSS -->
1615
<style>
16+
* {
17+
box-sizing: border-box;
18+
}
19+
1720
body {
1821
margin: 0;
1922
padding: 0;
2023
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
2124
line-height: 1.6;
2225
color: #24292e;
26+
background-color: #ffffff;
2327
}
2428

2529
.container {
@@ -124,12 +128,34 @@
124128
margin-bottom: 0.8em;
125129
}
126130

131+
.main-content h4 {
132+
font-size: 1.2em;
133+
font-weight: 600;
134+
color: #24292e;
135+
margin-top: 1.2em;
136+
margin-bottom: 0.6em;
137+
}
138+
139+
.main-content p {
140+
margin-bottom: 1em;
141+
}
142+
143+
.main-content ul, .main-content ol {
144+
margin-bottom: 1em;
145+
padding-left: 2em;
146+
}
147+
148+
.main-content li {
149+
margin-bottom: 0.5em;
150+
}
151+
127152
.main-content code {
128153
background-color: #f6f8fa;
129154
border: 1px solid #e1e4e8;
130155
border-radius: 3px;
131156
padding: 2px 4px;
132157
font-size: 0.9em;
158+
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
133159
}
134160

135161
.main-content pre {
@@ -138,12 +164,52 @@
138164
border-radius: 6px;
139165
padding: 16px;
140166
overflow-x: auto;
167+
margin-bottom: 1em;
141168
}
142169

143170
.main-content pre code {
144171
background: none;
145172
border: none;
146173
padding: 0;
174+
font-size: 0.9em;
175+
}
176+
177+
.main-content blockquote {
178+
border-left: 4px solid #dfe2e5;
179+
padding-left: 16px;
180+
margin: 1em 0;
181+
color: #6a737d;
182+
}
183+
184+
.main-content table {
185+
border-collapse: collapse;
186+
width: 100%;
187+
margin-bottom: 1em;
188+
}
189+
190+
.main-content th, .main-content td {
191+
border: 1px solid #dfe2e5;
192+
padding: 8px 12px;
193+
text-align: left;
194+
}
195+
196+
.main-content th {
197+
background-color: #f6f8fa;
198+
font-weight: 600;
199+
}
200+
201+
.main-content a {
202+
color: #0366d6;
203+
text-decoration: none;
204+
}
205+
206+
.main-content a:hover {
207+
text-decoration: underline;
208+
}
209+
210+
.main-content img {
211+
max-width: 100%;
212+
height: auto;
147213
}
148214

149215
@media (max-width: 768px) {
@@ -164,6 +230,14 @@
164230
padding: 20px;
165231
max-width: 100%;
166232
}
233+
234+
.main-content h1 {
235+
font-size: 2em;
236+
}
237+
238+
.main-content h2 {
239+
font-size: 1.5em;
240+
}
167241
}
168242
</style>
169243
</head>
@@ -231,8 +305,13 @@
231305

232306
links.forEach(function(link) {
233307
const href = link.getAttribute('href');
234-
if (href && currentPath.includes(href.replace('#', '').replace(/\//g, ''))) {
235-
link.classList.add('active');
308+
if (href) {
309+
// Check if this is the current page
310+
if (href.includes('#') && currentPath.includes(href.split('#')[0].replace(/\//g, ''))) {
311+
link.classList.add('active');
312+
} else if (!href.includes('#') && currentPath.includes(href.replace(/\//g, ''))) {
313+
link.classList.add('active');
314+
}
236315
}
237316
});
238317
});

0 commit comments

Comments
 (0)