videoDetail.html 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. {% load staticfiles %}
  2. <!DOCTYPE html>
  3. <html lang="en">
  4. <head>
  5. <meta charset="UTF-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  8. <title>视频详情</title>
  9. <link rel="stylesheet" href="{% static '/lib/font/fontIcon/iconfont.css' %}">
  10. <link rel="stylesheet" href="{% static '/lib/css/reset.css' %}">
  11. <link rel="stylesheet" href="{% static '/lib/layui/css/layui.css' %}">
  12. <link rel="stylesheet" href="{% static '/lib/css/video-js.min.css' %}">
  13. <link rel="stylesheet" href="{% static '/css/common.css' %}">
  14. <link rel="stylesheet" href="{% static '/css/module.css' %}">
  15. <link rel="stylesheet" href="{% static '/css/allDetail.css' %}">
  16. <style>
  17. .advImg {
  18. background: url(../static/imgs/videoAdv.jpg) no-repeat center;
  19. background-size: cover;
  20. }
  21. </style>
  22. </head>
  23. <body>
  24. <div class="header">
  25. <div class="headerTxt">
  26. <div class="wrapper">
  27. <p class="logoNameCn">休闲农业旅游网</p>
  28. <p class="logoNameEn">Leisure agricultural tourism network</p>
  29. </div>
  30. </div>
  31. <!-- 广告 -->
  32. <div class="bjColor advImg"></div>
  33. </div>
  34. <!-- 主体部分 -->
  35. <div class="content">
  36. <div class="wrapper">
  37. <div class="newsDiv">
  38. <!-- 面包屑导航 -->
  39. <div class="breadcrumb">
  40. <span class="layui-breadcrumb">
  41. <a href="home">首页</a>
  42. <a href="video_list?page=1">视频资讯</a>
  43. <a>
  44. <cite>详情</cite>
  45. </a>
  46. </span>
  47. </div>
  48. <!-- 新闻详情 -->
  49. <div class="innerDiv">
  50. <div class="detailPageDiv">
  51. <h1>{{video.title}}</h1>
  52. <div class="time">{{ video.publish_date|date:"Y-m-d"}}</div>
  53. <div class="videoItem">
  54. <video id="my-video" class="video-js" controls width="526" height="329" poster="{{video.video_img}}" data-setup="{}">
  55. <!--preload="auto"-->
  56. <source src="{{video.video_url}}" type="video/mp4">
  57. <source src="{{video.video_url}}" type="video/webm">
  58. <source src="{{video.video_url}}" type="video/ogg">
  59. <p class="vjs-no-js">要查看此视频,请启用JavaScript,并考虑升级到一个web浏览器
  60. <a href="http://videojs.com/html5-video-support/" target="_blank">支持HTML5视频</a>
  61. </p>
  62. </video>
  63. </div>
  64. <div>{{video.intro}}</div>
  65. <div class="sequence">
  66. {% for news in on_art %}
  67. {% if forloop.last %}
  68. <a href="video_detail?id={{news.id}}" class="prevBtn">上一篇:{{news.title}}</a>
  69. {% endif%}
  70. {% endfor %}
  71. {% for news in up_art %}
  72. {% if forloop.first %}
  73. <a href="video_detail?id={{news.id}}" class="nextBtn">下一篇:{{news.title}}</a>
  74. {% endif%}
  75. {% endfor %}
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. <!-- 底部版权 -->
  83. <div class="footer bjColor">
  84. <div class="wrapper">
  85. <div class="floatDiv">
  86. <div class="copyrightTxt">
  87. <div>休闲农业旅游网</div>
  88. <div>联系人:李四  联系电话:13811111111</div>
  89. <div>地址:河南省郑州市XXXXXXXXXXXXXXXXXXXXXXXXXX</div>
  90. </div>
  91. <div class="WeChatCode">
  92. <img src="{% static '/imgs/WeChatCode.jpg' %}" alt="">
  93. <p>关注公众号</p>
  94. </div>
  95. </div>
  96. <div class="copyright">
  97. 版权所有XXXXXXXXXXXXXXXXXXXXXX
  98. </div>
  99. </div>
  100. </div>
  101. <script src="{% static '/lib/js/jquery-2.1.4.min.js'%}"></script>
  102. <script src="{% static '/lib/layui/layui.js'%}"></script>
  103. <script src="{% static '/lib/js/video.min.js'%}"></script>
  104. <script>
  105. //注意:导航 依赖 element 模块,否则无法进行功能性操作
  106. layui.use(['element'], function () {
  107. var element = layui.element;
  108. });
  109. // 视频咨询
  110. var myPlayer = videojs('my-video');
  111. videojs("my-video").ready(function () {
  112. var myPlayer = this;
  113. myPlayer.play();
  114. });
  115. </script>
  116. </body>
  117. </html>