Skip to content

Commit 945d394

Browse files
committed
Addet footer updated language
1 parent a57e8e4 commit 945d394

8 files changed

Lines changed: 221 additions & 29 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# Nexory.org
1+
# nexory.dev
22
Website for this organisation, informations and more

public/dashboard/home.css

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,7 @@ body {
9292
width: 0%;
9393
background: linear-gradient(90deg, var(--color-grad-2), var(--color-grad-3));
9494
border-radius: 99px;
95-
animation: load-bar 1.2s ease forwards;
96-
}
97-
98-
@keyframes load-bar {
99-
to { width: 100%; }
95+
transition: width 0.35s ease;
10096
}
10197

10298
/* -- Hero Section -- */

public/dashboard/home.js

Lines changed: 54 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,73 @@
11
/* -- React Preloader -- */
2-
3-
const { useEffect, useRef } = React;
2+
const { useEffect, useRef, useState } = React;
43

54
function Preloader() {
65
const ref = useRef(null);
6+
const progressRef = useRef(0);
7+
const [progress, setProgress] = useState(0);
78

89
useEffect(() => {
9-
function showPage() {
10-
ref.current.classList.add('hidden');
10+
function advance(value) {
11+
if (value > progressRef.current) {
12+
progressRef.current = value;
13+
setProgress(value);
14+
}
15+
}
1116

12-
setTimeout(() => {
13-
document.getElementById('page').classList.remove('page-hidden');
14-
startAnimations();
15-
}, 500);
17+
advance(5);
18+
19+
const resources = document.querySelectorAll(
20+
'link[rel="stylesheet"], script[src], img[src]'
21+
);
22+
const expectedCount = resources.length;
23+
let loadedCount = 0;
24+
25+
let observer;
26+
try {
27+
observer = new PerformanceObserver((list) => {
28+
loadedCount += list.getEntries().length;
29+
if (expectedCount > 0) {
30+
const pct = Math.min(85, Math.round((loadedCount / expectedCount) * 85));
31+
advance(pct);
32+
}
33+
});
34+
observer.observe({ type: 'resource', buffered: true });
35+
} catch (_) {}
36+
37+
if (document.readyState === 'loading') {
38+
document.addEventListener('DOMContentLoaded', () => advance(25), { once: true });
39+
} else {
40+
advance(25);
1641
}
1742

18-
function trigger() {
19-
setTimeout(showPage, 1300);
43+
function finishLoading() {
44+
if (observer) observer.disconnect();
45+
advance(100);
46+
setTimeout(() => {
47+
if (ref.current) ref.current.classList.add('hidden');
48+
setTimeout(() => {
49+
document.getElementById('page').classList.remove('page-hidden');
50+
startAnimations();
51+
}, 500);
52+
}, 450);
2053
}
2154

2255
if (document.readyState === 'complete') {
23-
trigger();
56+
setTimeout(finishLoading, 200);
2457
} else {
25-
window.addEventListener('load', trigger, { once: true });
58+
window.addEventListener('load', () => setTimeout(finishLoading, 200), { once: true });
2659
}
60+
61+
return () => {
62+
if (observer) observer.disconnect();
63+
};
2764
}, []);
2865

2966
return (
3067
<div id="preloader" ref={ref}>
31-
<div className="preloader-logo">Nexory.Org</div>
68+
<div className="preloader-logo">nexory.dev</div>
3269
<div className="preloader-bar">
33-
<div className="preloader-bar-inner"></div>
70+
<div className="preloader-bar-inner" style={{ width: progress + '%' }}></div>
3471
</div>
3572
</div>
3673
);
@@ -42,7 +79,7 @@ ReactDOM.createRoot(document.getElementById('preloader-root')).render(<Preloader
4279
function startAnimations() {
4380
const canvas = document.getElementById('code-canvas');
4481
const ctx = canvas.getContext('2d');
45-
const PARTICLE_COUNT = 100;
82+
const PARTICLE_COUNT = 150;
4683
const CONNECTION_DIST = 200;
4784
const SPEED = 0.4;
4885
let particles = [];
@@ -108,7 +145,7 @@ function startAnimations() {
108145
draw();
109146

110147
const CODE =
111-
`class NexoryOrg:
148+
`class nexory:
112149
def __init__(self, org_name):
113150
self.org = org_name
114151
self.people = []
@@ -118,7 +155,7 @@ function startAnimations() {
118155
print(f"Welcome to {self.org}, {new_user}!")
119156
120157
if __name__ == "__main__":
121-
org = NexoryOrg("Nexory.Org")
158+
org = NexoryOrg("nexory.dev")
122159
org.join("Your Name")
123160
org.run()`;
124161

public/dashboard/home.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
<title data-i18n="home.title"><?= e(t('home.title')) ?></title>
1414
<script>
1515
window.__i18nPage = {
16-
de: { 'home.title': 'Nexory.Org' },
17-
en: { 'home.title': 'Nexory.Org \u2013 Open Source Projects' }
16+
de: { 'home.title': 'nexory.dev' },
17+
en: { 'home.title': 'nexory.dev' }
1818
};
1919
</script>
2020
<link rel="stylesheet" href="../dashboard/home.css">
@@ -33,7 +33,7 @@
3333

3434
<div class="hero-content">
3535
<div class="info">
36-
<h1>Nexory.Org</h1>
36+
<h1>nexory.dev</h1>
3737
<p>Open source projects &middot; Python, JavaScript, PHP and more</p>
3838
</div>
3939

public/footer/footer.css

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,118 @@
1+
/* -- Footer -- */
2+
3+
.footer {
4+
border-top: 1px solid var(--color-border);
5+
background: var(--color-bg-surface);
6+
font-family: 'Fira Code', monospace;
7+
color: var(--color-text);
8+
}
9+
10+
.footer-container {
11+
display: flex;
12+
flex-wrap: wrap;
13+
gap: 3rem;
14+
justify-content: space-between;
15+
align-items: flex-start;
16+
max-width: 1100px;
17+
margin: 0 auto;
18+
padding: 3rem 2rem 2rem;
19+
}
20+
21+
/* -- Brand -- */
22+
23+
.footer-brand {
24+
display: flex;
25+
flex-direction: column;
26+
gap: 0.6rem;
27+
max-width: 260px;
28+
}
29+
30+
.footer-logo {
31+
font-size: 1.2rem;
32+
font-weight: 600;
33+
background: linear-gradient(135deg, var(--color-grad-1) 0%, var(--color-grad-2) 35%, var(--color-grad-3) 70%, var(--color-grad-4) 100%);
34+
-webkit-background-clip: text;
35+
-webkit-text-fill-color: transparent;
36+
background-clip: text;
37+
}
38+
39+
.footer-tagline {
40+
font-size: 0.78rem;
41+
color: var(--color-text-muted);
42+
margin: 0;
43+
line-height: 1.6;
44+
}
45+
46+
/* -- Sections -- */
47+
48+
.footer-section {
49+
display: flex;
50+
flex-direction: column;
51+
gap: 0.75rem;
52+
}
53+
54+
.footer-section-title {
55+
font-size: 0.72rem;
56+
font-weight: 600;
57+
text-transform: uppercase;
58+
letter-spacing: 0.1em;
59+
color: var(--color-text-muted);
60+
margin: 0 0 0.25rem;
61+
}
62+
63+
.footer-nav-list {
64+
list-style: none;
65+
margin: 0;
66+
padding: 0;
67+
display: flex;
68+
flex-direction: column;
69+
gap: 0.55rem;
70+
}
71+
72+
.footer-nav-list li a {
73+
text-decoration: none;
74+
color: var(--color-text-muted);
75+
font-size: 0.85rem;
76+
transition: color 0.25s ease;
77+
}
78+
79+
.footer-nav-list li a:hover {
80+
color: var(--color-accent);
81+
}
82+
83+
/* -- Social link -- */
84+
85+
.footer-social-link {
86+
display: inline-flex;
87+
align-items: center;
88+
gap: 0.45rem;
89+
}
90+
91+
/* -- Bottom bar -- */
92+
93+
.footer-bottom {
94+
border-top: 1px solid var(--color-border-subtle);
95+
text-align: center;
96+
padding: 1rem 2rem;
97+
}
98+
99+
.footer-bottom p {
100+
margin: 0;
101+
font-size: 0.78rem;
102+
color: var(--color-text-muted);
103+
}
104+
105+
/* -- Responsive -- */
106+
107+
@media (max-width: 640px) {
108+
.footer-container {
109+
flex-direction: column;
110+
gap: 2rem;
111+
padding: 2rem 1.25rem 1.5rem;
112+
}
113+
114+
.footer-brand {
115+
max-width: 100%;
116+
}
117+
}
1118

public/footer/footer.php

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,37 @@
1+
<footer class="footer">
2+
<div class="footer-container">
13

4+
<div class="footer-brand">
5+
<span class="footer-logo">nexory.dev</span>
6+
<p class="footer-tagline"><?= e(t('footer.tagline')) ?></p>
7+
</div>
8+
9+
<div class="footer-section">
10+
<h4 class="footer-section-title"><?= e(t('footer.nav_heading')) ?></h4>
11+
<ul class="footer-nav-list">
12+
<li><a href="<?= e(with_language('../dashboard/home.php')) ?>"><?= e(t('nav.home')) ?></a></li>
13+
<li><a href="<?= e(with_language('../github/github.php')) ?>"><?= e(t('nav.github')) ?></a></li>
14+
<li><a href="<?= e(with_language('../contact/contact.php')) ?>"><?= e(t('nav.contact')) ?></a></li>
15+
</ul>
16+
</div>
17+
18+
<div class="footer-section">
19+
<h4 class="footer-section-title"><?= e(t('footer.links_heading')) ?></h4>
20+
<ul class="footer-nav-list">
21+
<li>
22+
<a href="https://github.com/NexoryOrg" target="_blank" rel="noopener noreferrer" class="footer-social-link">
23+
<svg aria-hidden="true" width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
24+
<path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/>
25+
</svg>
26+
NexoryOrg
27+
</a>
28+
</li>
29+
</ul>
30+
</div>
31+
32+
</div>
33+
34+
<div class="footer-bottom">
35+
<p>© <?= date('Y') ?> nexory.dev</p>
36+
</div>
37+
</footer>

public/init.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
$rawHost = (string)($_SERVER['HTTP_HOST'] ?? '');
3737
$cookieHost = (string)parse_url(($secure ? 'https' : 'http') . '://' . $rawHost, PHP_URL_HOST);
3838

39-
$allowedCookieBaseDomains = ['nexory.org'];
39+
$allowedCookieBaseDomains = ['nexory.dev'];
4040

4141
if ($cookieHost !== '' && filter_var($cookieHost, FILTER_VALIDATE_IP) === false) {
4242
foreach ($allowedCookieBaseDomains as $baseDomain) {

public/language.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,20 @@ function t($key) {
106106
'nav.github' => 'Github',
107107
'nav.contact' => 'Kontakt',
108108
'nav.language_switcher' => 'Sprachwechsel',
109-
'home.title' => 'Nexory.Org',
109+
'home.title' => 'nexory.dev',
110+
'footer.tagline' => 'Open-Source-Projekte · Python, JavaScript, PHP und mehr',
111+
'footer.nav_heading' => 'Navigation',
112+
'footer.links_heading' => 'Links',
110113
],
111114
'en' => [
112115
'nav.home' => 'Home',
113116
'nav.github' => 'Github',
114117
'nav.contact' => 'Contact',
115118
'nav.language_switcher' => 'Language Switcher',
116-
'home.title' => 'Nexory.Org',
119+
'home.title' => 'nexory.dev',
120+
'footer.tagline' => 'Open source projects · Python, JavaScript, PHP and more',
121+
'footer.nav_heading' => 'Navigation',
122+
'footer.links_heading' => 'Links',
117123
]
118124
];
119125

0 commit comments

Comments
 (0)