|
107 | 107 | <!-- RSS Feed --> |
108 | 108 | <link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}"> |
109 | 109 |
|
110 | | - <!-- Critical CSS Inline - Enhanced for Core Web Vitals --> |
| 110 | + <!-- Critical CSS Inline - Prevent CLS --> |
111 | 111 | <style> |
112 | | - /* Critical above-the-fold styles */ |
| 112 | + /* Reset and base - prevent layout shift */ |
| 113 | + *,*::before,*::after{box-sizing:border-box} |
113 | 114 | body{ |
114 | 115 | background:linear-gradient(135deg,#f8fafc 0%,#e2e8f0 100%); |
115 | 116 | min-height:100vh; |
116 | 117 | font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif; |
| 118 | + font-size:14px; |
117 | 119 | line-height:1.6; |
118 | 120 | color:#374151; |
119 | 121 | margin:0; |
120 | 122 | padding:0; |
121 | | - font-display:swap; |
122 | 123 | } |
| 124 | + /* Navbar - fixed height to prevent CLS */ |
| 125 | + .navbar{min-height:50px;margin-bottom:0;border:0} |
| 126 | + .navbar-fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030} |
123 | 127 | .navbar-custom{ |
124 | 128 | background:rgba(255,255,255,0.95); |
125 | 129 | backdrop-filter:blur(10px); |
126 | | - border:none; |
127 | 130 | box-shadow:0 2px 10px rgba(0,0,0,0.1); |
128 | | - transition:all 0.3s ease; |
| 131 | + height:50px; |
129 | 132 | } |
| 133 | + /* Container - Bootstrap grid basics */ |
| 134 | + .container{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto} |
| 135 | + @media(min-width:768px){.container{width:750px}} |
| 136 | + @media(min-width:992px){.container{width:970px}} |
| 137 | + @media(min-width:1200px){.container{width:1170px}} |
| 138 | + .container-fluid{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto} |
| 139 | + .row{margin-right:-15px;margin-left:-15px} |
| 140 | + .row::before,.row::after{display:table;content:" "} |
| 141 | + .row::after{clear:both} |
| 142 | + /* Column basics */ |
| 143 | + .col-lg-8,.col-md-10,.col-xs-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px} |
| 144 | + .col-xs-12{width:100%;float:left} |
| 145 | + @media(min-width:992px){.col-md-10{width:83.33333%;float:left}.col-md-offset-1{margin-left:8.33333%}} |
| 146 | + @media(min-width:1200px){.col-lg-8{width:66.66667%;float:left}.col-lg-offset-2{margin-left:16.66667%}} |
| 147 | + /* Intro header - fixed dimensions prevent CLS */ |
130 | 148 | .intro-header{ |
131 | 149 | background-attachment:scroll; |
132 | 150 | background-position:center center; |
133 | 151 | background-repeat:no-repeat; |
134 | 152 | background-size:cover; |
| 153 | + margin-top:50px; |
| 154 | + padding-top:100px; |
| 155 | + padding-bottom:50px; |
135 | 156 | min-height:400px; |
136 | | - display:flex; |
137 | | - align-items:center; |
138 | 157 | } |
| 158 | + @media(min-width:768px){.intro-header{min-height:500px;padding-top:150px;padding-bottom:75px}} |
| 159 | + .intro-header .site-heading,.intro-header .post-heading,.intro-header .page-heading{color:#fff} |
| 160 | + .intro-header .site-heading h1,.intro-header .post-heading h1{font-size:50px;margin-top:0} |
| 161 | + @media(min-width:768px){.intro-header .site-heading h1,.intro-header .post-heading h1{font-size:80px}} |
| 162 | + /* Post preview - fixed structure */ |
139 | 163 | .post-preview{ |
140 | 164 | margin-bottom:30px; |
141 | 165 | padding:25px; |
142 | 166 | background:rgba(255,255,255,0.9); |
143 | 167 | border-radius:12px; |
144 | 168 | box-shadow:0 4px 20px rgba(0,0,0,0.08); |
145 | 169 | border:1px solid rgba(0,0,0,0.05); |
146 | | - transition:transform 0.3s ease,box-shadow 0.3s ease; |
147 | | - backdrop-filter:blur(5px); |
148 | | - } |
149 | | - .post-preview:hover{ |
150 | | - transform:translateY(-2px); |
151 | | - box-shadow:0 8px 30px rgba(0,0,0,0.12); |
152 | | - } |
153 | | - .post-title{ |
154 | | - color:#1f2937; |
155 | | - font-weight:700; |
156 | | - margin-bottom:10px; |
157 | | - } |
158 | | - .post-subtitle{ |
159 | | - color:#6b7280; |
160 | | - margin-bottom:15px; |
161 | | - } |
162 | | - .post-meta{ |
163 | | - color:#9ca3af; |
164 | | - font-size:14px; |
165 | | - } |
166 | | - /* Loading state */ |
167 | | - .loading{ |
168 | | - opacity:0; |
169 | | - transform:translateY(20px); |
170 | | - } |
171 | | - .loaded{ |
172 | | - opacity:1; |
173 | | - transform:translateY(0); |
174 | | - transition:opacity 0.6s ease,transform 0.6s ease; |
175 | | - } |
176 | | - /* Prevent layout shift */ |
177 | | - img{ |
178 | | - max-width:100%; |
179 | | - height:auto; |
180 | | - display:block; |
181 | 170 | } |
| 171 | + .post-preview>.post-title{font-size:21px;margin-top:0;margin-bottom:10px} |
| 172 | + .post-preview>.post-subtitle{font-size:15px;margin:0;font-weight:300;margin-bottom:10px} |
| 173 | + .post-preview .post-meta{color:#9ca3af;font-size:14px;margin-top:0} |
| 174 | + /* Prevent image CLS */ |
| 175 | + img{max-width:100%;height:auto;display:block} |
| 176 | + /* Font display */ |
| 177 | + @font-face{font-family:'FontAwesome';font-display:swap} |
182 | 178 | </style> |
183 | | - |
184 | | - <!-- Async CSS Loading - Non-blocking for better performance --> |
185 | | - <link rel="preload" href="{{ "/css/bootstrap.min.css" | prepend: site.baseurl }}" as="style"> |
186 | | - <link rel="stylesheet" href="{{ "/css/bootstrap.min.css" | prepend: site.baseurl }}" media="print" onload="this.media='all';this.onload=null;"> |
187 | | - <noscript><link rel="stylesheet" href="{{ "/css/bootstrap.min.css" | prepend: site.baseurl }}"></noscript> |
188 | 179 |
|
189 | | - <!-- Font Awesome - Async load with subset --> |
| 180 | + <!-- Bootstrap CSS - MUST load synchronously for layout --> |
| 181 | + <link rel="stylesheet" href="{{ "/css/bootstrap.min.css" | prepend: site.baseurl }}"> |
| 182 | + |
| 183 | + <!-- Font Awesome - Async load (icons don't affect layout) --> |
190 | 184 | <link rel="preload" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" as="style"> |
191 | 185 | <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" media="print" onload="this.media='all';this.onload=null;"> |
192 | 186 | <noscript><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css"></noscript> |
|
307 | 301 | } |
308 | 302 | </script> |
309 | 303 |
|
310 | | - <!-- Custom Blog Styles - Async loading --> |
311 | | - <link rel="preload" href="{{ "/css/jason-blog.min.css" | prepend: site.baseurl }}" as="style"> |
312 | | - <link rel="stylesheet" href="{{ "/css/jason-blog.min.css" | prepend: site.baseurl }}" media="print" onload="this.media='all';this.onload=null;"> |
313 | | - <noscript><link rel="stylesheet" href="{{ "/css/jason-blog.min.css" | prepend: site.baseurl }}"></noscript> |
| 304 | + <!-- Custom Blog Styles - Synchronous to prevent CLS --> |
| 305 | + <link rel="stylesheet" href="{{ "/css/jason-blog.min.css" | prepend: site.baseurl }}"> |
314 | 306 |
|
315 | | - <!-- Async tail styles (low priority) --> |
| 307 | + <!-- Async tail styles (low priority, non-layout) --> |
316 | 308 | <link rel="stylesheet" href="{{ "/css/async.css" | prepend: site.baseurl }}" media="print" onload="this.media='all';this.onload=null;"> |
317 | 309 |
|
318 | 310 | <!-- Critical Font Preload --> |
|
0 commit comments