fix(css): Typography and layout
This commit is contained in:
committed by
mrugesh mohapatra
parent
a9b6a7e7db
commit
c63aecdf79
@ -5,7 +5,7 @@ import { Row, Col } from 'react-bootstrap';
|
|||||||
function SlimWidthRow({ children, ...restProps }) {
|
function SlimWidthRow({ children, ...restProps }) {
|
||||||
return (
|
return (
|
||||||
<Row {...restProps}>
|
<Row {...restProps}>
|
||||||
<Col md={ 4 } mdOffset={ 4 } sm={ 12 }>
|
<Col md={ 6 } mdOffset={ 3 } sm={ 12 }>
|
||||||
{ children }
|
{ children }
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
@ -13,11 +13,33 @@ const styles = `
|
|||||||
.app-layout li,
|
.app-layout li,
|
||||||
.app-layout a,
|
.app-layout a,
|
||||||
.app-layout span {
|
.app-layout span {
|
||||||
font-size: 18px;
|
font-size: 21.5px;
|
||||||
}
|
}
|
||||||
.app-layout hr {
|
.app-layout hr {
|
||||||
background-image: linear-gradient(to right, rgba(0, 100, 0, 0), rgba(0, 100, 0, 0.75), rgba(0, 100, 0, 0));
|
background-image: linear-gradient(to right, rgba(0, 100, 0, 0), rgba(0, 100, 0, 0.75), rgba(0, 100, 0, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.app-layout p {
|
||||||
|
paddin-top: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-layout h1, .app-layout h2, .app-layout h3, .app-layout h4, .app-layout h5, .app-layout h6
|
||||||
|
{
|
||||||
|
padding-top: 35px;
|
||||||
|
padding-bottom: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-layout h1 {
|
||||||
|
font-size: 42px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-layout h2 {
|
||||||
|
font-size: 34px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-layout h3 {
|
||||||
|
font-size: 32px;
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
/* eslint-enable max-len */
|
/* eslint-enable max-len */
|
||||||
function NewsApp() {
|
function NewsApp() {
|
||||||
|
@ -13,6 +13,9 @@ const propTypes = {
|
|||||||
history: PropTypes.shape({
|
history: PropTypes.shape({
|
||||||
push: PropTypes.func.isRequired
|
push: PropTypes.func.isRequired
|
||||||
}),
|
}),
|
||||||
|
location: PropTypes.shape({
|
||||||
|
state: PropTypes.object
|
||||||
|
}),
|
||||||
match: PropTypes.shape({
|
match: PropTypes.shape({
|
||||||
params: PropTypes.shape({
|
params: PropTypes.shape({
|
||||||
username: PropTypes.string,
|
username: PropTypes.string,
|
||||||
@ -29,17 +32,6 @@ const youtubeOpts = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const styles = `
|
const styles = `
|
||||||
article figure {
|
|
||||||
width: calc(100vw - 30px);
|
|
||||||
position: relative;
|
|
||||||
left: 50%;
|
|
||||||
right: 50%;
|
|
||||||
margin-left: -50vw;
|
|
||||||
margin-right: -50vw;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.feature-image-wrapper {
|
.feature-image-wrapper {
|
||||||
padding-top: 32px;
|
padding-top: 32px;
|
||||||
@ -91,6 +83,7 @@ class ShowArticle extends Component {
|
|||||||
}
|
}
|
||||||
if (article) {
|
if (article) {
|
||||||
const [, shortId] = slug.split('--');
|
const [, shortId] = slug.split('--');
|
||||||
|
/* eslint-disable react/no-did-mount-set-state */
|
||||||
return this.setState(
|
return this.setState(
|
||||||
{
|
{
|
||||||
fetchState: {
|
fetchState: {
|
||||||
|
@ -21,12 +21,16 @@ const styles = `
|
|||||||
.author-bio {
|
.author-bio {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin-left: 10px;
|
margin-left: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.author-bio span {
|
.author-bio span {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.author-block {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
function Author({ author: { name, avatar, bio } }) {
|
function Author({ author: { name, avatar, bio } }) {
|
||||||
@ -38,7 +42,7 @@ function Author({ author: { name, avatar, bio } }) {
|
|||||||
<img height='50px' src={avatar} />
|
<img height='50px' src={avatar} />
|
||||||
<div className='author-bio'>
|
<div className='author-bio'>
|
||||||
<a href='https://www.freecodecamp.org/quincylarson'>
|
<a href='https://www.freecodecamp.org/quincylarson'>
|
||||||
<span>{name}</span>
|
<span>By {name}</span>
|
||||||
</a>
|
</a>
|
||||||
<span>{bio.slice(0, 101)}</span>
|
<span>{bio.slice(0, 101)}</span>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user