diff options
author | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2017-01-11 15:56:16 +0000 |
---|---|---|
committer | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2017-01-11 15:56:16 +0000 |
commit | a9cf230d96f024f18ab720178bb7f63bdadd6649 (patch) | |
tree | 29cbf2c379e84f057dad98ed654e299e50c9a157 | |
parent | 4a463039ea9760efcdb7fa3ddb2b9723c704a53a (diff) | |
parent | f68a715366e3ecbdd479e363576842e1a9dfc559 (diff) | |
download | gitlab-ce-a9cf230d96f024f18ab720178bb7f63bdadd6649.tar.gz |
Merge branch '25776-alerts-should-be-responsive' into 'master'
Resolve "Alerts should be responsive"
Closes #25776
See merge request !8424
-rw-r--r-- | app/assets/stylesheets/framework/layout.scss | 15 | ||||
-rw-r--r-- | app/views/shared/_no_password.html.haml | 4 | ||||
-rw-r--r-- | app/views/shared/_no_ssh.html.haml | 4 | ||||
-rw-r--r-- | changelogs/unreleased/25776-alerts-should-be-responsive.yml | 4 |
4 files changed, 23 insertions, 4 deletions
diff --git a/app/assets/stylesheets/framework/layout.scss b/app/assets/stylesheets/framework/layout.scss index 5365b62e456..29d55c44699 100644 --- a/app/assets/stylesheets/framework/layout.scss +++ b/app/assets/stylesheets/framework/layout.scss @@ -41,6 +41,21 @@ body { } } + .alert-link-group { + float: right; + } + + /* Center alert text and alert action links on smaller screens */ + @media (max-width: $screen-sm-max) { + .alert { + text-align: center; + } + + .alert-link-group { + float: none; + } + } + /* Stripe the background colors so that adjacent alert-warnings are distinct from one another */ .alert-warning { transition: background-color 0.15s, border-color 0.15s; diff --git a/app/views/shared/_no_password.html.haml b/app/views/shared/_no_password.html.haml index a43bf33751a..ed6fc76c61e 100644 --- a/app/views/shared/_no_password.html.haml +++ b/app/views/shared/_no_password.html.haml @@ -1,8 +1,8 @@ - if cookies[:hide_no_password_message].blank? && !current_user.hide_no_password && current_user.require_password? - .no-password-message.alert.alert-warning.hidden-xs + .no-password-message.alert.alert-warning You won't be able to pull or push project code via #{gitlab_config.protocol.upcase} until you #{link_to 'set a password', edit_profile_password_path} on your account - .pull-right + .alert-link-group = link_to "Don't show again", profile_path(user: {hide_no_password: true}), method: :put | = link_to 'Remind later', '#', class: 'hide-no-password-message' diff --git a/app/views/shared/_no_ssh.html.haml b/app/views/shared/_no_ssh.html.haml index bb5fff2d3bb..d663fa13d10 100644 --- a/app/views/shared/_no_ssh.html.haml +++ b/app/views/shared/_no_ssh.html.haml @@ -1,8 +1,8 @@ - if cookies[:hide_no_ssh_message].blank? && !current_user.hide_no_ssh_key && current_user.require_ssh_key? - .no-ssh-key-message.alert.alert-warning.hidden-xs + .no-ssh-key-message.alert.alert-warning You won't be able to pull or push project code via SSH until you #{link_to 'add an SSH key', profile_keys_path, class: 'alert-link'} to your profile - .pull-right + .alert-link-group = link_to "Don't show again", profile_path(user: {hide_no_ssh_key: true}), method: :put, class: 'alert-link' | = link_to 'Remind later', '#', class: 'hide-no-ssh-message alert-link' diff --git a/changelogs/unreleased/25776-alerts-should-be-responsive.yml b/changelogs/unreleased/25776-alerts-should-be-responsive.yml new file mode 100644 index 00000000000..15006523d3e --- /dev/null +++ b/changelogs/unreleased/25776-alerts-should-be-responsive.yml @@ -0,0 +1,4 @@ +--- +title: Changed alerts to be responsive, centered text on smaller viewports +merge_request: 8424 +author: Connor Smallman |