Skip to content

Commit

Permalink
CORE-5091: remove log
Browse files Browse the repository at this point in the history
  • Loading branch information
ekachxaidze98 committed Jan 29, 2025
1 parent de752a8 commit fefabb0
Show file tree
Hide file tree
Showing 4 changed files with 309 additions and 6 deletions.
79 changes: 79 additions & 0 deletions netlify-cms.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

96 changes: 96 additions & 0 deletions pages/innovations/labs.jsx
Original file line number Diff line number Diff line change
@@ -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 }) => (
<Card variant="pure" className={styles.card}>
<img src={iconSrc} alt={title} className={styles.cardLogo} />
<Card.Title className={styles.headerWrapper} tag="h5">
<span>{title}</span>
<div className={styles.tag}>{tag}</div>
</Card.Title>
<Card.Description className={styles.description}>
{description}
</Card.Description>
<Card.Footer className={styles.cardFooter}>
<Button
className={styles.button}
variant="contained"
href={action.url}
tag="a"
>
{action.caption}
</Button>
</Card.Footer>
</Card>
)

const LabsPage = ({ page }) => (
<Page
title={page.header.header.title}
description={page.header.header.description}
// keywords={servicesData.keywords}
nav
>
<Layout>
<Hero
image={page.header.header.hero}
title={page.header.header.title}
description={page.header.header.description}
/>
<div className={styles.features}>
{page.services.features &&
page.services.features.map((feature) => (
<FeatureBox
key={feature.id}
iconSrc={feature.logo}
title={feature.title}
description={feature.description}
recommender={feature.recommender}
action={feature.action}
tag={feature.tag}
/>
))}
</div>
</Layout>
</Page>
)

export default LabsPage
128 changes: 128 additions & 0 deletions pages/innovations/labs.module.scss
Original file line number Diff line number Diff line change
@@ -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);
}
}
}
}

0 comments on commit fefabb0

Please sign in to comment.