1414< body >
1515 < div class ="main-content ">
1616 {% include nav.html %}
17- {{ content }}
17+ < section class ="hero is-primary is-small ">
18+ < div class ="hero-body ">
19+ < div class ="container is-max-widescreen ">
20+ < h1 class ="title ">
21+ {% if page.layout == 'post' %}
22+ {{ page.title }}
23+ {% else %}
24+ {{ page.hero_title }}
25+ {% endif %}
26+ </ h1 >
27+ {% if page.layout == 'post' and page.description %}
28+ < h2 class ="subtitle ">
29+ {{ page.description }}
30+ </ h2 >
31+ {% elsif page.hero_subtitle %}
32+ < h2 class ="subtitle ">
33+ {{ page.hero_subtitle }}
34+ </ h2 >
35+ {% endif %}
36+ </ div >
37+ </ div >
38+ </ section >
39+ < div class ="site-grid ">
40+ < div class ="columns ">
41+ < aside class ="column sidebar-left ">
42+ {% if page.layout == 'post' %}
43+ < div class ="sidebar-content ">
44+ < h6 class ="title is-5 "> Post Navigation</ h6 >
45+ < div class ="content is-small ">
46+ {% assign toc_items = '' %}
47+ {% assign headers = content | split: '< h ' %}
48+ {% for header in headers %}
49+ {% if forloop.index > 1 %}
50+ {% assign header_level = header | slice: 0, 1 %}
51+ {% if header_level == '2' or header_level == '3' %}
52+ {% assign header_parts = header | split: '> ' %}
53+ {% assign header_tag = header_parts[0] %}
54+ {% assign header_content = header_parts[1] | split: '</ h ' | first %}
55+ {% assign header_id = header_tag | split: 'id="' %}
56+ {% if header_id.size > 1 %}
57+ {% assign id_value = header_id[1] | split: '"' | first %}
58+ {% assign toc_items = toc_items | append: '< li class ="toc-h' | append: header_level | append: ' "> < a href ="#' | append: id_value | append: ' "> ' | append: header_content | append: '</ a > </ li > ' %}
59+ {% endif %}
60+ {% endif %}
61+ {% endif %}
62+ {% endfor %}
63+
64+ {% if toc_items != '' %}
65+ < h6 class ="title is-6 has-text-weight-semibold "> Table of Contents</ h6 >
66+ < ul class ="post-toc-list "> {{ toc_items }}</ ul >
67+ {% else %}
68+ < h6 class ="title is-6 has-text-weight-semibold "> Table of Contents</ h6 >
69+ < p class ="has-text-grey-light is-size-7 "> No headers found in this post.</ p >
70+ {% endif %}
71+ </ div >
72+ </ div >
73+ {% endif %}
74+ </ aside >
75+ < main class ="column main-content-inner ">
76+ {{ content }}
77+ </ main >
78+ < aside class ="column sidebar-right ">
79+ {% if page.layout == 'post' %}
80+ < div class ="sidebar-content ">
81+ < h6 class ="title is-5 "> Site Index</ h6 >
82+ < div class ="content is-small ">
83+
84+ <!-- Highlighted Posts Section -->
85+ {% assign highlighted_posts = site.posts | where: "tag", "Highlight" | limit: 2 %}
86+ {% if highlighted_posts.size > 0 %}
87+ < h6 class ="title is-6 has-text-weight-semibold "> Featured</ h6 >
88+ < ul class ="site-index-list ">
89+ {% for post in highlighted_posts %}
90+ < li > < a href ="{{ post.url | prepend: site.baseurl }} "> {{ post.title }}</ a > </ li >
91+ {% endfor %}
92+ </ ul >
93+ {% endif %}
94+
95+ <!-- Recent Posts Section (excluding highlighted) -->
96+ {% assign highlighted_urls = highlighted_posts | map: "url" %}
97+ {% assign recent_posts = '' | split: '' %}
98+ {% assign count = 0 %}
99+ {% for post in site.posts %}
100+ {% unless highlighted_urls contains post.url or count > = 3 %}
101+ {% assign recent_posts = recent_posts | push: post %}
102+ {% assign count = count | plus: 1 %}
103+ {% endunless %}
104+ {% endfor %}
105+
106+ {% if recent_posts.size > 0 %}
107+ < h6 class ="title is-6 has-text-weight-semibold "> Recent</ h6 >
108+ < ul class ="site-index-list ">
109+ {% for post in recent_posts %}
110+ < li > < a href ="{{ post.url | prepend: site.baseurl }} "> {{ post.title }}</ a > </ li >
111+ {% endfor %}
112+ </ ul >
113+ {% endif %}
114+
115+ <!-- Top Categories Section -->
116+ {% assign category_counts = '' | split: '' %}
117+ {% for category in site.categories %}
118+ {% assign cat_name = category[0] %}
119+ {% assign cat_count = category[1] | size %}
120+ {% comment %} Pad count with zeros for proper numeric sorting {% endcomment %}
121+ {% assign padded_count = cat_count %}
122+ {% if cat_count < 10 %}{% assign padded_count = '00 ' | append: cat_count %}{% endif %}
123+ {% if cat_count > = 10 and cat_count < 100 %}{% assign padded_count = '0 ' | append: cat_count %}{% endif %}
124+ {% assign cat_data = padded_count | append: '|' | append: cat_name %}
125+ {% assign category_counts = category_counts | push: cat_data %}
126+ {% endfor %}
127+ {% assign sorted_categories = category_counts | sort | reverse %}
128+
129+ < h6 class ="title is-6 has-text-weight-semibold "> Categories</ h6 >
130+ < ul class ="site-index-list ">
131+ {% for cat_data in sorted_categories limit: 3 %}
132+ {% assign cat_parts = cat_data | split: '|' %}
133+ {% assign cat_count = cat_parts[0] | plus: 0 %}
134+ {% assign cat_name = cat_parts[1] %}
135+ {% assign cat_slug = cat_name | slugify %}
136+ < li >
137+ < a href ="{{ '/categories/#category-' | append: cat_slug | prepend: site.baseurl }} ">
138+ {{ cat_name }} ({{ cat_count }})
139+ </ a >
140+ </ li >
141+ {% endfor %}
142+ </ ul >
143+
144+ </ div >
145+ </ div >
146+ {% endif %}
147+ </ aside >
148+ </ div >
149+ </ div >
18150 </ div >
19151 {% include footer.html %}
20152
21153 < script src ="{{ "/assets/js/toggle-menu.js" | prepend: site.baseurl }}"> </ script >
22154
23155</ body >
24- </ html >
156+ </ html >
0 commit comments