mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-16 15:16:38 +00:00
Prototype out glitchy elephant friend. #294.
Glitched elephant friends kindly provided by @ncls7615.
This commit is contained in:
parent
65986b6f0b
commit
835eec8a4c
|
@ -2,6 +2,7 @@
|
|||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import classNames from 'classnames';
|
||||
|
||||
// Actions.
|
||||
import { openModal } from 'flavours/glitch/actions/modal';
|
||||
|
@ -68,6 +69,12 @@ class Drawer extends React.Component {
|
|||
submitted,
|
||||
} = this.props;
|
||||
|
||||
let choices = ['mbstobon-bg-1', 'mbstobon-bg-2', 'mbstobon-bg-3'];
|
||||
let glitchyFriendDecision = choices[Math.floor(Math.random() * choices.length)];
|
||||
let drawerAttrs = {
|
||||
className: classNames('contents', glitchyFriendDecision)
|
||||
};
|
||||
|
||||
// The result.
|
||||
return (
|
||||
<div className='drawer'>
|
||||
|
@ -87,7 +94,7 @@ class Drawer extends React.Component {
|
|||
submitted={submitted}
|
||||
value={searchValue}
|
||||
/>
|
||||
<div className='contents'>
|
||||
<div {...drawerAttrs}>
|
||||
<DrawerAccount account={account} />
|
||||
<Composer />
|
||||
<DrawerResults
|
||||
|
|
BIN
app/javascript/flavours/glitch/images/mbstobon-ui-1.png
Normal file
BIN
app/javascript/flavours/glitch/images/mbstobon-ui-1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 39 KiB |
BIN
app/javascript/flavours/glitch/images/mbstobon-ui-2.png
Normal file
BIN
app/javascript/flavours/glitch/images/mbstobon-ui-2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 43 KiB |
BIN
app/javascript/flavours/glitch/images/mbstobon-ui-3.png
Normal file
BIN
app/javascript/flavours/glitch/images/mbstobon-ui-3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 39 KiB |
|
@ -49,6 +49,12 @@
|
|||
overflow-y: auto;
|
||||
contain: strict;
|
||||
}
|
||||
|
||||
@for $i from 1 through 3 {
|
||||
.mbstobon-bg-#{$i} {
|
||||
background: url("~flavours/glitch/images/mbstobon-ui-#{$i}.png") no-repeat left bottom / contain;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.drawer--header {
|
||||
|
|
Loading…
Reference in a new issue