Browse Source

adding embedded video to resources page

main
Simon Bowie 5 days ago
parent
commit
53327e9a81
4 changed files with 27 additions and 0 deletions
  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 View File

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 View File

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 View File

</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 View File

</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>

Loading…
Cancel
Save