Skip to content

Commit 77a5cb1

Browse files
CORE-5091: remove log (#1292)
1 parent de752a8 commit 77a5cb1

File tree

4 files changed

+309
-6
lines changed

4 files changed

+309
-6
lines changed

netlify-cms.config.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5033,3 +5033,82 @@ collections:
50335033
- name: url
50345034
widget: string
50355035
label: URL
5036+
5037+
- name: CORE Labs
5038+
5039+
media_folder: '/images'
5040+
public_folder: '/images'
5041+
5042+
create: false
5043+
delete: false
5044+
5045+
label: 🧪 CORE Labs
5046+
label_singular: section
5047+
description: >
5048+
Core services and details.
5049+
5050+
files:
5051+
- name: meta
5052+
label: Meta
5053+
file: coreLabs/meta.yml
5054+
fields:
5055+
- name: id
5056+
widget: string
5057+
label: ID
5058+
- name: title
5059+
widget: string
5060+
label: Title
5061+
- name: tagline
5062+
widget: string
5063+
label: Tagline
5064+
- name: header
5065+
label: Header
5066+
file: coreLabs/header.yml
5067+
fields:
5068+
- name: header
5069+
widget: object
5070+
label: Header
5071+
fields:
5072+
- name: title
5073+
widget: string
5074+
label: Title
5075+
- name: description
5076+
widget: markdown
5077+
label: Description
5078+
- name: hero
5079+
widget: string
5080+
label: Hero
5081+
- name: features
5082+
label: Features
5083+
file: coreLabs/services.yml
5084+
fields:
5085+
- name: features
5086+
widget: list
5087+
label: Features
5088+
fields:
5089+
- name: id
5090+
widget: string
5091+
label: ID
5092+
- name: title
5093+
widget: string
5094+
label: Title
5095+
- name: logo
5096+
widget: string
5097+
label: Logo
5098+
- name: tag
5099+
widget: string
5100+
label: Tag
5101+
- name: description
5102+
widget: markdown
5103+
label: Description
5104+
- name: action
5105+
widget: object
5106+
label: Action
5107+
fields:
5108+
- name: caption
5109+
widget: string
5110+
label: Caption
5111+
- name: url
5112+
widget: string
5113+
label: URL
5114+

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pages/innovations/labs.jsx

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
import React from 'react'
2+
import { Card, Button } from '@oacore/design/lib/elements'
3+
4+
import styles from './labs.module.scss'
5+
6+
import { Page } from 'components'
7+
import { Layout, Hero } from 'design-v2/components'
8+
import retrieveContent from 'content'
9+
10+
const ASSETS_BASE_URL = 'https://oacore.github.io/content/'
11+
12+
const setAssetsUrl = (object) => {
13+
Object.entries(object).forEach(([key, value]) => {
14+
if (typeof value === 'string' && value.includes('/images'))
15+
object[key] = ASSETS_BASE_URL + value
16+
else if (typeof value === 'object') setAssetsUrl(value) // Recursively process nested objects
17+
})
18+
}
19+
20+
const getSections = async ({ ref } = {}) => {
21+
const page = await retrieveContent('coreLabs', {
22+
ref,
23+
transform: 'object',
24+
})
25+
26+
setAssetsUrl(page)
27+
28+
return page
29+
}
30+
31+
export async function getStaticProps({ previewData }) {
32+
const ref = previewData?.ref
33+
const page = await getSections({ ref })
34+
35+
return {
36+
props: {
37+
page,
38+
},
39+
}
40+
}
41+
42+
const FeatureBox = ({ iconSrc, title, description, tag, action }) => (
43+
<Card variant="pure" className={styles.card}>
44+
<img src={iconSrc} alt={title} className={styles.cardLogo} />
45+
<Card.Title className={styles.headerWrapper} tag="h5">
46+
<span>{title}</span>
47+
<div className={styles.tag}>{tag}</div>
48+
</Card.Title>
49+
<Card.Description className={styles.description}>
50+
{description}
51+
</Card.Description>
52+
<Card.Footer className={styles.cardFooter}>
53+
<Button
54+
className={styles.button}
55+
variant="contained"
56+
href={action.url}
57+
tag="a"
58+
>
59+
{action.caption}
60+
</Button>
61+
</Card.Footer>
62+
</Card>
63+
)
64+
65+
const LabsPage = ({ page }) => (
66+
<Page
67+
title={page.header.header.title}
68+
description={page.header.header.description}
69+
// keywords={servicesData.keywords}
70+
nav
71+
>
72+
<Layout>
73+
<Hero
74+
image={page.header.header.hero}
75+
title={page.header.header.title}
76+
description={page.header.header.description}
77+
/>
78+
<div className={styles.features}>
79+
{page.services.features &&
80+
page.services.features.map((feature) => (
81+
<FeatureBox
82+
key={feature.id}
83+
iconSrc={feature.logo}
84+
title={feature.title}
85+
description={feature.description}
86+
recommender={feature.recommender}
87+
action={feature.action}
88+
tag={feature.tag}
89+
/>
90+
))}
91+
</div>
92+
</Layout>
93+
</Page>
94+
)
95+
96+
export default LabsPage

pages/innovations/labs.module.scss

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
.wrapper {
2+
padding-bottom: 4rem;
3+
}
4+
5+
.section {
6+
&-container {
7+
padding: 1rem 0 !important;
8+
&-inline {
9+
display: inline-flex;
10+
flex-direction: column;
11+
justify-content: stretch;
12+
max-width: 25.35rem;
13+
14+
&:not(:last-child) {
15+
margin-right: 1rem;
16+
}
17+
}
18+
}
19+
&-header {
20+
display: flex;
21+
align-items: center;
22+
margin-bottom: 2rem;
23+
&:after {
24+
border-bottom: 3px dashed var(--gray-300);
25+
content: '';
26+
flex: 1;
27+
}
28+
}
29+
&-video-img {
30+
margin-right: 1rem;
31+
position: relative;
32+
&:hover,
33+
&:focus {
34+
--button-overlay: none;
35+
--button-focus-ring: none;
36+
}
37+
img {
38+
width: 100%;
39+
height: auto;
40+
}
41+
.pulse {
42+
position: absolute;
43+
top: 18%;
44+
left: 22%;
45+
width: 100px;
46+
height: 100px;
47+
border-radius: 50%;
48+
background-color: rgba(255, 0, 0, 0.5);
49+
animation: pulse 2s infinite;
50+
z-index: -1;
51+
}
52+
53+
@keyframes pulse {
54+
0% {
55+
transform: scale(0);
56+
opacity: 1;
57+
}
58+
100% {
59+
transform: scale(2);
60+
opacity: 0;
61+
}
62+
}
63+
}
64+
&-title {
65+
display: block;
66+
margin-right: 1rem;
67+
font-weight: 600;
68+
}
69+
}
70+
.features {
71+
display: grid;
72+
grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
73+
grid-gap: 1rem;
74+
75+
.card {
76+
padding: 2rem;
77+
background-color: var(--gray-100);
78+
display: flex;
79+
flex-direction: column;
80+
min-height: 29rem;
81+
.header-wrapper {
82+
display: flex;
83+
justify-content: space-between;
84+
align-items: center;
85+
}
86+
.tag {
87+
padding: 3px 7px;
88+
border-radius: 2px;
89+
background: #8bc34a;
90+
color: #fff;
91+
font-size: 16px;
92+
font-style: normal;
93+
font-weight: 400;
94+
line-height: 24px;
95+
letter-spacing: 0.026px;
96+
}
97+
.description {
98+
color: #000;
99+
font-size: 16px;
100+
font-style: normal;
101+
font-weight: 400;
102+
line-height: 24px;
103+
letter-spacing: 0.026px;
104+
}
105+
.button {
106+
text-transform: initial;
107+
}
108+
&-logo {
109+
width: 96px;
110+
height: 63px;
111+
margin-bottom: 1rem;
112+
}
113+
&-title {
114+
font-weight: 500;
115+
}
116+
&-footer {
117+
height: 100%;
118+
align-items: flex-start;
119+
display: flex;
120+
flex-direction: column;
121+
justify-content: flex-end;
122+
&-caption {
123+
margin-bottom: 1rem;
124+
color: var(--gray-500);
125+
}
126+
}
127+
}
128+
}

0 commit comments

Comments
 (0)