Communitygithub.com

页面标题系统

设计并实施一套系统的框架,用于在页面级标题中提供上下文、定位和主要操作。

页面标题系统 是什么?

此技能提供了一套完整的方法论,用于设计页面顶部结构区域(区别于全局站点标题)。它确保用户能够立即识别当前位置(寻路)、理解当前视图的状态或元数据,并访问完成任务所需的主要操作,而无需在菜单中摸索。该技能适用于复杂仪表盘、长文文章、设置页面以及SaaS应用程序的标题标准化。它遵循严格的设计规则,如面包屑规则(深度超过2层必须使用)和“唯一H1”规则,并强调可访问性(使用语义HTML)和响应式设计(长标题优雅截断或换行)。通过明确定义寻路、标题与元数据、操作优先级以及空间布局模式,此技能可帮助开发者和设计师构建一致、可用且无障碍的页面标题。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/coastdigitalgroup/coastai-skills/tree/HEAD/website-design/page-header-system

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

页面标题系统 是做什么的?

目的

页面标题系统提供了一种方法论,用于设计单个页面的顶层结构区域(区别于全局站点标题)。它确保用户能够立即识别当前位置(寻路)、理解当前视图的状态或元数据,并访问完成任务所需的主要操作,而无需在菜单中摸索。

用例

  • 设计复杂仪表盘视图的标题(例如,“项目详情”)。
  • 结构化长文文章或文档页面的引言部分。
  • 组织设置或配置文件页面,其中上下文和保存操作至关重要。
  • 在整个SaaS应用程序或大型内容站点中标准化标题模式。
  • 在统一布局中管理面包屑、标题和状态指示器。

何时不使用

  • 全局站点导航: 使用site-navigation-system处理跨站点持久存在的全局标题。
  • 简单的着陆页: 由“英雄”部分(参见hero-section-optimization)充当页面标题。
  • 启动画面/弹窗: 内容临时或最小化;对弹窗标题使用overlay-and-dialog-system。

输入

  1. 页面标题与层级: 页面的主要名称(H1)及其在站点结构中的位置。
  2. 寻路需求: 用户是否需要面包屑或“返回”按钮?
  3. 元数据与状态: 关键详细信息,如“最后更新时间”、“草稿/已发布”或所有者信息。
  4. 操作优先级: 此页面上的主要任务是什么?(例如,编辑、分享、创建)。
  5. 品牌/系统令牌: 间距、排版和颜色令牌。

输出

  1. 标题结构规范: 各区域的定义(寻路、标题、元数据、操作)。
  2. 布局蓝图: 对齐(左对齐 vs. 居中对齐)和间距的规则。
  3. 响应式策略: 标题如何从桌面端适配到移动端。
  4. 交互规范: 粘性标题和操作按钮优先级的行为。

工作流程

1. 定义导航路径(寻路)

确定用户如何到达此页面以及如何返回:

  • 面包屑: 用于深度层级(例如,首页 > 项目 > 设计)。
  • 返回按钮: 用于线性任务或返回特定列表视图。
  • 父级链接: 用于2层深度,使用简单的“<- 返回至[父级]”。

2. 建立内容核心(标题与元数据)

在标题中心应用visual-hierarchy-system:

  • H1标题: 最突出的文本元素。
  • 上下文元数据: 次要信息(例如,标签、时间戳、状态徽章)放置在标题附近。
  • 缩略图/头像: 如果页面代表特定实体(例如,用户资料或产品)。

3. 组织页面级操作

将操作划分为优先级层级:

  • 主要操作: 一个“级别1”按钮(通常为高对比度的实色按钮)。
  • 次要操作: “级别2”按钮(轮廓或幽灵样式),用于不太频繁的任务。
  • 三级操作: 溢出菜单(...),用于罕见的管理任务。

4. 选择空间布局模式

  • 标准左对齐(SaaS/仪表盘): 面包屑/标题在左侧,操作在右侧。最适合提高生产力。
  • 居中对齐(内容/文章): 所有元素居中。最适合可读性和叙事。
  • 分割布局: 标题和操作通过空白区域分隔,以强调清晰度。

5. 定义粘性与滚动行为

  • 固定标题: 如果滚动时需要频繁执行操作(如“保存”),则保持页面标题可见。
  • 折叠标题: 随着用户向下滚动,缩小标题高度或隐藏面包屑,以最大化内容空间。

决策规则

  • 面包屑规则: 如果站点深度超过2层,则页面标题中必须包含面包屑。
  • “一个H1”规则: 页面标题必须包含页面唯一的H1标签。
  • 操作对齐: 在桌面上,将主要操作对齐到右上角。在移动端,如果标题过于拥挤,考虑使用粘性底部栏来放置主要操作。
  • 状态可见性: 关键状态(例如,“付款逾期”)必须通过徽章或图标立即放置在标题旁边。

