Skip to content

Commit

Permalink
pages: reorder module properties
Browse files Browse the repository at this point in the history
per #776 (comment)

+  small refactor in
  • Loading branch information
jorgeorpinel committed Nov 14, 2019
1 parent df65979 commit 85a73c6
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 34 deletions.
12 changes: 6 additions & 6 deletions pages/features.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ import Hero from '../src/Hero'
import FeaturesHero from '../src/FeaturesHero'
import TrySection from '../src/TrySection'

const HeadInjector = () => (
<Head>
<title>Features | Machine Learning Version Control System</title>
</Head>
)

export default function FeaturesPage() {
return (
<Page stickHeader={true}>
Expand Down Expand Up @@ -163,12 +169,6 @@ export default function FeaturesPage() {
)
}

const HeadInjector = () => (
<Head>
<title>Features | Machine Learning Version Control System</title>
</Head>
)

const Container = styled.div`
${container};
`
Expand Down
34 changes: 17 additions & 17 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,23 @@ import PromoSection from '../src/PromoSection'
import UseCases from '../src/UseCases'
import Subscribe from '../src/Subscribe'

const HeadInjector = () => (
<Head>
<link
rel="stylesheet"
type="text/css"
charSet="UTF-8"
href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick.min.css"
/>
<link
rel="stylesheet"
type="text/css"
href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick-theme.min.css"
/>
<title>Machine Learning Version Control System · DVC</title>
</Head>
)

export default function HomePage() {
return (
<Page stickHeader={true}>
Expand All @@ -31,23 +48,6 @@ export default function HomePage() {
)
}

const HeadInjector = () => (
<Head>
<link
rel="stylesheet"
type="text/css"
charSet="UTF-8"
href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick.min.css"
/>
<link
rel="stylesheet"
type="text/css"
href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick-theme.min.css"
/>
<title>Machine Learning Version Control System · DVC</title>
</Head>
)

const LearnMoreSection = styled.div`
z-index: 2;
position: absolute;
Expand Down
12 changes: 6 additions & 6 deletions pages/support.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ import Hero from '../src/Hero'
import TrySection from '../src/TrySection'
import Popover from '../src/Popover/Popover'

const HeadInjector = () => (
<Head>
<title>Support | Machine Learning Version Control System</title>
</Head>
)

export default function SupportPage() {
return (
<Page stickHeader>
Expand Down Expand Up @@ -118,12 +124,6 @@ export default function SupportPage() {
)
}

const HeadInjector = () => (
<Head>
<title>Support | Machine Learning Version Control System</title>
</Head>
)

const SupportHero = styled.div`
padding-top: 90px;
padding-bottom: 80px;
Expand Down
6 changes: 1 addition & 5 deletions src/Documentation/SidebarMenu/SidebarMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import { getParentsListFromPath } from './helper'
/** Height of each menu child items (to calc Element weight for animations) */
const heightMap = {}

const blankStyle = {}

/** Calculate element height with all open children. */
function calculateHeight({ activePaths, path }) {
let height = 0
Expand Down Expand Up @@ -60,9 +58,7 @@ class SidebarMenuItem extends React.PureComponent {
</SectionLink>
{children && (
<Collapse
style={
isActive ? { height: calculateHeight(this.props) } : blankStyle
}
style={isActive ? { height: calculateHeight(this.props) } : {}}
ref={r => (this.linkRef = r)}
>
{children.map(item => (
Expand Down

0 comments on commit 85a73c6

Please sign in to comment.