diff --git a/css/style.css b/css/style.css index cafdb5d2..00e87c59 100644 --- a/css/style.css +++ b/css/style.css @@ -143,12 +143,17 @@ main.home { column-gap: 8px } -#install-command { +.install-command { font-family: Consolas, Monaco, "Andale Mono", monospace; - padding: 5px 10px; + padding: 10px; border: 1px solid var(--border); border-radius: 3px; max-width: 375px; + background-color: inherit; + + code { + background-color: inherit; + } } .content { @@ -1147,7 +1152,7 @@ h2 a { flex-direction: column; } - #install-command { + .install-command { display: none; } @@ -1219,11 +1224,6 @@ h2 a { font-weight: 200; } - #install-command { - width: 100%; - margin-right: 5%; - } - .logo-container { margin-inline: auto; } diff --git a/index.md b/index.md index af03a662..02083dc1 100644 --- a/index.md +++ b/index.md @@ -13,7 +13,7 @@ redirect_from: "/en/index.html"
Express{{ site.data.express.current_version }}

Fast, unopinionated, minimalist web framework for Node.js

-
$ npm install express --save
+
$ npm install express --save
diff --git a/js/copycode.js b/js/copycode.js index d95a73f0..21747107 100644 --- a/js/copycode.js +++ b/js/copycode.js @@ -31,7 +31,9 @@ function setButtonAttributes(button, attributes) { async function copyCode(block, button) { const code = block.querySelector("code"); - const text = code.innerText; + let text = code.innerText; + // remove "$" and space if exists at the beginning of the code + text = text.replace(/^\$\s?/,""); try { await navigator.clipboard.writeText(text);