Skip to content

Commit 93db3d8

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 69a38ab commit 93db3d8

File tree

6 files changed

+15
-11
lines changed

6 files changed

+15
-11
lines changed

assets/scss/components/_og-preview.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.og-preview-wrapper {
2-
@apply relative max-w-sm mx-auto p-2 lg:max-w-xs;
2+
@apply relative max-w-sm mx-auto lg:max-w-xs;
33
}
44

55
.og-preview-container {
@@ -15,7 +15,7 @@
1515
@apply opacity-100;
1616
}
1717
.sharing-runner {
18-
@apply translate-y-full;
18+
@apply opacity-0;
1919
}
2020
}
2121
}
@@ -63,7 +63,7 @@
6363
}
6464

6565
.sharing-runner {
66-
@apply absolute bottom-0 left-0 right-0 h-10 flex items-center justify-between px-4 transition-transform duration-300 ease-in-out z-[3];
66+
@apply absolute bottom-0 left-0 right-0 h-10 flex items-center justify-between px-4 transition-all duration-300 ease-in-out z-[3] opacity-100;
6767
background: rgba(0,0,0, 0.7);
6868
backdrop-filter: blur(3px);
6969
color: white;
@@ -97,6 +97,6 @@
9797
opacity: 1;
9898
}
9999
.sharing-runner {
100-
transform: translateY(100%);
100+
@apply opacity-0;
101101
}
102102
}

layouts/blog/single.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{{ partial "page-header" . }}
33
<section class="section pt-6">
44
<div class="container">
5-
<div class="row">
5+
<div class="row lg:items-stretch">
66
<article class="{{ if gt (len .TableOfContents) 80 }}lg:col-8{{ else }}lg:col-10 mx-auto{{ end }}">
77
{{ $image:= .Params.image }}
88
{{ if $image }}

layouts/neuromorphic-hardware/single.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{{ partial "page-header" . }}
33
<section class="section pt-6">
44
<div class="container">
5-
<div class="row">
5+
<div class="row lg:items-stretch">
66
<div>
77
<div class="content-panel p-6 shadow-lg">
88
{{ partial "hardware/product-info" .Page }}

layouts/neuromorphic-software/single.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{{ partial "page-header" . }}
33
<section class="section pt-6">
44
<div class="container">
5-
<div class="row lg:gx-8">
5+
<div class="row lg:gx-8 lg:items-stretch">
66
{{/* Main Content Column */}}
77
<div class="lg:col-8">
88
<article class="content mb-10">
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
{{ if gt (len .TableOfContents) 80 }}
22
<aside class="lg:col-4 hidden lg:block">
3-
<div class="sticky top-24">
3+
<div class="">
4+
{{ partial "components/og-preview.html" . }}
5+
</div>
6+
<div class="sticky top-24 space-y-6">
7+
{{/* Table of Contents Section */}}
48
<div class="px-3 pt-5 pb-5 content-panel">
59
<div class="pb-3">
610
<strong class="text-xl">Table of Contents</strong>
711
</div>
8-
<div id="tableOfContentContainer" class="max-h-[calc(100vh-12rem)] overflow-y-auto">
12+
<div id="tableOfContentContainer" class="max-h-[calc(100vh-28rem)] overflow-y-auto">
913
{{ .TableOfContents }}
1014
</div>
1115
</div>
1216
</div>
1317
</aside>
14-
{{ end }}
18+
{{ end }}

layouts/shortcodes/toc.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
{{ end }}
99
</summary>
1010
{{ .Page.TableOfContents }}
11-
</details>
11+
</details>

0 commit comments

Comments
 (0)