Skip to content

Commit 9e69540

Browse files
committed
feat: Enhance sidebar and content layouts
This commit improves the layout and functionality of the sidebar and content areas: - Added og-preview component to sidebar - Adjusted TOC container height - Modified styles for og-preview component - Modified row layout for better content alignment
1 parent 93db3d8 commit 9e69540

File tree

1 file changed

+46
-35
lines changed

1 file changed

+46
-35
lines changed
Lines changed: 46 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,57 @@
11
{{ define "main" }}
2-
{{ partial "page-header" . }}
3-
<section class="section pt-6">
4-
<div class="container">
5-
<div class="row lg:items-stretch">
6-
<div>
7-
<div class="content-panel p-6 shadow-lg">
8-
{{ partial "hardware/product-info" .Page }}
2+
{{ partial "page-header" . }}
3+
<section class="section pt-6">
4+
<div class="container">
5+
{{/* Row 1: "At a Glance" section, full width */}}
6+
<div class="row mb-8">
7+
<div class="lg:col-12">
8+
<div class="content-panel p-6 shadow-lg">
9+
{{ partial "hardware/product-info" .Page }}
10+
</div>
911
</div>
1012
</div>
11-
<article class="{{ if gt (len .TableOfContents) 80 }}lg:col-8{{ else }}lg:col-10{{ end }}">
12-
<div class="content mb-10">
13+
14+
{{/* Row 2: Main content and sidebar */}}
15+
<div class="row lg:items-stretch">
16+
<article
17+
class="{{ if gt (len .TableOfContents) 80 }}lg:col-8{{ else }}lg:col-10 mx-auto{{ end }}">
1318
<p class="mb-6 text-xl">{{ .Params.summary }}</p>
14-
<div class="content-panel p-6 shadow-lg">
19+
<div class="content-panel p-6 shadow-lg mb-8">
1520
{{ partial "hardware/company-info" .Page }}
1621
</div>
17-
{{ .Content }}
18-
</div>
19-
<div class="row items-start justify-between">
20-
<div class="lg:col-12 flex justify-end">
21-
{{ partial "override-social-share" (dict "Context" . "Class" "share-icons" "Title" (i18n "share") "Whatsapp"
22-
true "Telegram" false) }}
22+
<div class="content mb-10">
23+
{{ .Content }}
2324
</div>
24-
</div>
25-
</article>
26-
{{ partial "components/sidebar-toc-shared.html" . }}
27-
</div>
25+
26+
{{/* --- SHARING & SUPPORT CTA SECTION --- */}}
27+
<div class="border-t border-border dark:border-darkmode-border mt-10 pt-8 text-center">
28+
<h3 class="text-2xl font-bold mb-3">Enjoyed This Post? Support Our Community</h3>
29+
<p class="mb-6 text-gray-700 dark:text-gray-300 max-w-2xl mx-auto">
30+
Thanks for reading! If you made it this far, you might be interested in supporting us. Sharing our posts helps amplify our signal and get the word out—it's an extremely valuable way to support our community, along with linking to our content from your website.
31+
</p>
32+
{{ partial "components/og-preview.html" . }}
33+
</div>
34+
{{/* --- END SHARING & SUPPORT CTA SECTION --- */}}
35+
36+
</article>
37+
{{ partial "components/sidebar-toc-shared.html" . }}
38+
</div>
2839

29-
<!-- Related posts -->
30-
{{ $related := (where site.RegularPages "Section" "blog") | intersect (where
31-
site.RegularPages ".Title" "!=" .Title) | union (site.RegularPages.Related . ) }}
32-
{{ $related = $related | shuffle | first 3 }}
33-
{{ with $related }}
34-
<div class="section pb-0">
35-
<div class="row">
36-
{{ range . }}
37-
<div class="lg:col-4">
38-
{{ partial "components/blog-card" . }}
40+
<!-- Related posts -->
41+
{{ $related := (where site.RegularPages "Section" "blog") | intersect (where
42+
site.RegularPages ".Title" "!=" .Title) | union (site.RegularPages.Related . ) }}
43+
{{ $related = $related | shuffle | first 3 }}
44+
{{ with $related }}
45+
<div class="section pb-0">
46+
<div class="row">
47+
{{ range . }}
48+
<div class="lg:col-4">
49+
{{ partial "components/blog-card" . }}
50+
</div>
51+
{{ end }}
52+
</div>
3953
</div>
40-
{{ end }}
41-
</div>
54+
{{ end }}
4255
</div>
43-
{{ end }}
44-
</div>
45-
</section>
56+
</section>
4657
{{ end }}

0 commit comments

Comments
 (0)