Skip to content

Commit

Permalink
📝 👌 implement feedback
Browse files Browse the repository at this point in the history
* Rewritten some components
* Replaced `users` page with `music`, artists showcase
  • Loading branch information
resir014 committed Mar 27, 2018
1 parent 41acbf4 commit 302310c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 70 deletions.
66 changes: 3 additions & 63 deletions website/pages/en/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const React = require('react')

const CompLibrary = require('../../core/CompLibrary.js')
const MarkdownBlock = CompLibrary.MarkdownBlock /* Used to read markdown */
// const MarkdownBlock = CompLibrary.MarkdownBlock /* Used to read markdown */
const Container = CompLibrary.Container
const GridBlock = CompLibrary.GridBlock

Expand Down Expand Up @@ -98,35 +98,6 @@ const Block = props => (
</Container>
)

const Features = props => (
<Block background='highlight' layout='twoColumn'>
{[
{
content: 'Handpicked from various genres.',
image: imgUrl('docusaurus.svg'),
imageAlign: 'top',
title: '50+ Songs'
},
{
content: 'Compete with other players online.',
image: imgUrl('docusaurus.svg'),
imageAlign: 'top',
title: 'Online Rankings'
}
]}
</Block>
)

const FeatureCallout = props => (
<div
className='productShowcaseSection highlightBackground paddingBottom'
style={{ textAlign: 'center' }}
>
<h2>Web-based</h2>
<MarkdownBlock>{'Play instantly from your browser.<br>No extra plugins required.'}</MarkdownBlock>
</div>
)

const FooterButtons = props => (
<div
className='productShowcaseSection highlightBackground'
Expand All @@ -141,7 +112,7 @@ const FooterButtons = props => (
)

const FeatureTour = props => (
<React.Fragment>
<div>
<Block background='light'>
{[
{
Expand Down Expand Up @@ -182,39 +153,9 @@ const FeatureTour = props => (
}
]}
</Block>
</React.Fragment>
</div>
)

const ArtistShowcase = props => {
if ((siteConfig.users || []).length === 0) {
return null
}
const showcase = siteConfig.users
.filter(artist => {
return artist.pinned
})
.map((artist, i) => {
return (
<a href={artist.url} key={i}>
{artist.name}
</a>
)
})

return (
<div className='productShowcaseSection paddingBottom'>
<h2>{'Featured Artists'}</h2>
<p>We'd like to thank the following artists for letting us use their songs in the game.</p>
<div className='logos'>{showcase}</div>
<div className='more-users'>
<a className='button' href={pageUrl('music.html', props.language)}>
More Artists
</a>
</div>
</div>
)
}

class Index extends React.Component {
render () {
let language = this.props.language || ''
Expand All @@ -224,7 +165,6 @@ class Index extends React.Component {
<HomeSplash language={language} />
<div className='mainContainer'>
<FeatureTour />
<ArtistShowcase />
<FooterButtons />
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions website/pages/en/music.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ const siteConfig = require(process.cwd() + '/siteConfig.js')

class Music extends React.Component {
render () {
if ((siteConfig.users || []).length === 0) {
if ((siteConfig.artists || []).length === 0) {
return null
}
const showcase = siteConfig.users.map((artist, i) => {
const showcase = siteConfig.artists.map((artist, i) => {
return (
<a href={artist.url} key={i}>
{artist.name}
Expand Down
14 changes: 9 additions & 5 deletions website/siteConfig.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
'use strict'

/* List of projects/orgs using your project for the users page */
/* List of artists used for the /music.html page */
/* TODO: Fetch from the artists.json file dynamically */
const artists = [
{
name: '5argon vs encX',
url: 'https://soundcloud.com/5argon'
url: 'https://soundcloud.com/5argon',
pinned: true
},
{
name: '5argon',
url: 'https://soundcloud.com/5argon'
url: 'https://soundcloud.com/5argon',
pinned: true
},
{
name: 'a_hisa',
url: 'http://hisaweb.6.ql.bz/'
url: 'http://hisaweb.6.ql.bz/',
pinned: true
}
]

Expand All @@ -30,7 +34,7 @@ const siteConfig = {
{ doc: 'users-gameplay', label: 'Docs' },
{ page: 'contribute', label: 'Contribute' }
],
users: artists,
artists,
/* path to images for header/footer */
headerIcon: 'img/docusaurus.svg',
footerIcon: 'img/docusaurus.svg',
Expand Down
4 changes: 4 additions & 0 deletions website/static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ table tr th {
background: rgba(0, 0, 0, 0.1);
}

.showcaseSection .prose h1 {
font-family: $baseFont;
}

/**
* 1. Create a background-opacity effect.
*/
Expand Down

0 comments on commit 302310c

Please sign in to comment.