2022-01-10 14:17:52 -08:00
|
|
|
import classNames from 'classnames';
|
2020-10-01 16:57:11 -07:00
|
|
|
import React from 'react';
|
|
|
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
2022-01-10 14:25:06 -08:00
|
|
|
|
2020-10-01 16:57:11 -07:00
|
|
|
import { defaultSettings } from 'soapbox/actions/settings';
|
2022-02-24 09:28:52 -08:00
|
|
|
import { themeColorsToCSS } from 'soapbox/utils/theme';
|
2020-10-01 16:57:11 -07:00
|
|
|
|
|
|
|
export default function SitePreview({ soapbox }) {
|
|
|
|
|
|
|
|
const settings = defaultSettings.mergeDeep(soapbox.get('defaultSettings'));
|
|
|
|
|
2022-03-21 11:09:01 -07:00
|
|
|
const bodyClass = classNames('site-preview', `theme-mode-${settings.get('themeMode')}`, {
|
2020-10-01 16:57:11 -07:00
|
|
|
'no-reduce-motion': !settings.get('reduceMotion'),
|
2021-07-28 07:03:14 -07:00
|
|
|
'underline-links': settings.get('underlineLinks'),
|
2020-10-01 16:57:11 -07:00
|
|
|
'dyslexic': settings.get('dyslexicFont'),
|
|
|
|
'demetricator': settings.get('demetricator'),
|
|
|
|
});
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className={bodyClass}>
|
2022-02-24 09:28:52 -08:00
|
|
|
<style>{`.site-preview {${themeColorsToCSS(soapbox.get('brandColor'), soapbox.get('accentColor'))}}`}</style>
|
2020-10-01 16:57:11 -07:00
|
|
|
<div className='app-holder'>
|
|
|
|
<div>
|
|
|
|
<div className='ui'>
|
|
|
|
<nav className='tabs-bar'>
|
|
|
|
<div className='tabs-bar__container'>
|
|
|
|
<div className='tabs-bar__split tabs-bar__split--left'>
|
|
|
|
<a className='tabs-bar__link--logo' href='#'>
|
|
|
|
<img alt='Logo' src={soapbox.get('logo')} />
|
|
|
|
<span>Home</span>
|
|
|
|
</a>
|
|
|
|
<a className='tabs-bar__link' href='#'>
|
|
|
|
<i role='img' alt='home' className='fa fa-home' />
|
|
|
|
<span>Home</span>
|
|
|
|
</a>
|
|
|
|
<a className='tabs-bar__link' href='#'>
|
|
|
|
<i role='img' alt='bell' className='fa fa-bell' />
|
|
|
|
<span>Notifications</span>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
<div className='page'>
|
|
|
|
<span className='spoiler-button__overlay__label'>Site Preview</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
SitePreview.propTypes = {
|
|
|
|
soapbox: ImmutablePropTypes.map.isRequired,
|
|
|
|
};
|