ROS Clock 各版本支持时间倒计时工具 转

举报
zhangrelay 发表于 2022/05/16 00:53:27 2022/05/16
【摘要】 网址:dlu.github.io/ros_clock/index.html "noetic": {"start": "May 23, 2020", "end": "May 23, 2025"}, "humble": {"start": "May 23, 2022", "end": "May 23, 2027"}, 效果如下: ...

网址:dlu.github.io/ros_clock/index.html

"noetic": {"start": "May 23, 2020", "end": "May 23, 2025"},

"humble": {"start": "May 23, 2022", "end": "May 23, 2027"},

效果如下:



  
  1. var timing = {
  2. //"boxturtle": {"start": "March 2, 2010", "end": ""},
  3. //"cturtle": {"start": "August 2, 2010", "end": ""},
  4. // "diamondback": {"start": "March 2, 2011", "end": ""},
  5. //"electric": {"start": "August 30, 2011", "end": ""},
  6. "fuerte": {"start": "April 23, 2012", "end": "Sept 4, 2013"},
  7. "groovy": {"start": "Dec 31, 2012", "end": "July 1, 2014"},
  8. "hydro": {"start": "Sept 4, 2013", "end": "May 1, 2015"},
  9. "indigo": {"start": "July 22, 2014", "end": "April 1, 2019"},
  10. "jade": {"start": "May 23, 2015", "end": "May 1, 2017"},
  11. "kinetic": {"start": "May 23, 2016", "end": "April 1, 2021"},
  12. "lunar": {"start": "May 23, 2017", "end": "May 23, 2019"},
  13. "melodic": {"start": "May 23, 2018", "end": "May 23, 2023"},
  14. "noetic": {"start": "May 23, 2020", "end": "May 23, 2025"},
  15. "ardent": {"start": "Dec 8, 2017", "end": "Dec 1, 2018"},
  16. "bouncy": {"start": "July 2, 2018", "end": "July 1, 2019"},
  17. "crystal": {"start": "Dec 14, 2018", "end": "Dec 1, 2019"},
  18. "dashing": {"start": "May 31, 2019", "end": "May 23, 2021"},
  19. "eloquent": {"start": "November 22, 2019","end": "November 1, 2020"},
  20. "foxy": {"start": "June 5, 2020", "end": "May 23, 2023"},
  21. "galactic": {"start": "May 23, 2021", "end": "November 23, 2022"},
  22. "humble": {"start": "May 23, 2022", "end": "May 23, 2027"},
  23. }

 


  
  1. <html>
  2. <head>
  3. <meta charset="utf-8" />
  4. <title>ROS Clock</title>
  5. <link href="https://fonts.googleapis.com/css?family=Press+Start+2P&display=swap" rel="stylesheet">
  6. <link href="terminal.css" rel="stylesheet">
  7. <script src="info.js"></script>
  8. <script src="countdown.js"></script>
  9. </head>
  10. <body>
  11. <h1>ROS Clock</h1>
  12. <div id="contents"></div>
  13. <script>
  14. function update()
  15. {
  16. updateDict();
  17. var contents = document.getElementById("contents");
  18. contents.innerHTML = '';
  19. for (key in timing)
  20. {
  21. var entry = timing[key];
  22. var row = document.createElement('div');
  23. row.setAttribute('class', "row " + entry["status"]);
  24. contents.appendChild(row);
  25. var head = document.createElement('span');
  26. head.setAttribute('class', 'distro')
  27. head.appendChild(document.createTextNode(key));
  28. row.appendChild(head);
  29. row.appendChild(document.createTextNode(entry["status"]));
  30. if (entry["status"] != "expired")
  31. {
  32. row.appendChild(document.createElement('br'));
  33. var countdown = document.createElement('span');
  34. countdown.setAttribute('class', 'countdown')
  35. countdown.appendChild(document.createTextNode('Time Remaining: '));
  36. countdown.appendChild(document.createTextNode(deltaToString(entry["delta"])));
  37. row.appendChild(countdown);
  38. if (entry["status"] == "future")
  39. {
  40. row.appendChild(document.createElement('br'));
  41. var countdown = document.createElement('span');
  42. countdown.setAttribute('class', 'countdown')
  43. countdown.appendChild(document.createTextNode('Time to Release: '));
  44. countdown.appendChild(document.createTextNode(deltaToString(entry["release"])));
  45. row.appendChild(countdown);
  46. }
  47. }
  48. }
  49. }
  50. setInterval(update, 1000);
  51. update();
  52. </script>
  53. </body>
  54. </html>

 

文章来源: zhangrelay.blog.csdn.net,作者:zhangrelay,版权归原作者所有,如需转载,请联系作者。

原文链接:zhangrelay.blog.csdn.net/article/details/124775846

【版权声明】本文为华为云社区用户转载文章,如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。