Skip to content

Commit 86550ba

Browse files
committed
portrait
1 parent 9fedc30 commit 86550ba

6 files changed

Lines changed: 55 additions & 17 deletions

File tree

_includes/components/footer.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
<p class="design-list-title">{{ site.data.footer.title }}</p>
44
<p class="footer-cloud">
55
{%- for link in site.data.footer.links %}
6+
{%- unless link.theme_toggle and page.force_light %}
67
<span class="footer-item">{% if link.theme_toggle %}<button type="button" class="design-link" data-radar-theme-toggle>{{ link.label }}</button>{% else %}<a class="design-link" href="{{ link.href }}"{% if link.external %} target="_blank" rel="noopener noreferrer"{% endif %}>{{ link.label }}</a>{% endif %}{% unless forloop.last %}<span class="footer-sep" aria-hidden="true">&nbsp;·</span>{% endunless %}</span>
8+
{%- endunless %}
79
{%- endfor %}
810
</p>
911
</div>

_includes/components/radar-nav.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@
6060
{% capture nav_search_trigger %}<a href="/search" class="radar-nav-search" aria-label="Search - type /">{% include components/design-kbd.html key="/" %}</a>{% endcapture %}
6161
{% include components/design-tooltip.html text="Search - type /" position="bottom-end" content=nav_search_trigger %}
6262

63-
{% capture nav_theme_trigger %}<button type="button" class="radar-nav-theme" data-radar-theme-toggle aria-label="Modes - type M">{% include components/design-kbd.html key="M" %}</button>{% endcapture %}
64-
{% include components/design-tooltip.html text="Modes - type M" position="bottom-end" content=nav_theme_trigger %}
63+
{% unless page.force_light %}
64+
{% capture nav_theme_trigger %}<button type="button" class="radar-nav-theme" data-radar-theme-toggle aria-label="Modes - type M">{% include components/design-kbd.html key="M" %}</button>{% endcapture %}
65+
{% include components/design-tooltip.html text="Modes - type M" position="bottom-end" content=nav_theme_trigger %}
66+
{% endunless %}
6567

6668
{% capture nav_github_trigger %}<a href="https://github.com/dotenvx/dotenvx" target="_blank" rel="noopener noreferrer" class="radar-nav-icon" aria-label="Star on GitHub - 5.7k" data-umami-event="GitHub repository link"><svg viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg></a>{% endcapture %}
6769
{% include components/design-tooltip.html text="Star on GitHub - 5.7k" position="bottom-end" content=nav_github_trigger %}

