This is an automated email from the ASF dual-hosted git repository.

imbajin pushed a commit to branch feat/oink-community-content
in repository https://gitbox.apache.org/repos/asf/hugegraph-doc.git

commit 4ddb7c6df60fa9b81734f3b9b8fbdd0204b6075d
Author: dark <[email protected]>
AuthorDate: Fri Sep 4 19:04:30 2026 +0800

    feat(community): render ASF project members
    
    - add bilingual Project members between participation and maturity\n- share 
one nested roster across HTML, print, and Markdown\n- provide no-JavaScript 
initials and accessible profile links\n- scope the responsive member grid to 5, 
3, and 2 columns
---
 assets/scss/community-members.scss                 | 62 ++++++++++++++++++++++
 data/landing/community/cn.yaml                     |  4 ++
 data/landing/community/en.yaml                     |  4 ++
 layouts/_partials/community/members.html           | 37 +++++++++++++
 layouts/_partials/community/members.md             | 19 +++++++
 layouts/_partials/landing/section.html             | 45 ++++++++++++++++
 .../landing/sections/community-members.html        |  1 +
 layouts/landing.md                                 | 18 +++++++
 8 files changed, 190 insertions(+)

diff --git a/assets/scss/community-members.scss 
b/assets/scss/community-members.scss
new file mode 100644
index 000000000..f5cfa240c
--- /dev/null
+++ b/assets/scss/community-members.scss
@@ -0,0 +1,62 @@
+.hg-community-members {
+  --hg-community-columns: 5;
+  &__role + &__role { margin-top: 2.5rem; }
+  &__grid {
+    display: grid;
+    grid-template-columns: repeat(var(--hg-community-columns), minmax(0, 1fr));
+    gap: 1rem;
+    padding: 0;
+    margin: 1rem 0 0;
+    list-style: none;
+  }
+}
+.hg-community-member {
+  min-width: 0;
+  padding: 0;
+  &__link {
+    display: flex;
+    min-height: 100%;
+    flex-direction: column;
+    align-items: center;
+    gap: .65rem;
+    padding: 1rem .75rem;
+    color: inherit;
+    text-align: center;
+    text-decoration: none;
+    border: 1px solid var(--td-border-color);
+    border-radius: var(--td-card-border-radius, .75rem);
+    background: var(--td-card-bg, var(--bs-body-bg));
+    &:hover, &:focus-visible {
+      color: var(--td-link-color, var(--bs-link-color));
+      border-color: currentColor;
+    }
+  }
+  &__avatar {
+    position: relative;
+    display: grid;
+    width: 8rem;
+    height: 8rem;
+    overflow: hidden;
+    place-items: center;
+    border-radius: 50%;
+    background: var(--td-secondary-bg, var(--bs-secondary-bg));
+    img, .hg-community-member__initials { position: absolute; inset: 0; width: 
100%; height: 100%; }
+    img { object-fit: cover; }
+  }
+  &__initials {
+    display: grid;
+    place-items: center;
+    font-size: 1.65rem;
+    font-weight: 700;
+    color: var(--td-body-color, var(--bs-body-color));
+  }
+  &__identity { max-width: 100%; overflow-wrap: anywhere; font-weight: 650; }
+  &__role-label { font-size: .8rem; color: var(--td-secondary-color, 
var(--bs-secondary-color)); }
+}
+@media (max-width: 1199.98px) {
+  .hg-community-members { --hg-community-columns: 3; }
+}
+@media (max-width: 767.98px) {
+  .hg-community-members { --hg-community-columns: 2; }
+  .hg-community-member__avatar { width: 6rem; height: 6rem; }
+}
diff --git a/data/landing/community/cn.yaml b/data/landing/community/cn.yaml
index 9bf9f66f4..39f89749f 100644
--- a/data/landing/community/cn.yaml
+++ b/data/landing/community/cn.yaml
@@ -34,6 +34,10 @@ sections:
             - [安全策略](/cn/docs/guides/security/) — 了解项目的安全问题报告流程。
             - [贡献指南](/cn/docs/contribution-guidelines/) — 了解如何贡献代码和文档。
 
+  - type: community-members
+    data:
+      id: project-members
+
   - type: markdown
     data:
       title: 了解项目运作方式
diff --git a/data/landing/community/en.yaml b/data/landing/community/en.yaml
index 9f54604f7..f5ef8ba2e 100644
--- a/data/landing/community/en.yaml
+++ b/data/landing/community/en.yaml
@@ -34,6 +34,10 @@ sections:
             - [Security policy](/docs/guides/security/) — follow the project's 
