This repository has been archived by the owner on Dec 13, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
548 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import React, { Component } from 'react'; | ||
|
||
import './Article.css'; | ||
|
||
class InfoPane extends Component { | ||
render() { | ||
const { children } = this.props; | ||
return ( | ||
<aside className="InfoPane"> | ||
<div className="InfoPane-content-container"> | ||
<div className="InfoPane-content"> | ||
{children} | ||
</div> | ||
</div> | ||
</aside> | ||
); | ||
} | ||
} | ||
|
||
class ContentPane extends Component { | ||
render() { | ||
const { children } = this.props; | ||
return ( | ||
<main className="ContentPane"> | ||
{children} | ||
</main> | ||
); | ||
} | ||
} | ||
|
||
class Article extends Component { | ||
static InfoPane = InfoPane; | ||
static ContentPane = ContentPane; | ||
|
||
render() { | ||
const { children } = this.props; | ||
|
||
return ( | ||
<article className="Article"> | ||
{ children } | ||
</article> | ||
); | ||
} | ||
|
||
} | ||
|
||
export default Article; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
.Article { | ||
flex-grow: 1; | ||
display: flex; | ||
flex-flow: row nowrap; | ||
} | ||
|
||
.Article > .InfoPane { | ||
flex-grow: 0; | ||
flex-basis: 300px; | ||
} | ||
|
||
.Article > .ContentPane { | ||
flex-basis: 800px; | ||
flex-grow: 4; | ||
} | ||
|
||
|
||
.InfoPane > .InfoPane-content-container { | ||
position: sticky; | ||
top: 20px; | ||
} | ||
|
||
.InfoPane .InfoPane-content { | ||
margin: 20px; | ||
padding: 2em 1em; | ||
border: 1px solid lightgrey; | ||
border-radius: 4px; | ||
background: rgba(255, 255, 255, 1); | ||
} | ||
|
||
.InfoPane-content > h1 { | ||
font-size: 1.2em; | ||
} | ||
|
||
.InfoPane ul { | ||
list-style: none; | ||
padding-left: 1em; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from 'react'; | ||
import { castArray } from 'lodash'; | ||
import classnames from 'classnames'; | ||
|
||
import './Breadcrumbs.css'; | ||
|
||
const Breadcrumbs = ({ children = [], root }) => ( | ||
<nav className={classnames('Breadcrumbs', {root})}> | ||
<ul> | ||
{castArray(children).map((child, i) => ( | ||
<li key={child.key ? `breadcrumb_key_${child.key}` : `breadcrumb_nr_${i}`}> | ||
{child} | ||
</li> | ||
))} | ||
</ul> | ||
</nav> | ||
); | ||
|
||
export default Breadcrumbs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
nav.Breadcrumbs { | ||
display: block; | ||
margin-bottom: 1em; | ||
|
||
ul { | ||
display: inline; | ||
list-style: none; | ||
padding: unset; | ||
margin: unset; | ||
|
||
li { | ||
display: inline; | ||
margin-left: 0.2em; | ||
} | ||
} | ||
|
||
&:not(.root) ul li::after { | ||
color: grey; | ||
content: '>'; | ||
margin-left: 0.2em; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
19 changes: 13 additions & 6 deletions
19
src/components/SearchResultListItem.js → ...components/search/SearchResultListItem.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const initialState = {}; | ||
|
||
const entityCache = (state = initialState, action) => { | ||
if (!action.type.startsWith('FETCH_ENTITY_')) return state; | ||
const { id, data } = action.payload; | ||
switch (action.type) { | ||
case 'FETCH_ENTITY_REQUEST': | ||
return { ...state, [id]: { _isFetching: true } }; | ||
case 'FETCH_ENTITY_SUCCESS': | ||
return { ...state, [id]: data }; | ||
default: | ||
return state; | ||
} | ||
}; | ||
|
||
export default entityCache; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.