社区活动
故事书: https://jubilant-umbrella-dd461ca9. pages.github.io 互联网档案馆的存檔,存档日期2013-12-22
说明
- 这是一个包含事件UI组件的软件包 .
- 社区活动提炼器提供了制作这些元素
EventTeaser, (中文(简体) ),EventTopicCardItem,以及EventPromo - 社区活动提炼器还提供两个用益功能的导出:
liveEventToEventTeaserProps,以及initTeaserTracking
说明
- 这个
initTeaserTracking正在使用函数所传递的 oTracking 的引用 。 该软件包经过测试并与来自4.0.0改为4.4.0。 。 。 .
安装
npm install @financial-times/community-event-teaser
使用量
-
如何使用
<EventTeaser/>import { h, render } from '@financial-times/x-engine'; import { EventTeaser } from "@financial-times/community-event-teaser"; const container = document.querySelector('.some-container-element'); render(( <EventTeaser imgUrl={"https://ftweekend.live.ft.com/some-cool-image-png"} title={"FTWeekend Festival"} standfirst={"Some short description of the event"} eventUrl={"https://ftweekend.live.ft.com"} lazyLoadImage={"some__lazy-loading-classname"} location={"Kenwood House Gardens & Online"} scheduledStartTime={new Date("2021-09-04T12:00:00.000Z")} showImage={true} showBrand={true} showStandfirst={true} />), container) -
如何使用
EventTopicCardItemimport { h, render } from '@financial-times/x-engine'; import { EventTopicCardItem } from "@financial-times/community-event-teaser"; const container = document.querySelector('.some-container-element'); render(( <EventTopicCardItem title={"FTWeekend Festival"} eventUrl={"https://ftweekend.live.ft.com"} location={"Kenwood House Gardens & Online"} scheduledStartTime={new Date("2021-09-04T12:00:00.000Z")} />), container)
发展
创造本地环境
- 简单地复制这个 repo, cd 进入目录并运行:
npm install