Skip to content

Commit 897e3e9

Browse files
authored
Merge pull request #9 from research-software-directory/7-kin-styles
KIN styles can be reviewed in the next PR where we make additional changed to homepage content
2 parents bd35c72 + 7141154 commit 897e3e9

File tree

19 files changed

+970
-61
lines changed

19 files changed

+970
-61
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ RSD_ENVIRONMENT=prod
6060
# Allowed values are: SURFCONEXT, ORCID, AZURE, LINKEDIN or LOCAL
6161
# if env value is not provided default provider is set to be SURFCONEXT
6262
# if you add the value "LOCAL", then local accounts are enabled, USE THIS FOR TESTING PURPOSES ONLY
63-
RSD_AUTH_PROVIDERS=SURFCONEXT;ORCID;AZURE;LOCAL
63+
RSD_AUTH_PROVIDERS=LINKEDIN;ORCID;LOCAL
6464

6565
# consumed by services: authentication, frontend (api/fe)
6666
# provide a list of supported OpenID auth providers for coupling with the user's RSD account

data-generation/main.js

Lines changed: 50 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,44 +15,78 @@ const orcids = generateOrcids();
1515
const [
1616
accounts,
1717
idsMentions
18-
] = await Promise.all([
18+
] = await Promise.allSettled([
1919
generateAccounts(orcids),
2020
generateMentions()
2121
])
2222

23-
console.log("accounts...", accounts.length)
24-
console.log("mentions...", idsMentions.length)
23+
if (accounts.status==='fulfilled'){
24+
console.log("accounts...DONE...", accounts.value.length)
25+
}else{
26+
console.log("accounts...FAILED...", accounts.reason)
27+
}
28+
29+
if(idsMentions.status==='fulfilled'){
30+
console.log("mentions...DONE...", idsMentions.value.length)
31+
}else{
32+
console.log("mentions...FAILED...", idsMentions.reason)
33+
}
2534

2635
// software, projects, news and meta pages
2736
const [
2837
// idsSoftware,
2938
idsProjects,
30-
// idsNews,
39+
idsNews,
3140
idsMeta
32-
] = await Promise.all([
41+
] = await Promise.allSettled([
3342
// generateSoftware({orcids,idsMentions}),
34-
generateProject({orcids,idsMentions}),
35-
// generateNews(),
43+
generateProject({
44+
orcids,
45+
idsMentions:idsMentions.value
46+
}),
47+
generateNews(),
3648
generateMetaPages()
3749
])
3850

39-
// console.log("software...", idsSoftware.length)
40-
console.log("projects...", idsProjects.length)
41-
// console.log("news...", idsNews.length)
42-
console.log("meta pages...", idsMeta.length)
51+
if (idsProjects.status==='fulfilled'){
52+
// console.log("software...", idsSoftware.length)
53+
console.log("projects...DONE...", idsProjects.value.length)
54+
}else{
55+
console.log("projects...FAILED...", idsProjects.reason)
56+
}
57+
58+
if (idsNews.status==='fulfilled'){
59+
console.log("news...DONE...", idsNews.value.length)
60+
}else{
61+
console.log("news...FAILED...", idsNews.reason)
62+
}
63+
64+
if (idsMeta.status==='fulfilled'){
65+
// console.log("news...", idsNews.length)
66+
console.log("meta pages...DONE...", idsMeta.value.length)
67+
}else{
68+
console.log("meta pages...FAILED...", idsMeta.reason)
69+
}
4370

44-
// organisations and communities
71+
// organisations, news and communities
4572
const [
4673
idsOrganisations,
4774
// idsCommunities,
48-
] = await Promise.all([
49-
generateOrganisation({idsSoftware:[],idsProjects,idsMentions}),
75+
] = await Promise.allSettled([
76+
generateOrganisation({
77+
idsSoftware:[],
78+
idsProjects:idsProjects.value,
79+
idsMentions: idsMentions.value
80+
}),
5081
// generateCommunities({idsSoftware}),
5182
])
5283

53-
console.log("organisations...", idsOrganisations.length)
84+
if (idsOrganisations.status==='fulfilled'){
85+
console.log("organisations...DONE...", idsOrganisations.value.length)
86+
}else{
87+
console.log("organisations...FAILED...", idsOrganisations.reason)
88+
}
5489

55-
// console.log("communities...", idsCommunities.length)
5690
console.log('Done');
5791

5892
// This is unfortunately needed, because when using docker compose, the node process might hang for a long time

data-generation/news.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export async function generateNews(){
99
const news = await postToBackend('/news', createNews())
1010
const newsIds = news.map(n=>n.id)
1111

12-
const newsData = Promise.all([
12+
const newsData = await Promise.all([
1313
postToBackend('/image_for_news', generateImagesForNews(newsIds, newsImageIds))
1414
])
1515

data-generation/project.js

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,32 @@ export async function generateProject({orcids,idsMentions,amount = 500}){
1818
const projects = await postToBackend('/project', createProjects(projectImageIds,amount))
1919
const idsProjects = projects.map(p=>p.id)
2020

21-
const projectData = await Promise.all([
22-
postToBackend('/team_member', await generateTeamMembers(idsProjects,peopleWithOrcid,projectImageIds)),
23-
postToBackend('/url_for_project', generateUrlsForProjects(idsProjects)),
24-
postToBackend('/keyword_for_project', generateKeywordsForEntity(idsProjects, idsKeywords, 'project')),
25-
postToBackend('/output_for_project', generateMentionsForEntity(idsProjects, idsMentions, 'project')),
26-
postToBackend('/impact_for_project', generateMentionsForEntity(idsProjects, idsMentions, 'project')),
27-
postToBackend(
28-
'/research_domain_for_project',
29-
generateResearchDomainsForProjects(idsProjects, idsResearchDomains)
30-
),
31-
postToBackend('/project_for_project', generateSoftwareForSoftware(idsProjects))
21+
const teamMembers = generateTeamMembers(idsProjects,peopleWithOrcid,projectImageIds)
22+
const projectUrls = generateUrlsForProjects(idsProjects)
23+
const keywords = generateKeywordsForEntity(idsProjects, idsKeywords, 'project')
24+
const output = generateMentionsForEntity(idsProjects, idsMentions, 'project')
25+
const impact = generateMentionsForEntity(idsProjects, idsMentions, 'project')
26+
const researchDomains = generateResearchDomainsForProjects(idsProjects, idsResearchDomains)
27+
const relatedProjects = generateSoftwareForSoftware(idsProjects)
28+
29+
const responses = await Promise.allSettled([
30+
postToBackend('/team_member', teamMembers),
31+
postToBackend('/url_for_project', projectUrls),
32+
postToBackend('/keyword_for_project', keywords),
33+
postToBackend('/output_for_project', output),
34+
postToBackend('/impact_for_project', impact),
35+
postToBackend('/research_domain_for_project', researchDomains),
36+
postToBackend('/project_for_project', relatedProjects)
3237
])
3338

39+
responses.forEach((resp,idx)=>{
40+
if (resp.status==="fulfilled"){
41+
console.log("Project section...", idx, "...OK")
42+
}else{
43+
console.log("Project section...", idx, "...FAILED: ",resp.reason)
44+
}
45+
})
46+
3447
return idsProjects
3548
}
3649

@@ -86,10 +99,11 @@ export function createProjects(projectImageIds,amount = 500) {
8699
return result;
87100
}
88101

89-
export async function generateTeamMembers(projectIds, peopleWithOrcids, contributorImageIds=[],minPerProject = 0, maxPerProject = 15) {
102+
export function generateTeamMembers(projectIds, peopleWithOrcids, contributorImageIds=[],minPerProject = 0, maxPerProject = 15) {
90103
const result = [];
91104

92105
for (const projectId of projectIds) {
106+
93107
const amount = faker.number.int({
94108
max: maxPerProject,
95109
min: minPerProject,

data-generation/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export function mimeTypeFromFileName(fileName) {
136136
if (fileName.endsWith('.png')) {
137137
return 'image/png';
138138
} else if (fileName.endsWith('.jpg') || fileName.endsWith('.jpeg')) {
139-
return 'image/jpg';
139+
return 'image/jpeg';
140140
} else if (fileName.endsWith('.svg')) {
141141
return 'image/svg+xml';
142142
} else return null;

deployment/docker-compose.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
services:
66
database:
77
container_name: database
8-
image: ghcr.io/research-software-directory/rsd-saas/database:v2.17.0
8+
image: ghcr.io/research-software-directory/rsd-saas/database:v2.29.0
99
expose:
1010
- 5432
1111
environment:
@@ -25,7 +25,7 @@ services:
2525

2626
backend:
2727
container_name: backend
28-
image: ghcr.io/research-software-directory/rsd-saas/backend:v2.17.0
28+
image: ghcr.io/research-software-directory/rsd-saas/backend:v2.29.0
2929
expose:
3030
- 3500
3131
environment:
@@ -43,7 +43,7 @@ services:
4343

4444
auth:
4545
container_name: auth
46-
image: ghcr.io/research-software-directory/rsd-saas/auth:v2.28.0
46+
image: ghcr.io/research-software-directory/rsd-saas/auth:v2.29.0
4747
expose:
4848
- 7000
4949
environment:
@@ -82,7 +82,7 @@ services:
8282

8383
scrapers:
8484
container_name: scrapers
85-
image: ghcr.io/research-software-directory/rsd-saas/scrapers:v2.17.0
85+
image: ghcr.io/research-software-directory/rsd-saas/scrapers:v2.29.0
8686
environment:
8787
# it uses values from .env file
8888
- POSTGREST_URL

docker-compose.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
services:
66
database:
7-
image: ghcr.io/research-software-directory/rsd-saas/database:v2.17.0
7+
image: ghcr.io/research-software-directory/rsd-saas/database:v2.29.0
88
ports:
99
# enable connection from outside (development mode)
1010
- "5432:5432"
@@ -23,7 +23,7 @@ services:
2323
- net
2424

2525
backend:
26-
image: ghcr.io/research-software-directory/rsd-saas/backend:v2.17.0
26+
image: ghcr.io/research-software-directory/rsd-saas/backend:v2.29.0
2727
expose:
2828
- 3500
2929
environment:
@@ -39,7 +39,7 @@ services:
3939
- net
4040

4141
auth:
42-
image: ghcr.io/research-software-directory/rsd-saas/auth:v2.28.0
42+
image: ghcr.io/research-software-directory/rsd-saas/auth:v2.29.0
4343
ports:
4444
- 5005:5005
4545
expose:
@@ -85,7 +85,7 @@ services:
8585
]
8686

8787
scrapers:
88-
image: ghcr.io/research-software-directory/rsd-saas/scrapers:v2.17.0
88+
image: ghcr.io/research-software-directory/rsd-saas/scrapers:v2.29.0
8989
environment:
9090
# it uses values from .env file
9191
- POSTGREST_URL
@@ -110,7 +110,7 @@ services:
110110
# dockerfile to use for build
111111
dockerfile: Dockerfile
112112
# update version number to correspond to frontend/package.json
113-
image: kin-rpd/frontend:0.0.2
113+
image: kin-rpd/frontend:0.1.0
114114
environment:
115115
# it uses values from .env file
116116
- POSTGREST_URL
@@ -161,7 +161,7 @@ services:
161161
context: ./documentation
162162
# dockerfile to use for build
163163
dockerfile: Dockerfile
164-
image: kin-rpd/documentation:0.0.1
164+
image: kin-rpd/documentation:0.1.0
165165
expose:
166166
- "80"
167167
networks:

frontend/components/AppFooter/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default function AppFooter () {
2626
</p>
2727
<ContactEmail email={host?.email} headers={host?.emailHeaders} />
2828
{/* <div className="py-4"></div> */}
29-
<div className="bg-base-100 w-[24rem] p-4 rounded-md mt-4">
29+
<div className="w-[10rem] p-2 rounded-md mt-4">
3030
<OrganisationLogo host={host} />
3131
</div>
3232

frontend/components/AppHeader/index.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,13 @@ export default function AppHeader() {
5151
<div className="w-full flex-1 flex items-center justify-between">
5252
<Link href="/" passHref className="hover:text-inherit" aria-label="Link to home page">
5353
<img
54-
src="/apple-touch-icon.png"
55-
alt="KIN logo"
54+
src={host.logo_url}
55+
alt="VEDA by KIN logo"
5656
title="Klimaatonderzoek Initiatief Nederland"
5757
style={{
5858
height: '3.5rem',
5959
width: 'auto',
60-
padding: '0.5rem',
61-
objectFit: 'contain',
62-
backgroundColor: '#fff',
63-
borderRadius:'50%'
60+
objectFit: 'contain'
6461
}}
6562
/>
6663
</Link>

frontend/public/data/settings.json

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
22
"host": {
33
"name": "kin-rpd",
4+
"email": "[email protected]",
45
"emailHeaders": [],
5-
"logo_url": "/images/logo-KIN.svg",
6-
"website": "https://hetkin.nl/en/home-en/",
6+
"logo_url": "/images/veda-beta-logo.png",
7+
"website": "https://hetkin.nl/en/",
78
"feedback": {
89
"enabled": true,
9-
"url": "rsd@esciencecenter.nl",
10+
"url": "veda@hetkin.nl",
1011
"issues_page_url": "https://github.com/research-software-directory/KIN-RPD/issues"
1112
},
1213
"login_info_url":"https://research-software-directory.github.io/documentation/getting-access.html",
@@ -52,19 +53,19 @@
5253
"base-content": "#306070",
5354
"base-content-secondary": "rgba(48,96,112,0.7)",
5455
"base-content-disabled": "rgba(34,36,37,0.45)",
55-
"primary": "#01A2D6",
56+
"primary": "#01a2d6",
5657
"primary-content": "#fff",
5758
"secondary": "#306070",
5859
"secondary-content": "#fff",
59-
"accent": "#a3ccb9",
60-
"accent-content": "#306070",
61-
"error": "#8A1D12",
60+
"accent": "#01a2d6",
61+
"accent-content": "#fff",
62+
"error": "#EC5F59",
6263
"error-content": "#fff",
6364
"warning": "#ed6c02",
6465
"warning-content": "#fff",
6566
"info": "#0288d1",
6667
"info-content": "#fff",
67-
"success": "#307070",
68+
"success": "#71ad93",
6869
"success-content": "#fff",
6970
"glow-start": "#db2777",
7071
"glow-end": "#9333ea"
@@ -101,15 +102,15 @@
101102
"primary-content": "#fff",
102103
"secondary": "#306070",
103104
"secondary-content": "#fff",
104-
"accent": "#73095d",
105+
"accent": "#6C4E71",
105106
"accent-content": "#fff",
106-
"error": "#e53935",
107+
"error": "#EC5F59",
107108
"error-content": "#000",
108109
"warning": "#ed6c02",
109110
"warning-content": "#000",
110111
"info": "#0288d1",
111112
"info-content": "#000",
112-
"success": "#2e7d32",
113+
"success": "#71ad93",
113114
"success-content": "#fff",
114115
"glow-start": "#db2777",
115116
"glow-end": "#9333ea"
@@ -129,8 +130,8 @@
129130
}
130131
},
131132
"typography": {
132-
"defaultFontFamily": "aller, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif,'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",
133-
"titlesFontFamily": "aller, Roboto, sans-serif",
133+
"defaultFontFamily": "Aller, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif,'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",
134+
"titlesFontFamily": "Aller, Roboto, sans-serif",
134135
"fontWeightLight": 200,
135136
"fontWeightRegular": 400,
136137
"fontWeightMedium": 500,

0 commit comments

Comments
 (0)