]> danix's work - danix.xyz-2.git/commitdiff
style: add .back-to-top component class
authorDanilo M. <redacted>
Mon, 20 Apr 2026 20:13:10 +0000 (22:13 +0200)
committerDanilo M. <redacted>
Mon, 20 Apr 2026 20:13:10 +0000 (22:13 +0200)
themes/danix-xyz-hacker/assets/css/main.css
themes/danix-xyz-hacker/assets/css/main.min.css

index 8229271a6e3487743d2fb0c125c7fcc8ae769e2d..421932725ad512692f77ea0ce1b82c3ed9f842b2 100644 (file)
@@ -611,6 +611,23 @@ html.theme-light picture img[src="/images/default_thumbnail_dark.png"] {
     background: rgba(0, 255, 136, 0.1);
     color: var(--accent2);
   }
+
+  /* Back to top button */
+  .back-to-top {
+    @apply fixed bottom-6 right-6 z-40 w-11 h-11 rounded-full flex items-center justify-content-center;
+    background: var(--accent);
+    box-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
+    transition: background 200ms ease, box-shadow 200ms ease;
+    color: #fff;
+  }
+  .back-to-top:hover {
+    background: #9333ea;
+    box-shadow: 0 0 20px var(--accent);
+  }
+  .back-to-top:focus-visible {
+    outline: 2px solid var(--accent);
+    outline-offset: 2px;
+  }
 }
 
 /* Prose overrides for light theme */
index fe4435850fa9fb5fa20790593f2e9ef9dc43518d..389a8b79ba4324949a5a3f5fdcd446ab731214f5 100644 (file)
@@ -1733,6 +1733,8 @@ article.border.border-border\/30.rounded-lg.card.group.bg-bg {
   color: var(--accent2);
 }
 
+/* Back to top button */
+
 .sr-only {
   position: absolute;
   width: 1px;