Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

launches: adds launches page using SondeHub iframe #268

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Zenith
Copyright (c) 2022 Zenith

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
32 changes: 32 additions & 0 deletions components/launches-components/LaunchItem.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React from 'react';
import styles from 'styles/LaunchItem.module.css';

function changeUrl(url) {
document.getElementById("sondeHub").src = url;
}

function LaunchItem (props) {
const {
title,
date,
launchDate,
local,
altitude,
link
} = props.textContent;

return (
<div onClick={() => changeUrl(link)} className={styles.launchContainer}>
<div className={styles.launchTitle}>
<div>{title}</div>
<div>{altitude}</div>
</div>
<div className={styles.launchInfo}>
<div>{local}</div>
<div>{launchDate}</div>
</div>
</div>
);
}

export default LaunchItem;
21 changes: 21 additions & 0 deletions components/launches-components/LaunchMenu.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from 'react';
import styles from 'styles/LaunchMenu.module.css';
import useTranslation from 'next-translate/useTranslation';
import LaunchItem from './LaunchItem';

function LaunchMenu (props) {
const { t } = useTranslation();
const launches = t("lancamentos:launches", { count: -1 }, { returnObjects: true });
const rows = [];
for (let i = 0; i < 10; i++) {
rows.push(<LaunchItem className={styles.launchItem} textContent={launches[""+i]}></LaunchItem>);
}

return (
<div className={styles.launchContainer}>
{rows}
</div>
);
}

