Skip to content
Merged
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
1 change: 1 addition & 0 deletions frontend/src/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"footer.nav_section_title": "Rechtliches",
"nav.language_switcher": "Sprachwechsel",
"home.title": "nexory-dev.de",
"home.subtext": "Open-Source-Projekte · Python, JavaScript, PHP und mehr",
"footer.tagline": "Open-Source-Projekte · Python, JavaScript, PHP und mehr",
"footer.nav_heading": "Navigation",
"footer.links_heading": "Links"
Expand Down
1 change: 1 addition & 0 deletions frontend/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"footer.nav_section_title": "Legal",
"nav.language_switcher": "Language Switcher",
"home.title": "nexory-dev.de",
"home.subtext": "Open source projects · Python, JavaScript, PHP and more",
"footer.tagline": "Open source projects · Python, JavaScript, PHP and more",
"footer.nav_heading": "Navigation",
"footer.links_heading": "Links"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/Contact.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default function Contact() {
target="_blank"
rel="noopener noreferrer"
>
github.com/NexoryOrg
github.com/NexoryDev
</a>{' '}
in the meantime.
</p>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/GitHub.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default function GitHub() {
target="_blank"
rel="noopener noreferrer"
>
github.com/NexoryOrg
github.com/NexoryDev
</a>{' '}
in the meantime.
</p>
Expand Down
58 changes: 42 additions & 16 deletions frontend/src/pages/Home.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,41 @@
import { useEffect, useRef } from 'react';
import { useLanguage } from '../context/LanguageContext';
import '../styles/Home.css';

const CODE_MAP = {
de:
`class nexory:
def __init__(self, org_name):
self.org = org_name
self.people = []

def join(self, neuer_nutzer):
self.people.append(neuer_nutzer)
print(f"Willkommen bei {self.org}, {neuer_nutzer}!")

if __name__ == "__main__":
org = NexoryOrg("nexory-dev.de")
org.join("Dein Name")
org.run()`,

en:
`class nexory:
def __init__(self, org_name):
self.org = org_name
self.people = []

def join(self, new_user):
self.people.append(new_user)
print(f"Welcome to {self.org}, {new_user}!")

if __name__ == "__main__":
org = NexoryOrg("nexory-dev.de")
org.join("Your Name")
org.run()`,
};

export default function Home() {
const { language, t } = useLanguage();
const canvasRef = useRef(null);
const outputRef = useRef(null);

Expand All @@ -19,6 +53,11 @@ export default function Home() {
function resize() {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
particles = particles.map(p => ({
...p,
x: Math.random() * canvas.width,
y: Math.random() * canvas.height,
}))
}
resize();
window.addEventListener('resize', resize);
Expand Down Expand Up @@ -82,20 +121,7 @@ export default function Home() {

/* Typing Animation */
useEffect(() => {
const CODE =
`class nexory:
def __init__(self, org_name):
self.org = org_name
self.people = []

def join(self, new_user):
self.people.append(new_user)
print(f"Welcome to {self.org}, {new_user}!")

if __name__ == "__main__":
org = NexoryOrg("nexory-dev.de")
org.join("Your Name")
org.run()`;
const CODE = CODE_MAP[language] ?? CODE_MAP['de'];

const TYPE_SPEED = 58;
const WAIT_MS = 20000;
Expand All @@ -122,7 +148,7 @@ if __name__ == "__main__":
startTyping();

return () => clearTimeout(timeoutId);
}, []);
}, [language]);

return (
<section className="hero">
Expand All @@ -132,7 +158,7 @@ if __name__ == "__main__":
<div className="hero-content">
<div className="info">
<h1>nexory-dev</h1>
<p>Open source projects &middot; Python, JavaScript, PHP and more</p>
<p>{t('home.subtext')}</p>
</div>

<div className="terminal">
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/styles/Navbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,12 @@
}

.navebar-toggle.active span:nth-child(1) {
transform: rotate(45deg) translate(5px, 5px);
transform: rotate(45deg) translate(7.5px, 7.5px);
}
.navebar-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.navebar-toggle.active span:nth-child(3) { opacity: 0; transform: scaleX(0); }
.navebar-toggle.active span:nth-child(4) {
transform: rotate(-45deg) translate(5px, -5px);
transform: rotate(-45deg) translate(7.5px, -7.5px);
}

.navebar-menu {
Expand Down
Loading