fix(client): adjust guide styles
This commit is contained in:
committed by
mrugesh mohapatra
parent
21b72f2219
commit
90555d6b16
@ -69,7 +69,7 @@ class Layout extends React.Component {
|
|||||||
}) => (
|
}) => (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<Spacer size={1} />
|
<Spacer size={1} />
|
||||||
<Grid>
|
<Grid className='guide-container'>
|
||||||
<Row>
|
<Row>
|
||||||
<Col
|
<Col
|
||||||
md={4}
|
md={4}
|
||||||
@ -110,7 +110,6 @@ class Layout extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Layout.displayName = 'Layout';
|
Layout.displayName = 'Layout';
|
||||||
Layout.propTypes = propTypes;
|
Layout.propTypes = propTypes;
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ class NavItem extends React.Component {
|
|||||||
const { isStubbed, path, title } = this.props;
|
const { isStubbed, path, title } = this.props;
|
||||||
return (
|
return (
|
||||||
<li>
|
<li>
|
||||||
<Link data-navitem='true' onClick={this.handleClick} to={path}>
|
<Link onClick={this.handleClick} to={path}>
|
||||||
<span className={'navItemTitle' + (isStubbed ? ' stubbed' : '')}>
|
<span className={'navItemTitle' + (isStubbed ? ' stubbed' : '')}>
|
||||||
{title}
|
{title}
|
||||||
</span>
|
</span>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { Panel } from '@freecodecamp/react-bootstrap';
|
import { Panel } from '@freecodecamp/react-bootstrap';
|
||||||
import { navigate } from 'gatsby';
|
import { Link } from 'gatsby';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
children: PropTypes.any,
|
children: PropTypes.any,
|
||||||
@ -53,14 +53,13 @@ class NavPanel extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleTitleClick() {
|
handleTitleClick() {
|
||||||
const { path, toggleDisplaySideNav, onNavigate } = this.props;
|
const { toggleDisplaySideNav, onNavigate } = this.props;
|
||||||
toggleDisplaySideNav();
|
toggleDisplaySideNav();
|
||||||
navigate(path);
|
|
||||||
onNavigate();
|
onNavigate();
|
||||||
}
|
}
|
||||||
|
|
||||||
renderHeader() {
|
renderHeader() {
|
||||||
const { isExpanded, title } = this.props;
|
const { isExpanded, path, title } = this.props;
|
||||||
return (
|
return (
|
||||||
<div className='title' onClick={this.handleHeaderClick}>
|
<div className='title' onClick={this.handleHeaderClick}>
|
||||||
<span
|
<span
|
||||||
@ -68,7 +67,7 @@ class NavPanel extends Component {
|
|||||||
'caret ' + (isExpanded ? 'caretStyle expanded' : 'caretStyle')
|
'caret ' + (isExpanded ? 'caretStyle expanded' : 'caretStyle')
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<span onClick={this.handleTitleClick}>{title}</span>
|
<Link onClick={this.handleTitleClick} to={path}>{title}</Link>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1,47 +1,13 @@
|
|||||||
/* globals */
|
.guide-container {
|
||||||
|
|
||||||
.colourDarkGrey {
|
|
||||||
color: #444;
|
|
||||||
}
|
|
||||||
|
|
||||||
.colourGreen {
|
|
||||||
color: #006400;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pointer {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
:global body {
|
|
||||||
font-family: 'Lato', sans-serif, 'FontAwesome';
|
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
:global h1,
|
|
||||||
:global h2,
|
|
||||||
:global h3,
|
|
||||||
:global h4,
|
|
||||||
:global h5,
|
|
||||||
:global h6 {
|
|
||||||
/* Bootstrap sets weight to 500, we don't have that */
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
|
|
||||||
:global h2:first-child {
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
:global td,
|
|
||||||
:global th {
|
|
||||||
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Breadcrumbs */
|
/* Breadcrumbs */
|
||||||
|
|
||||||
.breadcrumb {
|
.breadcrumb {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
|
margin: 0;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
transition: opacity 0.1s ease-out;
|
transition: opacity 0.1s ease-out;
|
||||||
@ -55,6 +21,10 @@
|
|||||||
color: #006400;
|
color: #006400;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.breadcrumb > li {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.breadcrumb > li + li:before {
|
.breadcrumb > li + li:before {
|
||||||
content: '\203A';
|
content: '\203A';
|
||||||
color: #555;
|
color: #555;
|
||||||
@ -105,11 +75,18 @@
|
|||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.navPanelUl > li {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navItemTitle {
|
||||||
|
margin-left: 19px;
|
||||||
|
}
|
||||||
|
|
||||||
.panelStyle {
|
.panelStyle {
|
||||||
border: none !important;
|
border: none !important;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
color: #006400;
|
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,7 +113,11 @@
|
|||||||
border: none;
|
border: none;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: #006400;
|
}
|
||||||
|
|
||||||
|
.night .panelStyle,
|
||||||
|
.night .title {
|
||||||
|
background-color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 992px) {
|
@media (max-width: 992px) {
|
||||||
|
Reference in New Issue
Block a user