diff --git a/public_html/css/post.css b/public_html/css/post.css index 3696508c..8ffbf750 100644 --- a/public_html/css/post.css +++ b/public_html/css/post.css @@ -1,24 +1,34 @@ -.post-type-video video { - max-width: 100%; -} - -.post-type-image .image-wrapper { +.post-type-image .object-wrapper { max-width: 100%; position: relative; } -.post-type-image .image-wrapper img { +.post-type-image .object-wrapper img { position: absolute; - top: 0; - left: 0; width: 100%; + height: 100%; } -.post-type-youtube iframe { - width: 800px; - height: 600px; +.post-type-youtube .object-wrapper { + max-width: 800px; + position: relative; +} +.post-type-youtube .object-wrapper .padding-fix { + padding-bottom: 75%; +} +.post-type-youtube .object-wrapper iframe { + position: absolute; + width: 100%; + height: 100%; border: 0; } +.post-type-video .object-wrapper { + max-width: 100%; +} +.post-type-video .object-wrapper video { + width: 100%; +} + #post-current-search-wrapper { text-align: center; } diff --git a/public_html/js/Presenters/PostContentPresenter.js b/public_html/js/Presenters/PostContentPresenter.js index 7cfe1a62..db9f874a 100644 --- a/public_html/js/Presenters/PostContentPresenter.js +++ b/public_html/js/Presenters/PostContentPresenter.js @@ -45,8 +45,8 @@ App.Presenters.PostContentPresenter = function( } function updatePostNotesSize() { - $target.find('.post-notes-target').width($target.find('.image-wrapper').outerWidth()); - $target.find('.post-notes-target').height($target.find('.image-wrapper').outerHeight()); + $target.find('.post-notes-target').width($target.find('.object-wrapper').outerWidth()); + $target.find('.post-notes-target').height($target.find('.object-wrapper').outerHeight()); } function addNewPostNote() { @@ -57,6 +57,7 @@ App.Presenters.PostContentPresenter = function( init: init, render: render, addNewPostNote: addNewPostNote, + updatePostNotesSize: updatePostNotesSize, }; }; diff --git a/public_html/js/Presenters/PostPresenter.js b/public_html/js/Presenters/PostPresenter.js index 42348f65..8c605a23 100644 --- a/public_html/js/Presenters/PostPresenter.js +++ b/public_html/js/Presenters/PostPresenter.js @@ -134,6 +134,18 @@ App.Presenters.PostPresenter = function( editButtonClicked(null); }); + keyboard.keyup('f', function() { + var $wrapper = $el.find('.object-wrapper'); + if ($wrapper.data('full')) { + $wrapper.css({maxWidth: $wrapper.attr('data-width') + 'px', width: 'auto'}); + $wrapper.data('full', false); + } else { + $wrapper.css({maxWidth: null, width: $wrapper.attr('data-width')}); + $wrapper.data('full', true); + } + postContentPresenter.updatePostNotesSize(); + }); + attachSidebarEvents(); attachLinksToPostsAround(); diff --git a/public_html/templates/help.tpl b/public_html/templates/help.tpl index c39fc8c6..e4febaa1 100644 --- a/public_html/templates/help.tpl +++ b/public_html/templates/help.tpl @@ -64,6 +64,11 @@
[F]
[E]