Skip to content

Commit

Permalink
add dataset tab on projet page
Browse files Browse the repository at this point in the history
  • Loading branch information
pierromond committed Feb 24, 2023
1 parent ae31012 commit aad44cf
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 4 deletions.
3 changes: 3 additions & 0 deletions data/01_NANTES/dataset.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# About Dataset

blalbalblba
3 changes: 3 additions & 0 deletions data/02_LORIENT/dataset.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# About Dataset

blalbalblba
3 changes: 3 additions & 0 deletions data/03_Cart_ASUR/dataset.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# About Dataset

blalbalblba
1 change: 1 addition & 0 deletions data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Finally you can add context to your project by adding markdown files in the proj

- `project.md`: about page
- `sponsors.md`: sponsors page
- `dataset.md`: dataset page
- `bibliography.md`: references page

Those contents will be rendered as web pages accessible from the project page menu.
Expand Down
1 change: 1 addition & 0 deletions packages/client/i18n.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"page.project": "Project",
"page.sponsors": "Sponsors",
"page.dataset": "Dataset",
"page.bibliography": "Bibliography",
"variable.acoustic-birds": "Birds",
"variable.acoustic-voices": "Voices",
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/components/project/ProjectMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export interface ProjectMenuProps {
/**
* current project page id
*/
currentProjectPage?: string; //"maps" | "project" | "sponsors" | "bibliography"
currentProjectPage?: string; //"maps" | "project" | "dataset" | "sponsors" | "bibliography"
}

export const ProjectMenu: FC<ProjectMenuProps> = ({ id, className, style, project, currentProjectPage }) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/views/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const HomePage: FC = () => {
<Layout heading={t("Soundscape Mapping")}>
<div className="row">
<div className="col-12">
<Markdown content={t("<center>Welcome to the LASSO platform. <br> <br> The LASSO platform is a web-based platform that presents a range of spatio-temporal datasets related to soundscapes. These datasets are the result of collaborative projects between Gustave Eiffel University and the University of Cergy-Pontoise. The platform aims to demonstrate the value of soundscape mapping in comparison to standardized noise mapping, and to provide researchers and data analysts with access to exclusive soundscapes datasets. <br> In addition to serving as a repository of unique datasets, the LASSO platform provides a platform for researchers and specialists to submit their own projects for representation.<br> The LASSO platform is committed to advancing our understanding of the role of soundscapes in shaping our environment. Through this platform, users can explore the power of soundscapes and their impact on our daily lives.<br> <br> Enjoy your visit!</center>")} />
<Markdown content={t("<center>Welcome to the LASSO platform. <br> <br> The LASSO platform is a web-based platform that presents a range of spatio-temporal dataset related to soundscapes. These dataset are the result of collaborative projects between Gustave Eiffel University and the University of Cergy-Pontoise. The platform aims to demonstrate the value of soundscape mapping in comparison to standardized noise mapping, and to provide researchers and data analysts with access to exclusive soundscapes datasets. <br> In addition to serving as a repository of unique datasets, the LASSO platform provides a platform for researchers and specialists to submit their own projects for representation.<br> The LASSO platform is committed to advancing our understanding of the role of soundscapes in shaping our environment. Through this platform, users can explore the power of soundscapes and their impact on our daily lives.<br> <br> Enjoy your visit!</center>")} />
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/views/layout/Heading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ProjectMenu } from "../../components/project/ProjectMenu";
export const Heading: FC<{
heading?: string | JSX.Element;
project?: Project;
currentProjectPage?: string; //"maps" | "project" | "sponsors" | "bibliography"
currentProjectPage?: string; //"maps" | "project" | "dataset" |  "sponsors" | "bibliography"
}> = ({ heading, project, currentProjectPage }) => {
if (!heading && !project) return null;
return (
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/views/layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface LayoutProps {
fullPage?: boolean;
project?: Project;
heading?: string | JSX.Element;
currentProjectPage?: string; //"maps" | "project" | "sponsors" | "bibliography"
currentProjectPage?: string; //"maps" | "project" | "dataset" |  "sponsors" | "bibliography"
}
export const Layout: FC<PropsWithChildren<LayoutProps>> = ({
project,
Expand Down
8 changes: 8 additions & 0 deletions packages/dataprep/src/utils/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,22 @@ export async function exportProject(project: InternalProject): Promise<Project>
// TODO: change urls to images
const pages = { project: `${projectUrl}project.md` } as Project["pages"];
await fsu.writeFile(path.resolve(projectFolder, "project.md"), project.pages.project);

if (project.pages.dataset) {
await fsu.writeFile(path.resolve(projectFolder, "dataset.md"), project.pages.dataset);
pages.dataset = `${projectUrl}dataset.md`;
}

if (project.pages.sponsors) {
await fsu.writeFile(path.resolve(projectFolder, "sponsors.md"), project.pages.sponsors);
pages.sponsors = `${projectUrl}sponsors.md`;
}

if (project.pages.bibliography) {
await fsu.writeFile(path.resolve(projectFolder, "bibliography.md"), project.pages.bibliography);
pages.bibliography = `${projectUrl}bibliography.md`;
}


// Create geojson files if needed
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down

0 comments on commit aad44cf

Please sign in to comment.