如何将函数式 bootstrap JS 转换为 Accelerated Mobile Project (AMP)

How to convert functional bootstrap JS into Accelerated Mobile Project (AMP)

最近,我正在将所有外部 Javascript 转换为放大器模式。我使用 amp-iframe 访问 javascript 网站并使用 amp-form 提交我的表单。图片标签更改为 amp-img 标签。但是当涉及到我的移动响应中的导航栏折叠汉堡按钮或 jquery 动画在用户单击其中一个菜单 link 时向下滑动时,两者都不起作用。因为我已经删除了我网站中的所有外部 Javascript。这种情况下只允许使用 amp javascript。

  1. 如何使汉堡导航栏折叠按钮再次起作用?

  2. 如何在用户单击菜单时执行动画向下滑动link?

  3. 任何 AMP 标签或技巧都可以做到这一点吗?

AMP 文档:https://www.ampproject.org/docs/get_started/create

@Lovntola 提到的 side-bar 只是 AMP HTML 支持的 the many components 之一。但是,不要指望 bootstrap 中的每个功能在 AMP HTML.

中都有类似的功能

Accelerated Mobile Pages are just like any other HTML page, but with a limited set of allowed technical functionality that is defined and governed by the open source AMP spec. Just like all web pages, Accelerated Mobile Pages will load in any modern browser or app webview.

如果您没有查看的功能不在组件列表中,它可能还不受支持。您可能想要 contribute to AMP HTML.