mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 19:52:01 +03:00
09fb17a2be
Closes #4032 - Created "mobile" views: `parent-view`, `content-view` and `index-view` - `mobile/parent-view` has three callbacks for managing layout, and a mediaQuery listener to keep in sync with the user - content-view and index-view use their parent-views callbacks to bring themselves into and out of the viewport as appropriate - fixed media queries for post content list from 800px to 900px - Created `mobile-index-route` to intelligently transition to a new route on desktops (used by both PostsIndexRoute and SettingsIndexRoute) - Extract mobile interactions from settings views to new mobile utility views - `js-` prefixed settings view transitions - removed unused openEditor action from PostsRoute - removed unused mobile util "responsiveAction"
21 lines
834 B
JavaScript
21 lines
834 B
JavaScript
import MobileParentView from 'ghost/views/mobile/parent-view';
|
|
|
|
var SettingsView = MobileParentView.extend({
|
|
// MobileParentView callbacks
|
|
showMenu: function () {
|
|
$('.js-settings-header-inner').css('display', 'none');
|
|
$('.js-settings-menu').css({right: '0', left: '0', 'margin-right': '0'});
|
|
$('.js-settings-content').css({right: '-100%', left: '100%', 'margin-left': '15'});
|
|
},
|
|
showContent: function () {
|
|
$('.js-settings-menu').css({right: '100%', left: '-110%', 'margin-right': '15px'});
|
|
$('.js-settings-content').css({right: '0', left: '0', 'margin-left': '0'});
|
|
$('.js-settings-header-inner').css('display', 'block');
|
|
},
|
|
showAll: function () {
|
|
$('.js-settings-menu, .js-settings-content').removeAttr('style');
|
|
}
|
|
});
|
|
|
|
export default SettingsView;
|