-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContent.njs
More file actions
111 lines (99 loc) · 4.73 KB
/
Content.njs
File metadata and controls
111 lines (99 loc) · 4.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
import './content.css';
let contentInfo = [
{
id: 0,
title: 'Lógica de Programação com Python',
text: 'Domine fundamentos de programação e lógica, essenciais para desenvolver suas habilidades em Python de forma sólida e estruturada.',
img: '/sales-page-python-img/python-logica.png',
imgAlt: 'Lógica de Programação com Python',
},
{
id: 1,
title: 'Python Orientado à Objetos',
text: 'Aprenda a aplicar os princípios de programação orientada a objetos para escrever códigos Python mais limpos, reutilizáveis e eficientes.',
img: '/sales-page-python-img/python-orientado-objetos.png',
imgAlt: 'Python Orientado à Objetos',
},
{
id: 2,
title: 'Dominando a Web com Flask e Django',
text: 'Crie aplicações web robustas e escaláveis usando frameworks poderosos que facilitam pequenos e grandes projetos.',
img: '/sales-page-python-img/python-inteligencia-artificial.png',
imgAlt: 'Dominando a Web com Flask e Django',
},
{
id: 3,
title: 'Inteligência Artificial',
text: 'Abra portas para inovações com IA, aprendendo a construir algoritmos de machine learning e deep learning com Python.',
img: '/sales-page-python-img/python-automacao-robotica.png',
imgAlt: 'Inteligência Artificial',
},
{
id: 4,
title: 'Automações',
text: 'Construa robôs para automatizar tarefas rotineiras e complexas com scripts Python, tornando seus processos mais eficientes.',
img: '/sales-page-python-img/python-automator.png',
imgAlt: 'Automação e Robótica',
}
]
function ContentMobileTablet(props){
return (
<div class="my-2 flex md:gap-20 md:my-4 flex-col md:flex-row min-[1300px]:hidden m-auto">
<img class="w-[347px] h-[347px] md:w-[211px] md:h-[211px] rounded-[20px] max-md:m-auto" src={props.src} alt={props.alt} />
<div class="lg:w-[584px]">
<h4 class="leading-[28.6px] text-[22px] md:leading-[36px] md:text-[30px] font-bold md:font-semibold my-4">{props.title}</h4>
<p class="hidden md:block text-base font-normal md:text-[#9da2a5] ">{props.text}</p>
</div>
</div>
)
}
function ContentDesktop(){
return (
<div class="my-2 m-auto hidden min-[1300px]:flex gap-[2rem] min-[1350px]:gap-[5rem]">
<div class="w-[584px]">
{contentInfo.map((contentDescription) =>
<>
<div class={contentDescription.id === 0 ? "desktop-card-container highlight text-[#879098] mb-8" : "desktop-card-container text-[#879098] mb-8"}>
<h4 class="title-content leading-[36px] text-[30px] font-bold md:font-semibold mb-2">{contentDescription.title}</h4>
<p class="p-content hidden md:block text-base font-normal">{contentDescription.text}</p>
</div>
</>
)}
</div>
{contentInfo.map(content => (
<img class={content.id === 0 ? 'img-content w-[616px] h-[640px] rounded-[20px] max-md:m-auto img-highlight hidden' : 'img-content w-[616px] h-[640px] rounded-[20px] max-md:m-auto hidden'} src={content.img} />
) )}
</div>
)
}
export default function Content(){
const desktopCard = document.querySelectorAll('.desktop-card-container')
desktopCard.forEach((card, cardIndex) => {
const imgDesktop = document.querySelectorAll('.img-content')
card.addEventListener('mouseover', ()=> {
document.querySelector('.highlight').classList.remove('highlight')
card.classList.add('highlight')
imgDesktop.forEach((img, imgIndex) => {
if(cardIndex === imgIndex){
document.querySelector('.img-highlight').classList.remove('img-highlight')
img.classList.add('img-highlight')
}
})
})
})
return (
<>
<section class="my-8 px-10 py-8 bg-[#1e1e1e] text-[#f6fbff]">
<h3 class="text-center text-[34px] leading-[28.8px] md:text-[38px] lg:text-5xl md:leading-[45.6px] font-semibold mb-10">O que você irá aprender</h3>
<div class="flex flex-col max-md:items-center 2xl:w-max m-auto">
{contentInfo.map(content => {
return (
<ContentMobileTablet id={content.id} title={content.title} text={content.text} src={content.img} alt={content.alt} />
)
})}
<ContentDesktop />
</div>
</section>
</>
)
}