diff --git a/.env.example b/.env.example index 708c880..ecf25e0 100644 --- a/.env.example +++ b/.env.example @@ -60,7 +60,7 @@ RSD_ENVIRONMENT=prod # Allowed values are: SURFCONEXT, ORCID, AZURE, LINKEDIN or LOCAL # if env value is not provided default provider is set to be SURFCONEXT # if you add the value "LOCAL", then local accounts are enabled, USE THIS FOR TESTING PURPOSES ONLY -RSD_AUTH_PROVIDERS=SURFCONEXT;ORCID;AZURE;LOCAL +RSD_AUTH_PROVIDERS=LINKEDIN;ORCID;LOCAL # consumed by services: authentication, frontend (api/fe) # provide a list of supported OpenID auth providers for coupling with the user's RSD account diff --git a/data-generation/main.js b/data-generation/main.js index 88aabea..753dcec 100644 --- a/data-generation/main.js +++ b/data-generation/main.js @@ -15,44 +15,78 @@ const orcids = generateOrcids(); const [ accounts, idsMentions -] = await Promise.all([ +] = await Promise.allSettled([ generateAccounts(orcids), generateMentions() ]) -console.log("accounts...", accounts.length) -console.log("mentions...", idsMentions.length) +if (accounts.status==='fulfilled'){ + console.log("accounts...DONE...", accounts.value.length) +}else{ + console.log("accounts...FAILED...", accounts.reason) +} + +if(idsMentions.status==='fulfilled'){ + console.log("mentions...DONE...", idsMentions.value.length) +}else{ + console.log("mentions...FAILED...", idsMentions.reason) +} // software, projects, news and meta pages const [ // idsSoftware, idsProjects, - // idsNews, + idsNews, idsMeta -] = await Promise.all([ +] = await Promise.allSettled([ // generateSoftware({orcids,idsMentions}), - generateProject({orcids,idsMentions}), - // generateNews(), + generateProject({ + orcids, + idsMentions:idsMentions.value + }), + generateNews(), generateMetaPages() ]) -// console.log("software...", idsSoftware.length) -console.log("projects...", idsProjects.length) -// console.log("news...", idsNews.length) -console.log("meta pages...", idsMeta.length) +if (idsProjects.status==='fulfilled'){ + // console.log("software...", idsSoftware.length) + console.log("projects...DONE...", idsProjects.value.length) +}else{ + console.log("projects...FAILED...", idsProjects.reason) +} + +if (idsNews.status==='fulfilled'){ + console.log("news...DONE...", idsNews.value.length) +}else{ + console.log("news...FAILED...", idsNews.reason) +} + +if (idsMeta.status==='fulfilled'){ + // console.log("news...", idsNews.length) + console.log("meta pages...DONE...", idsMeta.value.length) +}else{ + console.log("meta pages...FAILED...", idsMeta.reason) +} -// organisations and communities +// organisations, news and communities const [ idsOrganisations, // idsCommunities, -] = await Promise.all([ - generateOrganisation({idsSoftware:[],idsProjects,idsMentions}), +] = await Promise.allSettled([ + generateOrganisation({ + idsSoftware:[], + idsProjects:idsProjects.value, + idsMentions: idsMentions.value + }), // generateCommunities({idsSoftware}), ]) -console.log("organisations...", idsOrganisations.length) +if (idsOrganisations.status==='fulfilled'){ + console.log("organisations...DONE...", idsOrganisations.value.length) +}else{ + console.log("organisations...FAILED...", idsOrganisations.reason) +} -// console.log("communities...", idsCommunities.length) console.log('Done'); // This is unfortunately needed, because when using docker compose, the node process might hang for a long time diff --git a/data-generation/news.js b/data-generation/news.js index fd24c6d..aa54718 100644 --- a/data-generation/news.js +++ b/data-generation/news.js @@ -9,7 +9,7 @@ export async function generateNews(){ const news = await postToBackend('/news', createNews()) const newsIds = news.map(n=>n.id) - const newsData = Promise.all([ + const newsData = await Promise.all([ postToBackend('/image_for_news', generateImagesForNews(newsIds, newsImageIds)) ]) diff --git a/data-generation/project.js b/data-generation/project.js index 670b2d0..8b506de 100644 --- a/data-generation/project.js +++ b/data-generation/project.js @@ -18,19 +18,32 @@ export async function generateProject({orcids,idsMentions,amount = 500}){ const projects = await postToBackend('/project', createProjects(projectImageIds,amount)) const idsProjects = projects.map(p=>p.id) - const projectData = await Promise.all([ - postToBackend('/team_member', await generateTeamMembers(idsProjects,peopleWithOrcid,projectImageIds)), - postToBackend('/url_for_project', generateUrlsForProjects(idsProjects)), - postToBackend('/keyword_for_project', generateKeywordsForEntity(idsProjects, idsKeywords, 'project')), - postToBackend('/output_for_project', generateMentionsForEntity(idsProjects, idsMentions, 'project')), - postToBackend('/impact_for_project', generateMentionsForEntity(idsProjects, idsMentions, 'project')), - postToBackend( - '/research_domain_for_project', - generateResearchDomainsForProjects(idsProjects, idsResearchDomains) - ), - postToBackend('/project_for_project', generateSoftwareForSoftware(idsProjects)) + const teamMembers = generateTeamMembers(idsProjects,peopleWithOrcid,projectImageIds) + const projectUrls = generateUrlsForProjects(idsProjects) + const keywords = generateKeywordsForEntity(idsProjects, idsKeywords, 'project') + const output = generateMentionsForEntity(idsProjects, idsMentions, 'project') + const impact = generateMentionsForEntity(idsProjects, idsMentions, 'project') + const researchDomains = generateResearchDomainsForProjects(idsProjects, idsResearchDomains) + const relatedProjects = generateSoftwareForSoftware(idsProjects) + + const responses = await Promise.allSettled([ + postToBackend('/team_member', teamMembers), + postToBackend('/url_for_project', projectUrls), + postToBackend('/keyword_for_project', keywords), + postToBackend('/output_for_project', output), + postToBackend('/impact_for_project', impact), + postToBackend('/research_domain_for_project', researchDomains), + postToBackend('/project_for_project', relatedProjects) ]) + responses.forEach((resp,idx)=>{ + if (resp.status==="fulfilled"){ + console.log("Project section...", idx, "...OK") + }else{ + console.log("Project section...", idx, "...FAILED: ",resp.reason) + } + }) + return idsProjects } @@ -86,10 +99,11 @@ export function createProjects(projectImageIds,amount = 500) { return result; } -export async function generateTeamMembers(projectIds, peopleWithOrcids, contributorImageIds=[],minPerProject = 0, maxPerProject = 15) { +export function generateTeamMembers(projectIds, peopleWithOrcids, contributorImageIds=[],minPerProject = 0, maxPerProject = 15) { const result = []; for (const projectId of projectIds) { + const amount = faker.number.int({ max: maxPerProject, min: minPerProject, diff --git a/data-generation/utils.js b/data-generation/utils.js index 656a97c..d5a7f53 100644 --- a/data-generation/utils.js +++ b/data-generation/utils.js @@ -136,7 +136,7 @@ export function mimeTypeFromFileName(fileName) { if (fileName.endsWith('.png')) { return 'image/png'; } else if (fileName.endsWith('.jpg') || fileName.endsWith('.jpeg')) { - return 'image/jpg'; + return 'image/jpeg'; } else if (fileName.endsWith('.svg')) { return 'image/svg+xml'; } else return null; diff --git a/deployment/docker-compose.yml b/deployment/docker-compose.yml index eacce18..f20f862 100644 --- a/deployment/docker-compose.yml +++ b/deployment/docker-compose.yml @@ -5,7 +5,7 @@ services: database: container_name: database - image: ghcr.io/research-software-directory/rsd-saas/database:v2.17.0 + image: ghcr.io/research-software-directory/rsd-saas/database:v2.29.0 expose: - 5432 environment: @@ -25,7 +25,7 @@ services: backend: container_name: backend - image: ghcr.io/research-software-directory/rsd-saas/backend:v2.17.0 + image: ghcr.io/research-software-directory/rsd-saas/backend:v2.29.0 expose: - 3500 environment: @@ -43,7 +43,7 @@ services: auth: container_name: auth - image: ghcr.io/research-software-directory/rsd-saas/auth:v2.28.0 + image: ghcr.io/research-software-directory/rsd-saas/auth:v2.29.0 expose: - 7000 environment: @@ -82,7 +82,7 @@ services: scrapers: container_name: scrapers - image: ghcr.io/research-software-directory/rsd-saas/scrapers:v2.17.0 + image: ghcr.io/research-software-directory/rsd-saas/scrapers:v2.29.0 environment: # it uses values from .env file - POSTGREST_URL diff --git a/docker-compose.yml b/docker-compose.yml index f4da0b9..e0abddf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,7 @@ services: database: - image: ghcr.io/research-software-directory/rsd-saas/database:v2.17.0 + image: ghcr.io/research-software-directory/rsd-saas/database:v2.29.0 ports: # enable connection from outside (development mode) - "5432:5432" @@ -23,7 +23,7 @@ services: - net backend: - image: ghcr.io/research-software-directory/rsd-saas/backend:v2.17.0 + image: ghcr.io/research-software-directory/rsd-saas/backend:v2.29.0 expose: - 3500 environment: @@ -39,7 +39,7 @@ services: - net auth: - image: ghcr.io/research-software-directory/rsd-saas/auth:v2.28.0 + image: ghcr.io/research-software-directory/rsd-saas/auth:v2.29.0 ports: - 5005:5005 expose: @@ -85,7 +85,7 @@ services: ] scrapers: - image: ghcr.io/research-software-directory/rsd-saas/scrapers:v2.17.0 + image: ghcr.io/research-software-directory/rsd-saas/scrapers:v2.29.0 environment: # it uses values from .env file - POSTGREST_URL @@ -110,7 +110,7 @@ services: # dockerfile to use for build dockerfile: Dockerfile # update version number to correspond to frontend/package.json - image: kin-rpd/frontend:0.0.2 + image: kin-rpd/frontend:0.1.0 environment: # it uses values from .env file - POSTGREST_URL @@ -161,7 +161,7 @@ services: context: ./documentation # dockerfile to use for build dockerfile: Dockerfile - image: kin-rpd/documentation:0.0.1 + image: kin-rpd/documentation:0.1.0 expose: - "80" networks: diff --git a/frontend/components/AppFooter/index.tsx b/frontend/components/AppFooter/index.tsx index 01f6d8b..c35dee4 100644 --- a/frontend/components/AppFooter/index.tsx +++ b/frontend/components/AppFooter/index.tsx @@ -26,7 +26,7 @@ export default function AppFooter () {