约束条件

  • 无障碍性: 标题必须使用<h1>。面包屑必须使用带有aria-label="Breadcrumb"的<nav>。
  • 对比度: 状态徽章和操作必须满足WCAG AA对比度要求。操作按钮必须满足WCAG 2.2 SC 2.5.8目标大小(最小24x24px,移动端粘性栏建议44x44px)。
  • 响应式: 标题必须优雅处理长标题(截断 vs. 换行)。

常见失败模式

  • 操作过载: 在标题中放置过多按钮,混淆主要任务。
  • 缺少寻路: 在深层页面上忘记放置面包屑,让用户感到“迷失”。
  • 标题挤压: 在移动端没有为长标题留出足够空间,导致其与操作重叠。
  • 冗余的站点标题: 使页面标题看起来与全局站点标题过于相似,造成视觉混淆。

验证标准

  • 标题包含一个与导航标签匹配的清晰H1。
  • 寻路(面包屑/返回)适用于站点的深度。
  • 主要操作在视觉上区别于次要操作。
  • 布局在移动视口中保持功能性和可读性。
  • 使用语义HTML(面包屑使用<nav>,标题使用<h1>)。
  • 状态指示器(如有)高对比度且易于发现。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for progressive disclosure using accordions, ensuring structural integrity, visual affordances, and accessibility across different content densities and devices.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for long-form content, managing readability, vertical rhythm, and information density to ensure a superior reading experience.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for informational elements that communicate state (Badges) and categorization (Tags) with clarity and accessibility.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for non-overlay notifications, managing global announcements and contextual inline alerts to communicate system states without interrupting the user's flow.

coastdigitalgroup/coastai-skills

Design and implement a systematic, asymmetrical bento-grid layout framework to organize diverse content types cohesively while maintaining strict visual hierarchy, logical focus order, and responsive flexibility.

coastdigitalgroup/coastai-skills

Design a responsive, mobile-first bottom navigation bar and persistent action dock system for mobile websites and web applications, establishing spatial anchors, tab bar anatomy, badge indicators, thumb-zone ergonomics, safe area inset handling, active/inactive state contrast, and desktop responsive adaptation rules.

coastdigitalgroup/coastai-skills

Design a mobile-first bottom sheet overlay system with configurable detents, drag affordances, safe area padding, responsive desktop modal/popover adaptation, and WCAG AA accessibility compliance.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for secondary navigation trails that provide orientation, context, and one-click access to parent levels in deep information architectures.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for buttons and interactive triggers, managing visual hierarchy, variant logic, and action grouping to ensure clear intent and accessible interaction.

coastdigitalgroup/coastai-skills

Design a systematic framework for date and time selection, managing calendar grids, range pickers, and scheduling interfaces to ensure precision and accessibility.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for modular content containers that maintain hierarchy, structural integrity, and action alignment across variable content and responsive viewports.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for horizontal discovery components, managing navigation affordances, scroll behavior, and accessibility to ensure effective content density without compromising usability.

coastdigitalgroup/coastai-skills

Design a systematic, highly accessible, and developer-friendly UI layout framework for code blocks, snippet showcases, multi-file code tabs, line-highlighting, diff views, and syntax token contrast in technical documentation and developer platforms.

coastdigitalgroup/coastai-skills

Design a systematic framework for global command menus (Cmd+K panels) that combines keyboard-driven navigation, command execution, and shortcut discovery into an accessible, responsive overlay.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for threaded conversations, managing nesting depths, action hierarchies, and community signaling to foster engagement and readability.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for side-by-side comparison interfaces, managing high attribute density and responsive complexity to support informed decision-making.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for user privacy, managing consent banners, preference centers, and persistent privacy controls to balance legal compliance with user trust.

coastdigitalgroup/coastai-skills

Design and implement a systematic, highly accessible, and responsive visual layout framework for conversational chat widgets, live chat boxes, and chatbot panels that ensures clear message scannability, native focus flow, and seamless mobile keyboard adaptation.

coastdigitalgroup/coastai-skills

Design a systematic, accessible, and high-conversion framework for custom select dropdowns and comboboxes, defining anatomy, states, search-filtering, and responsive mobile-adaptive patterns.

coastdigitalgroup/coastai-skills

Design and implement a systematic color palette that ensures WCAG 2.2 accessibility compliance. Trigger this skill when asked to define brand colors, create UI themes, or establish a visual system for a website.

相关技能