Skip to content

Commit

Permalink
Use prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
lgeiger authored and rgbkrk committed Oct 12, 2017
1 parent 07e1198 commit da1b9f6
Show file tree
Hide file tree
Showing 41 changed files with 1,036 additions and 886 deletions.
96 changes: 48 additions & 48 deletions components/content-section/content-section.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,58 +3,58 @@ import styles from "./content-section.scss";
import inView from "in-view";

export class ContentSectionPane extends React.Component {


render() {

let classes = '';
if('full' in this.props){
classes += ' content-section-pane-full';
}
if(this.props.className){
classes += ' ' + this.props.className;
}
return (<div className={`pane-50 pane ${this.props.layout ? this.props.layout : ""} ${classes}`}>
{this.props.children}
</div>);
render() {
let classes = "";
if ("full" in this.props) {
classes += " content-section-pane-full";
}
if (this.props.className) {
classes += " " + this.props.className;
}
return (
<div
className={`pane-50 pane ${this.props.layout
? this.props.layout
: ""} ${classes}`}
>
{this.props.children}
</div>
);
}
}

export class ContentSection extends React.Component {
constructor(props) {
super(props);
}

componentDidMount() {
inView.offset(50);
inView(".inview").on("enter", el => {
if (!el.classList.contains("showing")) {
el.classList.add("showing");
}
});

inView('.inview').check();
constructor(props) {
super(props);
}

componentDidMount() {
inView.offset(50);
inView(".inview").on("enter", el => {
if (!el.classList.contains("showing")) {
el.classList.add("showing");
}
});

inView(".inview").check();
}

render() {
let classes = "";

if ("full" in this.props) {
classes += " content-section-full";
}

render() {

let classes = '';

if('full' in this.props){
classes += ' content-section-full';
}
if(this.props.className){
classes += ' ' + this.props.className;
}
return (
<section className={"content-section " + classes}>
<style dangerouslySetInnerHTML={{__html: styles}}/>
<div className="content-section-wrapper inview">
<div className="panes center-vertically">
{this.props.children}
</div>
</div>
</section>
);
if (this.props.className) {
classes += " " + this.props.className;
}
return (
<section className={"content-section " + classes}>
<style dangerouslySetInnerHTML={{ __html: styles }} />
<div className="content-section-wrapper inview">
<div className="panes center-vertically">{this.props.children}</div>
</div>
</section>
);
}
}
43 changes: 20 additions & 23 deletions components/content-section/content-section.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import "partials/abstract/abstract";

section{
section {
overflow: hidden;
}
.content-section {
Expand Down Expand Up @@ -30,12 +30,10 @@ section{
}
}

&-pane{

&-full{
&-pane {
&-full {
width: 100% !important;
max-width:100%;

max-width: 100%;
}
}
}
Expand All @@ -59,15 +57,14 @@ section{
}

.pane {

&.center{
&.center {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
p{
max-width:580px;
p {
max-width: 580px;
}
}
&:first-child {
Expand Down Expand Up @@ -113,26 +110,26 @@ section{
}
}

video{
max-width:100%;
video {
max-width: 100%;
}
.columns{
.columns {
display: flex;
max-width:100%;
flex-wrap:wrap;
@include handheld{
max-width: 100%;
flex-wrap: wrap;
@include handheld {
flex-direction: column;
}
.column{
.column {
flex: 1;
max-width:100%;
@include tablet{
max-width: 100%;
@include tablet {
width: 100%;
}
&:not(:last-of-type){
@include desktop{
padding-right:$unit*2;
}
&:not(:last-of-type) {
@include desktop {
padding-right: $unit*2;
}
}
}
}
65 changes: 29 additions & 36 deletions components/download-buttons.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,11 @@ export const DownloadFeaturette = ({ platform }: DownloadFeaturetteProps) => {
<div className="download-featurette">
<div className="buttons buttons-hero not-mobile">
<style jsx>
{
`
{`
a {
text-decoration: none;
}
`
}
`}
</style>
<a href="https://github.com/nteract/nteract/releases/latest">
<div className="button button-primary">
Expand All @@ -68,42 +66,37 @@ export const DownloadFeaturette = ({ platform }: DownloadFeaturetteProps) => {

<div className="footnote not-mobile">
<style jsx>
{
`
a {
color: currentColor;
text-decoration: none;
}
a:hover {
color: white;
}
`
}

{`
a {
color: currentColor;
text-decoration: none;
}
a:hover {
color: white;
}
`}
</style>
<a href="https://github.com/nteract/nteract/releases/latest">
<div className="footnote-message">
Download for other platforms

</div>
<div className="footnote-message">Download for other platforms</div>
</a>

{platform !== "Windows"
? <a href="https://github.com/nteract/nteract/releases/latest">
<WindowsIcon />
</a>
: null}
{platform !== "macOS"
? <a href="https://github.com/nteract/nteract/releases/latest">
{" "}<MacIcon />
</a>
: null}
{platform !== "Linux"
? <a href="https://github.com/nteract/nteract/releases/latest">
{" "}<LinuxIcon />
</a>
: null}

{platform !== "Windows" ? (
<a href="https://github.com/nteract/nteract/releases/latest">
<WindowsIcon />
</a>
) : null}
{platform !== "macOS" ? (
<a href="https://github.com/nteract/nteract/releases/latest">
{" "}
<MacIcon />
</a>
) : null}
{platform !== "Linux" ? (
<a href="https://github.com/nteract/nteract/releases/latest">
{" "}
<LinuxIcon />
</a>
) : null}
</div>
</div>
);
Expand Down
96 changes: 47 additions & 49 deletions components/footer/footer.js
Original file line number Diff line number Diff line change
@@ -1,55 +1,53 @@
import React from 'react'
import styles from './footer.scss'
import NavigationLeft from '../navigation/navigation-left'
import NavigationRight from '../navigation/navigation-right'
import SocialButtons from '../navigation/social-buttons'

import React from "react";
import styles from "./footer.scss";
import NavigationLeft from "../navigation/navigation-left";
import NavigationRight from "../navigation/navigation-right";
import SocialButtons from "../navigation/social-buttons";

class Footer extends React.Component {
constructor(props) {
super(props);
}


constructor(props) {
super(props);
}

render() {
return (
<div>
<style dangerouslySetInnerHTML={{__html: styles}}/>
<footer className="footer-main">
<div className="footer-main-wrapper">
<div className="footer-main-section">
<div className="logos">
<div className="logos-wrapper">
{/*<div className="logo"><img*/}
{/*src="https://s3-us-west-1.amazonaws.com/plotly-tutorials/plotly-marketing-pages/images/new-branding/logo/images/plotly-logo-01-stripe%402x.png"*/}
{/*alt=""/>*/}
{/*</div>*/}
{/*<div className="logo"><img*/}
{/*src="https://nteract.github.io/assets/images/[email protected]"*/}
{/*alt=""/>*/}
{/*</div>*/}
{/*<div className="logo"><img src="https://nteract.github.io/assets/images/sponsor-carina.svg"*/}
{/*alt=""/>*/}
{/*</div>*/}
<div className="logo"><img
src="https://nteract.github.io/assets/images/sponsor-numfocus.png"
alt=""/>
</div>
</div>
</div>
</div>
<div className="footer-main-section links light">
<NavigationLeft/>
<NavigationRight/>
<SocialButtons/>
</div>
</div>
</footer>
render() {
return (
<div>
<style dangerouslySetInnerHTML={{ __html: styles }} />
<footer className="footer-main">
<div className="footer-main-wrapper">
<div className="footer-main-section">
<div className="logos">
<div className="logos-wrapper">
{/*<div className="logo"><img*/}
{/*src="https://s3-us-west-1.amazonaws.com/plotly-tutorials/plotly-marketing-pages/images/new-branding/logo/images/plotly-logo-01-stripe%402x.png"*/}
{/*alt=""/>*/}
{/*</div>*/}
{/*<div className="logo"><img*/}
{/*src="https://nteract.github.io/assets/images/[email protected]"*/}
{/*alt=""/>*/}
{/*</div>*/}
{/*<div className="logo"><img src="https://nteract.github.io/assets/images/sponsor-carina.svg"*/}
{/*alt=""/>*/}
{/*</div>*/}
<div className="logo">
<img
src="https://nteract.github.io/assets/images/sponsor-numfocus.png"
alt=""
/>
</div>
</div>
</div>
</div>
)
}
<div className="footer-main-section links light">
<NavigationLeft />
<NavigationRight />
<SocialButtons />
</div>
</div>
</footer>
</div>
);
}
}


export default Footer
export default Footer;
Loading

0 comments on commit da1b9f6

Please sign in to comment.