Skip to content

Commit 5a9423d

Browse files
authored
Merge pull request #1621 from Adez017/patch-1
An Experimental fix for the blog layout structure
2 parents a69975e + 31ce507 commit 5a9423d

1 file changed

Lines changed: 141 additions & 0 deletions

File tree

src/css/custom.css

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2040,3 +2040,144 @@ html[data-theme="dark"] {
20402040
scrollbar-width: thin !important;
20412041
scrollbar-color: #334155 transparent !important;
20422042
}
2043+
2044+
/* =====================================================
2045+
SECTION 15: BLOG POST PAGE — CENTER + TOC FIX
2046+
2047+
SAFE: Only targets .blog-wrapper (individual post page)
2048+
Remove any previous SECTION 15 block before adding this.
2049+
===================================================== */
2050+
2051+
/* Full width container — no artificial max-width cutting space */
2052+
.blog-wrapper .container {
2053+
max-width: 100% !important;
2054+
width: 100% !important;
2055+
padding-left: 1rem !important;
2056+
padding-right: 1rem !important;
2057+
}
2058+
2059+
/* Row: full width flex, no gaps, sidebars hug the edges */
2060+
.blog-wrapper .container>.row {
2061+
display: flex !important;
2062+
flex-wrap: nowrap !important;
2063+
align-items: flex-start !important;
2064+
width: 100% !important;
2065+
margin: 0 !important;
2066+
padding: 0 !important;
2067+
}
2068+
2069+
/* LEFT sidebar — Recent Posts, fixed width, left edge */
2070+
.blog-wrapper .container>.row>.col.col--3 {
2071+
flex: 0 0 240px !important;
2072+
width: 240px !important;
2073+
max-width: 240px !important;
2074+
padding-left: 0.5rem !important;
2075+
padding-right: 1.5rem !important;
2076+
}
2077+
2078+
/* CENTER content — takes all remaining space between sidebars */
2079+
.blog-wrapper .container>.row>.col:not(.col--2):not(.col--3) {
2080+
flex: 1 1 auto !important;
2081+
min-width: 0 !important;
2082+
max-width: 100% !important;
2083+
/* Center the text content within this column */
2084+
padding-left: 3rem !important;
2085+
padding-right: 3rem !important;
2086+
}
2087+
2088+
/* RIGHT sidebar — TOC, wider so text is readable, right edge */
2089+
.blog-wrapper .container>.row>.col.col--2 {
2090+
flex: 0 0 280px !important;
2091+
/* ← expanded from ~220px to 280px */
2092+
width: 280px !important;
2093+
max-width: 280px !important;
2094+
padding-left: 1rem !important;
2095+
padding-right: 0.5rem !important;
2096+
}
2097+
2098+
/* TOC links: allow text to wrap properly instead of squishing */
2099+
.blog-wrapper .table-of-contents__link {
2100+
white-space: normal !important;
2101+
word-break: break-word !important;
2102+
line-height: 1.4 !important;
2103+
display: block !important;
2104+
padding: 2px 0 !important;
2105+
font-size: 0.85rem !important;
2106+
}
2107+
2108+
/* TOC heading items — slightly bolder for hierarchy */
2109+
.blog-wrapper .table-of-contents li>.table-of-contents__link {
2110+
font-size: 0.875rem !important;
2111+
}
2112+
2113+
/* Comfortable reading styles */
2114+
.blog-post-page .markdown {
2115+
max-width: 100% !important;
2116+
line-height: 1.8 !important;
2117+
}
2118+
2119+
/* ── Large desktop (≥1400px) ── */
2120+
@media (min-width: 1400px) {
2121+
.blog-wrapper .container>.row>.col.col--3 {
2122+
flex: 0 0 260px !important;
2123+
width: 260px !important;
2124+
max-width: 260px !important;
2125+
}
2126+
2127+
.blog-wrapper .container>.row>.col.col--2 {
2128+
flex: 0 0 300px !important;
2129+
width: 300px !important;
2130+
max-width: 300px !important;
2131+
}
2132+
2133+
.blog-wrapper .container>.row>.col:not(.col--2):not(.col--3) {
2134+
padding-left: 4rem !important;
2135+
padding-right: 4rem !important;
2136+
}
2137+
}
2138+
2139+
/* ── Tablet (997px–1199px) ── */
2140+
@media (max-width: 1199px) and (min-width: 997px) {
2141+
.blog-wrapper .container>.row>.col.col--3 {
2142+
flex: 0 0 200px !important;
2143+
width: 200px !important;
2144+
max-width: 200px !important;
2145+
}
2146+
2147+
.blog-wrapper .container>.row>.col.col--2 {
2148+
flex: 0 0 220px !important;
2149+
width: 220px !important;
2150+
max-width: 220px !important;
2151+
}
2152+
2153+
.blog-wrapper .container>.row>.col:not(.col--2):not(.col--3) {
2154+
padding-left: 2rem !important;
2155+
padding-right: 2rem !important;
2156+
}
2157+
}
2158+
2159+
/* ── Mobile (≤996px): stack columns naturally ── */
2160+
@media (max-width: 996px) {
2161+
.blog-wrapper .container {
2162+
padding-left: 1rem !important;
2163+
padding-right: 1rem !important;
2164+
}
2165+
2166+
.blog-wrapper .container>.row {
2167+
flex-direction: column !important;
2168+
}
2169+
2170+
.blog-wrapper .container>.row>.col.col--3,
2171+
.blog-wrapper .container>.row>.col.col--2,
2172+
.blog-wrapper .container>.row>.col:not(.col--2):not(.col--3) {
2173+
flex: 1 1 auto !important;
2174+
width: 100% !important;
2175+
max-width: 100% !important;
2176+
padding-left: 0 !important;
2177+
padding-right: 0 !important;
2178+
}
2179+
}
2180+
2181+
/* =====================================================
2182+
END SECTION 15
2183+
===================================================== */

0 commit comments

Comments
 (0)