/
githubmirror
/
amphtml
Обзор
Документация
Войти
/
githubmirror
/
amphtml
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
examples/timeago.amp.html
55 строк
1 KB
Caroline Liu
Apply bulk transform to html tags (#34836)
15 июн 2021, 21:07
Не верифицирован
15 июн 2021, 21:07
3ace35c
Код
Авторство
О чём код?
<!doctype html> <html amp4email data-css-strict lang="en"> <head> <meta charset="utf-8"> <script async src="https://cdn.ampproject.org/v0.js"></script> <script async custom-element="amp-timeago" src="https://cdn.ampproject.org/v0/amp-timeago-0.1.js"></script> <style amp4email-boilerplate>body{visibility:hidden}</style> <style amp-custom> body { padding: 10px; } span { display: flex; font-family: sans-serif; font-size: 12pt; } </style> </head> <body> <h1>Bad</h1> <span> Something happened <amp-timeago layout="fixed" width="160" height="20" datetime="2017-04-11T00:37:33.809Z" locale="en" > Saturday 11 April 2017 00.37 </amp-timeago> </span> <h1>Better</h1> <span> Something happened <amp-timeago layout="fixed" width="160" height="20" datetime="2017-04-11T00:37:33.809Z" locale="en" role="text" > Saturday 11 April 2017 00.37 </amp-timeago> </span> <h1>Another</h1> <span> Something happened <span><time datetime="2017-04-11T00:37:33.809Z">3 years ago</time></span> </span> </body> </html>