Skip to content

Commit 35d8811

Browse files
committed
add more tools and update css
1 parent 96458f2 commit 35d8811

File tree

10 files changed

+2696
-2047
lines changed

10 files changed

+2696
-2047
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ data.json
33
makefile
44
*.service
55
node_modules
6-
src/App.css
6+
frontend/src/App.css

backend/githubData.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,18 @@ const tools = [
119119
name: "pybind11",
120120
owner: "pybind",
121121
},
122+
{
123+
name: "pyscript",
124+
owner: "pyscript",
125+
},
126+
{
127+
name: "cython",
128+
owner: "cython",
129+
},
130+
{
131+
name: "pyodide",
132+
owner: "pyodide",
133+
},
122134
];
123135

124136
function getQuery(name: string, owner: string) {

frontend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
},
4040
"devDependencies": {
4141
"@fullhuman/postcss-purgecss": "^2.3.0",
42+
"@tailwindcss/typography": "^0.5.2",
4243
"@testing-library/jest-dom": "^4.2.4",
4344
"@testing-library/react": "^9.3.2",
4445
"@testing-library/user-event": "^7.1.2",

frontend/src/App.tailwind.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
@tailwind base;
22
@tailwind components;
33
@tailwind utilities;
4+
5+
@layer base {
6+
a {
7+
@apply underline;
8+
}
9+
}

frontend/src/Tools.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,9 @@ export function toolDataToTableData(
206206
return toolData
207207
.map((data: Tool) => ({
208208
...data,
209+
stargazers: data.stargazers?.totalCount
210+
? { totalCount: `⭐ ${data.stargazers.totalCount.toLocaleString()}` }
211+
: null,
209212
name: (
210213
<div className="font-bold text-lg">
211214
{data.url ? <a href={data.url}>{data.name}</a> : data.name}
@@ -237,7 +240,7 @@ export function toolDataToTableData(
237240
.map((url, i) => {
238241
return (
239242
<div key={i}>
240-
<a href={url} className="hover:bg-yellow-200 text-xs">
243+
<a href={url} className="hover:bg-yellow-300 ">
241244
{url}
242245
</a>
243246
</div>

frontend/src/Types.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import React from 'react';
2+
13
export type GithubGraphqlShape = {
24
stargazers?: {
35
totalCount: number;
@@ -26,7 +28,7 @@ export type GithubGraphqlShape = {
2628
export type Tool = {
2729
name: string;
2830
features: Feature[];
29-
toolDescription: string;
31+
toolDescription: string | React.ReactElement;
3032
dependsOn: string[];
3133
useCases: string[];
3234
} & GithubGraphqlShape;

frontend/src/index.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ code {
1111
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
1212
monospace;
1313
}
14+

frontend/src/initialToolData.tsx

Lines changed: 63 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Tool } from './Types';
2+
import React from 'react';
23

34
const zipAppDescription =
45
'Makes "python executables", which are files that can be run directly, but require a python interpreter available on the system. This is part of a group of tools that utilize the zipapp feature of the standard library.';
@@ -45,10 +46,14 @@ const _initialToolData: Tool[] = [
4546
'install cli apps',
4647
],
4748
name: 'pdm',
48-
toolDescription:
49-
'Helps you declare, manage, and install dependencies of Python projects. ' +
50-
'It does not use virtual environments at all. ' +
51-
'Instead it installs packages to a local directory called __pypackages__ (PEP-582).',
49+
toolDescription: (
50+
<div>
51+
Helps you declare, manage, and install dependencies of Python projects.
52+
It does not use virtual environments at all. Instead it installs
53+
packages to a local directory called <code>__pypackages__</code>{' '}
54+
(PEP-582).
55+
</div>
56+
),
5257
useCases: [],
5358
dependsOn: [],
5459
},
@@ -62,12 +67,15 @@ const _initialToolData: Tool[] = [
6267
'PEP-582',
6368
],
6469
name: 'pyflow',
65-
toolDescription:
66-
'Pyflow streamlines working with Python projects and files. ' +
67-
"It's an easy-to-use CLI app with a minimalist API. " +
68-
'Never worry about having the right version of Python or dependencies. ' +
69-
'Instead of using virtual environments, it installs packages to a local ' +
70-
'directory named __pypackages__ (PEP-582)',
70+
toolDescription: (
71+
<div>
72+
Pyflow streamlines working with Python projects and files. "Its an
73+
easy-to-use CLI app with a minimalist API. " Never worry about having
74+
the right version of Python or dependencies. Instead of using virtual
75+
environments, it installs packages to a local directory named
76+
<code>__pypackages__</code> (PEP-582),
77+
</div>
78+
),
7179
useCases: [],
7280
dependsOn: [],
7381
},
@@ -298,6 +306,51 @@ const _initialToolData: Tool[] = [
298306
useCases: [],
299307
dependsOn: [],
300308
},
309+
{
310+
name: 'pyscript',
311+
features: ['language bindings'],
312+
toolDescription: 'A frontend framework to write Python apps in the browser',
313+
useCases: [],
314+
dependsOn: ['wasm', 'pyodide'],
315+
},
316+
{
317+
name: 'cython',
318+
features: ['language bindings'],
319+
toolDescription: (
320+
<div>
321+
Cython generates C code from your Python code, then builds it into a
322+
shared object (.so file). These .so files are C extension modules, which
323+
can be imported by your Python code, where they run at the speed of a C
324+
program. For example, <code>cythonize --build hello.py</code> will build
325+
<code> hello.so</code> which can be imported directly in Python code
326+
elsewhere with <code>import hello</code>.
327+
</div>
328+
),
329+
useCases: [],
330+
dependsOn: [],
331+
},
332+
{
333+
name: 'pyodide',
334+
features: ['language bindings'],
335+
toolDescription: (
336+
<div>
337+
<p>
338+
Pyodide is a Python distribution for the browser and Node.js based on
339+
WebAssembly. Pyodide is a port of CPython to WebAssembly/Emscripten.
340+
Pyodide makes it possible to install and run Python packages in the
341+
browser with micropip. Any pure Python package with a wheel available
342+
on PyPi is supported. Many packages with C extensions have also been
343+
ported for use with Pyodide.{' '}
344+
</p>
345+
<p>
346+
You can try the{' '}
347+
<a href="https://pyodide.org/en/stable/console.html">REPL here.</a>
348+
</p>
349+
</div>
350+
),
351+
useCases: [],
352+
dependsOn: ['wasm'],
353+
},
301354
];
302355
_initialToolData.sort((a, b) => {
303356
return a.name.toLocaleLowerCase() < b.name.toLocaleLowerCase() ? -1 : 1;

frontend/tailwind.config.js

Lines changed: 54 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,61 @@
11
module.exports = {
2-
purge: ['./src/**/*.tsx', './src/**/*.ts'],
3-
theme: {
4-
extend: {},
5-
},
6-
variants: {},
7-
plugins: [],
82
future: {
93
removeDeprecatedGapUtilities: true,
104
purgeLayersByDefault: true,
115
},
6+
theme: {
7+
extend:{}
8+
// {typography:{DEFAULT:{css:{code:{backgroundColor:'#000'}}}}}
9+
},
1210
corePlugins: { outline: false },
11+
purge: ['./src/**/*.tsx', './src/**/*.ts'],
1312
};
13+
14+
// module.exports = {
15+
// purge: ['./src/**/*.tsx', './src/**/*.ts'],
16+
// theme: {
17+
// colors: {
18+
// grey: {
19+
// 100: "#F5F7FA",
20+
// 1000: "#1F2933"
21+
// },
22+
// },
23+
// typography: theme => ({
24+
// default: {
25+
// css: {
26+
// pre: {
27+
// color: theme("colors.grey.1000"),
28+
// backgroundColor: theme("colors.grey.100")
29+
// },
30+
// "pre code::before": {
31+
// "padding-left": "unset"
32+
// },
33+
// "pre code::after": {
34+
// "padding-right": "unset"
35+
// },
36+
// code: {
37+
// backgroundColor: theme("colors.grey.100"),
38+
// color: "#DD1144",
39+
// fontWeight: "400",
40+
// "border-radius": "0.25rem"
41+
// },
42+
// "code::before": {
43+
// content: '""',
44+
// "padding-left": "0.25rem"
45+
// },
46+
// "code::after": {
47+
// content: '""',
48+
// "padding-right": "0.25rem"
49+
// }
50+
// }
51+
// }
52+
// })
53+
// },
54+
// variants: {},@tailwindcss/typography
55+
// plugins: [require("@tailwindcss/typography")],
56+
// future: {
57+
// removeDeprecatedGapUtilities: true,
58+
// purgeLayersByDefault: true,
59+
// },
60+
// corePlugins: { outline: false },
61+
// };

0 commit comments

Comments
 (0)