security reporting process.
             - [Contribution guidelines](/docs/contribution-guidelines/) — 
learn how to contribute code and documentation.
 
+  - type: community-members
+    data:
+      id: project-members
+
   - type: cta
     data:
       title: Learn how the project works
diff --git a/layouts/_partials/community/members.html 
b/layouts/_partials/community/members.html
new file mode 100644
index 000000000..36921f309
--- /dev/null
+++ b/layouts/_partials/community/members.html
@@ -0,0 +1,37 @@
+{{- $page := .page -}}
+{{- $data := hugo.Data.community.roster -}}
+{{- $labels := dict
+  "en" (dict "title" "Project members" "lead" "Current Apache HugeGraph PMC 
members and Committers, sourced from public ASF records." "chair" "Chair" "pmc" 
"PMC" "committers" "Committers")
+  "cn" (dict "title" "项目成员" "lead" "Apache HugeGraph 当前的 PMC 成员与 
Committers,数据来自 ASF 公开记录。" "chair" "主席" "pmc" "PMC" "committers" "Committers")
+-}}
+{{- $copy := index $labels $page.Language.Lang | default (index $labels "en") 
-}}
+{{- $style := resources.Get "scss/community-members.scss" | toCSS | minify | 
fingerprint -}}
+<link rel="stylesheet" href="{{ $style.RelPermalink }}" integrity="{{ 
$style.Data.Integrity }}">
+<section id="project-members" class="td-landing-section hg-community-members" 
aria-labelledby="project-members-title">
+  <div class="td-site-container">
+    <div class="td-landing-section__header">
+      <h2 id="project-members-title">{{ $copy.title }}</h2>
+      <p>{{ $copy.lead }}</p>
+    </div>
+    {{- range $role := slice "pmc" "committers" }}
+      {{- $members := index $data.roles $role }}
+      <section class="hg-community-members__role" data-community-role="{{ 
$role }}" aria-labelledby="project-members-{{ $role }}">
+        <h3 id="project-members-{{ $role }}">{{ index $copy $role }}</h3>
+        <ul class="td-landing-contributor-grid hg-community-members__grid" 
role="list">
+          {{- range $members }}
+          <li class="td-landing-contributor hg-community-member">
+            <a class="hg-community-member__link" href="{{ .profile_url }}" 
aria-label="{{ .name }} ({{ .asf_id }})">
+              <span class="td-landing-contributor__avatar 
hg-community-member__avatar" aria-hidden="true">
+                <span class="hg-community-member__initials">{{ .initials 
}}</span>
+                {{- with .avatar }}<img src="{{ . }}" alt="" width="128" 
height="128" loading="lazy" decoding="async">{{ end }}
+              </span>
+              <span class="hg-community-member__identity">{{ with .github 
}}@{{ .login }}{{ else }}{{ .asf_id }}{{ end }}</span>
+              {{- if .chair }}<span class="hg-community-member__role-label">{{ 
$copy.chair }}</span>{{ end }}
+            </a>
+          </li>
+          {{- end }}
+        </ul>
+      </section>
+    {{- end }}
+  </div>
+</section>
diff --git a/layouts/_partials/community/members.md 
b/layouts/_partials/community/members.md
new file mode 100644
index 000000000..47eb164b8
--- /dev/null
+++ b/layouts/_partials/community/members.md
@@ -0,0 +1,19 @@
+{{- $page := .page -}}
+{{- $data := hugo.Data.community.roster -}}
+{{- $labels := dict
+  "en" (dict "title" "Project members" "lead" "Current Apache HugeGraph PMC 
members and Committers, sourced from public ASF records." "chair" "Chair")
+  "cn" (dict "title" "项目成员" "lead" "Apache HugeGraph 当前的 PMC 成员与 
Committers,数据来自 ASF 公开记录。" "chair" "主席")
+-}}
+{{- $copy := index $labels $page.Language.Lang | default (index $labels "en") 
-}}
+## {{ $copy.title }}
+
+{{ $copy.lead }}
+
+{{ range $role := slice "pmc" "committers" -}}
+### {{ if eq $role "pmc" }}PMC{{ else }}Committers{{ end }}
+
+{{ range (index $data.roles $role) -}}
+- [{{ with .github }}@{{ .login }}{{ else }}{{ .asf_id }}{{ end }}]({{ 
.profile_url }}){{ if .chair }} — {{ $copy.chair }}{{ end }}
+{{ end }}
+
+{{ end -}}
diff --git a/layouts/_partials/landing/section.html 
b/layouts/_partials/landing/section.html
new file mode 100644
index 000000000..254c48ed4
--- /dev/null
+++ b/layouts/_partials/landing/section.html
@@ -0,0 +1,45 @@
+{{- $page := .page -}}
+{{- $home := .home -}}
+{{- $resolved := partial "landing/entry.html" (dict "home" $home "entry" 
.entry) -}}
+{{- $rawType := $resolved.rawType -}}
+{{- $type := $resolved.type -}}
+{{- $key := $resolved.key -}}
+{{- $entryMap := $resolved.entry -}}
+{{- $data := $resolved.data -}}
+{{- $enabled := $resolved.enabled -}}
+{{- $registry := dict
+  "hero" "landing/sections/hero.html"
+  "metrics" "landing/sections/metrics.html"
+  "capabilities" "landing/sections/capabilities.html"
+  "principles" "landing/sections/principles.html"
+  "cards" "landing/sections/cards.html"
+  "logo-wall" "landing/sections/logo-wall.html"
+  "gallery" "landing/sections/gallery.html"
+  "testimonials" "landing/sections/testimonials.html"
+  "contributors" "landing/sections/contributors.html"
+  "community-members" "landing/sections/community-members.html"
+  "faq" "landing/sections/faq.html"
+  "markdown" "landing/sections/markdown.html"
+  "cta" "landing/sections/cta.html"
+  "pricing" "landing/sections/pricing.html"
+  "pricing-compare" "landing/sections/pricing-compare.html"
+  "command-box" "landing/sections/command-box.html"
+  "steps" "landing/sections/steps.html"
+  "timeline" "landing/sections/timeline.html"
+  "code-plate" "landing/sections/code-plate.html"
+  "preview" "landing/sections/preview.html"
+  "case-study" "landing/sections/case-study.html"
+  "download" "landing/sections/download.html"
+  "bar-chart" "landing/sections/bar-chart.html"
+-}}
+{{- $template := index $registry $type | default "" -}}
+{{- with index $entryMap "partial" }}{{ $template = printf "%v" . }}{{ end -}}
+{{- if and $enabled $data $template -}}
+  {{- $id := $key | default $type -}}
+  {{- with index $entryMap "id" }}{{ $id = printf "%v" . }}{{ end -}}
+  {{- with index $data "id" }}{{ $id = printf "%v" . }}{{ end -}}
+  {{- $id = $id | anchorize -}}
+  {{- partial $template (dict "page" $page "home" $home "data" $data "entry" 
$entryMap "type" $type "id" $id "index" $.index) -}}
+{{- else if and $enabled (not $template) -}}
+  {{- warnf "OINK landing page: unknown section type %q" $rawType -}}
+{{- end -}}
diff --git a/layouts/_partials/landing/sections/community-members.html 
b/layouts/_partials/landing/sections/community-members.html
new file mode 100644
index 000000000..2e1abd08b
--- /dev/null
+++ b/layouts/_partials/landing/sections/community-members.html
@@ -0,0 +1 @@
+{{- partial "community/members.html" (dict "page" .page) -}}
diff --git a/layouts/landing.md b/layouts/landing.md
new file mode 100644
index 000000000..9e37861d6
--- /dev/null
+++ b/layouts/landing.md
@@ -0,0 +1,18 @@
+{{- .Store.Set "tdOutputFormat" "markdown" -}}
+{{- partial "page-meta-lastmod.html" . }}
+{{- $landing := partial "landing/data.html" . -}}
+{{- $text := partial "landing/text.html" (dict "page" . "data" $landing) | 
strings.TrimSpace -}}
+{{- if and (eq .Section "community") (eq (.Params.landing | default "") 
"community") -}}
+  {{- $parts := split $text "\n\n" -}}
+  {{- $ctaHeading := cond (eq .Language.Lang "cn") "## 了解项目运作方式" "## Learn how 
the project works" -}}
+  {{- $roster := partial "community/members.md" (dict "page" .) | 
strings.TrimSpace -}}
+  {{- $before := slice -}}{{- $after := slice -}}{{- $found := false -}}
+  {{- range $parts -}}
+    {{- if and (not $found) (strings.HasPrefix . $ctaHeading) }}{{ $found = 
true }}{{ end -}}
+    {{- if $found }}{{ $after = $after | append . }}{{ else }}{{ $before = 
$before | append . }}{{ end -}}
+  {{- end -}}
+  {{- $text = delimit (slice (delimit $before "\n\n") $roster (delimit $after 
"\n\n")) "\n\n" -}}
+{{- end -}}
+{{- with $text }}
+{{ . | safeHTML }}
+{{- end }}

Reply via email to