Skip to content

Commit d1ca475

Browse files
committed
improve page'
1 parent 8e86ef0 commit d1ca475

5 files changed

Lines changed: 70 additions & 31 deletions

File tree

_includes/components/docs-cli-pager.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@
3737
href="{{ prev_item.href }}"
3838
aria-label="Previous: {{ prev_item.label }}"
3939
data-docs-quickstart-prev
40-
><span aria-hidden="true"></span> {{ prev_item.label }}</a>
40+
><span aria-hidden="true"></span> <span class="docs-quickstart-pager-label">{{ prev_item.label }}</span></a>
4141
{% endif %}
4242
{% if next_item %}
4343
<a
4444
class="design-btn"
4545
href="{{ next_item.href }}"
4646
aria-label="Next: {{ next_item.label }}"
4747
data-docs-quickstart-next
48-
>{{ next_item.label }} <span aria-hidden="true"></span></a>
48+
><span class="docs-quickstart-pager-label">{{ next_item.label }}</span> <span aria-hidden="true"></span></a>
4949
{% endif %}
5050
</nav>
5151
{% endif %}

_includes/components/docs-quickstart-pager.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@
3232
href="{{ prev_item.href }}"
3333
aria-label="Previous: {{ prev_item.label }}"
3434
data-docs-quickstart-prev
35-
><span aria-hidden="true"></span> {{ prev_item.label }}</a>
35+
><span aria-hidden="true"></span> <span class="docs-quickstart-pager-label">{{ prev_item.label }}</span></a>
3636
{% endif %}
3737
{% if next_item %}
3838
<a
3939
class="design-btn"
4040
href="{{ next_item.href }}"
4141
aria-label="Next: {{ next_item.label }}"
4242
data-docs-quickstart-next
43-
>{{ next_item.label }} <span aria-hidden="true"></span></a>
43+
><span class="docs-quickstart-pager-label">{{ next_item.label }}</span> <span aria-hidden="true"></span></a>
4444
{% endif %}
4545
</nav>
4646
{% endif %}

