搜索

7.2. 自定义 Developer Hub 实例的品牌

download PDF

您可以通过配置品牌部分来自定义 Developer Hub 实例 的品牌,如下例所示:

app:
  branding:
    fullLogo: ${BASE64_EMBEDDED_FULL_LOGO}
    iconLogo: ${BASE64_EMBEDDED_ICON_LOGO}
    theme:
      light:
        primaryColor: ${PRIMARY_LIGHT_COLOR}
        headerColor1: ${HEADER_LIGHT_COLOR_1}
        headerColor2: ${HEADER_LIGHT_COLOR_2}
        navigationIndicatorColor: ${NAV_INDICATOR_LIGHT_COLOR}
      dark:
        primaryColor: ${PRIMARY_DARK_COLOR}
        headerColor1: ${HEADER_DARK_COLOR_1}
        headerColor2: ${HEADER_DARK_COLOR_2}
        navigationIndicatorColor: ${NAV_INDICATOR_DARK_COLOR}
# ...

在前面的配置中,

  • fullLogo 是展开(pinned)侧边栏上的徽标,并需要一个 base64 编码镜像。
  • iconLogo 是折叠(unpinned)侧边栏上的徽标,并需要一个 base64 编码镜像。
  • primaryColor 是链接的颜色,以及输入颜色的大部分按钮。primaryColor 支持的格式包括:

    • #nnn
    • #nnnnnn
    • rgb()
    • rgba()
    • hsl()
    • hsla()
    • color()
  • headerColor1 (横幅旁边)和 headerColor2 (横幅的右边)会更改每个页面标题横幅的颜色,以及模板卡的横幅。headerColor1headerColor2 支持的格式包括:

    • #nnn
    • #nnnnnn
    • rgb()
    • rgba()
    • hsl()
    • hsla()
    • color()
  • navigationIndicatorColor 在侧边栏中更改指示您要所处的标签页的颜色。navigationIndicatorColor 支持的格式包括:

    • #nnn
    • #nnnnnn
    • rgb()
    • rgba()
    • hsl()
    • hsla()
    • color()

7.2.1. 自定义边栏徽标宽度

您可以通过为 fullLogoSize 字段设置值来自定义边栏徽标的宽度,如下例所示:

app:
  branding:
    fullLogoWidth: 110px
# ...

徽标宽度的默认值为 110px。支持以下单位: integer, px,em,rem, percentage。

Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.