[TASK] Display only featured items in the quadrant view
This commit is contained in:
@@ -28,6 +28,7 @@ Each file has a [front-matter](https://github.com/jxson/front-matter) header
|
|||||||
where the attributes of the item are listed:
|
where the attributes of the item are listed:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
title: "React"
|
title: "React"
|
||||||
ring: adopt
|
ring: adopt
|
||||||
@@ -46,8 +47,7 @@ Following front-matter attributes are possible:
|
|||||||
* **info**: (optional) A short textual description of the item (visible in
|
* **info**: (optional) A short textual description of the item (visible in
|
||||||
overview pages)
|
overview pages)
|
||||||
* **featured**: (optional, default "true") If you set this to `false`, the item
|
* **featured**: (optional, default "true") If you set this to `false`, the item
|
||||||
will not be visibile on the homepage anymore but still available in the radar
|
will not be visible in the radar quadrants but still be available in the overview.
|
||||||
overview.
|
|
||||||
|
|
||||||
The name of the .md file acts as item identifier and may overwrite items with
|
The name of the .md file acts as item identifier and may overwrite items with
|
||||||
the same name from older releases.
|
the same name from older releases.
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ import Fadeable from './Fadeable';
|
|||||||
import SetTitle from './SetTitle';
|
import SetTitle from './SetTitle';
|
||||||
|
|
||||||
import { translate } from '../../common/config';
|
import { translate } from '../../common/config';
|
||||||
import { groupByQuadrants } from '../../common/model';
|
import {featuredOnly, groupByQuadrants} from '../../common/model';
|
||||||
|
|
||||||
export default function PageQuadrant({ leaving, onLeave, pageName, items, ...props }) {
|
export default function PageQuadrant({ leaving, onLeave, pageName, items, ...props }) {
|
||||||
const groups = groupByQuadrants(items);
|
const groups = groupByQuadrants(featuredOnly(items));
|
||||||
return (
|
return (
|
||||||
<Fadeable leaving={leaving} onLeave={onLeave}>
|
<Fadeable leaving={leaving} onLeave={onLeave}>
|
||||||
<SetTitle {...props} title={translate(pageName)} />
|
<SetTitle {...props} title={translate(pageName)} />
|
||||||
|
|||||||
Reference in New Issue
Block a user