Skip to content

Commit 33e0be7

Browse files
Vonngclaude
andcommitted
refactor(hero): Postgres Install Guide on one line, drop the host band
- The backronym is now *Postgres* Install Guide, set on a single line. `.pig-hero-title` is a wrapping flex row, so the one-line variant turns wrapping off and sizes the type off the column width instead: the string is about 11.6em in Chakra Petch Bold, so 4.2vw fits the two-column hero and 7.4vw fits the single-column one, each clamped at both ends. The footer brand line and the README follow the same spelling. - The hero diagram drops its "your host" band and the wire into it, keeping the two stages that carry the idea: upstream repositories resolving into one static binary and its subcommands. The viewBox shrinks to match, which also brings the hero down to a screenful. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sq2ApUGzvSnkriqwhqWRBw
1 parent 2f87799 commit 33e0be7

6 files changed

Lines changed: 23 additions & 40 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# PIG Documentation
22

3-
This repository contains the bilingual website for **PIG***PostgreSQL
3+
This repository contains the bilingual website for **PIG***Postgres
44
Install Guide*, the PostgreSQL extension package manager by
55
[Pigsty](https://pigsty.io). It is built with
66
[Hugo](https://gohugo.io/) and the [OINK](https://github.com/pgsty/oink)

data/footer/en.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# OINK 胖页脚(data/footer/<lang>.yaml):品牌块 + 四列链接。
22
# 站内链接写相对路径(主题会过 relLangURL),站外链接标 external: true。
33
brand:
4-
tagline: '**P**ostgreSQL **I**nstall **G**uide'
4+
tagline: '**P**ostgres **I**nstall **G**uide'
55
slogan: One command. Extensions installed.
66
columns:
77
- title: Get PIG

data/footer/zh.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# OINK 胖页脚(data/footer/<lang>.yaml):品牌块 + 四列链接。
22
# 站内链接写相对路径(主题会过 relLangURL),站外链接标 external: true。
33
brand:
4-
tagline: '**P**ostgreSQL **I**nstall **G**uide'
4+
tagline: '**P**ostgres **I**nstall **G**uide'
55
slogan: 一行命令,装好扩展
66
columns:
77
- title: 获取 PIG

layouts/_partials/pig/hero-diagram.html

Lines changed: 3 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
{{- /* Hero 架构图:把 pig 的工作原理画成三段流水线 ——
2-
上游仓库 → 一个静态二进制 → 本机上被管起来的东西。
1+
{{- /* Hero 架构图:上游仓库 → 一个静态二进制及其子命令。
32
颜色全部走 landing-v3.css 的主题变量(.pa-* 类),
43
所以深浅主题各自成立;动效受 prefers-reduced-motion 约束。 */ -}}
54
{{- $zh := eq .Site.Language.Lang "zh" -}}
65
{{- $ext := .Site.Params.pgext_count -}}
76
<figure class="hero-figure" aria-labelledby="hero-arch-title" aria-describedby="hero-arch-desc">
8-
<svg class="pig-arch" viewBox="0 0 560 512" role="img" xmlns="http://www.w3.org/2000/svg">
7+
<svg class="pig-arch" viewBox="0 0 560 326" role="img" xmlns="http://www.w3.org/2000/svg">
98
<title id="hero-arch-title">{{ if $zh }}pig 工作原理示意图{{ else }}How pig works{{ end }}</title>
10-
<desc id="hero-arch-desc">{{ if $zh }}pig 从 Pigsty Infra、PGDG 与操作系统基础仓库解析软件包,通过 repo、ext、pg、pt、pb、pitr 等子命令,在本机配置仓库、安装 PostgreSQL 14-18 与 {{ $ext }} 个扩展,并接管 Patroni 高可用与 pgBackRest 备份恢复。{{ else }}pig resolves packages from Pigsty Infra, PGDG, and the OS base repositories, then uses its repo, ext, pg, pt, pb, and pitr subcommands to configure repositories on the host, install PostgreSQL 14-18 with {{ $ext }} extensions, and drive Patroni high availability and pgBackRest backup and recovery.{{ end }}</desc>
9+
<desc id="hero-arch-desc">{{ if $zh }}pig 从 Pigsty Infra、PGDG 与操作系统基础仓库解析软件包,再由一个静态二进制的 repo、ext、pg、pt、pb、pitr 等子命令,配置仓库、安装 PostgreSQL 14-18 与 {{ $ext }} 个扩展,并接管 Patroni 高可用与 pgBackRest 备份恢复。{{ else }}pig resolves packages from Pigsty Infra, PGDG, and the OS base repositories, then drives them from one static binary whose repo, ext, pg, pt, pb, and pitr subcommands configure repositories, install PostgreSQL 14-18 with {{ $ext }} extensions, and run Patroni high availability and pgBackRest backup and recovery.{{ end }}</desc>
1110

1211
<defs>
1312
<linearGradient id="pa-core-sheen" x1="0" y1="0" x2="1" y2="1">
@@ -105,34 +104,5 @@
105104
</g>
106105
</g>
107106

108-
{{/* 内核 → 主机 */}}
109-
<g class="pa-wires">
110-
<path class="pa-trace pa-trace--head" d="M280 316 V 372" marker-end="url(#pa-arrow)"/>
111-
<path class="pa-flow pa-flow--c" d="M280 316 V 368"/>
112-
<circle class="pa-node" cx="280" cy="316" r="3"/>
113-
<text class="pa-edge-label" x="292" y="344">apt · dnf · systemd</text>
114-
</g>
115-
116-
{{/* -------------------------------------------------------------- 主机 */}}
117-
<g class="pa-band">
118-
<text class="pa-band-label" x="16" y="366">{{ if $zh }}你的主机{{ else }}YOUR HOST{{ end }}</text>
119-
<line class="pa-rule" x1="16" y1="376" x2="544" y2="376"/>
120-
121-
<rect class="pa-plate" x="16" y="388" width="258" height="52" rx="9"/>
122-
<text class="pa-plate-title" x="34" y="410">{{ if $zh }}仓库定义{{ else }}Repositories{{ end }}</text>
123-
<text class="pa-plate-sub" x="34" y="428">/etc/apt · /etc/yum.repos.d</text>
124-
125-
<rect class="pa-plate" x="286" y="388" width="258" height="52" rx="9"/>
126-
<text class="pa-plate-title" x="304" y="410">PostgreSQL 14 – 18</text>
127-
<text class="pa-plate-sub" x="304" y="428">{{ if $zh }}内核 + {{ $ext }} 个扩展包{{ else }}kernels + {{ $ext }} extension packages{{ end }}</text>
128-
129-
<rect class="pa-plate" x="16" y="448" width="258" height="52" rx="9"/>
130-
<text class="pa-plate-title" x="34" y="470">Patroni</text>
131-
<text class="pa-plate-sub" x="34" y="488">{{ if $zh }}高可用集群与切换{{ else }}HA cluster &amp; switchover{{ end }}</text>
132-
133-
<rect class="pa-plate" x="286" y="448" width="258" height="52" rx="9"/>
134-
<text class="pa-plate-title" x="304" y="470">pgBackRest → PITR</text>
135-
<text class="pa-plate-sub" x="304" y="488">{{ if $zh }}备份、校验与时间点恢复{{ else }}backup, verify, recover{{ end }}</text>
136-
</g>
137107
</svg>
138108
</figure>

layouts/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
<span class="eyebrow-en">{{ if $zh }}PostgreSQL 扩展包管理器{{ else }}THE POSTGRESQL EXTENSION PACKAGE MANAGER{{ end }}</span>
2222
</p>
2323

24-
<h1 class="hero-title pig-hero-title anim" style="--d:1" aria-label="PIG — PostgreSQL Install Guide">
25-
<span class="hero-title-line"><b class="ini ini-p">P</b>ostgreSQL</span>
24+
<h1 class="hero-title pig-hero-title pig-hero-title--oneline anim" style="--d:1" aria-label="PIG — Postgres Install Guide">
25+
<span class="hero-title-line"><b class="ini ini-p">P</b>ostgres</span>
2626
<span class="hero-title-line"><b class="ini ini-i">I</b>nstall</span>
2727
<span class="hero-title-line"><b class="ini ini-g">G</b>uide</span>
2828
</h1>

static/css/landing-v3.css

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,14 +373,27 @@ main { display: block; }
373373
}
374374
@media (min-width: 981px) {
375375
.hero-grid--split {
376-
grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
376+
grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
377377
}
378-
.hero-grid--split .hero-title { font-size: clamp(2.15rem, 3.6vw, 3.35rem); }
378+
/* 双栏区间标题排一行,字号跟着左栏宽度走:左栏 ≈ (容器 − 间距) × 0.535,
379+
「Postgres Install Guide」约 12em,所以 4.05vw 正好,两端各钳一次。 */
380+
.hero-grid--split .hero-title { font-size: clamp(2.45rem, 4.2vw, 3.5rem); }
379381
}
380382

381383
.hero-copy {
382384
width: min(100%, 1120px);
383385
}
386+
/* 标题排成一行:.pig-hero-title 是 flex 容器,默认允许换行。 */
387+
.pig-hero-title--oneline { flex-wrap: nowrap; }
388+
389+
/* 单栏区间(<981px)也要排一行,所以字号得跟着视口宽度走:可用宽约
390+
100vw 减去 .landing-container 的左右边距,「Postgres Install Guide」
391+
在 Chakra Petch Bold 下约 11.6em。前缀是为了压过 pig-v3.css 里同名的
392+
窄屏 clamp —— 那个文件在 landing-v3.css 之后加载。 */
393+
@media (max-width: 980px) {
394+
.landing-page .pig-hero-title--oneline { font-size: clamp(1.72rem, 7.4vw, 3.6rem); }
395+
}
396+
384397
.hero-grid--split .hero-copy { width: 100%; }
385398
.hero-grid--split .hero-tagline { margin-bottom: 20px; }
386399

0 commit comments

Comments
 (0)