web: refine builder & gallery footer

pull/186/head
Amio 2018-10-25 15:38:22 +08:00
rodzic 86651ff76d
commit cdb8c5a8ba
4 zmienionych plików z 43 dodań i 21 usunięć

Wyświetl plik

@ -6,11 +6,16 @@ export default () => (
<div> <div>
<h3><img src='/static/badgen-logo-w.svg' />Badgen Service</h3> <h3><img src='/static/badgen-logo-w.svg' />Badgen Service</h3>
<div className='sitemap'> <div className='sitemap'>
<Link href='/gallery'><a>Gallery</a></Link> <Link href='https://badgen.net'><a>Classic</a></Link>
<em>/</em>
<Link href='https://flat.badgen.net'><a>Flat</a></Link>
<em>/</em> <em>/</em>
<Link href='https://api.badgen.net'><a>API</a></Link> <Link href='https://api.badgen.net'><a>API</a></Link>
<em>/</em> <em>/</em>
<Link href='/gallery'><a>Gallery</a></Link>
<em>/</em>
<Link href='https://status.badgen.net'><a>Status</a></Link> <Link href='https://status.badgen.net'><a>Status</a></Link>
<br />
</div> </div>
</div> </div>
<div className='bottom'> <div className='bottom'>
@ -29,7 +34,7 @@ export default () => (
</div> </div>
<style jsx>{` <style jsx>{`
footer { footer {
background-color: #333; background-color: #222;
padding: 2rem 2rem; padding: 2rem 2rem;
color: #777; color: #777;
} }
@ -37,11 +42,12 @@ export default () => (
margin: 0 auto; margin: 0 auto;
} }
h3 { h3 {
font: 22px/32px Merriweather, serif; font: 24px/32px Merriweather, serif;
color: #EEE; letter-spacing: 0.5px;
color: #DDD;
} }
h3 img { h3 img {
height: 20px; height: 21px;
opacity: 0.8; opacity: 0.8;
margin-right: 8px; margin-right: 8px;
position: relative; position: relative;
@ -49,6 +55,7 @@ export default () => (
} }
.sitemap { .sitemap {
line-height: 26px; line-height: 26px;
padding-bottom: 2em;
} }
.sitemap a { .sitemap a {
color: #999; color: #999;
@ -60,11 +67,12 @@ export default () => (
text-decoration: underline; text-decoration: underline;
} }
.sitemap em { .sitemap em {
margin: 0 0.5rem; color: #555;
margin: 0 0.6rem;
} }
.bottom { .bottom {
margin-top: 2rem; margin-top: 2rem;
border-top: 1px solid #555; border-top: 1px solid #444;
padding-top: 2rem; padding-top: 2rem;
display: grid; display: grid;
grid-template-columns: 1fr 100px; grid-template-columns: 1fr 100px;
@ -76,14 +84,14 @@ export default () => (
text-align: right; text-align: right;
} }
.links a { .links a {
margin-left: 10px; margin-left: 1em;
opacity: 0.7; opacity: 0.7;
} }
.links a:hover { .links a:hover {
opacity: 1; opacity: 1;
} }
.links img { .links img {
height: 20px; height: 22px;
} }
`}</style> `}</style>
</footer> </footer>

Wyświetl plik

@ -33,7 +33,7 @@ export default class BuilderPage extends React.Component {
const { host, placeholder, badgeURL, focus } = this.state const { host, placeholder, badgeURL, focus } = this.state
return ( return (
<div> <div className='home'>
<Preview host={host} badgeURL={badgeURL} focus={focus} /> <Preview host={host} badgeURL={badgeURL} focus={focus} />
<Bar <Bar
host={host} host={host}
@ -43,11 +43,29 @@ export default class BuilderPage extends React.Component {
onBlur={this.setBlur} onBlur={this.setBlur}
onFocus={this.setFocus} /> onFocus={this.setFocus} />
<Hints focus={focus} badgeURL={badgeURL} /> <Hints focus={focus} badgeURL={badgeURL} />
{ badgeURL && { badgeURL && <Helper host={host} badgeURL={badgeURL} onSelect={this.selectExample} /> }
<Helper host={host} badgeURL={badgeURL} onSelect={this.selectExample} /> } { !badgeURL && <div className='home-footer'>
<a href='/gallery/live'>BADGE GALLERY</a>
</div> }
<style jsx>{` <style jsx>{`
div { .home {
height: 100%; height: 100vh;
position: relative;
}
.home-footer {
width: 100%;
position: absolute;
bottom: 20px;
text-align: center;
}
.home-footer a {
color: #333;
font-size: 14px;
border: 1px solid #FFF;
padding: 5px 8px;
}
.home-footer a:hover {
border-color: #333;
} }
`}</style> `}</style>
</div> </div>

Wyświetl plik

@ -6,7 +6,7 @@ import liveExamples from '../../libs/examples-live.js'
export default class Gallery extends React.Component { export default class Gallery extends React.Component {
render () { render () {
return ( return (
<GalleryLayout tab='static'> <GalleryLayout tab='live'>
<BadgeExamples data={liveExamples} /> <BadgeExamples data={liveExamples} />
</GalleryLayout> </GalleryLayout>
) )

Wyświetl plik

@ -1,7 +1,3 @@
import React from 'react' import Builder from './builder.js'
export default class Index extends React.Component { export default Builder
render () {
return 'hello'
}
}