@ecl/site-footer

中文文档
5.4.1发布于 2026/11/10EUPL-1.2近 30 天下载 3722

ECL 站点页脚

中文使用文档
文档目录3 节
  1. 欧共体页脚参数
  2. 欧盟页脚参数
  3. 示例

ECL 站点页脚组件

npm 软件包 : @ecl/site-footer

npm install --save @ecl/site-footer
  • "共同拥有者" (可选) (对象)(默认:()): 脚上方的横幅
    • "标题"(字符串)(默认为:""): 共有所有权
    • "链接"(对象阵列): 链接列表,使用ECL链接结构
  • " 第 xx节" (对象)(默认: ): 页脚的特定部分,全部使用相同的结构 可用的部分:"section site info","section core","section contact","section about","section more","section 相干","section feedback"和"section common"
    • "标题" (可选) (字符串或对象): 区域标题; 可以使用ECL Link 结构成为简单的字符串或链接
    • "论" (可选) (对象): 标记图像
      • "图片"(对象):用于标识的图像,使用ECL图片结构
      • "路径"(字符串): 标识链接的 URL
    • "描述" (可选) (字符串): 免费文本
    • "动作-按钮" (可选) (对象): 隐藏链接, 显示为按钮
    • "链接" (可选) (对象阵列): 链接列表,使用ECL链接结构
    • "链接-内线" (可选) (布尔) (默认: 假): 链接应显示内在吗 ?
    • "社交 媒体" (可选) (对象): 社交媒体链接列表,使用ECL社交媒体 遵循架构
    • "外部链接" (可选) (对象阵列) : 额外链接,在社交媒体后端,使用ECL Link架构
  • “ 海关” (阵列)(默认:[ ]): 沿前方结构增加的定制部分
  • "超级" (字符串)(默认为:")页脚的额外类(空格分隔)
  • “外部属性” (可选) (阵列) (默认: []) 页脚的额外属性
    • 名称 (字符串) 属性名称, 如“ 数据测试 ”
    • 值 (字符串) 属性值, 如 : “ data- test-1 ”
  • "共同拥有者" (可选) (对象)(默认:()): 脚上方的横幅
    • "标题"(字符串)(默认为:""): 共有所有权
    • "链接"(对象阵列): 链接列表,使用ECL链接结构
  • "数" (对象阵列)(默认:[])
    • “ 第 类 名称” (可选) (字符串)(默认:")
    • "论"
      • "标题":(字符串)(默认:"): logo标题属性.
      • 标志链接的"alt" (字符串) alt属性
      • "路径" (字符串) 标志链接路径
      • "语言" (字符串) 语言代码
      • "src mobile"(字符串) 路径移动标志
      • "src desktop" (字符串) 桌面标识路径
    • "标题" (可选) (字符串) OR(属性中有链接组件的对象)
    • 标题( w) (可选) (布尔)(默认:虚假)
    • "描述" (可选) (字符串)(默认:")
    • "内容 在" (可选) (字符串)(默认:")
    • "链接" (可选) (对象阵列)(默认:[]),
      • "链接" (链接对象)
      • 链接前的可选文本
      • 链接后的可选文本
    • "链接-内线" (可选) (boolean) (默认: 假) 列表的可选内线样式
    • 链接 分隔符 (可选) (boolean) (默认: 假) 内置链接的可选分隔符
  • "超级" (可选) (字符串)(默认为:") 外类(空格分隔)
  • “外部属性” (可选) (阵列) (默认: []) 额外属性
    • 名称 (字符串) 属性名称, 如“ 数据测试 ”
    • 值 (字符串) 属性值, 如 : “ data- test-1 ”

示例

{% include '@ecl/site-footer/site-footer.html.twig' with {
  section_site_info: {
    title: {
      link: {
        label: 'Site name',
        path: '#',
      },
      icon: {
        name: 'arrow-right',
        family: 'phosphor',
        size: 'xs',
        style: 'inverted',
      },
    },
    description:
      'This site is managed by:<br />[name of the manager of the site]',
    social_media: {
      links: [
        {
          link: {
            label: 'Instagram',
            path: '#',
            hide_label: true,
            icon_position: 'before',
            inverted: true,
          },
          icon: {
            name: 'instagram',
            family: 'networks',
            style: 'inverted',
          },
        },
        {
          link: {
            label: 'X',
            path: '#',
            hide_label: true,
            icon_position: 'before',
            inverted: true,
          },
          icon: {
            name: 'x',
            family: 'networks',
            style: 'inverted',
          },
        },
      ],
    },
  },
  section_contact: {
    title: 'Contact us',
    links: [
      {
        link: {
          label: 'Contact information of the DG',
          path: '#',
        },
      },
    ],
  },
  section_about: {
    title: 'About us',
    links: [
      {
        link: {
          label: 'Information about the DG',
          path: '#',
        },
      },
      {
        link: {
          label: 'Information about the DG',
          path: '#',
        },
      },
    ],
  },
  section_more: {
    title: 'More information on',
    links: [
      {
        link: {
          label: 'Class name 1',
          path: '#',
        },
      },
      {
        link: {
          label: 'Class name 2',
          path: '#',
        },
      },
    ],
  },
  section_related: {
    title: 'Related links',
    links: [
      {
        link: {
          label: 'Related link 1',
          path: '#',
        },
      },
      {
        link: {
          label: 'Related link 2',
          path: '#',
        },
      },
    ],
  },
  section_common: {
    logo: {
      picture: {
        img: {
          src: 'path_to_logo.svg',
          alt: 'European Commission',
        },
      },
      path: '#',
    },
    social_media: {
      description: 'Follow the European Commission',
      description_inline: true,
      links: [
        {
          link: {
            label: 'Telegram',
            path: '#',
            hide_label: true,
            icon_position: 'before',
            inverted: true,
          },
          icon: {
            name: 'telegram',
            family: 'networks',
            style: 'inverted',
          },
        },
        {
          link: {
            label: 'X',
            path: '#',
            hide_label: true,
            icon_position: 'before',
            inverted: true,
          },
          icon: {
            name: 'x',
            family: 'networks',
            style: 'inverted',
          },
        },
      ],
    },
    links_inline: true,
    links: [
      {
        link: {
          label: 'Report an IT vulnerability',
          path: '#',
        },
      },
      {
        link: {
          label: 'Languages on our websites',
          path: '#',
        },
      },
    ],
  },
%} 

版本与发布记录

@ecl/site-footer 共发布 45 个版本,首次发布于 2025/01/22;过去 12 个月发布了 24 个版本。

版本发布日期距今
5.4.1latest2026/11/103 天前
5.4.02026/10/2222 天前
5.3.22026/10/081 个月前
5.3.12026/09/211 个月前
5.3.02026/09/151 个月前
5.2.22026/09/082 个月前

关于 @ecl/site-footer 的常见问题

@ecl/site-footer 是什么?

ECL 站点页脚

如何安装 @ecl/site-footer?

在项目目录运行 npm install @ecl/site-footer,或使用 pnpm add / yarn add / bun add。

@ecl/site-footer 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/ecl__site-footer 是否存在。

@ecl/site-footer 可以商用吗?

@ecl/site-footer 使用 EUPL-1.2 许可。声明的许可为 EUPL-1.2,请阅读许可原文确认使用条件。以上为概括,不构成法律意见,请以许可原文为准。

@ecl/site-footer 的下载量有多少?

根据 npm 官方下载统计,@ecl/site-footer 在 2026/10/13 – 2026/11/11 这 30 天内被下载 3,722 次,日均约 124 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@ecl/site-footer 还在维护吗?

最新版本 5.4.1 发布于 2026/11/10(3 天前);至今共发布 45 个版本,其中过去 12 个月发布了 24 个;首次发布于 2025/01/22。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。