Change error graphic to hover-to-play (#10055)

Fix #6060
このコミットが含まれているのは:
Eugen Rochko 2019-02-15 23:33:25 +01:00
コミット caf1450292
4個のファイルの変更26行の追加8行の削除

13
app/javascript/packs/error.js ノーマルファイル
ファイルの表示

@ -0,0 +1,13 @@
import ready from '../mastodon/ready';
ready(() => {
const image = document.querySelector('img');
image.addEventListener('mouseenter', () => {
image.src = '/oops.gif';
});
image.addEventListener('mouseleave', () => {
image.src = '/oops.png';
});
});

ファイルの表示

@ -100,12 +100,14 @@ body {
vertical-align: middle;
margin: 20px;
img {
display: block;
max-width: 470px;
width: 100%;
height: auto;
margin-top: -120px;
&__illustration {
img {
display: block;
max-width: 470px;
width: 100%;
height: auto;
margin-top: -120px;
}
}
h1 {

ファイルの表示

@ -7,8 +7,11 @@
%meta{ content: 'width=device-width,initial-scale=1', name: 'viewport' }/
= stylesheet_pack_tag 'common', media: 'all'
= stylesheet_pack_tag Setting.default_settings['theme'], media: 'all'
= javascript_pack_tag 'common', integrity: true, crossorigin: 'anonymous'
= javascript_pack_tag 'error', integrity: true, crossorigin: 'anonymous'
%body.error
.dialog
%img{ alt: Setting.default_settings['site_title'], src: '/oops.gif' }/
%div
.dialog__illustration
%img{ alt: Setting.default_settings['site_title'], src: '/oops.png' }/
.dialog__message
%h1= yield :content

バイナリ
public/oops.png ノーマルファイル

バイナリファイルは表示されません。

変更後

幅:  |  高さ:  |  サイズ: 20 KiB