Update server configuration and translations for improved deployment and user experience

- Enhanced server startup message to include dynamic protocol and domain based on the environment (production or development).
- Updated translation references from GitHub to Gitea across multiple languages for consistency.
- Refactored layout and metadata in Astro components to utilize SITE configuration for URLs, ensuring accurate site links.
- Cleaned up unused code in the layout file and removed commented-out sections for better readability.
This commit is contained in:
becarta
2025-07-18 08:16:10 +02:00
parent 4fbfcc5855
commit 0b59b3b977
5 changed files with 26 additions and 27 deletions

View File

@@ -18,5 +18,12 @@ app.use(express.static(path.join(__dirname, 'dist/client')));
app.all('*', handler); app.all('*', handler);
app.listen(PORT, () => { app.listen(PORT, () => {
console.log(`Server running with compression on http://localhost:${PORT}`); const isProduction = process.env.NODE_ENV === 'production';
const domain = isProduction ? '365devnet.eu' : `localhost:${PORT}`;
const protocol = isProduction ? 'https' : 'http';
console.log(`Server running with compression on ${protocol}://${domain}`);
if (!isProduction) {
console.log(`Development server accessible at http://localhost:${PORT}`);
}
}); });

View File

@@ -143,7 +143,7 @@ const translations: Record<SupportedLanguage, JourniiTranslation> = {
cta: { cta: {
title: "Stay Updated", title: "Stay Updated",
desc: "Journii is currently in active development. Follow our progress and be among the first to know when it launches.", desc: "Journii is currently in active development. Follow our progress and be among the first to know when it launches.",
github: "View on GitHub", github: "View on Gitea",
updates: "Get Updates" updates: "Get Updates"
} }
}, },
@@ -225,7 +225,7 @@ const translations: Record<SupportedLanguage, JourniiTranslation> = {
cta: { cta: {
title: "Blijf op de Hoogte", title: "Blijf op de Hoogte",
desc: "Journii is momenteel in actieve ontwikkeling. Volg onze voortgang en wees een van de eersten die het weet wanneer het wordt gelanceerd.", desc: "Journii is momenteel in actieve ontwikkeling. Volg onze voortgang en wees een van de eersten die het weet wanneer het wordt gelanceerd.",
github: "Bekijk op GitHub", github: "Bekijk op Gitea",
updates: "Ontvang Updates" updates: "Ontvang Updates"
} }
}, },
@@ -307,7 +307,7 @@ const translations: Record<SupportedLanguage, JourniiTranslation> = {
cta: { cta: {
title: "Bleiben Sie Auf Dem Laufenden", title: "Bleiben Sie Auf Dem Laufenden",
desc: "Journii befindet sich derzeit in aktiver Entwicklung. Verfolgen Sie unseren Fortschritt und gehören Sie zu den Ersten, die erfahren, wann es startet.", desc: "Journii befindet sich derzeit in aktiver Entwicklung. Verfolgen Sie unseren Fortschritt und gehören Sie zu den Ersten, die erfahren, wann es startet.",
github: "Auf GitHub Ansehen", github: "Auf Gitea Ansehen",
updates: "Updates Erhalten" updates: "Updates Erhalten"
} }
}, },
@@ -389,7 +389,7 @@ const translations: Record<SupportedLanguage, JourniiTranslation> = {
cta: { cta: {
title: "Restez Informé", title: "Restez Informé",
desc: "Journii est actuellement en développement actif. Suivez nos progrès et soyez parmi les premiers à savoir quand il sera lancé.", desc: "Journii est actuellement en développement actif. Suivez nos progrès et soyez parmi les premiers à savoir quand il sera lancé.",
github: "Voir sur GitHub", github: "Voir sur Gitea",
updates: "Recevoir les Mises à Jour" updates: "Recevoir les Mises à Jour"
} }
} }

View File

