From 85ec18c9a6d216120431d10043996c7659c7d679 Mon Sep 17 00:00:00 2001 From: darkweak Date: Sun, 15 Oct 2023 16:10:47 +0200 Subject: [PATCH] fix(redesign): static top download --- new/download.html | 35 +++++++++++++++++----------------- new/resources/css/download.css | 25 ++++++++++++++++-------- new/resources/js/download.js | 4 ++++ 3 files changed, 39 insertions(+), 25 deletions(-) diff --git a/new/download.html b/new/download.html index a7851db..afbcee5 100644 --- a/new/download.html +++ b/new/download.html @@ -16,21 +16,6 @@

Download

-
- - -
- -
-
-
-
-
-
@@ -64,10 +49,10 @@ - +
-
+
 						xcaddy build
 					
@@ -81,6 +66,22 @@
+ +
+ + +
+ +
+
+
+
+
+
diff --git a/new/resources/css/download.css b/new/resources/css/download.css index 67a840d..40c7399 100644 --- a/new/resources/css/download.css +++ b/new/resources/css/download.css @@ -63,8 +63,9 @@ html { #download { position: sticky; - bottom: 0; - padding-bottom: 16px; + top: 0; + padding-bottom: 32px; + z-index: 10; } #download>div { @@ -90,7 +91,7 @@ html { } #downloader { - padding-bottom: 8px; + padding-bottom: 16px; } #command { @@ -111,6 +112,7 @@ html { #command>svg { height: 1em; + cursor: pointer; } #command-builder::before { @@ -151,9 +153,16 @@ h2 { color: var(--text-color); } +.card-title-name>a { + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; + overflow-x: hidden; +} + .card-title-info { display: inline-flex; - gap: 16px; + gap: 8px; font-size: 90%; color: var(--text-color-muted); } @@ -235,10 +244,11 @@ select { height: 3rem; font-size: 100%; font-weight: 600; - background-color: white; + border: 1px solid var(--button-border-color); + color: var(--text-color); + background-color: var(--body-bg); width: 100%; border-radius: var(--radius); - border: none; } .filters>div { @@ -258,8 +268,7 @@ select { line-height: 1.25rem; line-height: 2; min-height: 3rem; - border-width: 1px; - border-color: var(--text-color-muted); + border: 1px solid var(--button-border-color); background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) calc(1px + 50%), calc(100% - 16.1px) calc(1px + 50%); background-size: 4px 4px, 4px 4px; diff --git a/new/resources/js/download.js b/new/resources/js/download.js index 4caf6c1..92dad31 100644 --- a/new/resources/js/download.js +++ b/new/resources/js/download.js @@ -138,4 +138,8 @@ function togglePackage({ target: { dataset: { module } } }) { } document.getElementById('command-builder').innerText = `xcaddy build${packages.map(p => ` --with ${p}`).join('')}` +} + +function copyCommand() { + navigator.clipboard.writeText(`xcaddy build${packages.map(s => ` --with ${s}`).join('')}`) } \ No newline at end of file