mirror of
https://github.com/ForkAwesome/Fork-Awesome.git
synced 2024-12-26 21:41:31 +08:00
Stop Kickstarter video if modal is dismissed
This commit is contained in:
parent
8e157646bc
commit
c06ec8507f
@ -1,5 +1,4 @@
|
||||
<div class="modal fade" id="modal-kickstarter" tabindex="-1" role="dialog" aria-labelledby="modal-kickstarter-label"
|
||||
xmlns="http://www.w3.org/1999/html">
|
||||
<div class="modal" id="modal-kickstarter" tabindex="-1" role="dialog" aria-labelledby="modal-kickstarter-label">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
@ -9,7 +8,9 @@
|
||||
<div class="modal-body">
|
||||
|
||||
<style>.embed-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; } .embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }</style>
|
||||
<div class='embed-container'><iframe src='https://www.kickstarter.com/projects/232193852/font-awesome-5/widget/video.html' frameborder='0' allowfullscreen></iframe></div>
|
||||
<div class='embed-container'>
|
||||
<iframe id="kickstarter-iframe" src="https://www.kickstarter.com/projects/232193852/font-awesome-5/widget/video.html" frameborder="0" scrolling="no" allowfullscreen></iframe>
|
||||
</div>
|
||||
|
||||
<a class="btn btn-kickstarter btn-lg btn-block margin-top" href="http://five.fontawesome.io/?utm_source=font_awesome_homepage&utm_medium=display&utm_content=kickstarter_modal&utm_campaign=promo_4.7_update"
|
||||
onClick="_gaq.push(['_trackEvent', 'Outbound Modal Link', 'Check out the Kickstarter']);">
|
||||
|
@ -55,8 +55,14 @@ $(function () {
|
||||
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
$('[data-toggle="popover"]').popover();
|
||||
|
||||
if (storageAvailable('localStorage') && !localStorage.seenKickstarterModal) {
|
||||
$('#modal-kickstarter').modal('toggle');
|
||||
$('#modal-kickstarter')
|
||||
.modal('toggle')
|
||||
.on('hidden.bs.modal', function (e) {
|
||||
$('#kickstarter-iframe').remove();
|
||||
});
|
||||
;
|
||||
}
|
||||
|
||||
if (storageAvailable('localStorage')) {
|
||||
|
Loading…
Reference in New Issue
Block a user