export default LaunchMenu;
16 changes: 16 additions & 0 deletions components/launches-components/SondeHub.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from 'react';
import style from 'styles/SondeHub.module.css';
import LaunchMenu from './LaunchMenu';
export default function SondeHub(props) {

let url_sondehub = "https://sondehub.org/";

return (
<div className={style.container}>
<div className={style.menu}>
<LaunchMenu></LaunchMenu>
</div>
<iframe id="sondeHub" className={style.iframe} src={url_sondehub} title="SondeHub Tracker"></iframe>
</div>
);
}
5 changes: 5 additions & 0 deletions components/navbar-components/NavLinks.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ export default function NavLinks(props) {
<a href="https://ob-site.vercel.app/" passHref={true}>{navTexts[4]}</a>
</li>
</Link>
<Link href="/lancamentos" passHref={true}>
<li className={navBarItem}>
<a href="/lancamentos" passHref={true}>{navTexts[5]}</a>
</li>
</Link>
</ul>
</>
);
Expand Down
3 changes: 2 additions & 1 deletion i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"/kurumim" : ["kurumim"],
"/processo-seletivo": ["processoSeletivo"],
"/projetos" : ["projetos"],
"/zenith" : ["oZenith"]
"/zenith" : ["oZenith"],
"/lancamentos" : ["lancamentos"]
}
}
2 changes: 1 addition & 1 deletion jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"baseUrl": ".",
"paths": {
// Caso alguém queira adicionar +1 path pra import abosluto, só seguir o seguinte padrão abaixo:
// Caso alguém queira adicionar +1 path pra import absoluto, só seguir o seguinte padrão abaixo:
// "@/components/*": ["components/*"]
}
}
Expand Down
4 changes: 2 additions & 2 deletions locales/en/common.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"navBar": ["ABOUT US", "PROJECTS", "KURUMIM", "SELECTION PROCESS", "OBSAT"],
"navBar": ["ABOUT US", "PROJECTS", "KURUMIM", "SELECTION PROCESS", "OBSAT", "LAUNCHES"],
"footer": {
"copyright": "© 2021 Zenith Aerospace",
"copyright": "© 2022 Zenith Aerospace",
"easterEgg": "MADE WITH TONS OF JAVASCRIPT AND CONFUSION ON DISCORD"
}
}
95 changes: 95 additions & 0 deletions locales/en/lancamentos.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"metaTags": {
"pageName": "Lançamentos",
"lang": "en",
"pageTitle": "Lançamentos",
"title": "Lançamentos: Desenvolvendo Tecnologia Aeroespacial || Zenith EESC",
"description": "Nossos lançamentos integram diversos campos da Engenharia no setor aeroespacial, desde o Hardware e a Estrutura até o Software."
},
"lancamentosHero": {
"title": "Nossos lançamentos",
"subtitle": "Integração de diversos campos da Engenharia no setor aeroespacial"
},
"launches": {
"0": {
"title": "Sábado Aeroespacial",
"date": 2022,
"launchDate": " 09/10/2022",
"local": "Kurumin, São Carlos - SP",
"altitude": "Altitude: 22.7 km",
"link": "https://sondehub.org/#!mt=Mapnik&f=J4830341&q=J4830341"
},
"1": {
"title": "Sábado Aeroespacial",
"date": 2022,
"launchDate": "09/10/2022",
"local": "Kurumin, São Carlos - SP",
"altitude": "Altitude: 6.8 km",
"link": "https://sondehub.org/#!mt=Mapnik&f=J4840152&q=J4840152"
},
"2": {
"title": "Sábado Aeroespacial",
"date": 2022,
"launchDate": "09/10/2022",
"local": "Kurumin, São Carlos - SP",
"altitude": "Altitude: 23.2 km",
"link": "https://sondehub.org/#!mt=Mapnik&f=J4840095&q=J4840095"
},
"3": {
"title": "Sábado Aeroespacial",
"date": 2022,
"launchDate": "09/10/2022",
"local": "Kurumin, São Carlos - SP",
"altitude": "Altitude: 25.2 km",
"link": "https://sondehub.org/#!mt=Mapnik&f=J4830342&q=J4830342"
},
"4": {
"title": "ZenBee",
"date": 2022,
"launchDate": "17/09/2022",
"local": "UFG, Goiânia - GO",
"altitude": "Altitude: 27.4 km",
"link": "https://sondehub.org/#!mt=Mapnik&f=T0350530&q=T0350530"
},
"5": {
"title": "ZenBee",
"date": 2022,
"launchDate": "02/09/2022",
"local": "CVT/AEB, Natal - RN",
"altitude": "Altitude: 25.9 km",
"link": "https://sondehub.org/#!mt=Mapnik&f=T0351008&q=T0351008"
},
"6": {
"title": "ZenBee",
"date": 2022,
"launchDate": "02/09/2022",
"local": "CVT/AEB, Natal - RN",
"altitude": "Altitude: 27.3 km",
"link": "https://sondehub.org/#!mt=Mapnik&f=T0350530&q=T0350530"
},
"7": {
"title": "ZenBee",
"date": 2022,
"launchDate": "20/08/2022",
"local": "UERJ, Rio de Janeiro - RJ",
"altitude": "Altitude: 26 km",
"link": "https://sondehub.org/#!mt=Mapnik&f=T4220752&q=T4220752"
},
"8": {
"title": "ZenBee",
"date": 2022,
"launchDate": "13/08/2022",
"local": "TecnoParq, Santa Maria - RS",
"altitude": "Altitude: 25.9 km",
"link": "https://sondehub.org/#!mt=Mapnik&f=T4220752&q=T4220752"
},
"9": {
"title": "ZenBee",
"date": 2022,
"launchDate": "06/08/2022",
"local": "LASC, Tatuí - SP",
"altitude": "Altitude: 26.2 km",
"link": "https://sondehub.org/#!mt=Mapnik&f=T4150774&q=T4150774"
}
}
}
4 changes: 2 additions & 2 deletions locales/es/common.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"navBar": ["SOBRE NÓS", "PROJETOS", "KURUMIM", "PROCESSO SELETIVO", "OBSAT"],
"navBar": ["SOBRE NÓS", "PROJETOS", "KURUMIM", "PROCESSO SELETIVO", "OBSAT", "LANÇAMENTOS"],
"footer": {
"copyright": "© 2021 Zenith Aerospace",
"copyright": "© 2022 Zenith Aerospace",
"easterEgg": "FEITO COM MUITO JAVASCRIPT E CONFUSÃO NO DISCORD"
}
}
95 changes: 95 additions & 0 deletions locales/es/lancamentos.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"metaTags": {
"pageName": "Lançamentos",
"lang": "es",
"pageTitle": "Lançamentos",
"title": "Lançamentos: Desenvolvendo Tecnologia Aeroespacial || Zenith EESC",
"description": "Nossos lançamentos integram diversos campos da Engenharia no setor aeroespacial, desde o Hardware e a Estrutura até o Software."
},
"lancamentosHero": {
"title": "Nossos lançamentos",
"subtitle": "Integração de diversos campos da Engenharia no setor aeroespacial"
},
"launches": {
"0": {
"title": "Sábado Aeroespacial",
"date": 2022,
"launchDate": " 09/10/2022",
"local": "Kurumin, São Carlos - SP",
"altitude": "Altitude: 22.7 km",
"link": "https://sondehub.org/#!mt=Mapnik&f=J4830341&q=J4830341"
},
"1": {
"title": "Sábado Aeroespacial",
"date": 2022,
"launchDate": "09/10/2022",
"local": "Kurumin, São Carlos - SP",
"altitude": "Altitude: 6.8 km",
"link": "https://sondehub.org/#!mt=Mapnik&f=J4840152&q=J4840152"
},
"2": {
"title": "Sábado Aeroespacial",
"date": 2022,
"launchDate": "09/10/2022",
"local": "Kurumin, São Carlos - SP",
"altitude": "Altitude: 23.2 km",
"link": "https://sondehub.org/#!mt=Mapnik&f=J4840095&q=J4840095"
},
"3": {
"title": "Sábado Aeroespacial",
"date": 2022,
"launchDate": "09/10/2022",
"local": "Kurumin, São Carlos - SP",
"altitude": "Altitude: 25.2 km",
"link": "https://sondehub.org/#!mt=Mapnik&f=J4830342&q=J4830342"
},
"4": {
"title": "ZenBee",
"date": 2022,
"launchDate": "17/09/2022",
"local": "UFG, Goiânia - GO",
"altitude": "Altitude: 27.4 km",
"link": "https://sondehub.org/#!mt=Mapnik&f=T0350530&q=T0350530"
},
"5": {
"title": "ZenBee",
"date": 2022,
"launchDate": "02/09/2022",
"local": "CVT/AEB, Natal - RN",
"altitude": "Altitude: 25.9 km",
"link": "https://sondehub.org/#!mt=Mapnik&f=T0351008&q=T0351008"
},
"6": {
"title": "ZenBee",
"date": 2022,
"launchDate": "02/09/2022",
"local": "CVT/AEB, Natal - RN",
"altitude": "Altitude: 27.3 km",
"link": "https://sondehub.org/#!mt=Mapnik&f=T0350530&q=T0350530"
},
"7": {
"title": "ZenBee",
"date": 2022,
"launchDate": "20/08/2022",
"local": "UERJ, Rio de Janeiro - RJ",
"altitude": "Altitude: 26 km",
"link": "https://sondehub.org/#!mt=Mapnik&f=T4220752&q=T4220752"
},
"8": {
"title": "ZenBee",
"date": 2022,
"launchDate": "13/08/2022",
"local": "TecnoParq, Santa Maria - RS",
"altitude": "Altitude: 25.9 km",
"link": "https://sondehub.org/#!mt=Mapnik&f=T4220752&q=T4220752"
},
"9": {
"title": "ZenBee",
"date": 2022,
"launchDate": "06/08/2022",
"local": "LASC, Tatuí - SP",
"altitude": "Altitude: 26.2 km",
"link": "https://sondehub.org/#!mt=Mapnik&f=T4150774&q=T4150774"
}
}
}
4 changes: 2 additions & 2 deletions locales/pt/common.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"navBar": ["SOBRE NÓS", "PROJETOS", "KURUMIM", "PROCESSO SELETIVO", "OBSAT"],
"navBar": ["SOBRE NÓS", "PROJETOS", "KURUMIM", "PROCESSO SELETIVO", "OBSAT", "LANÇAMENTOS"],
"footer": {
"copyright": "© 2021 Zenith Aerospace",
"copyright": "© 2022 Zenith Aerospace",
"easterEgg": "FEITO COM MUITO JAVASCRIPT E CONFUSÃO NO DISCORD"
}
}
Loading