|
1 | | -// import React from "react" |
2 | | -// import styled from "@emotion/styled" |
3 | | - |
4 | | -// import { Sheet } from "./common" |
5 | | - |
6 | | -// const SingleContent = styled.div` |
7 | | -// display: flex; |
8 | | -// flex-flow: row wrap; |
9 | | -// & > div { |
10 | | -// margin: 15px; |
11 | | -// flex: 1 1 calc(50% - 30px); |
12 | | -// @media print { |
13 | | -// margin: 15px 50px; |
14 | | -// } |
15 | | -// @media only screen and (max-width: 668px) { |
16 | | -// flex-basis: calc(100% - 20px); |
17 | | -// margin: 0 10px; |
18 | | -// margin-bottom: 15px; |
19 | | -// } |
20 | | -// @media print { |
21 | | -// flex-basis: 100%; |
22 | | -// } |
23 | | -// } |
24 | | -// ` |
25 | | - |
26 | | -// const SheetTitle = styled.div` |
27 | | -// display: flex; |
28 | | -// flex-wrap: wrap; |
29 | | -// align-items: center; |
30 | | -// justify-content: space-between; |
31 | | -// & a { |
32 | | -// text-decoration: none; |
33 | | -// background: #00000080; |
34 | | -// color: #fff; |
35 | | -// font-weight: 900; |
36 | | -// text-transform: uppercase; |
37 | | -// font-size: 13px; |
38 | | -// padding: 1px 10px; |
39 | | -// border-radius: 4px; |
40 | | -// margin-bottom: 15px; |
41 | | -// opacity: 0; |
42 | | -// } |
43 | | -// ` |
44 | | - |
45 | | -// const Content = ({ data }) => ( |
46 | | -// <SingleContent> |
47 | | -// {data.contents.map(({ title, items, code: onlyCode }, index) => ( |
48 | | -// <Sheet id={index + 1} key={index}> |
49 | | -// <SheetTitle className="sheet-title"> |
50 | | -// <h3>{title}</h3> |
51 | | -// <a href={`/${data.slug}/#${index + 1}`}>Link</a> |
52 | | -// </SheetTitle> |
53 | | -// <ul className="single-item"> |
54 | | -// {items ? ( |
55 | | -// items.map(({ definition, code }, index) => ( |
56 | | -// <li key={index} className="item"> |
57 | | -// {definition && ( |
58 | | -// <p |
59 | | -// className="def" |
60 | | -// dangerouslySetInnerHTML={{ __html: definition }} |
61 | | -// /> |
62 | | -// )} |
63 | | -// {code && ( |
64 | | -// <pre className="code"> |
65 | | -// <code>{code}</code> |
66 | | -// </pre> |
67 | | -// )} |
68 | | -// </li> |
69 | | -// )) |
70 | | -// ) : ( |
71 | | -// <pre className="code"> |
72 | | -// <code>{onlyCode}</code> |
73 | | -// </pre> |
74 | | -// )} |
75 | | -// </ul> |
76 | | -// </Sheet> |
77 | | -// ))} |
78 | | -// </SingleContent> |
79 | | -// ) |
80 | | - |
81 | | -// export default Content |
82 | | - |
83 | 1 | import React from "react" |
84 | 2 | import styled from "@emotion/styled" |
85 | 3 |
|
86 | 4 | import AllItems from "./allitems" |
87 | 5 |
|
88 | | -import { Container, Curve, Section, ThinContainer } from "./common" |
| 6 | +import { Curve, Section, ThinContainer } from "./common" |
89 | 7 | import PopularItems from "./popularitems" |
90 | 8 | import Item from "./item" |
91 | 9 |
|
|
0 commit comments