{/*
*/} -
+
diff --git a/frontend/components/AppHeader/index.tsx b/frontend/components/AppHeader/index.tsx index 425bae2..8bbb64b 100644 --- a/frontend/components/AppHeader/index.tsx +++ b/frontend/components/AppHeader/index.tsx @@ -51,16 +51,13 @@ export default function AppHeader() {
KIN logo diff --git a/frontend/public/data/settings.json b/frontend/public/data/settings.json index 38adb34..afbdf71 100644 --- a/frontend/public/data/settings.json +++ b/frontend/public/data/settings.json @@ -1,12 +1,13 @@ { "host": { "name": "kin-rpd", + "email": "veda@hetkin.nl", "emailHeaders": [], - "logo_url": "/images/logo-KIN.svg", - "website": "https://hetkin.nl/en/home-en/", + "logo_url": "/images/veda-beta-logo.png", + "website": "https://hetkin.nl/en/", "feedback": { "enabled": true, - "url": "rsd@esciencecenter.nl", + "url": "veda@hetkin.nl", "issues_page_url": "https://github.com/research-software-directory/KIN-RPD/issues" }, "login_info_url":"https://research-software-directory.github.io/documentation/getting-access.html", @@ -52,19 +53,19 @@ "base-content": "#306070", "base-content-secondary": "rgba(48,96,112,0.7)", "base-content-disabled": "rgba(34,36,37,0.45)", - "primary": "#01A2D6", + "primary": "#01a2d6", "primary-content": "#fff", "secondary": "#306070", "secondary-content": "#fff", - "accent": "#a3ccb9", - "accent-content": "#306070", - "error": "#8A1D12", + "accent": "#01a2d6", + "accent-content": "#fff", + "error": "#EC5F59", "error-content": "#fff", "warning": "#ed6c02", "warning-content": "#fff", "info": "#0288d1", "info-content": "#fff", - "success": "#307070", + "success": "#71ad93", "success-content": "#fff", "glow-start": "#db2777", "glow-end": "#9333ea" @@ -101,15 +102,15 @@ "primary-content": "#fff", "secondary": "#306070", "secondary-content": "#fff", - "accent": "#73095d", + "accent": "#6C4E71", "accent-content": "#fff", - "error": "#e53935", + "error": "#EC5F59", "error-content": "#000", "warning": "#ed6c02", "warning-content": "#000", "info": "#0288d1", "info-content": "#000", - "success": "#2e7d32", + "success": "#71ad93", "success-content": "#fff", "glow-start": "#db2777", "glow-end": "#9333ea" @@ -129,8 +130,8 @@ } }, "typography": { - "defaultFontFamily": "aller, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif,'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'", - "titlesFontFamily": "aller, Roboto, sans-serif", + "defaultFontFamily": "Aller, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif,'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'", + "titlesFontFamily": "Aller, Roboto, sans-serif", "fontWeightLight": 200, "fontWeightRegular": 400, "fontWeightMedium": 500, diff --git a/frontend/public/images/veda-banner.svg b/frontend/public/images/veda-banner.svg new file mode 100644 index 0000000..e548c53 --- /dev/null +++ b/frontend/public/images/veda-banner.svg @@ -0,0 +1,825 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/public/images/veda-beta-logo.png b/frontend/public/images/veda-beta-logo.png new file mode 100644 index 0000000..606b07e Binary files /dev/null and b/frontend/public/images/veda-beta-logo.png differ diff --git a/frontend/public/styles/aller/v12/AllerDisplay.woff b/frontend/public/styles/aller/v12/AllerDisplay.woff new file mode 100644 index 0000000..e111dd5 Binary files /dev/null and b/frontend/public/styles/aller/v12/AllerDisplay.woff differ diff --git a/frontend/public/styles/aller/v12/Aller_Bd.woff b/frontend/public/styles/aller/v12/Aller_Bd.woff new file mode 100644 index 0000000..ed352f9 Binary files /dev/null and b/frontend/public/styles/aller/v12/Aller_Bd.woff differ diff --git a/frontend/public/styles/aller/v12/Aller_BdIt.woff b/frontend/public/styles/aller/v12/Aller_BdIt.woff new file mode 100644 index 0000000..775f8f8 Binary files /dev/null and b/frontend/public/styles/aller/v12/Aller_BdIt.woff differ diff --git a/frontend/public/styles/aller/v12/Aller_It.woff b/frontend/public/styles/aller/v12/Aller_It.woff new file mode 100644 index 0000000..11c49c8 Binary files /dev/null and b/frontend/public/styles/aller/v12/Aller_It.woff differ diff --git a/frontend/public/styles/aller/v12/Aller_LtIt.woff b/frontend/public/styles/aller/v12/Aller_LtIt.woff new file mode 100644 index 0000000..e2c898f Binary files /dev/null and b/frontend/public/styles/aller/v12/Aller_LtIt.woff differ diff --git a/frontend/public/styles/aller/v12/Aller_Rg.woff b/frontend/public/styles/aller/v12/Aller_Rg.woff new file mode 100644 index 0000000..110b5a1 Binary files /dev/null and b/frontend/public/styles/aller/v12/Aller_Rg.woff differ diff --git a/frontend/public/styles/index.css b/frontend/public/styles/index.css index a8f442b..4d5780b 100644 --- a/frontend/public/styles/index.css +++ b/frontend/public/styles/index.css @@ -325,3 +325,41 @@ https: //fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500&display=sw unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } +/* ALLER from fonts.cdn */ + +@font-face { + font-family: 'Aller'; + font-style: normal; + font-weight: 400; + src: local('Aller'), url(aller/v12/Aller_Rg.woff) format('woff'); +} +@font-face { + font-family: 'Aller'; + font-style: italic; + font-weight: 400; + src: local('Aller'), url(aller/v12/Aller_It.woff) format('woff'); +} +@font-face { + font-family: 'Aller'; + font-style: normal; + font-weight: 700; + src: local('Aller'), url(aller/v12/Aller_Bd.woff) format('woff'); +} +@font-face { + font-family: 'Aller'; + font-style: italic; + font-weight: 700; + src: local('Aller'), url(aller/v12/Aller_BdIt.woff) format('woff'); +} +@font-face { + font-family: 'Aller Display'; + font-style: normal; + font-weight: 400; + src: local('Aller Display'), url(aller/v12/AllerDisplay.woff) format('woff'); +} +@font-face { + font-family: 'Aller Light'; + font-style: italic; + font-weight: 400; + src: local('Aller Light'), url(aller/v12/Aller_LtIt.woff) format('woff'); +}