浏览代码

adding embedded video to resources page

main
Simon Bowie 3 个月前
父节点
当前提交
53327e9a81
共有 4 个文件被更改,包括 27 次插入0 次删除
  1. +1
    -0
      web/app/models.py
  2. +14
    -0
      web/app/static/styles/main.css
  3. +6
    -0
      web/app/templates/book.html
  4. +6
    -0
      web/app/templates/resource.html

+ 1
- 0
web/app/models.py 查看文件

type = db.Column(db.Text) type = db.Column(db.Text)
name = db.Column(db.Text) name = db.Column(db.Text)
description = db.Column(db.Text) description = db.Column(db.Text)
videoUrl = db.Column(db.Text)
# tools # tools
developer = db.Column(db.Text) developer = db.Column(db.Text)
developerUrl = db.Column(db.Text) developerUrl = db.Column(db.Text)

+ 14
- 0
web/app/static/styles/main.css 查看文件

color: #fff; color: #fff;
background-color: #d9534f; background-color: #d9534f;
border-color: #d43f3a; border-color: #d43f3a;
}

#embedded-video {
margin-top: 1rem;
}

div#embedded-video iframe {
position: relative;
top: 0;
bottom: 0;
left: 0;
right: 0;
height: 480px;
width: 100%;
} }

+ 6
- 0
web/app/templates/book.html 查看文件

</div> </div>
{% endif %} {% endif %}
</div> </div>
{% if resource['videoUrl'] %}
<div id="embedded-video" class="lg:col-span-12">
<h3>Accompanying video</h3>
<iframe src="{{ resource['videoUrl']|safe }}" frameborder="0" webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen></iframe>
</div>
{% endif %}
</div> </div>
</div> </div>
</div> </div>

+ 6
- 0
web/app/templates/resource.html 查看文件

</div> </div>
{% endif %} {% endif %}
</div> </div>
{% if resource['videoUrl'] %}
<div id="embedded-video" class="lg:col-span-12">
<h3>Accompanying video</h3>
<iframe src="{{ resource['videoUrl']|safe }}" frameborder="0" webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen></iframe>
</div>
{% endif %}


</div> </div>
</div> </div>

正在加载...
取消
保存