-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.html
203 lines (195 loc) · 5.45 KB
/
template.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<!DOCTYPE html>
<html lang="es">
<head>
<title>Resumen del Análisis</title>
<meta charset="utf-8" />
<meta
name="viewport"
content="minimum-scale=1, initial-scale=1, width=device-width"
/>
<script
src="https://unpkg.com/react@latest/umd/react.development.js"
crossorigin="anonymous"
></script>
<script src="https://unpkg.com/react-dom@latest/umd/react-dom.development.js"></script>
<script
src="https://unpkg.com/@material-ui/core@latest/umd/material-ui.development.js"
crossorigin="anonymous"
></script>
<script
src="https://unpkg.com/babel-standalone@latest/babel.min.js"
crossorigin="anonymous"
></script>
<!-- Fonts to support Material Design -->
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"
/>
<!-- Icons to support Material Design -->
<link
rel="stylesheet"
href="https://fonts.googleapis.com/icon?family=Material+Icons"
/>
</head>
<body>
<div id="root"></div>
<script type="text/babel">
const data = $data;
const {
colors,
CssBaseline,
ThemeProvider,
Typography,
Container,
makeStyles,
createMuiTheme,
Box,
SvgIcon,
Link,
TableContainer,
Table,
TableHead,
TableBody,
TableCell,
TableRow,
Paper,
List,
ListItem,
ListItemIcon,
ListItemText,
Divider,
Icon,
} = MaterialUI;
// Create a theme instance.
const theme = createMuiTheme({
palette: {
primary: {
main: "#556cd6",
},
secondary: {
main: "#19857b",
},
error: {
main: colors.red.A400,
},
background: {
default: "#fff",
},
},
});
const useStyles = makeStyles((theme) => ({
root: {
width: "100%",
},
container: {
maxHeight: 440,
},
}));
function TableItem() {
const classes = useStyles();
return (
<TableContainer component={Paper} className={classes.container}>
<Table
stickyHeader
className={classes.table}
size="small"
aria-label="a dense table"
>
<TableHead>
<TableRow>
<TableCell>Productos Únicos</TableCell>
<TableCell>Items Publicados</TableCell>
</TableRow>
</TableHead>
<TableBody>
{data.map((row, index) => (
<TableRow key={index}>
<TableCell component="th" scope="row">
{row[0]}
</TableCell>
<TableCell component="th" scope="row">
{row.length}
</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</TableContainer>
);
}
function Copyright() {
return (
<Typography
variant="body2"
color="textSecondary"
align="center"
style={{ padding: "1rem" }}
>
{"Made by "}
<Link color="inherit" href="https://camiloromero.dev/">
Camilo Romero
</Link>
</Typography>
);
}
function Review() {
return (
<div>
<List component="nav" aria-label="main mailbox folders">
<ListItem button>
<ListItemIcon>
<Icon>public</Icon>
</ListItemIcon>
<ListItemText primary="URL Analizada" />
<ListItemText primary="$url" />
</ListItem>
<ListItem button>
<ListItemIcon>
<Icon>category</Icon>
</ListItemIcon>
<ListItemText primary="Productos Únicos" />
<ListItemText primary="$products" />
</ListItem>
<ListItem button>
<ListItemIcon>
<Icon>shopping_cart</Icon>
</ListItemIcon>
<ListItemText primary="Items Publicados" />
<ListItemText primary="$items" />
</ListItem>
<ListItem button>
<ListItemIcon>
<Icon>functions</Icon>
</ListItemIcon>
<ListItemText primary="Indice de Similitud" />
<ListItemText primary="$similarity" />
</ListItem>
</List>
</div>
);
}
function App() {
return (
<Container maxWidth="sm">
<div style={{ marginTop: 24 }}>
<Typography variant="h4" component="h1" gutterBottom>
Resumen del Análisis
</Typography>
<Review />
<TableItem />
<Copyright />
</div>
</Container>
);
}
ReactDOM.render(
<ThemeProvider theme={theme}>
{/* CssBaseline kickstart an elegant, consistent, and simple baseline to build upon. */}
<CssBaseline />
<App />
</ThemeProvider>,
document.querySelector("#root")
);
</script>
</body>
</html>