_includes/layouts/radar-theme.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script>
22
(function () {
33
var MODES = ['light', 'dark', 'storm']
4+
var FORCE_LIGHT = {{ page.force_light | default: false | jsonify }}
45

56
function cookieDomain() {
67
var host = location.hostname
@@ -36,13 +37,15 @@
3637
}
3738

3839
function resolveThemeMode() {
40+
if (FORCE_LIGHT) return 'light'
3941
var stored = readThemeMode()
4042
var mode = MODES.indexOf(stored) !== -1 ? stored : 'storm'
4143
persistThemeMode(mode)
4244
return mode
4345
}
4446

4547
function applyThemeMode(mode) {
48+
if (FORCE_LIGHT) mode = 'light'
4649
var root = document.documentElement
4750
root.classList.toggle('dark', mode === 'dark' || mode === 'storm')
4851
root.classList.toggle('storm', mode === 'storm')
@@ -75,8 +78,9 @@
7578
try {
7679
applyThemeMode(resolveThemeMode())
7780
} catch (e) {
78-
document.documentElement.classList.add('dark', 'storm')
81+
if (FORCE_LIGHT) document.documentElement.classList.remove('dark', 'storm')
82+
else document.documentElement.classList.add('dark', 'storm')
7983
}
8084
})()
8185
</script>
82-
<meta name="theme-color" content="#14171c">
86+
<meta name="theme-color" content="{% if page.force_light %}#e4e7e6{% else %}#14171c{% endif %}">

_layouts/radar.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
{% include layouts/meta.html %}
66
{% include layouts/analytics.html %}
77
</head>
8-
<body class="radar-layout">
8+
<body class="radar-layout{% if page.body_class %} {{ page.body_class }}{% endif %}">
99
{% include components/storm-lightning.html %}
1010
{% include components/radar-nav.html %}
1111
<main class="radar-main">
1212
{{ content }}
1313
</main>
14-
{% include components/footer.html %}
15-
{% include components/design-theme-control.html %}
14+
{% unless page.hide_footer %}{% include components/footer.html %}{% endunless %}
15+
{% unless page.force_light %}{% include components/design-theme-control.html %}{% endunless %}
1616
{% include components/site-search.html %}
17-
<script src="{{ '/assets/js/radar-theme.js' | relative_url }}"></script>
17+
{% unless page.force_light %}<script src="{{ '/assets/js/radar-theme.js' | relative_url }}"></script>{% endunless %}
1818
<script src="{{ '/assets/js/design-choice.js' | relative_url }}"></script>
1919
</body>
2020
</html>

assets/img/got-env-portrait.png

1.31 MB
Loading

got-env.md

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,27 @@ title: "got .env?"
33
description: Ask Claude to install dotenvx and protect your project’s secrets.
44
permalink: /got-env
55
layout: radar
6+
force_light: true
7+
body_class: gotenv-layout
68
---
79

810
<style>
911
.gotenv-page {
1012
align-items: center;
13+
aspect-ratio: 2 / 3;
14+
background:
15+
linear-gradient(rgba(7, 10, 12, 0.34), rgba(7, 10, 12, 0.5)),
16+
url('/assets/img/got-env-portrait.png') center 28% / cover no-repeat;
17+
box-sizing: border-box;
1118
display: flex;
12-
min-height: min(48rem, calc(100vh - 8rem));
19+
height: calc(100svh - 4.5rem);
20+
margin-left: auto;
21+
margin-right: auto;
22+
max-height: 93.75rem;
23+
max-width: 62.5rem;
1324
padding: clamp(5rem, 14vh, 10rem) 0;
1425
text-align: center;
26+
width: auto;
1527
}
1628

1729
.gotenv-inner {
@@ -20,43 +32,61 @@ layout: radar
2032
flex-direction: column;
2133
margin: 0 auto;
2234
max-width: 44rem;
35+
transform: translateY(clamp(3rem, 7vh, 4.5rem));
2336
width: 100%;
2437
}
2538

2639
.gotenv-title {
27-
color: var(--design-ink);
40+
color: #ffffff;
2841
font-family: var(--design-font-sans);
29-
font-size: clamp(4.5rem, 15vw, 10rem);
42+
font-size: 72px;
3043
font-weight: 400;
3144
letter-spacing: -0.07em;
3245
line-height: 0.9;
3346
margin: 0;
47+
text-shadow: 0 2px 24px rgba(0, 0, 0, 0.32);
48+
white-space: nowrap;
3449
}
3550

3651
.gotenv-lede {
37-
color: var(--design-body);
52+
color: rgba(255, 255, 255, 0.94);
3853
font-family: var(--design-font-sans);
39-
font-size: clamp(1.1rem, 2.2vw, 1.4rem);
54+
font-size: 16.5px;
4055
letter-spacing: -0.02em;
4156
line-height: 1.45;
4257
margin: 2rem 0 0;
4358
max-width: 29rem;
59+
text-shadow: 0 1px 14px rgba(0, 0, 0, 0.52);
4460
}
4561

4662
.gotenv-action {
4763
margin-top: 2rem;
64+
width: 100%;
4865
}
4966

5067
.gotenv-action .design-btn {
51-
min-width: 11rem;
68+
box-sizing: border-box;
69+
display: block;
70+
font-size: 13.5px;
71+
margin-left: auto;
72+
margin-right: auto;
73+
padding: 0.95rem 1.5rem;
74+
width: min(21rem, 70%);
5275
}
5376

5477
.gotenv-hint {
55-
color: var(--design-secondary);
78+
color: rgba(255, 255, 255, 0.74);
5679
font-family: var(--design-font-mono);
57-
font-size: var(--design-text-compact);
80+
font-size: 13px;
5881
letter-spacing: 0.04em;
5982
margin: 0.85rem 0 0;
83+
text-shadow: 0 1px 10px rgba(0, 0, 0, 0.58);
84+
}
85+
86+
@media (max-width: 640px) {
87+
.gotenv-page {
88+
background-position: center 20%;
89+
}
6090
}
6191
</style>
6292

@@ -112,7 +142,7 @@ Finish with a concise summary of files changed, commands to use, which encrypted
112142
label="Copy prompt"
113143
id="gotenv-copy-prompt"
114144
class="design-btn--trial"
115-
data_umami_event="gotenv-copy-prompt"
145+
data_umami_event="Got env copy prompt click"
116146
%}
117147
</div>
118148
<p class="gotenv-hint" id="gotenv-copy-status" aria-live="polite">Paste into Claude Code</p>

0 commit comments

Comments
 (0)