Skip to content

Commit

Permalink
CORE: update src
Browse files Browse the repository at this point in the history
  • Loading branch information
ekachxaidze98 committed Jan 23, 2025
1 parent 29f9def commit add1983
Show file tree
Hide file tree
Showing 20 changed files with 9 additions and 1,166 deletions.
4 changes: 2 additions & 2 deletions netlify-cms.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2294,8 +2294,8 @@ collections:
- name: datasets

media_folder: '/images'
public_folder: '/images'
media_folder: '/images/services'
public_folder: '/images/services'

create: false
delete: false
Expand Down
9 changes: 4 additions & 5 deletions pages/governance/advisory.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,21 @@ import retrieveContent from 'content'

const ASSETS_BASE_URL = 'https://oacore.github.io/content/'

const setAssetsUrl = (object) =>
const setAssetsUrl = (object) => {
Object.entries(object).forEach(([key, value]) => {
if (typeof value === 'string' && value.includes('/images'))
object[key] = ASSETS_BASE_URL + value
else if (typeof value === 'object') setAssetsUrl(value) // Recursively process nested objects
})
}

const getSections = async ({ ref } = {}) => {
const content = await retrieveContent('advisory', {
ref,
transform: 'object',
})

Object.values(content).forEach((section) => {
setAssetsUrl(section)
if (section.table) setAssetsUrl(section.table)
})
setAssetsUrl(content)

return content
}
Expand Down
4 changes: 3 additions & 1 deletion pages/services/dataset.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ import retrieveContent from 'content'

const ASSETS_BASE_URL = 'https://oacore.github.io/content/'

const setAssetsUrl = (object) =>
const setAssetsUrl = (object) => {
Object.entries(object).forEach(([key, value]) => {
if (typeof value === 'string' && value.includes('/images'))
object[key] = ASSETS_BASE_URL + value
else if (typeof value === 'object') setAssetsUrl(value) // Recursively process nested objects
})
}

const getSections = async ({ ref } = {}) => {
const page = await retrieveContent('datasets', {
Expand Down
259 changes: 0 additions & 259 deletions public/images/advisory-board.svg

This file was deleted.

30 changes: 0 additions & 30 deletions public/images/chicago.svg

This file was deleted.

35 changes: 0 additions & 35 deletions public/images/core.svg

This file was deleted.

30 changes: 0 additions & 30 deletions public/images/dans.svg

This file was deleted.

30 changes: 0 additions & 30 deletions public/images/harvard.svg

This file was deleted.

134 changes: 0 additions & 134 deletions public/images/logos/caktus.svg

This file was deleted.

17 changes: 0 additions & 17 deletions public/images/logos/techdico.svg

This file was deleted.

30 changes: 0 additions & 30 deletions public/images/montreal.svg

This file was deleted.

30 changes: 0 additions & 30 deletions public/images/nationalInstitute.svg

This file was deleted.

35 changes: 0 additions & 35 deletions public/images/openUniversity.svg

This file was deleted.

Binary file removed public/images/people/olson.png
Binary file not shown.
Loading

0 comments on commit add1983

Please sign in to comment.