Skip to content

Commit

Permalink
Merge pull request #950 from microlinkhq/refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats authored Jul 5, 2020
2 parents e983d47 + 0b75725 commit 11f8067
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 50 deletions.
2 changes: 1 addition & 1 deletion src/components/elements/Heading.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Heading.defaultProps = {
lineHeight: [0, 0, 1, 1],
textAlign: 'center',
fontWeight: 'bold',
fontSize: [4, 4, 5, 7],
fontSize: [5, 5, 5, 6],
variant: 'gradient'
}

Expand Down
4 changes: 4 additions & 0 deletions src/components/elements/Link/solid.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ const style = css`
const LinkSolid = styled(Link)`
${style};
${hoverStyle};
.active {
text-decoration: inherit;
}
`

LinkSolid.defaultProps = {
Expand Down
1 change: 0 additions & 1 deletion src/components/pages/screenshot/examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,6 @@ export const Timings = ({ queryParam }) => {
color='white'
variant={null}
mr={[1, 1, 3, 3]}
fontSize={[3, 3, 5, 7]}
children={children}
/>
))}
Expand Down
1 change: 0 additions & 1 deletion src/components/patterns/Headline/Headline.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const TitleConstructor = TitleComponnet => ({
{...props}
>
<TitleComponnet
maxWidth={['14rem', '100%', '100%', '100%']}
fontWeight={fontWeight}
fontSize={fontSize}
px={0}
Expand Down
6 changes: 2 additions & 4 deletions src/pages/oss.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ export default () => {
<DotsBackground alignItems='center' justifyContent='center'>
<Layout footer={{ bg: 'transparent' }}>
<Flex
px={4}
pt={4}
pb={4}
pt={[0, 0, 0, 3]}
px={3}
width='100%'
flexDirection='column'
justifyContent='center'
Expand All @@ -22,7 +21,6 @@ export default () => {
<Headline title='Open Source Software' pb={3} />
<Text
fontSize={[2, 2, 2, 3]}
fontWeight='regular'
mb={4}
textAlign='center'
maxWidth={10}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/privacy.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ title: 'Privacy Policy'
date: '2018-08-20'
---

<Paraph fontSize={3}>
Your privacy is important to us. It's Microlink HQ's policy to respect
<Paraph mt={0} fontSize={[2, 2, 2, 3]} textAlign='center'>
Microlink respects
your privacy regarding any information we may collect from you across our
website <Link href='https://microlink.io' children='microlink.io' />, and
other sites we own and operate, according to EU General Data Protection
Expand Down
24 changes: 17 additions & 7 deletions src/pages/stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,25 @@ export default () => {
justifyContent='center'
alignItems='center'
>
<Container maxWidth='100%' px={[5, 5, 4, 4]}>
<Container maxWidth='100%' px={3}>
<Box id='stats'>
{isLoading ? (
<Text
style={{ whiteSpace: 'pre', fontFamily: 'monospace' }}
color={color}
fontSize={[0, 0, 1, 1]}
children={`\n${data}`}
/>
<>
<Text
pt={[0, 0, 0, 3]}
color={color}
textAlign='center'
style={{ fontFamily: 'monospace' }}
>
$ watch curl -sL https://k8s.microlink.io/
</Text>
<Text
style={{ whiteSpace: 'pre', fontFamily: 'monospace' }}
color={color}
fontSize={[0, 0, 1, 1]}
children={`\n${data}`}
/>
</>
) : (
<>
<Flex
Expand Down
44 changes: 10 additions & 34 deletions src/templates/page.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
import Markdown, {
H1,
H2,
Paraph,
Strong,
Link,
Blockquote
} from 'components/markdown'
import { withContainer } from 'helpers/hoc'

import { Chat, Layout } from 'components/patterns'
import Markdown, { H2, Paraph, Strong, Link } from 'components/markdown'

import { Headline, Chat, Layout } from 'components/patterns'
import { Text, Box } from 'components/elements'
import { formatDate } from 'helpers'
import TimeAgo from 'react-timeago'
import React from 'react'

const { WIDTH } = withContainer

const PostFooter = () => (
<>
<H2 id='chat'>Come chat with us</H2>
Expand All @@ -32,37 +29,16 @@ const PostFooter = () => (

export default ({ isBlogPage, date, meta, content }) => (
<Layout {...meta}>
<Box px={3}>
<Text
as='header'
textAlign='center'
mb={5}
maxWidth='900px'
ml='auto'
mr='auto'
>
<H1
textAlign='center'
children={meta.title}
slug={false}
variant='gradient'
mb={3}
/>
<Box pt={[0, 0, 0, 3]} px={3}>
<Text maxWidth={isBlogPage ? WIDTH.normal : 'none'} ml='auto' mr='auto'>
<Headline title={meta.title} pb={3} />
{isBlogPage && (
<Text fontSize={2} color='black50'>
<Text fontSize={[2, 2, 2, 3]} textAlign='center' mb={4}>
{formatDate(date)} ({<TimeAgo date={date} />})
</Text>
)}
</Text>

{!isBlogPage && date && (
<Blockquote>
<Paraph>
Last Updated: {formatDate(date)} ({<TimeAgo date={date} />})
</Paraph>
</Blockquote>
)}

<Markdown children={content} />

{isBlogPage && <PostFooter />}
Expand Down

0 comments on commit 11f8067

Please sign in to comment.