Skip to content

Commit 554eeff

Browse files
Merge pull request #253 from HaudinFlorence/fix_authors_in_atom_feed
Follow up PR 251: enable to display all authors of a blogpost
2 parents bd9d5c6 + aaf3c2a commit 554eeff

File tree

5 files changed

+391
-266
lines changed

5 files changed

+391
-266
lines changed

scripts/generate-atom-feed.mjs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,23 @@ const generateAtomFeedFromBlogDetails = (feed, blogpostsDetails, nbOfBlogPosts)
2020
link: blogpost.url,
2121
summary: blogpost.summary,
2222
date: new Date(blogpost.date),
23-
authors: blogpost.authors.split(','),
23+
authors: blogpost.authors,
2424
image: blogpost.image
2525
})
2626
};
2727

2828
posts.forEach((post) => {
29-
const imageHtml = `<img src="${post.image}" alt="Image for ${post.title}" style="max-width:100%; height:auto;" />`;
30-
const summaryHtml = `<p>${post.summary}</p>`;
29+
const image = `<img src="${post.image}" alt="Image for ${post.title}" style="max-width:100%; height:auto;" />`;
30+
const summary = `<p>${post.summary}</p>`;
31+
3132
feed.addItem({
3233
title: post.title,
3334
id: post.link,
3435
link: post.link,
3536
date: new Date(post.date),
36-
author: [{ name: post.authors }],
37-
content: `${imageHtml}${summaryHtml}`
38-
39-
37+
author: [{ name: post.authors}],
38+
content: `${image}${summary}`
4039
});
41-
4240
})
4341
return feed;
4442
}
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
import styles from "./styles.module.css";
2+
import { useHistory } from "@docusaurus/router";
3+
import BlueCaretIcon from "@site/static/img/icons/BlueCaret.svg";
4+
import LinkToMoreInformation from "./LinkToMoreInformation";
5+
import ProgressBar from "./ProgressBar";
6+
import FundersIcon from "@site/static/img/icons/Funders.svg";
7+
import DollarIcon from "@site/static/img/icons/Dollar.svg";
8+
9+
export function SmallProjectCard({ project }) {
10+
const history = useHistory();
11+
12+
function openDialog() {
13+
const pageName = project.pageName;
14+
15+
history.push({
16+
pathname: `/fundable/${pageName}`,
17+
state: { fromFundable: true, scrollY: window.scrollY },
18+
});
19+
}
20+
21+
return (
22+
<div onClick={openDialog}>
23+
<div className={"card" + " " + styles.small_project_card}>
24+
<div className="card__body" style={{ padding: "0" }}>
25+
<div className="row" >
26+
<div className="col col--7">
27+
<div
28+
className={styles.project_title
29+
}
30+
>
31+
{project.title}
32+
</div>
33+
<div
34+
className={styles.project_catch_up_phrase}
35+
>
36+
{project.catchUpPhrase}
37+
</div>
38+
<div className={styles.project_information_container}>
39+
<div className="flex-full-centered">
40+
<BlueCaretIcon />
41+
</div>
42+
<div className={styles.project_information}>
43+
<div>
44+
{project.shortDescription.length < 250
45+
? project.shortDescription
46+
: project.shortDescription.substring(0, 250) + "..."}
47+
48+
</div>
49+
</div>
50+
</div>
51+
<div>
52+
<LinkToMoreInformation label={"Read more"} pageName={project.pageName} />
53+
</div>
54+
55+
56+
<div className={styles.project_information_container}>
57+
<div className="flex-full-centered">
58+
<BlueCaretIcon />
59+
</div>
60+
<div className={styles.project_information}>
61+
Open-source under relevant licenses
62+
</div>
63+
</div>
64+
<div className={styles.project_information_container}>
65+
<div className="flex-full-centered">
66+
<BlueCaretIcon />
67+
</div>
68+
<div className={styles.project_information}>
69+
The funding organization will be credited in communication about the project
70+
</div>
71+
</div>
72+
73+
<div className={styles.note}>Note: Costs and features can be further adapted following discussion with the funding organization</div>
74+
</div>
75+
<div className={"col col--5"} style={{ backgroundColor: "rgba(217, 217, 217, 0.25" }}>
76+
<div className={styles.price_container}>
77+
<div className={styles.price}>
78+
{project.price}
79+
</div>
80+
</div>
81+
<div className={styles.indicative_price_text}>
82+
Indicative price
83+
</div>
84+
<div>
85+
<div className={styles.financed_at_text}>
86+
Financed at {project.currentFundingPercentage} %
87+
</div>
88+
<div>
89+
<ProgressBar value={project.currentFundingPercentage} color={'var(--ifm-color-secondary-s1'} />
90+
</div>
91+
<div className={styles.shareable_container}>
92+
<div><FundersIcon width="35px" height="26px" /></div>
93+
<div className={styles.shareable_text}>{project.maxNbOfFunders === 1
94+
? 'Not shareable between funders'
95+
: `Shareable between ${project.maxNbOfFunders} funders`
96+
}
97+
</div>
98+
</div>
99+
<div className={styles.shareable_container}>
100+
<div><DollarIcon width="35px" height="26px" /></div>
101+
<div className={styles.shareable_text}>
102+
{project.currentNbOfFunders === 0
103+
? 'The project is not supported yet'
104+
: `Supported by ${project.currentNbOfFunders}
105+
${project.currentNbOfFunders === 1 ? 'funder' : 'funders'}
106+
`}
107+
</div>
108+
109+
</div>
110+
</div>
111+
</div>
112+
</div>
113+
</div>
114+
</div>
115+
</div >
116+
)
117+
}
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
import NbconvertModernizationMD from "@site/src/components/fundable/descriptions/NbconvertModernization.md"
2+
import JupyterGISRasterProcessingMD from "@site/src/components/fundable/descriptions/JupyterGISRasterProcessing.md"
3+
import JupyterGISToolsForPythonAPIMD from "@site/src/components/fundable/descriptions/JupyterGISToolsForPythonAPI.md"
4+
import EmscriptenForgePackageRequestsMD from "@site/src/components/fundable/descriptions/EmscriptenForgePackageRequests.md"
5+
import JupyterLabParquetFileViewerMD from "@site/src/components/fundable/descriptions/JupyterLabParquetFileViewer.md"
6+
import JupyterGISIcon from "/img/icons/JupyterGIS.svg";
7+
import ToolsIcon from "/img/icons/Tools.svg";
8+
import PythonIcon from "/img/icons/Python.svg";
9+
import GlobeIcon from "/img/icons/Globe.svg";
10+
import EmptyIcon from "/img/icons/Empty.svg";
11+
import JupyterIcon from "/img/icons/Jupyter.svg";
12+
import EmscriptenForgeIcon from "/img/icons/EmscriptenForge.svg";
13+
14+
export const fundableProjectsDetails = {
15+
jupyterEcosystem: [
16+
{
17+
category: "Jupyter Ecosystem",
18+
title: "Modernize nbconvert",
19+
pageName: "NbconvertModernization",
20+
catchUpPhrase: "",
21+
shortDescription: "Conversion of Jupyter notebooks to PDF currently relies on nbconvert in the backend, which in turns uses a headless browser for producing the PDF. We propose to directly perform the PDF conversion in the user's browser, which will simplify the architecture and make it function with JupyterLite.",
22+
description: NbconvertModernizationMD,
23+
optionA: "This is option A",
24+
optionB: "This is option B",
25+
customOption: "This is custom option",
26+
icons: [JupyterIcon, EmptyIcon, EmptyIcon, EmptyIcon, EmptyIcon, EmptyIcon],
27+
price: "15000 €",
28+
maxNbOfFunders: 3,
29+
currentNbOfFunders: 2,
30+
currentFundingPercentage: 65,
31+
note: "Note: Costs and features can be further adapted following discussion with the funding organization. Open-source under relevant licenses. The funding organization will be credited in communication about the project.",
32+
repoLink: "https://github.com/jupyter/nbconvert"
33+
},
34+
{
35+
category: "Jupyter Ecosystem",
36+
title: "Raster processing tools in JupyterGIS",
37+
pageName: "JupyterGISRasterProcessing",
38+
catchUpPhrase: "",
39+
shortDescription: "JupyterGIS currently offers a set of vector processing and conversion tools. These capabilities are powered by a GDAL WebAssembly (WASM) build running in the browser. We will work on extending support to raster processing tools using the same underlying technology.",
40+
description: JupyterGISRasterProcessingMD,
41+
optionA: "This is option A",
42+
optionB: "This is option B",
43+
customOption: "This is custom option",
44+
icons: [JupyterIcon, JupyterGISIcon, ToolsIcon, PythonIcon, GlobeIcon, EmptyIcon],
45+
price: "15000 €",
46+
maxNbOfFunders: 4,
47+
currentNbOfFunders: 2,
48+
currentFundingPercentage: 45,
49+
note: "Note: Costs and features can be further adapted following discussion with the funding organization. Open-source under relevant licenses. The funding organization will be credited in communication about the project.",
50+
repoLink: "https://github.com/geojupyter/jupytergis"
51+
},
52+
{
53+
category: "Jupyter Ecosystem",
54+
title: "Bringing processing tools to the JupyterGIS Python API",
55+
pageName: "JupyterGISToolsForPythonAPI",
56+
catchUpPhrase: "",
57+
shortDescription: "JupyterGIS currently supports several vector processing and conversion tools, currently available only through the JupyterGIS user interface. We plan to extend these capabilities to the JupyterGIS Python API, enabling users to access the same processing tools programmatically. ",
58+
description: JupyterGISToolsForPythonAPIMD,
59+
optionA: "This is option A",
60+
optionB: "This is option B",
61+
customOption: "This is custom option",
62+
icons: [JupyterIcon, JupyterGISIcon, ToolsIcon, PythonIcon, GlobeIcon, EmptyIcon],
63+
price: "10000 €",
64+
maxNbOfFunders: 2,
65+
currentNbOfFunders: 0,
66+
currentFundingPercentage: 15,
67+
note: "Note: Costs and features can be further adapted following discussion with the funding organization. Open-source under relevant licenses. The funding organization will be credited in communication about the project.",
68+
repoLink: "https://github.com/geojupyter/jupytergis"
69+
},
70+
{
71+
category: "Jupyter Ecosystem",
72+
title: "Parquet File Viewer For JupyterLab",
73+
pageName: "JupyterLabParquetFileViewer",
74+
catchUpPhrase: "",
75+
shortDescription: "",
76+
description: JupyterLabParquetFileViewerMD,
77+
optionA: "This is option A",
78+
optionB: "This is option B",
79+
customOption: "This is custom option",
80+
icons: [JupyterIcon, EmptyIcon, EmptyIcon, EmptyIcon, EmptyIcon, EmptyIcon],
81+
price: "10000 €",
82+
maxNbOfFunders: 3,
83+
currentNbOfFunders: 1,
84+
currentFundingPercentage: 15,
85+
note: "Note: Costs and features can be further adapted following discussion with the funding organization. Open-source under relevant licenses. The funding organization will be credited in communication about the project.",
86+
repoLink: "https://github.com/jupyterlab/jupyterlab"
87+
}
88+
],
89+
packageManagement: [
90+
{
91+
category: "Package Management",
92+
title: "Package requests for emscripten-forge",
93+
pageName: "EmscriptenForgePackageRequests",
94+
catchUpPhrase: "",
95+
shortDescription: "Emscripten-forge is a conda package distribution specifically designed for WebAssembly. While the number of available emscripten-forge packages is growing quickly, many packages are still missing from the ecosystem. We will be working on adding new packages upon request.",
96+
description: EmscriptenForgePackageRequestsMD,
97+
optionA: "This is option A",
98+
optionB: "This is option B",
99+
customOption: "This is custom option",
100+
icons: [EmscriptenForgeIcon, EmptyIcon, EmptyIcon, EmptyIcon, EmptyIcon, EmptyIcon],
101+
price: "TBD",
102+
maxNbOfFunders: 1,
103+
currentNbOfFunders: 0,
104+
currentFundingPercentage: 0,
105+
note: "Note: Costs and features can be further adapted following discussion with the funding organization. Open-source under relevant licenses. The funding organization will be credited in communication about the project.",
106+
repoLink: "https://github.com/mamba-org/mamba"
107+
}],
108+
}
109+

0 commit comments

Comments
 (0)