]> danix's work - danix.xyz-2.git/commitdiff
style: unify sidebar widget styling with bash comment prefix
authorDanilo M. <redacted>
Sat, 18 Apr 2026 14:44:36 +0000 (16:44 +0200)
committerDanilo M. <redacted>
Sat, 18 Apr 2026 14:44:36 +0000 (16:44 +0200)
All sidebar widgets (author, share, related posts) now use:
- Unified .sidebar-widget container (no box, only top border via <hr>)
- .sidebar-widget-label with # prefix (bash comment style)
- Monospace, dimmed, small text for consistency

Previously, share widget used a different style (full box with borders).
Author and Related Posts widgets now match the hacker aesthetic.

Co-Authored-By: Claude Haiku 4.5 <redacted>
themes/danix-xyz-hacker/assets/css/main.css
themes/danix-xyz-hacker/assets/css/main.min.css
themes/danix-xyz-hacker/layouts/partials/sidebar.html
themes/danix-xyz-hacker/layouts/partials/social-share.html

index 6f00eb5a746ea835102d7cef0a7dd59161813f6c..8ab29a0c723df3e4b3a980ed437a50ef5030f95b 100644 (file)
@@ -306,13 +306,13 @@ html.theme-light {
     height: 50px !important;
   }
 
-  /* Social share widget */
-  .share-widget {
-    padding-top: 0.75rem;
-    border-top: 1px solid var(--border);
+  /* Sidebar widget — no box, no border */
+  .sidebar-widget {
+    margin-bottom: 1.5rem;
   }
 
-  .share-label {
+  /* Sidebar widget title — bash comment style */
+  .sidebar-widget-label {
     font-family: var(--font-mono, monospace);
     font-size: 0.75rem;
     color: var(--text-dim);
@@ -320,6 +320,13 @@ html.theme-light {
     margin-bottom: 0.5rem;
   }
 
+  /* Sidebar separator */
+  .sidebar-hr {
+    border: none;
+    border-top: 1px solid var(--border);
+    margin-bottom: 1.5rem;
+  }
+
   .share-grid {
     display: grid;
     grid-template-columns: repeat(3, 50px);
index 87ce73b41ea6506dabd5652abf96dcc58f09b925..a9aa329871fd266f2512d95bb29a17e6d579af90 100644 (file)
@@ -1419,14 +1419,15 @@ button,
 
 /* Force Feather icons to match size */
 
-/* Social share widget */
+/* Sidebar widget — no box, no border */
 
-.share-widget {
-  padding-top: 0.75rem;
-  border-top: 1px solid var(--border);
+.sidebar-widget {
+  margin-bottom: 1.5rem;
 }
 
-.share-label {
+/* Sidebar widget title — bash comment style */
+
+.sidebar-widget-label {
   font-family: var(--font-mono, monospace);
   font-size: 0.75rem;
   color: var(--text-dim);
@@ -1434,6 +1435,14 @@ button,
   margin-bottom: 0.5rem;
 }
 
+/* Sidebar separator */
+
+.sidebar-hr {
+  border: none;
+  border-top: 1px solid var(--border);
+  margin-bottom: 1.5rem;
+}
+
 .share-grid {
   display: grid;
   grid-template-columns: repeat(3, 50px);
index 2ec48a6b5a2dc46ad72ec267af6af8b310f7b0cf..f80c2cf2af6108102716380e71ffbd1571c87b79 100644 (file)
@@ -1,20 +1,23 @@
 <aside class="order-last md:order-none md:col-span-1">
   <!-- Author info widget (optional - can be expanded) -->
-  <div class="p-4 border border-border/30 rounded mb-6">
-    <h3 class="text-lg font-semibold text-accent mb-3">{{ i18n "author" }}</h3>
+  <div class="sidebar-widget">
+    <p class="sidebar-widget-label"># {{ i18n "author" }}</p>
     <p class="text-text-dim text-sm leading-relaxed">
       {{ .Site.Params.author }}
     </p>
   </div>
 
+  <hr class="sidebar-hr">
+
   <!-- Social sharing widget -->
   {{ partial "social-share.html" (dict "page" . "mode" "sidebar") }}
 
   <!-- Related posts widget (articles only) -->
   {{ if and .Site.Params.relatedPosts (eq .Type "articles") }}
   {{ $related := first 5 (.Site.RegularPages.Related .) }}
-  <div class="p-4 border border-border/30 rounded mb-6">
-    <h3 class="text-lg font-semibold text-accent mb-3">{{ i18n "relatedPosts" }}</h3>
+  <hr class="sidebar-hr">
+  <div class="sidebar-widget">
+    <p class="sidebar-widget-label"># {{ i18n "relatedPosts" }}</p>
     {{ if $related }}
     <ul class="space-y-3">
       {{ range $related }}
index 20977a8e0a8a9a9ad373b9be24a45f6c9185aa41..9e9be43660b016a7d054dd1f4cac3b1c8175a676 100644 (file)
@@ -8,8 +8,8 @@
   {{ $gridClass = "flex flex-wrap justify-center gap-1" }}
 {{ end }}
 
-<div class="share-widget mb-6">
-  <p class="share-label">// {{ i18n "share" }}</p>
+<div class="sidebar-widget">
+  <p class="sidebar-widget-label"># {{ i18n "share" }}</p>
   <nav aria-label="{{ i18n "share" }}">
     <div class="{{ $gridClass }}">