mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-10-16 15:49:20 +08:00
feat(views): Add views and extend functionality
This commit is contained in:
committed by
mrugesh mohapatra
parent
2c633e70da
commit
4dac8c1867
@@ -5,7 +5,7 @@ function Loader() {
|
||||
return (
|
||||
<div className='full-size'>
|
||||
<Helmet>
|
||||
<link href='/css/loader.css' rel='stylesheet' />
|
||||
<link href='/css/loader.css' rel='stylesheet' />
|
||||
</Helmet>
|
||||
<div className='loader full-size'>
|
||||
<div className='ball-scale-ripple-multiple'>
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Row, Col } from 'react-bootstrap';
|
||||
|
||||
function SlimWidthRow({ children, ...restProps }) {
|
||||
return (
|
||||
<Row {...restProps}>
|
||||
<Col md={ 4 } mdOffset={ 4 } sm={ 12 }>
|
||||
{ children }
|
||||
</Col>
|
||||
</Row>
|
||||
);
|
||||
}
|
||||
|
||||
SlimWidthRow.displayName = 'SlimWidthRow';
|
||||
SlimWidthRow.propTypes = {
|
||||
children: PropTypes.any
|
||||
};
|
||||
|
||||
export default SlimWidthRow;
|
||||
@@ -1,5 +1,6 @@
|
||||
export { default as ButtonSpacer } from './ButtonSpacer.jsx';
|
||||
export { default as FullWidthRow } from './FullWidthRow.jsx';
|
||||
export { default as SlimWidthRow } from './SlimWidthRow';
|
||||
export { default as Loader } from './Loader.jsx';
|
||||
export { default as SkeletonSprite } from './SkeletonSprite.jsx';
|
||||
export { default as Spacer } from './Spacer.jsx';
|
||||
|
||||
@@ -11,19 +11,29 @@
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"slugPart": {
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "A kebab-case-string created from the title, will have the shortId appended to it"
|
||||
},
|
||||
"meta": {
|
||||
"type": "object",
|
||||
"default": {},
|
||||
"description": "A place to keep the referral link and read time"
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"author": {
|
||||
"type": "string",
|
||||
"type": "object",
|
||||
"required": true
|
||||
},
|
||||
"subtitle": {
|
||||
"type": "string"
|
||||
},
|
||||
"featureImage": {
|
||||
"type": "string"
|
||||
"type": "object"
|
||||
},
|
||||
"draft": {
|
||||
"type": "string",
|
||||
@@ -32,6 +42,10 @@
|
||||
"renderableContent": {
|
||||
"type": "string"
|
||||
},
|
||||
"youtubeId": {
|
||||
"type": "string",
|
||||
"description": "A youtube video id eg: 'EErY9zXGLNU'"
|
||||
},
|
||||
"published": {
|
||||
"type": "boolean",
|
||||
"required": true,
|
||||
@@ -52,6 +66,9 @@
|
||||
"required": true,
|
||||
"default": 1
|
||||
},
|
||||
"firstPublishedDate": {
|
||||
"type": "date"
|
||||
},
|
||||
"createdDate": {
|
||||
"type": "date",
|
||||
"required": true
|
||||
|
||||
Reference in New Issue
Block a user