chore(components): Removed footer component
This commit is contained in:
parent
8cd9ab3386
commit
cc0d2b17b6
5 changed files with 5 additions and 88 deletions
|
@ -34,8 +34,8 @@ const createConfig = (component, module) => {
|
||||||
|
|
||||||
const config = []
|
const config = []
|
||||||
// When developing, you can use this to only rebuild the components you're working on
|
// When developing, you can use this to only rebuild the components you're working on
|
||||||
let dev = true
|
let dev = false
|
||||||
let only = ['Workbench']
|
let only = ['Draft', 'Workbench']
|
||||||
for (let component of components) {
|
for (let component of components) {
|
||||||
if (!dev || only.indexOf(component) !== -1) config.push(createConfig(component, false))
|
if (!dev || only.indexOf(component) !== -1) config.push(createConfig(component, false))
|
||||||
// Webpack doesn't handle .mjs very well
|
// Webpack doesn't handle .mjs very well
|
||||||
|
|
|
@ -44,6 +44,9 @@ const Snippets = (props) => {
|
||||||
d="M -1.7,-1 L -1.7,1 M 1.7,-1 L 1.7,1"
|
d="M -1.7,-1 L -1.7,1 M 1.7,-1 L 1.7,1"
|
||||||
/>
|
/>
|
||||||
</g>,
|
</g>,
|
||||||
|
<g id="eyelet" className="snippet eyelet" key="eyelet">
|
||||||
|
<circle cy="0" cx="0" r="2.5" {...stroke} />
|
||||||
|
</g>,
|
||||||
<g id="logo" className="snippet logo" transform="translate(-23 -36)" key="logo">
|
<g id="logo" className="snippet logo" transform="translate(-23 -36)" key="logo">
|
||||||
<path d={logoPathString} {...fill} />
|
<path d={logoPathString} {...fill} />
|
||||||
</g>
|
</g>
|
||||||
|
|
|
@ -1,83 +0,0 @@
|
||||||
import React from 'react'
|
|
||||||
import Logo from '../Logo'
|
|
||||||
import { FormattedMessage, FormattedHTMLMessage } from 'react-intl'
|
|
||||||
import IconButton from '@material-ui/core/IconButton'
|
|
||||||
import Icon from '../Icon'
|
|
||||||
import { version } from '../../package.json'
|
|
||||||
|
|
||||||
const Footer = ({ links = false, home = '/', patrons = null, language = 'en' }) => {
|
|
||||||
const icons = {
|
|
||||||
gitter: 'https://gitter.im/freesewing/chat',
|
|
||||||
twitter: 'https://twitter.com/freesewing_org',
|
|
||||||
github: 'https://github.com/freesewing',
|
|
||||||
instagram: 'https://instagram.com/freesewing_org'
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!links)
|
|
||||||
links = {
|
|
||||||
left: {
|
|
||||||
blog: 'https://' + language + '.freesewing.org/blog',
|
|
||||||
aboutFreesewing: 'https://' + language + '.freesewing.org/docs/about',
|
|
||||||
faq: 'https://' + language + '.freesewing.org/faq'
|
|
||||||
},
|
|
||||||
right: {
|
|
||||||
becomeAPatron: 'https://' + language + '.freesewing.org/patrons/join',
|
|
||||||
makerDocs: 'https://' + language + '.freesewing.org/docs/',
|
|
||||||
devDocs: 'https://' + language + '.freesewing.dev/'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const styles = {
|
|
||||||
container: {
|
|
||||||
display: 'flex',
|
|
||||||
flexDirection: 'row',
|
|
||||||
flexWrap: 'wrap',
|
|
||||||
justifyContent: 'center'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return <p>This is a footer</p>
|
|
||||||
|
|
||||||
return (
|
|
||||||
<footer>
|
|
||||||
<a href={home} data-test="logo">
|
|
||||||
<Logo size={101} />
|
|
||||||
</a>
|
|
||||||
<p data-test="social">
|
|
||||||
{Object.keys(icons).map((i) => (
|
|
||||||
<IconButton href={icons[i]} className={i} title={i} key={i}>
|
|
||||||
<Icon icon={i} />
|
|
||||||
</IconButton>
|
|
||||||
))}
|
|
||||||
</p>
|
|
||||||
<p data-test="text">
|
|
||||||
<FormattedHTMLMessage id="app.txt-footer" />:
|
|
||||||
</p>
|
|
||||||
{patrons}
|
|
||||||
<div style={styles.container}>
|
|
||||||
{Object.keys(links).map((l) => {
|
|
||||||
let items = []
|
|
||||||
for (let i of Object.keys(links[l])) {
|
|
||||||
items.push(
|
|
||||||
<li key={i} style={{ textAlign: 'center' }}>
|
|
||||||
<a href={links[l][i]} data-test={i}>
|
|
||||||
<FormattedMessage id={'app.' + i} />
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
return (
|
|
||||||
<div key={l}>
|
|
||||||
<ul style={{ margin: '0 1rem' }}>{items}</ul>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
})}
|
|
||||||
</div>
|
|
||||||
<p className="version">
|
|
||||||
<a href={'https://github.com/freesewing/freesewing/releases/tag/v' + version}>v{version}</a>
|
|
||||||
</p>
|
|
||||||
</footer>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Footer
|
|
|
@ -13,7 +13,6 @@ import DraftPattern from './DraftPattern'
|
||||||
import Json from './Json'
|
import Json from './Json'
|
||||||
import SamplePattern from './SamplePattern'
|
import SamplePattern from './SamplePattern'
|
||||||
import Welcome from './Welcome'
|
import Welcome from './Welcome'
|
||||||
import Footer from '../Footer'
|
|
||||||
import Measurements from './Measurements'
|
import Measurements from './Measurements'
|
||||||
|
|
||||||
const Workbench = ({
|
const Workbench = ({
|
||||||
|
@ -230,7 +229,6 @@ const Workbench = ({
|
||||||
>
|
>
|
||||||
{display !== 'welcome' ? <Navbar navs={navs} home={() => saveDisplay('welcome')} /> : null}
|
{display !== 'welcome' ? <Navbar navs={navs} home={() => saveDisplay('welcome')} /> : null}
|
||||||
{main}
|
{main}
|
||||||
{display !== 'welcome' ? <Footer language={language} /> : null}
|
|
||||||
</div>
|
</div>
|
||||||
</MuiThemeProvider>
|
</MuiThemeProvider>
|
||||||
)
|
)
|
||||||
|
|
|
@ -4,7 +4,6 @@ export default [
|
||||||
'DraftConfigurator',
|
'DraftConfigurator',
|
||||||
'Emblem',
|
'Emblem',
|
||||||
'Example',
|
'Example',
|
||||||
'Footer',
|
|
||||||
'Icon',
|
'Icon',
|
||||||
'Legend',
|
'Legend',
|
||||||
'LineDrawing',
|
'LineDrawing',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue