|
1 | 1 | import React from 'react';
|
2 | 2 | import styled from 'react-emotion';
|
3 | 3 | import { Flex, Box } from 'grid-emotion';
|
4 |
| -import { space } from 'styled-system'; |
| 4 | +import { space, fontSize } from 'styled-system'; |
5 | 5 | import Link from 'next/link';
|
6 | 6 | import LearningIcon from 'react-icons/lib/fa/book';
|
7 | 7 | import EstimateIcon from 'react-icons/lib/md/access-time';
|
@@ -42,18 +42,19 @@ const SubjectCard = styled.div`
|
42 | 42 | }
|
43 | 43 | }
|
44 | 44 | & .subtitle {
|
45 |
| - font-size: 0.8rem; |
| 45 | + ${fontSize}; |
46 | 46 | color: #8393a7;
|
47 | 47 | margin-top: 0px;
|
48 | 48 | margin-bottom: 10px;
|
49 | 49 | }
|
50 | 50 | & .stats {
|
| 51 | + ${fontSize}; |
51 | 52 | color: #8393a7;
|
52 |
| - font-size: 0.8rem; |
53 | 53 | }
|
54 | 54 | & .icons {
|
55 |
| - font-size: 1.1rem; |
| 55 | + font-size: 1.2rem; |
56 | 56 | margin-right: 0.25rem;
|
| 57 | + margin-bottom: 0.25rem; |
57 | 58 | color: #8393a7;
|
58 | 59 | }
|
59 | 60 | & .view {
|
@@ -81,15 +82,17 @@ export default ({ subject }) => (
|
81 | 82 | </div>
|
82 | 83 | <div className="content">
|
83 | 84 | <h3 className="title">{subject.title}</h3>
|
84 |
| - <p className="subtitle">{subject.domain}</p> |
| 85 | + <p className="subtitle" fontSize={[12, 14, 16]}> |
| 86 | + {subject.domain} |
| 87 | + </p> |
85 | 88 | <Flex className="stats" wrap>
|
86 |
| - <Box pr={[1]} pb={[1]}> |
| 89 | + <Box pr={[1]} pb={[1]} fontSize={[12, 14, 16]}> |
87 | 90 | <LearningIcon className="icons" />
|
88 |
| - 20 learning |
| 91 | + <span>20 learning</span> |
89 | 92 | </Box>
|
90 |
| - <Box> |
| 93 | + <Box fontSize={[12, 14, 16]}> |
91 | 94 | <EstimateIcon className="icons" />
|
92 |
| - 20 hours |
| 95 | + <span>20 hours</span> |
93 | 96 | </Box>
|
94 | 97 | </Flex>
|
95 | 98 | <Link href={`/learn/subject?id=${subject.subjectId}`} as={subject.url}>
|
|
0 commit comments