@@ -1,7 +1,7 @@
--- ---
import '~/assets/styles/tailwind.css'; import '~/assets/styles/tailwind.css';
import { I18N } from 'astrowind:config'; import { I18N, SITE } from 'astrowind:config';
import CommonMeta from '~/components/common/CommonMeta.astro'; import CommonMeta from '~/components/common/CommonMeta.astro';
import Favicons from '~/components/Favicons.astro'; import Favicons from '~/components/Favicons.astro';
@@ -52,10 +52,10 @@ const { language, textDirection } = I18N;
'@context': 'https://schema.org', '@context': 'https://schema.org',
'@type': 'WebSite', '@type': 'WebSite',
name: '365DevNet', name: '365DevNet',
url: Astro.url.origin, url: SITE.site,
potentialAction: { potentialAction: {
'@type': 'SearchAction', '@type': 'SearchAction',
target: `${Astro.url.origin}/search?q={search_term_string}`, target: `${SITE.site}/search?q={search_term_string}`,
'query-input': 'required name=search_term_string', 'query-input': 'required name=search_term_string',
}, },
}} }}
@@ -84,8 +84,8 @@ const { language, textDirection } = I18N;
<LanguagePersistence /> <LanguagePersistence />
<CookieBanner /> <CookieBanner />
<BackToTop /> <BackToTop />
<!-- Start of Rocket.Chat Livechat Script -->
<!--
<script type="text/javascript" defer> <script type="text/javascript" defer>
(function(w, d, s, u) { (function(w, d, s, u) {
w.RocketChat = function(c) { w.RocketChat._.push(c) }; w.RocketChat._ = []; w.RocketChat.url = u; w.RocketChat = function(c) { w.RocketChat._.push(c) }; w.RocketChat._ = []; w.RocketChat.url = u;
@@ -94,8 +94,7 @@ const { language, textDirection } = I18N;
h.parentNode.insertBefore(j, h); h.parentNode.insertBefore(j, h);
})(window, document, 'script', 'https://chat.365devnet.eu/livechat'); })(window, document, 'script', 'https://chat.365devnet.eu/livechat');
</script> </script>
-->
<!-- End of Rocket.Chat Livechat Script -->
<ImageModal /> <ImageModal />
</body> </body>
</html> </html>

View File

@@ -12,6 +12,7 @@ import CallToAction from '~/components/widgets/CallToAction.astro';
import HomePageImage from '~/assets/images/richardbergsma.png'; import HomePageImage from '~/assets/images/richardbergsma.png';
import { getTranslation, supportedLanguages } from '~/i18n/translations'; import { getTranslation, supportedLanguages } from '~/i18n/translations';
import { SITE } from 'astrowind:config';
export async function getStaticPaths() { export async function getStaticPaths() {
return supportedLanguages.map((lang) => ({ return supportedLanguages.map((lang) => ({
@@ -385,8 +386,8 @@ const metadata = {
name: 'Richard Bergsma', name: 'Richard Bergsma',
jobTitle: 'IT Systems and Automation Manager', jobTitle: 'IT Systems and Automation Manager',
description: t.hero.subtitle, description: t.hero.subtitle,
image: Astro.url.origin + '/images/richardbergsma.png', image: SITE.site + '/images/richardbergsma.png',
url: Astro.url.origin, url: SITE.site,
sameAs: ['https://www.linkedin.com/in/rrpbergsma', 'https://github.com/rrpbergsma'], sameAs: ['https://www.linkedin.com/in/rrpbergsma', 'https://github.com/rrpbergsma'],
knowsAbout: t.skills.items.map((skill) => skill.title), knowsAbout: t.skills.items.map((skill) => skill.title),
worksFor: { worksFor: {

View File

@@ -174,25 +174,17 @@ const metadata = {
</p> </p>
<div class="flex flex-col sm:flex-row gap-4 justify-center"> <div class="flex flex-col sm:flex-row gap-4 justify-center">
<a <a
href="https://github.com/yourusername/journii" href="https://git.365devnet.eu/365DevNet"
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
class="inline-flex items-center px-6 py-3 bg-white/20 hover:bg-white/30 rounded-lg font-semibold transition-colors" class="inline-flex items-center px-6 py-3 bg-white/20 hover:bg-white/30 rounded-lg font-semibold transition-colors"
> >
<svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 24 24"> <svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 24 24">
<path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z"/> <path d="M8 3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2H8zm0 2h8v14H8V5zm2 2v2h4V7h-4zm0 4v2h4v-2h-4z"/>
</svg> </svg>
{t.cta.github} {t.cta.github}
</a> </a>
<a
href="#newsletter"
class="inline-flex items-center px-6 py-3 bg-white text-blue-600 hover:bg-gray-100 rounded-lg font-semibold transition-colors"
>
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 17h5l-5 5-5-5h5v-12"></path>
</svg>
{t.cta.updates}
</a>
</div> </div>
</div> </div>
</div> </div>