diff --git a/netlify-cms.config.yml b/netlify-cms.config.yml index ced4fc0f..bf72f725 100644 --- a/netlify-cms.config.yml +++ b/netlify-cms.config.yml @@ -5033,3 +5033,82 @@ collections: - name: url widget: string label: URL + +- name: CORE Labs + + media_folder: '/images' + public_folder: '/images' + + create: false + delete: false + + label: 🧪 CORE Labs + label_singular: section + description: > + Core services and details. + + files: + - name: meta + label: Meta + file: coreLabs/meta.yml + fields: + - name: id + widget: string + label: ID + - name: title + widget: string + label: Title + - name: tagline + widget: string + label: Tagline + - name: header + label: Header + file: coreLabs/header.yml + fields: + - name: header + widget: object + label: Header + fields: + - name: title + widget: string + label: Title + - name: description + widget: markdown + label: Description + - name: hero + widget: string + label: Hero + - name: features + label: Features + file: coreLabs/services.yml + fields: + - name: features + widget: list + label: Features + fields: + - name: id + widget: string + label: ID + - name: title + widget: string + label: Title + - name: logo + widget: string + label: Logo + - name: tag + widget: string + label: Tag + - name: description + widget: markdown + label: Description + - name: action + widget: object + label: Action + fields: + - name: caption + widget: string + label: Caption + - name: url + widget: string + label: URL + diff --git a/package-lock.json b/package-lock.json index 46023ffd..01daef89 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2806,9 +2806,9 @@ } }, "node_modules/@oacore/design": { - "version": "5.0.24", - "resolved": "https://npm.pkg.github.com/download/@oacore/design/5.0.24/5c44cbde5164b4200f6182c9a0201f3956a8fdda", - "integrity": "sha512-WQY2ZZaNR9vtjj99CWop8Z/kDtatrkcKHvnMRjvRIzkVq6QRboUvmewLUeciGAXDSJQ6bcHtZlzuEqeraW+AwQ==", + "version": "5.0.28", + "resolved": "https://npm.pkg.github.com/download/@oacore/design/5.0.28/06833ffc3676860692900f8058211a26fd4e132c", + "integrity": "sha512-thRUtJdc1sNC3eZKa/EQ08pd8leUtxRjvpBZalzo7POJQj6Q837TiqNiulCPNKYjvBI0sUnLn0tdBa/ViTAvLQ==", "hasInstallScript": true, "license": "UNLICENSED", "dependencies": { @@ -16240,9 +16240,9 @@ "integrity": "sha512-qtBF56vPC6d6a8p7LYd0iRjW89fhY80kAIzmj+VonvIGjK/nymBjcFUhbKiMFqlhsarCksnhwX+Zmn95Dw9qvA==" }, "@oacore/design": { - "version": "5.0.24", - "resolved": "https://npm.pkg.github.com/download/@oacore/design/5.0.24/5c44cbde5164b4200f6182c9a0201f3956a8fdda", - "integrity": "sha512-WQY2ZZaNR9vtjj99CWop8Z/kDtatrkcKHvnMRjvRIzkVq6QRboUvmewLUeciGAXDSJQ6bcHtZlzuEqeraW+AwQ==", + "version": "5.0.28", + "resolved": "https://npm.pkg.github.com/download/@oacore/design/5.0.28/06833ffc3676860692900f8058211a26fd4e132c", + "integrity": "sha512-thRUtJdc1sNC3eZKa/EQ08pd8leUtxRjvpBZalzo7POJQj6Q837TiqNiulCPNKYjvBI0sUnLn0tdBa/ViTAvLQ==", "requires": { "@babel/runtime": "^7.12.1", "@mdi/svg": "^5.8.55", diff --git a/pages/innovations/labs.jsx b/pages/innovations/labs.jsx new file mode 100644 index 00000000..0ee32ef6 --- /dev/null +++ b/pages/innovations/labs.jsx @@ -0,0 +1,96 @@ +import React from 'react' +import { Card, Button } from '@oacore/design/lib/elements' + +import styles from './labs.module.scss' + +import { Page } from 'components' +import { Layout, Hero } from 'design-v2/components' +import retrieveContent from 'content' + +const ASSETS_BASE_URL = 'https://oacore.github.io/content/' + +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('coreLabs', { + ref, + transform: 'object', + }) + + setAssetsUrl(page) + + return page +} + +export async function getStaticProps({ previewData }) { + const ref = previewData?.ref + const page = await getSections({ ref }) + + return { + props: { + page, + }, + } +} + +const FeatureBox = ({ iconSrc, title, description, tag, action }) => ( + + + + {title} + {tag} + + + {description} + + + + {action.caption} + + + +) + +const LabsPage = ({ page }) => ( + + + + + {page.services.features && + page.services.features.map((feature) => ( + + ))} + + + +) + +export default LabsPage diff --git a/pages/innovations/labs.module.scss b/pages/innovations/labs.module.scss new file mode 100644 index 00000000..5c2e68f1 --- /dev/null +++ b/pages/innovations/labs.module.scss @@ -0,0 +1,128 @@ +.wrapper { + padding-bottom: 4rem; +} + +.section { + &-container { + padding: 1rem 0 !important; + &-inline { + display: inline-flex; + flex-direction: column; + justify-content: stretch; + max-width: 25.35rem; + + &:not(:last-child) { + margin-right: 1rem; + } + } + } + &-header { + display: flex; + align-items: center; + margin-bottom: 2rem; + &:after { + border-bottom: 3px dashed var(--gray-300); + content: ''; + flex: 1; + } + } + &-video-img { + margin-right: 1rem; + position: relative; + &:hover, + &:focus { + --button-overlay: none; + --button-focus-ring: none; + } + img { + width: 100%; + height: auto; + } + .pulse { + position: absolute; + top: 18%; + left: 22%; + width: 100px; + height: 100px; + border-radius: 50%; + background-color: rgba(255, 0, 0, 0.5); + animation: pulse 2s infinite; + z-index: -1; + } + + @keyframes pulse { + 0% { + transform: scale(0); + opacity: 1; + } + 100% { + transform: scale(2); + opacity: 0; + } + } + } + &-title { + display: block; + margin-right: 1rem; + font-weight: 600; + } +} +.features { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); + grid-gap: 1rem; + + .card { + padding: 2rem; + background-color: var(--gray-100); + display: flex; + flex-direction: column; + min-height: 29rem; + .header-wrapper { + display: flex; + justify-content: space-between; + align-items: center; + } + .tag { + padding: 3px 7px; + border-radius: 2px; + background: #8bc34a; + color: #fff; + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: 24px; + letter-spacing: 0.026px; + } + .description { + color: #000; + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: 24px; + letter-spacing: 0.026px; + } + .button { + text-transform: initial; + } + &-logo { + width: 96px; + height: 63px; + margin-bottom: 1rem; + } + &-title { + font-weight: 500; + } + &-footer { + height: 100%; + align-items: flex-start; + display: flex; + flex-direction: column; + justify-content: flex-end; + &-caption { + margin-bottom: 1rem; + color: var(--gray-500); + } + } + } +}