logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: 2c1ed5f8720dfdba9cf7582d097f4702e19eeeb6
parent: 7d376e41be626eec6e8ccafaab452381c7acd8d6
Author: Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
Date:   Tue,  2 Jan 2018 13:07:56 +0900

Show mastodon on modal (#6129)


Diffstat:

Mapp/controllers/authorize_follows_controller.rb5+++++
Mapp/controllers/remote_follow_controller.rb4++++
Mapp/controllers/shares_controller.rb2+-
Rapp/javascript/images/mastodon-drawer.png -> app/javascript/images/mastodon-ui.png0
Aapp/javascript/images/wave-compose-standalone.png0
Aapp/javascript/images/wave-modal.png0
Mapp/javascript/styles/application.scss1+
Mapp/javascript/styles/mastodon/components.scss2+-
Aapp/javascript/styles/mastodon/modal.scss20++++++++++++++++++++
Mapp/views/layouts/modal.html.haml2++
10 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/app/controllers/authorize_follows_controller.rb b/app/controllers/authorize_follows_controller.rb @@ -4,6 +4,7 @@ class AuthorizeFollowsController < ApplicationController layout 'modal' before_action :authenticate_user! + before_action :set_body_classes def show @account = located_account || render(:error) @@ -58,4 +59,8 @@ class AuthorizeFollowsController < ApplicationController def acct_params params.fetch(:acct, '') end + + def set_body_classes + @body_classes = 'modal-layout' + end end diff --git a/app/controllers/remote_follow_controller.rb b/app/controllers/remote_follow_controller.rb @@ -38,4 +38,8 @@ class RemoteFollowController < ApplicationController def suspended_account? @account.suspended? end + + def set_body_classes + @body_classes = 'modal-layout' + end end diff --git a/app/controllers/shares_controller.rb b/app/controllers/shares_controller.rb @@ -25,6 +25,6 @@ class SharesController < ApplicationController end def set_body_classes - @body_classes = 'compose-standalone' + @body_classes = 'modal-layout compose-standalone' end end diff --git a/app/javascript/images/mastodon-drawer.png b/app/javascript/images/mastodon-ui.png Binary files differ. diff --git a/app/javascript/images/wave-compose-standalone.png b/app/javascript/images/wave-compose-standalone.png Binary files differ. diff --git a/app/javascript/images/wave-modal.png b/app/javascript/images/wave-modal.png Binary files differ. diff --git a/app/javascript/styles/application.scss b/app/javascript/styles/application.scss @@ -6,6 +6,7 @@ @import 'mastodon/reset'; @import 'mastodon/basics'; +@import 'mastodon/modal'; @import 'mastodon/containers'; @import 'mastodon/lists'; @import 'mastodon/footer'; diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss @@ -1773,7 +1773,7 @@ } > .mastodon { - background: url('../images/mastodon-drawer.png') no-repeat left bottom / contain; + background: url('../images/mastodon-ui.png') no-repeat left bottom / contain; flex: 1; } } diff --git a/app/javascript/styles/mastodon/modal.scss b/app/javascript/styles/mastodon/modal.scss @@ -0,0 +1,20 @@ +.modal-layout { + background: $ui-base-color url('../images/wave-modal.png') repeat-x bottom fixed; + display: flex; + flex-direction: column; + height: 100vh; + padding: 0; +} + +.modal-layout__mastodon { + display: flex; + flex: 1; + flex-direction: column; + justify-content: flex-end; + + > * { + flex: 1; + max-height: 235px; + background: url('../images/mastodon-ui.png') no-repeat left bottom / contain; + } +} diff --git a/app/views/layouts/modal.html.haml b/app/views/layouts/modal.html.haml @@ -12,5 +12,7 @@ = fa_icon 'sign-out' .container= yield + .modal-layout__mastodon + %div = render template: 'layouts/application'