Skip to content

Commit

Permalink
Merge pull request #2161 from G-code7/hasta-cuando-ciberseguridad
Browse files Browse the repository at this point in the history
disclosure created for twocolumns.
  • Loading branch information
alesanchezr authored Sep 12, 2024
2 parents 17b713a + 1524172 commit 8aa4e97
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/components/TwoColumn/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const Side = ({
heading,
sub_heading,
content,
disclosure,
button,
bullets,
boxes,
Expand Down Expand Up @@ -258,6 +259,39 @@ const Side = ({
))
)}

{disclosure && /<\/?[a-z0-9]+>/g.test(disclosure.text) ? (
<Paragraph
textAlign="left"
textAlign_tablet="left"
margin="10px 0"
fontSize="13px"
style={disclosure.style ? JSON.parse(disclosure.style) : null}
dangerouslySetInnerHTML={{ __html: disclosure.text }}
onClick={(e) => {
if (e.target.tagName === "A" && disclosure.path)
smartRedirecting(e, disclosure.path);
}}
/>
) : (
disclosure &&
disclosure.text.split("\n").map((p, i) => (
<Paragraph
key={`${i}-${p}`}
textAlign="left"
textAlign_tablet="left"
margin="10px 0"
fontSize="13px"
style={disclosure.style ? JSON.parse(disclosure.style) : null}
onClick={(e) => {
if (e.target.tagName === "A" && disclosure.path)
smartRedirecting(e, disclosure.path);
}}
>
{p}
</Paragraph>
))
)}

{button && (
<Button
outline
Expand Down
3 changes: 3 additions & 0 deletions src/data/course/cybersecurity.es.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ two_columns_first:
sub_heading:
text: "Tanto los contenidos, como los docentes del bootcamp de ciberseguridad de 4Geeks Academy han sido validados por Chema Alonso, experto en ciberseguridad. Se trata de un curso de alta calidad, con contenido actualizado en el que aprenderás a trabajar con los estándares ISO y NIST, y adquirirás experiencia práctica en técnicas de prevención de pérdida de datos (DLP), pruebas de penetración, etc. Además incluye :"
font_size: ["16px", "16px", "16px", "16px", "16px"]
disclosure:
text: '* Estos beneficios relacionados con nuestra colaboración con Chema Alonso están disponibles <span style="font-weight: 600;" >únicamente</span> para nuestros estudiantes que asisten a clases en cualquiera de nuestros campus en 🇪🇸 España.'
style: '{"margin-top": "0px"}'
button:
text: "Inscríbete ahora"
color: "white"
Expand Down
3 changes: 3 additions & 0 deletions src/data/course/cybersecurity.us.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ two_columns_first:
With over 20 years of experience and recognition from industry giants like Microsoft, Chema Alonso brings unparalleled expertise to our program. His endorsement ensures cutting-edge content, alignment with ISO and NIST standards, and practical insights into essential areas such as data loss prevention (DLP) techniques and penetration testing.
As part of our partnership, you'll gain access to:
font_size: ["16px", "16px", "16px", "16px", "16px"]
disclosure:
text: '* These benefits related to our partnership with Chema Alonso are <span style="font-weight: 600;" >only Available</span> for our students attending classes at any of our campuses in 🇪🇸 Spain.'
style: '{"margin-top": "0px"}'
button:
text: "APPLY NOW"
color: "white"
Expand Down
5 changes: 5 additions & 0 deletions src/templates/course-cybersecurity.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ const Cybersecurity = ({ data, pageContext, yml }) => {
sub_heading: yml.two_columns_first?.sub_heading,
bullets: yml.two_columns_first?.bullets,
content: yml.two_columns_first?.content,
disclosure: yml.two_columns_first?.disclosure,
button: yml.two_columns_first?.button,
}}
proportions={yml.two_columns_first?.proportions}
Expand Down Expand Up @@ -574,6 +575,10 @@ export const query = graphql`
text
font_size
}
disclosure {
text
style
}
button {
text
color
Expand Down

0 comments on commit 8aa4e97

Please sign in to comment.