assets/css/main.src.css

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4745,31 +4745,41 @@ html.storm .docs-hero-icon--invert-dark {
47454745

47464746
.docs-quickstart-pager {
47474747
display: flex;
4748-
flex-direction: column;
4748+
flex-direction: row;
47494749
gap: 0.75rem;
47504750
margin-top: 0;
47514751
width: 100%;
47524752
}
47534753

4754+
.docs-quickstart-pager--both {
4755+
justify-content: space-between;
4756+
}
4757+
4758+
.docs-quickstart-pager--next-only {
4759+
justify-content: flex-end;
4760+
}
4761+
47544762
.docs-quickstart-pager .design-btn {
47554763
align-items: center;
47564764
display: inline-flex;
4765+
flex: 0 1 auto;
47574766
gap: 0.4rem;
47584767
justify-content: center;
4768+
max-width: 100%;
4769+
min-width: 0;
4770+
overflow: hidden;
4771+
width: fit-content;
47594772
}
47604773

4761-
@media (min-width: 640px) {
4762-
.docs-quickstart-pager {
4763-
flex-direction: row;
4764-
}
4765-
4766-
.docs-quickstart-pager--both {
4767-
justify-content: space-between;
4768-
}
4774+
.docs-quickstart-pager--both .design-btn {
4775+
max-width: calc(50% - 0.375rem);
4776+
}
47694777

4770-
.docs-quickstart-pager--next-only {
4771-
justify-content: flex-end;
4772-
}
4778+
.docs-quickstart-pager-label {
4779+
min-width: 0;
4780+
overflow: hidden;
4781+
text-overflow: ellipsis;
4782+
white-space: nowrap;
47734783
}
47744784

47754785
.docs-guide-body .design-codeblock-wrap,

docs/cli/run.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,24 @@ options:
9090
- title: "run --no-armor"
9191
href: /docs/cli/run-no-armor/
9292
---
93+
Given you have an app with environment variables:
9394
{% capture cli_code_0 %}
9495
console.log(`Hello ${process.env.HELLO}`)
9596
{% endcapture %}
9697
{% capture cli_code_0_copy %}console.log(`Hello ${process.env.HELLO}`){% endcapture %}
9798
{% include components/design-codeblock.html value=cli_code_0 copy_text=cli_code_0_copy %}
98-
99+
Encrypt your .env file. Your secrets stay safely encrypted at rest.
99100
{% capture cli_code_1 %}
100101
$ dotenvx encrypt
102+
◈ encrypted (.env)
103+
{% endcapture %}
104+
{% capture cli_code_1_copy %}dotenvx encrypt{% endcapture %}
105+
{% include components/design-codeblock.html value=cli_code_1 copy_text=cli_code_1_copy %}
106+
And then decrypt and inject them at runtime - just in time.
107+
{% capture cli_code_2 %}
101108
$ dotenvx run -- node index.js
102109
⟐ injected env (14) from .env
103110
{% endcapture %}
104-
{% capture cli_code_1_copy %}dotenvx encrypt
105-
dotenvx run -- node index.js{% endcapture %}
106-
{% include components/design-codeblock.html value=cli_code_1 copy_text=cli_code_1_copy %}
111+
{% capture cli_code_2_copy %}dotenvx run -- node index.js{% endcapture %}
112+
{% include components/design-codeblock.html value=cli_code_2 copy_text=cli_code_2_copy %}
113+
This works cross-platform across plaintext and encrypted .env files.

docs/learn/installing.md

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,7 @@ $ winget install dotenvx
6868
{% include components/design-step.html content=step_content %}
6969

7070
{% capture step_content %}
71-
<h2 class="design-page-title design-page-title--flush">Other</h2>
72-
73-
<h3 class="design-list-title" id="brew">Brew</h3>
71+
<h2 class="design-page-title design-page-title--flush" id="brew">Brew</h2>
7472
<p class="design-paragraph">Install with <a class="design-link" href="https://brew.sh">brew</a>:</p>
7573

7674
{% capture install_brew %}
@@ -82,8 +80,11 @@ brew install dotenvx
8280
{% include components/design-codeblock.html value=install_brew copy=false %}
8381

8482
<p class="design-paragraph">Find the <a class="design-link" href="https://github.com/dotenvx/homebrew-brew">dotenvx brew tap here</a>.</p>
83+
{% endcapture %}
84+
{% include components/design-step.html content=step_content %}
8585

86-
<h3 class="design-list-title" id="docker">Docker</h3>
86+
{% capture step_content %}
87+
<h2 class="design-page-title design-page-title--flush" id="docker">Docker</h2>
8788
<p class="design-paragraph">We also provide a <a class="design-link" href="https://hub.docker.com/r/dotenv/dotenvx">docker image</a> for your convenience:</p>
8889

8990
{% capture install_docker %}
@@ -101,8 +102,11 @@ RUN curl -sfS https://dotenvx.sh/install.sh | sh
101102
CMD ["dotenvx", "run", "--", "echo", "Hello $HELLO"]
102103
{% endcapture %}
103104
{% include components/design-codeblock.html value=install_docker_dockerfile copy=false %}
105+
{% endcapture %}
106+
{% include components/design-step.html content=step_content %}
104107

105-
<h3 class="design-list-title" id="github">GitHub Releases</h3>
108+
{% capture step_content %}
109+
<h2 class="design-page-title design-page-title--flush" id="github">GitHub Releases</h2>
106110
<p class="design-paragraph">You can also download straight from <a class="design-link" href="https://github.com/dotenvx/dotenvx/releases">GitHub Releases</a>.</p>
107111

108112
{% capture install_github %}
@@ -113,8 +117,11 @@ tar -xzf dotenvx.tar.gz
113117
{% include components/design-codeblock.html value=install_github copy=false %}
114118

115119
<p class="design-paragraph">If you download manually you'll need to move the binary somewhere in your PATH.</p>
120+
{% endcapture %}
121+
{% include components/design-step.html content=step_content %}
116122

117-
<h3 class="design-list-title" id="heroku">Heroku Buildpack</h3>
123+
{% capture step_content %}
124+
<h2 class="design-page-title design-page-title--flush" id="heroku">Heroku Buildpack</h2>
118125
<p class="design-paragraph">For our Heroku friends, we have a <a class="design-link" href="https://github.com/dotenvx/heroku-buildpack-dotenvx">heroku buildpack</a>.</p>
119126

120127
{% capture install_heroku %}
@@ -129,8 +136,11 @@ heroku buildpacks:add https://github.com/dotenvx/heroku-buildpack-dotenvx
129136
web: dotenvx run -- node index.js
130137
{% endcapture %}
131138
{% include components/design-codeblock.html value=install_heroku_procfile copy=false %}
139+
{% endcapture %}
140+
{% include components/design-step.html content=step_content %}
132141

133-
<h3 class="design-list-title" id="standalone">Standalone</h3>
142+
{% capture step_content %}
143+
<h2 class="design-page-title design-page-title--flush" id="standalone">Standalone</h2>
134144
<p class="design-paragraph"><code class="design-code">dotenvx</code> is a standalone binary, so (if you want) you can just download it directly:</p>
135145

136146
{% capture install_standalone %}
@@ -157,8 +167,11 @@ curl -sfS --proto '=https' "https://dotenvx.sh/$(uname)/$(uname -m).tgz?version=
157167
{% include components/design-codeblock.html value=install_standalone_version copy=false %}
158168

159169
<p class="design-paragraph">You can view available versions at <a class="design-link" href="https://github.com/dotenvx/releases/tree/main">github.com/dotenvx/releases</a>.</p>
170+
{% endcapture %}
171+
{% include components/design-step.html content=step_content %}
160172

161-
<h3 class="design-list-title" id="npm-local">Npm local</h3>
173+
{% capture step_content %}
174+
<h2 class="design-page-title design-page-title--flush" id="npm-local">Npm local</h2>
162175
<p class="design-paragraph">Use dotenvx locally as a cli in your node project.</p>
163176

164177
{% capture install_npm_local %}
@@ -177,25 +190,34 @@ npm i @dotenvx/dotenvx --save
177190
}
178191
{% endcapture %}
179192
{% include components/design-codeblock.html value=install_npm_local_pkg copy=false %}
193+
{% endcapture %}
194+
{% include components/design-step.html content=step_content %}
180195

181-
<h3 class="design-list-title" id="npm-global">Npm global</h3>
196+
{% capture step_content %}
197+
<h2 class="design-page-title design-page-title--flush" id="npm-global">Npm global</h2>
182198
<p class="design-paragraph">You can also install globally using npm's <code class="design-code">--global</code> flag.</p>
183199

184200
{% capture install_npm_global %}
185201
npm install @dotenvx/dotenvx --global
186202
dotenvx help
187203
{% endcapture %}
188204
{% include components/design-codeblock.html value=install_npm_global copy=false %}
205+
{% endcapture %}
206+
{% include components/design-step.html content=step_content %}
189207

190-
<h3 class="design-list-title" id="npx">Npx</h3>
208+
{% capture step_content %}
209+
<h2 class="design-page-title design-page-title--flush" id="npx">Npx</h2>
191210
<p class="design-paragraph">Or prefer to run as needed, uses <code class="design-code">npx</code>.</p>
192211

193212
{% capture install_npx %}
194213
npx @dotenvx/dotenvx help
195214
{% endcapture %}
196215
{% include components/design-codeblock.html value=install_npx copy_text="npx @dotenvx/dotenvx help" %}
216+
{% endcapture %}
217+
{% include components/design-step.html content=step_content %}
197218

198-
<h3 class="design-list-title" id="wget">Wget</h3>
219+
{% capture step_content %}
220+
<h2 class="design-page-title design-page-title--flush" id="wget">Wget</h2>
199221

200222
{% capture install_wget %}
201223
wget -qO- https://dotenvx.sh | sh

0 commit comments

Comments
 (0)