David Pomerenke
commited on
Commit
·
5bcc69a
1
Parent(s):
11c32ae
Colourful boxes
Browse files- frontend/src/App.css +0 -43
- frontend/src/App.js +62 -24
- frontend/src/components/DatasetTable.js +2 -2
- frontend/src/components/LanguageTable.js +2 -2
- frontend/src/components/ModelTable.js +2 -2
- frontend/src/index.css +45 -0
frontend/src/App.css
DELETED
@@ -1,43 +0,0 @@
|
|
1 |
-
.App {
|
2 |
-
text-align: center;
|
3 |
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
4 |
-
max-width: 1200px;
|
5 |
-
margin: 0 auto;
|
6 |
-
padding: 0 20px;
|
7 |
-
}
|
8 |
-
|
9 |
-
.App-header {
|
10 |
-
background-color: #ffffff;
|
11 |
-
min-height: 50vh;
|
12 |
-
display: flex;
|
13 |
-
flex-direction: column;
|
14 |
-
align-items: center;
|
15 |
-
justify-content: flex-start;
|
16 |
-
padding-top: 60px;
|
17 |
-
color: #333;
|
18 |
-
}
|
19 |
-
|
20 |
-
.emoji-container {
|
21 |
-
margin-bottom: 10px;
|
22 |
-
}
|
23 |
-
|
24 |
-
.header-emoji {
|
25 |
-
font-size: 70px;
|
26 |
-
}
|
27 |
-
|
28 |
-
h1 {
|
29 |
-
font-size: 2.5rem;
|
30 |
-
margin-bottom: 15px;
|
31 |
-
font-weight: 700;
|
32 |
-
color: #222;
|
33 |
-
}
|
34 |
-
|
35 |
-
p {
|
36 |
-
font-size: 1.15rem;
|
37 |
-
color: #555;
|
38 |
-
margin-top: 0;
|
39 |
-
}
|
40 |
-
|
41 |
-
* {
|
42 |
-
font-size: 10pt;
|
43 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
frontend/src/App.js
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
import './App.css'
|
2 |
import { useState, useEffect } from 'react'
|
3 |
import { PrimeReactProvider } from 'primereact/api'
|
4 |
import 'primereact/resources/themes/lara-light-cyan/theme.css'
|
@@ -29,36 +28,75 @@ function App () {
|
|
29 |
}, [])
|
30 |
|
31 |
return (
|
32 |
-
<div
|
33 |
-
<header
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
<span
|
36 |
role='img'
|
37 |
-
aria-label='
|
38 |
-
|
39 |
>
|
40 |
🌍
|
41 |
</span>
|
42 |
</div>
|
43 |
-
<h1
|
44 |
-
|
45 |
-
|
46 |
-
<
|
47 |
-
|
48 |
-
|
49 |
-
{error && <p>Error: {error}</p>}
|
50 |
-
{data && (
|
51 |
-
<div style={{ display: 'flex', flexDirection: 'column', gap: '2rem', alignItems: 'center', width: '100%' }}>
|
52 |
-
<div style={{ display: 'flex', flexDirection: 'row', gap: '2rem' }}>
|
53 |
-
<ModelTable data={data} />
|
54 |
-
<LanguageTable data={data} />
|
55 |
-
</div>
|
56 |
-
<DatasetTable data={data} />
|
57 |
-
</div>
|
58 |
-
)}
|
59 |
-
</PrimeReactProvider>
|
60 |
-
</div>
|
61 |
</header>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
</div>
|
63 |
)
|
64 |
}
|
|
|
|
|
1 |
import { useState, useEffect } from 'react'
|
2 |
import { PrimeReactProvider } from 'primereact/api'
|
3 |
import 'primereact/resources/themes/lara-light-cyan/theme.css'
|
|
|
28 |
}, [])
|
29 |
|
30 |
return (
|
31 |
+
<div style={{ height: '100%', display: 'flex', flexDirection: 'column' }}>
|
32 |
+
<header
|
33 |
+
style={{
|
34 |
+
display: 'flex',
|
35 |
+
flexDirection: 'column',
|
36 |
+
alignItems: 'center',
|
37 |
+
justifyContent: 'center',
|
38 |
+
padding: '5vh 0'
|
39 |
+
}}
|
40 |
+
>
|
41 |
+
<div>
|
42 |
<span
|
43 |
role='img'
|
44 |
+
aria-label='Globe Emoji'
|
45 |
+
style={{ fontSize: '70px' }}
|
46 |
>
|
47 |
🌍
|
48 |
</span>
|
49 |
</div>
|
50 |
+
<h1 style={{ fontSize: '2.5rem', fontWeight: '700' }}>
|
51 |
+
Global AI Language Monitor
|
52 |
+
</h1>
|
53 |
+
<p style={{ fontSize: '1.15rem', color: '#555', marginTop: '0' }}>
|
54 |
+
Tracking language proficiency of AI models for every language
|
55 |
+
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
</header>
|
57 |
+
<PrimeReactProvider>
|
58 |
+
{loading && <p>...</p>}
|
59 |
+
{error && <p>Error: {error}</p>}
|
60 |
+
{data && (
|
61 |
+
<div
|
62 |
+
style={{
|
63 |
+
display: 'flex',
|
64 |
+
flexDirection: 'row',
|
65 |
+
flexWrap: 'wrap',
|
66 |
+
gap: '2rem',
|
67 |
+
alignItems: 'center',
|
68 |
+
width: '100%',
|
69 |
+
height: '100%',
|
70 |
+
justifyContent: 'center'
|
71 |
+
}}
|
72 |
+
>
|
73 |
+
<div
|
74 |
+
style={{
|
75 |
+
flex: '60vw 100vw 40vw',
|
76 |
+
maxWidth: 'min(100vw, 800px)',
|
77 |
+
}}
|
78 |
+
>
|
79 |
+
<ModelTable data={data} />
|
80 |
+
</div>
|
81 |
+
<div
|
82 |
+
style={{
|
83 |
+
flex: '60vw 100vw 40vw',
|
84 |
+
maxWidth: 'min(100vw, 800px)'
|
85 |
+
}}
|
86 |
+
>
|
87 |
+
<LanguageTable data={data} />
|
88 |
+
</div>
|
89 |
+
<div
|
90 |
+
style={{
|
91 |
+
flex: '60vw 100vw 40vw',
|
92 |
+
maxWidth: 'min(100vw, 800px)'
|
93 |
+
}}
|
94 |
+
>
|
95 |
+
<DatasetTable data={data} />
|
96 |
+
</div>
|
97 |
+
</div>
|
98 |
+
)}
|
99 |
+
</PrimeReactProvider>
|
100 |
</div>
|
101 |
)
|
102 |
}
|
frontend/src/components/DatasetTable.js
CHANGED
@@ -28,8 +28,8 @@ const DatasetTable = ({ data }) => {
|
|
28 |
filters={filters}
|
29 |
filterDisplay='menu'
|
30 |
scrollable
|
31 |
-
scrollHeight='
|
32 |
-
|
33 |
>
|
34 |
{/* <Column
|
35 |
field='implemented'
|
|
|
28 |
filters={filters}
|
29 |
filterDisplay='menu'
|
30 |
scrollable
|
31 |
+
scrollHeight='600px'
|
32 |
+
id='dataset-table'
|
33 |
>
|
34 |
{/* <Column
|
35 |
field='implemented'
|
frontend/src/components/LanguageTable.js
CHANGED
@@ -124,8 +124,8 @@ const LanguageTable = ({ data }) => {
|
|
124 |
filters={filters}
|
125 |
filterDisplay='menu'
|
126 |
scrollable
|
127 |
-
scrollHeight='
|
128 |
-
|
129 |
>
|
130 |
<Column
|
131 |
field='language_name'
|
|
|
124 |
filters={filters}
|
125 |
filterDisplay='menu'
|
126 |
scrollable
|
127 |
+
scrollHeight='600px'
|
128 |
+
id='language-table'
|
129 |
>
|
130 |
<Column
|
131 |
field='language_name'
|
frontend/src/components/ModelTable.js
CHANGED
@@ -145,8 +145,8 @@ const ModelTable = ({ data }) => {
|
|
145 |
filters={filters}
|
146 |
filterDisplay='menu'
|
147 |
scrollable
|
148 |
-
scrollHeight='
|
149 |
-
|
150 |
>
|
151 |
<Column field='rank' body={rankBodyTemplate} />
|
152 |
<Column
|
|
|
145 |
filters={filters}
|
146 |
filterDisplay='menu'
|
147 |
scrollable
|
148 |
+
scrollHeight='600px'
|
149 |
+
id='model-table'
|
150 |
>
|
151 |
<Column field='rank' body={rankBodyTemplate} />
|
152 |
<Column
|
frontend/src/index.css
CHANGED
@@ -5,9 +5,54 @@ body {
|
|
5 |
sans-serif;
|
6 |
-webkit-font-smoothing: antialiased;
|
7 |
-moz-osx-font-smoothing: grayscale;
|
|
|
8 |
}
|
9 |
|
10 |
code {
|
11 |
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
|
12 |
monospace;
|
13 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
sans-serif;
|
6 |
-webkit-font-smoothing: antialiased;
|
7 |
-moz-osx-font-smoothing: grayscale;
|
8 |
+
font-size: 10pt;
|
9 |
}
|
10 |
|
11 |
code {
|
12 |
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
|
13 |
monospace;
|
14 |
}
|
15 |
+
|
16 |
+
html, body, #root {
|
17 |
+
height: 100%;
|
18 |
+
}
|
19 |
+
|
20 |
+
.p-datatable-wrapper {
|
21 |
+
scrollbar-color: #f0f0f0 rgba(0, 0, 0, 0);
|
22 |
+
}
|
23 |
+
|
24 |
+
#model-table {
|
25 |
+
border: 3px solid #5151ff;
|
26 |
+
border-radius: 10px;
|
27 |
+
}
|
28 |
+
|
29 |
+
#model-table .p-datatable-header {
|
30 |
+
border-top-width: 0px;
|
31 |
+
border-radius: 5px 5px 0 0;
|
32 |
+
background: linear-gradient(to bottom, #5151ff, #0000cd);
|
33 |
+
color: white;
|
34 |
+
}
|
35 |
+
|
36 |
+
#language-table {
|
37 |
+
border: 3px solid #00aa00;
|
38 |
+
border-radius: 10px;
|
39 |
+
}
|
40 |
+
|
41 |
+
#language-table .p-datatable-header {
|
42 |
+
border-top-width: 0px;
|
43 |
+
border-radius: 5px 5px 0 0;
|
44 |
+
background: linear-gradient(to bottom, #17b417, #008000);
|
45 |
+
color: white;
|
46 |
+
}
|
47 |
+
|
48 |
+
#dataset-table {
|
49 |
+
border: 3px solid #ffaa00;
|
50 |
+
border-radius: 10px;
|
51 |
+
}
|
52 |
+
|
53 |
+
#dataset-table .p-datatable-header {
|
54 |
+
border-top-width: 0px;
|
55 |
+
border-radius: 5px 5px 0 0;
|
56 |
+
background: linear-gradient(to bottom, #ffaa00, #ff8000);
|
57 |
+
color: white;
|
58 |
+
}
|