diff --git a/CITATION.cff b/CITATION.cff index da6bcc25c..4d9cda253 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -75,5 +75,5 @@ keywords: - Software Impact - Software Reuse license: Apache-2.0 -version: v1.11.0 -date-released: '2022-11-15' +version: v1.11.1 +date-released: '2022-11-18' diff --git a/database/100-create-api-views.sql b/database/100-create-api-views.sql index 7a6537c62..80f872352 100644 --- a/database/100-create-api-views.sql +++ b/database/100-create-api-views.sql @@ -1171,7 +1171,13 @@ $$ BEGIN SELECT count(id) FROM software INTO software_cnt; SELECT count(id) FROM project INTO project_cnt; - SELECT count(id) FROM organisation WHERE parent IS NULL INTO organisation_cnt; + SELECT + count(id) AS organisation_cnt + FROM + organisations_overview(true) + WHERE + organisations_overview.parent IS NULL AND organisations_overview.score>0 + INTO organisation_cnt; SELECT count(display_name) FROM unique_contributors() INTO contributor_cnt; SELECT count(mention) FROM mention_for_software INTO software_mention_cnt; END diff --git a/frontend/components/AppFooter/ContactEmail.tsx b/frontend/components/AppFooter/ContactEmail.tsx index b6e0b0cb4..1138f51b6 100644 --- a/frontend/components/AppFooter/ContactEmail.tsx +++ b/frontend/components/AppFooter/ContactEmail.tsx @@ -8,12 +8,12 @@ import Mail from '@mui/icons-material/Mail' export default function ContactEmail({email}:{email?:string}) { if (email) { return ( -
-
Questions or comments?
+
+ {/*
Questions or comments?
*/} - {email} + {email}
) diff --git a/frontend/components/AppFooter/index.tsx b/frontend/components/AppFooter/index.tsx index b11758a12..7925c3b9f 100644 --- a/frontend/components/AppFooter/index.tsx +++ b/frontend/components/AppFooter/index.tsx @@ -21,8 +21,7 @@ export default function AppFooter () {

- The Research Software Directory aims to promote the impact, - the exchange and re-use of research software. + The Research Software Directory promotes the impact, re-use and citation of research software.

diff --git a/frontend/components/GlobalSearchAutocomplete/index.tsx b/frontend/components/GlobalSearchAutocomplete/index.tsx index d94e41c9b..c663114d8 100644 --- a/frontend/components/GlobalSearchAutocomplete/index.tsx +++ b/frontend/components/GlobalSearchAutocomplete/index.tsx @@ -128,7 +128,7 @@ export default function GlobalSearchAutocomplete(props: Props) { setOpen(false) }}>
+ className={`${props.className} relative z-10 flex w-full xl:w-[14.5rem] xl:max-w-[20rem] focus-within:w-full duration-700`}>
{/* Search Icon */} @@ -138,7 +138,7 @@ export default function GlobalSearchAutocomplete(props: Props) {
({ + mode: 'onChange', + defaultValues: { + name:'', + organisation: '', + role:'', + description: '' + } + }) + + const [name,organisation,role,description] = watch(['name','organisation','role','description']) + + // console.group('Organisation Sing Up') + // console.log('name...', name) + // console.log('organisation...', organisation) + // console.log('description...', description) + // console.groupEnd() + + function mailBody(): string | undefined { + return encodeURIComponent(`Hi RSD team, + + I would like to add my organisation to RSD! + + ------------------------- + Name: ${name} + Organisation: ${organisation} + Professional role: ${role} + ------------------------- + + ${description} + `) + } + + function closeAndReset() { + setOpen(false) + // reset form after all processes settled + // we need to wait for mailBody function + setTimeout(() => { + reset() + },0) + } + + return ( + <> + + setOpen(false)} + aria-labelledby="responsive-dialog-title" + > +
+
+
+ {config.button.register.label} +
+
+ You can find more information about registering your organisation in our documentation. +
+ {/* INPUTS */} + + + + + {/* NOTIFICATIONS */} +
+ {organisationSignUp.notification[0]}
+ {organisationSignUp.notification[1]} +
+ {/* NAVIGATION */} +
+ + + Create email * + +
+
+
+
+ + ) +} diff --git a/frontend/components/home/rsd/PersonalSignUp.tsx b/frontend/components/home/rsd/PersonalSignUp.tsx new file mode 100644 index 000000000..eba734717 --- /dev/null +++ b/frontend/components/home/rsd/PersonalSignUp.tsx @@ -0,0 +1,177 @@ +// SPDX-FileCopyrightText: 2022 Dusan Mijatovic (dv4all) +// SPDX-FileCopyrightText: 2022 dv4all +// +// SPDX-License-Identifier: Apache-2.0 + +import {useState} from 'react' +import useTheme from '@mui/material/styles/useTheme' +import useMediaQuery from '@mui/material/useMediaQuery' +import Dialog from '@mui/material/Dialog' +import MailOutlineOutlined from '@mui/icons-material/MailOutlineOutlined' + +import {config,personalSignUp} from './config' +import useRsdSettings from '~/config/useRsdSettings' +import {useForm} from 'react-hook-form' + +type SignUpForm = { + name: string, + affiliation: string, + role: string, + orcid: string, + description:string +} + +const inputClasses='mb-4 placeholder:text-gray-500 outline-0 p-2 w-full text-sm bg-transparent text-white border border-gray-600 rounded-sm' + +export default function PersonalSignUp({minWidth = '9rem'}:{minWidth:string}) { + const theme = useTheme() + const fullScreen = useMediaQuery(theme.breakpoints.down('sm')) + const {host} = useRsdSettings() + const [open, setOpen] = useState(false) + + const {register, watch, reset} = useForm({ + mode: 'onChange', + defaultValues: { + name:'', + affiliation: '', + role:'', + orcid: '', + description: '' + } + }) + + const [name,affiliation,role,orcid,description] = watch(['name','affiliation','role','orcid','description']) + + // console.group('Personal Sing Up') + // console.log('name...', name) + // console.log('affiliation...', affiliation) + // console.log('orcid...', orcid) + // console.log('description...', description) + // console.groupEnd() + + function mailBody(): string | undefined { + return encodeURIComponent(`Hi RSD team, + + I would like to join RSD! + + ------------------------- + Name: ${name} + Affiliation: ${affiliation} + Professional role: ${role} + ORCID: ${orcid} + ------------------------- + + ${description} + `) + } + + function closeAndReset() { + setOpen(false) + // reset form after all processes settled + // we need to wait for mailBody function + setTimeout(() => { + reset() + },0) + } + + return ( + <> + + setOpen(false)} + aria-labelledby="responsive-dialog-title" + > +
+
+
+ {config.button.signUp.label} +
+
+ You can find more information about how to get access in our documentation. +
+ {/* INPUTS */} + + + + + +
+ +
+ {/* NOTIFICATIONS */} +
+ {personalSignUp.notification[0]}
+ {personalSignUp.notification[1]} +
+ {/* NAVIGATION */} +
+ + + Create email * + +
+
+
+
+ + ) +} diff --git a/frontend/components/home/rsd/config.ts b/frontend/components/home/rsd/config.ts index 640f1d1c7..3b5fe1008 100644 --- a/frontend/components/home/rsd/config.ts +++ b/frontend/components/home/rsd/config.ts @@ -12,13 +12,15 @@ export const config = { }, signUp: { label: 'Sign up to contribute', - url: 'https://research-software-directory.github.io/documentation/getting-access.html', - target: '_blank' + // MOVED to form + // url: 'https://research-software-directory.github.io/documentation/getting-access.html', + // target: '_blank' }, register: { - label: 'Register your organization', - url: 'mailto:rsd@esciencecenter.nl?subject=Register organisation', - target: '_blank' + label: 'Register your organisation', + // MOVED to form + // url: 'mailto:rsd@esciencecenter.nl?subject=Register organisation', + // target: '_blank' }, demo: { label: 'Demo', @@ -52,3 +54,47 @@ export const config = { }, } } + +export const personalSignUp = { + notification: [ + '* Required', + 'We will use your default email application to send an email to rsd@esciencecenter.nl. Please send us an email directly if this fails.' + ], + name: { + label: 'Your name *' + }, + affiliation: { + label: 'Your affiliation *' + }, + role: { + label: 'Your professional role' + }, + orcid: { + label: 'Your ORCID' + }, + description: { + label: 'Any additional information you would like to share about your request, such as a description of the content you would like to contribute.', + } +} + +export const organisationSignUp = { + notification: [ + '* Required', + 'We will use your default email application to send an email to rsd@esciencecenter.nl. Please send us an email directly if this fails.' + ], + name: { + label: 'Name *' + }, + organisation: { + label: 'Organisation *' + }, + role: { + label: 'Professional role' + }, + // rorId: { + // label: 'ROR id' + // }, + description: { + label: 'Any additional information you would like to share about your request such as a link to the website of your organisation.', + } +} diff --git a/frontend/components/home/rsd/index.tsx b/frontend/components/home/rsd/index.tsx index f165ef369..150e36871 100644 --- a/frontend/components/home/rsd/index.tsx +++ b/frontend/components/home/rsd/index.tsx @@ -24,6 +24,8 @@ import LogoUMC from '~/assets/logos/LogoUMC.svg' import LogoUU from '~/assets/logos/LogoUU.svg' import LogoLeiden from '~/assets/logos/LogoLeiden.svg' import Arc from './arc.svg' +import PersonalSignUp from './PersonalSignUp' +import OrganisationSignUp from './OrganisationSignUp' /*! purgecss start ignore */ import 'aos/dist/aos.css' @@ -76,44 +78,40 @@ export default function RsdHome({software_cnt, project_cnt, organisation_cnt, co {/* Jumbo Banner */} -
- - {/* Jumbo Image*/} -
- rsd-illustration -
- -
- {/* Jumbo Text*/} -
-

- Showing the impact
- of research software -

-
- The - Research Software Directory - - is designed to show the impact research software has on research and society. We - stimulate the reuse of research software and encourage proper citation of research - software to ensure researchers and RSEs get credit for their work. {/*Learn more.*/} -
- - {/*
- -
*/} +
+ {/* Jumbo Text*/} +
+

+ Show your research software to the world +

+
+ The + Research Software Directory + + is designed to show the impact research software has on research and society. We + stimulate the reuse of research software and encourage proper citation of research + software to ensure researchers and RSEs get credit for their work. {/*Learn more.*/}
+ {/* Jumbo image */} +
+ rsd-illustration +
{/* Divider */} {/* */} - {/* stats */} + {/* Stats */}
{software_cnt} Software
@@ -145,75 +143,10 @@ export default function RsdHome({software_cnt, project_cnt, organisation_cnt, co {/* Arc separator */} - - {/* Feature Cards - Saved for later */} - {/*
-
-
-
-
-
- Discover -
-
- Find - - - research software - - that is relevant to your research -
-
-
-
-
- -
-
-
-
-
- Share -
-
- Showcase your research software and promote reuse by others. -
-
-
-
-
-
-
-
-
-
- Impact -
-
- Enable developers and research organizations to monitor the impact of their - research software. -
-
-
-
-
-
*/} - - {/* Get started section */} -
+

{/* eslint-disable-next-line react/no-unescaped-entities */} @@ -240,21 +173,17 @@ export default function RsdHome({software_cnt, project_cnt, organisation_cnt, co data-aos-duration="300" data-aos-easing="ease-in-out" > - +

- +
@@ -263,9 +192,11 @@ export default function RsdHome({software_cnt, project_cnt, organisation_cnt, co {/* Our Goals Section */} -
+

Our goals

@@ -320,6 +251,7 @@ export default function RsdHome({software_cnt, project_cnt, organisation_cnt, co {/* Learn more section */}
Try out our online demo, or get more detailed information in our documentation and - faq. + FAQ.

+

{/* eslint-disable-next-line react/no-unescaped-entities */} @@ -387,7 +321,7 @@ export default function RsdHome({software_cnt, project_cnt, organisation_cnt, co

The Research Software Directory is an open source project initiated by the Netherlands - eScience Center. We are always open for improvements and discussions. Feel free to + eScience Center and jointly developed with Helmholtz. Feel free to contact us or join our effort!

@@ -427,7 +361,9 @@ export default function RsdHome({software_cnt, project_cnt, organisation_cnt, co {/* Logos */} -
+
Partners using the Research Software Directory
diff --git a/frontend/public/data/settings.json b/frontend/public/data/settings.json index 8ef251b04..887b99846 100644 --- a/frontend/public/data/settings.json +++ b/frontend/public/data/settings.json @@ -18,7 +18,7 @@ "target": "_self" }, { - "label": "Documentation", + "label": "User Documentation", "url": "https://research-software-directory.github.io/documentation", "target": "_blank" }, diff --git a/frontend/public/images/screenshots.webp b/frontend/public/images/screenshots.webp new file mode 100644 index 000000000..2f26b213e Binary files /dev/null and b/frontend/public/images/screenshots.webp differ diff --git a/frontend/public/images/screenshots.webp.license b/frontend/public/images/screenshots.webp.license new file mode 100644 index 000000000..49b108bbb --- /dev/null +++ b/frontend/public/images/screenshots.webp.license @@ -0,0 +1,6 @@ +SPDX-FileCopyrightText: 2022 Jesús García Gonzalez (Netherlands eScience Center) +SPDX-FileCopyrightText: 2022 Netherlands eScience Center +SPDX-FileCopyrightText: 2022 Dusan Mijatovic (dv4all) +SPDX-FileCopyrightText: 2022 dv4all + +SPDX-License-Identifier: CC-BY-4.0 diff --git a/frontend/utils/getOrganisations.ts b/frontend/utils/getOrganisations.ts index ddc80b609..166b34437 100644 --- a/frontend/utils/getOrganisations.ts +++ b/frontend/utils/getOrganisations.ts @@ -16,7 +16,7 @@ import {paginationUrlParams} from './postgrestUrl' export function organisationListUrl({search, rows = 12, page = 0}: { search: string | undefined, rows: number, page: number }) { // by default order is on software count and name - let url = `${process.env.POSTGREST_URL}/rpc/organisations_overview?parent=is.null&order=score.desc.nullslast,name.asc` + let url = `${process.env.POSTGREST_URL}/rpc/organisations_overview?parent=is.null&score=gt.0&order=is_tenant.desc,score.desc.nullslast,name.asc` // add search params if (search) { url += `&or=(name.ilike.*${search}*, website.ilike.*${search}*)`