Remove french dedicated 404 page and update fallback 404 page.
This commit removes the french version of the 404 page and updates the fallback 404 page to support both English and French languages. In addition, it includes changes in multiple places to handle deletion of specific Insights in French and English and ensure their proper referencing.
This commit is contained in:
parent
926bb98d0e
commit
a7591b600c
10 changed files with 36 additions and 185 deletions
|
@ -71,9 +71,13 @@ import Icon from "./icons/Icon.astro";
|
|||
.split("/")
|
||||
.filter((part) => part && !languages.includes(part as TLanguage));
|
||||
|
||||
// Disable the selection of the same language
|
||||
if (lang === url.pathname.split("/")[1]) return;
|
||||
|
||||
if (url.pathname.includes("/post")) {
|
||||
if (
|
||||
url.pathname.includes("/post") ||
|
||||
url.pathname.includes("/insight")
|
||||
) {
|
||||
if (url.pathname.includes("en")) {
|
||||
pathParts.unshift(lang);
|
||||
pathParts.splice(2, 0, lang);
|
||||
|
|
|
@ -4,16 +4,20 @@ import { Image } from "astro:assets";
|
|||
import Icon from "@components/ui/icons/Icon.astro";
|
||||
import type { CollectionEntry } from "astro:content";
|
||||
|
||||
const { insightEntry } = Astro.props;
|
||||
const {
|
||||
insightEntry,
|
||||
label = Astro.currentLocale === "fr" ? "Lire plus" : "Read more",
|
||||
} = Astro.props;
|
||||
|
||||
interface Props {
|
||||
insightEntry: CollectionEntry<"insights">;
|
||||
label?: string;
|
||||
}
|
||||
---
|
||||
|
||||
<!-- The anchor tag is the root container for the "Insight" card. It links to the insight detail page. -->
|
||||
<a
|
||||
class="group outline-none rounded-xl ring-zinc-500 transition duration-300 focus-visible:ring dark:ring-zinc-200 dark:focus:outline-none"
|
||||
class="group rounded-xl outline-none ring-zinc-500 transition duration-300 focus-visible:ring dark:ring-zinc-200 dark:focus:outline-none"
|
||||
href={`/insights/${insightEntry.slug}/`}
|
||||
>
|
||||
<!-- This is the container for the insight's cover image. -->
|
||||
|
@ -42,7 +46,7 @@ interface Props {
|
|||
<p
|
||||
class="mt-5 inline-flex items-center gap-x-1 font-medium text-orange-400 decoration-2 group-hover:underline dark:text-orange-300"
|
||||
>
|
||||
Read more
|
||||
{label}
|
||||
<Icon name="arrowRightStatic" />
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
---
|
||||
title: "The Future of Construction Technology"
|
||||
description: "Explore ScrewFast's pioneering role in revolutionizing construction through advanced technology and innovative solutions."
|
||||
cardImage: "@/images/insights/insight-1.avif"
|
||||
cardImageAlt: "Top view mechanical tools arrangement"
|
||||
---
|
||||
|
||||
In the world of construction, where innovation meets practicality, ScrewFast stands as a beacon of pioneering advancements. For years, this company has been at the forefront of revolutionizing construction through its unwavering commitment to advanced technology and innovative solutions. From skyscrapers to bridges, ScrewFast has left an indelible mark on the industry, shaping the future of construction in ways once thought unimaginable.
|
||||
|
||||
## A Legacy of Innovation
|
||||
|
||||
Founded with a vision to redefine the norms of construction, ScrewFast embarked on a journey marked by relentless innovation. Since its inception, the company has continually pushed the boundaries of what is possible, introducing groundbreaking technologies that have transformed the way structures are built.
|
||||
|
||||
## Reinventing Foundation Systems
|
||||
|
||||
At the heart of ScrewFast's success lies its revolutionary approach to foundation systems. Traditionally, the process of laying foundations has been cumbersome and time-consuming, often requiring extensive excavation and manual labor. However, ScrewFast's innovative solutions have changed the game entirely.
|
||||
|
||||
By leveraging advanced techniques such as helical pile installation, ScrewFast has streamlined the foundation process, significantly reducing both time and cost. These helical piles, with their screw-like design, offer unparalleled stability and can be installed with remarkable efficiency, making them the go-to choice for projects of all sizes.
|
||||
|
||||
## Embracing Digitalization
|
||||
|
||||
In an era dominated by digitalization, ScrewFast has embraced technology wholeheartedly, harnessing its power to drive efficiency and precision. Through the use of advanced software and modeling techniques, the company has revolutionized the design and planning phases of construction projects.
|
||||
|
||||
From 3D modeling to Building Information Modeling (BIM), ScrewFast employs cutting-edge tools to create detailed simulations of structures, allowing for better visualization and optimization. This digital approach not only enhances the accuracy of construction plans but also enables seamless collaboration among architects, engineers, and builders.
|
||||
|
||||
## Sustainable Solutions for a Greener Tomorrow
|
||||
|
||||
In a world increasingly concerned with sustainability, ScrewFast has taken proactive steps to minimize its environmental footprint. By prioritizing eco-friendly materials and sustainable construction practices, the company is leading the charge towards a greener future.
|
||||
|
||||
One notable example is ScrewFast's commitment to modular construction—a method that involves prefabricating building components off-site and assembling them on-site. This approach not only reduces construction waste but also minimizes disruption to local ecosystems, making it a win-win for both builders and the environment.
|
||||
|
||||
## The Road Ahead: Challenges and Opportunities
|
||||
|
||||
As ScrewFast continues to push the boundaries of construction technology, it faces a myriad of challenges and opportunities on the horizon. From navigating regulatory hurdles to adapting to evolving industry trends, the road ahead is fraught with complexities.
|
||||
|
||||
However, with its unwavering dedication to innovation and a track record of success, ScrewFast is well-positioned to overcome these obstacles and continue shaping the future of construction for generations to come. As the industry marches towards an increasingly digital and sustainable future, ScrewFast stands as a beacon of progress, leading the way towards a world where construction is not just efficient and cost-effective but also environmentally responsible.
|
||||
|
||||
## Conclusion
|
||||
|
||||
In the ever-evolving landscape of construction technology, ScrewFast remains a trailblazer, constantly pushing the boundaries of what is possible. Through its commitment to innovation, digitalization, and sustainability, the company has not only revolutionized the way structures are built but has also set a new standard for excellence in the industry.
|
||||
|
||||
As we look towards the future, one thing is clear: the legacy of ScrewFast will continue to shape the world of construction for years to come, inspiring generations of builders to dream big and push the limits of possibility. With ScrewFast leading the way, the future of construction has never looked brighter.
|
|
@ -1,44 +0,0 @@
|
|||
---
|
||||
title: "The Importance of Collaboration"
|
||||
description: "Explore how collaboration is central to ScrewFast's construction approach, driving effective communication and teamwork to achieve outstanding outcomes."
|
||||
cardImage: "@/images/insights/insight-2.avif"
|
||||
cardImageAlt: "Top view mechanical tools arrangement"
|
||||
---
|
||||
|
||||
In the realm of construction, where projects often involve intricate designs, tight deadlines, and complex logistical challenges, the importance of collaboration cannot be overstated. Effective collaboration is not just a desirable aspect of project management; it is the cornerstone upon which successful construction endeavors are built. In this long read, we delve into how collaboration serves as the driving force behind ScrewFast's construction approach, facilitating effective communication and teamwork to achieve outstanding outcomes.
|
||||
|
||||
## Understanding ScrewFast: A Brief Overview
|
||||
|
||||
Before we delve into the intricacies of collaboration within ScrewFast's construction projects, it's essential to grasp the company's background and ethos. ScrewFast is a renowned construction firm known for its innovative approach to foundation solutions. Specializing in helical pile foundations, ScrewFast has established itself as a leader in the construction industry, delivering high-quality, cost-effective solutions for a wide range of projects, from small-scale developments to large-scale infrastructure ventures.
|
||||
|
||||
## The Collaborative Culture at ScrewFast
|
||||
|
||||
At the heart of ScrewFast's success lies a culture that prioritizes collaboration at every stage of the construction process. From project inception to completion, collaboration is woven into the fabric of the company's operations. Unlike traditional hierarchical models prevalent in many construction firms, ScrewFast fosters an environment where every team member's input is valued, regardless of their role or seniority.
|
||||
|
||||
### Breaking Down Silos: The Key to Effective Collaboration
|
||||
|
||||
One of the biggest hurdles to collaboration in construction is the presence of silos within organizations. Departments often operate in isolation, leading to miscommunication, duplication of efforts, and a lack of synergy. ScrewFast tackles this challenge head-on by breaking down silos and promoting cross-functional collaboration.
|
||||
|
||||
#### Cross-Functional Teams: Bridging the Gap
|
||||
|
||||
ScrewFast forms cross-functional teams comprising professionals from diverse backgrounds, including engineers, architects, project managers, and construction workers. By bringing together individuals with varied expertise and perspectives, ScrewFast ensures comprehensive problem-solving and holistic decision-making throughout the project lifecycle.
|
||||
|
||||
#### Integrated Project Delivery: A Unified Approach
|
||||
|
||||
Integrated project delivery (IPD) is another cornerstone of ScrewFast's collaborative ethos. Unlike traditional project delivery methods where stakeholders operate in separate silos, IPD fosters a unified approach where all parties work together from the outset. This integrated approach promotes transparency, efficiency, and collective accountability, ultimately leading to superior project outcomes.
|
||||
|
||||
## Driving Innovation Through Collaboration
|
||||
|
||||
Collaboration isn't just about improving communication and teamwork; it also serves as a catalyst for innovation. At ScrewFast, collaboration fuels a culture of continuous improvement and forward thinking, driving the development of groundbreaking solutions that push the boundaries of construction technology.
|
||||
|
||||
### Co-Creation with Clients: Turning Ideas into Reality
|
||||
|
||||
ScrewFast recognizes the importance of involving clients in the co-creation process. By collaborating closely with clients from project inception, ScrewFast gains valuable insights into their needs, preferences, and challenges. This collaborative approach enables ScrewFast to tailor its solutions to meet clients' specific requirements, resulting in enhanced customer satisfaction and project success.
|
||||
|
||||
### Embracing Emerging Technologies
|
||||
|
||||
Innovation thrives in collaborative environments where diverse perspectives intersect. At ScrewFast, collaboration extends beyond internal teams to external partners, including technology providers, research institutions, and academia. By forging strategic partnerships with industry leaders, ScrewFast stays at the forefront of technological advancements, leveraging cutting-edge tools and techniques to drive efficiency and performance across its projects.
|
||||
|
||||
## Conclusion
|
||||
|
||||
In the fast-paced world of construction, collaboration isn't just a buzzword; it's a fundamental principle that underpins success. ScrewFast's construction approach exemplifies the transformative power of collaboration, demonstrating how effective communication, teamwork, and innovation can drive outstanding outcomes. As the construction industry continues to evolve, embracing collaboration will be key to navigating challenges, seizing opportunities, and delivering sustainable solutions that stand the test of time.
|
|
@ -1,37 +0,0 @@
|
|||
---
|
||||
title: "The Impact of Sustainable Practices"
|
||||
description: "Discover how ScrewFast is leading the charge in promoting sustainability within the construction industry"
|
||||
cardImage: "@/images/insights/insight-3.avif"
|
||||
cardImageAlt: "Top view mechanical tools arrangement"
|
||||
---
|
||||
|
||||
The construction industry casts a long shadow. While it provides the essential framework for our lives, its environmental impact is undeniable. From resource depletion and pollution to energy consumption and waste generation, traditional construction practices take a toll on our planet. But a revolution is brewing, and at the forefront is ScrewFast, a company demonstrably changing the game with its commitment to sustainable practices.
|
||||
|
||||
## The Scope of the Challenge
|
||||
|
||||
Imagine this: the construction industry is responsible for a staggering 36% of global energy use and a whopping 40% of total CO2 emissions [1]. That's not all. Buildings and construction are major contributors to solid waste generation, accounting for up to 40%, and gobble up 30% of the world's raw materials [1]. These statistics paint a clear picture: business as usual is simply unsustainable.
|
||||
|
||||
## ScrewFast: Building with Responsibility
|
||||
|
||||
ScrewFast is a company built on the foundation of responsibility. They understand the environmental cost of construction and are taking decisive action to change course. Their commitment to sustainability permeates every aspect of their operations, from the materials they use to the construction processes they implement.
|
||||
|
||||
* **Material Innovation:** ScrewFast prioritizes the use of recycled and recyclable materials. This not only reduces reliance on virgin resources but also lessens the environmental burden associated with resource extraction.
|
||||
* **Energy Efficiency:** ScrewFast champions energy-efficient construction methods. This might involve incorporating high-performance insulation materials, optimizing building design for natural light and ventilation, or even integrating renewable energy sources like solar panels. The result? Buildings that require less energy to operate, leading to a significant reduction in greenhouse gas emissions.
|
||||
* **Waste Reduction:** ScrewFast meticulously plans and executes projects to minimize waste generation. This can involve using prefabricated components, employing modular construction techniques, and implementing meticulous waste segregation and recycling programs. By minimizing waste, ScrewFast conserves resources and reduces the environmental impact associated with landfills.
|
||||
* **Sustainable Sourcing:** ScrewFast takes a responsible approach to sourcing its materials. They prioritize working with suppliers who share their commitment to sustainability. This ensures that the environmental footprint is considered throughout the entire supply chain.
|
||||
|
||||
## The Impact of Change
|
||||
|
||||
ScrewFast's dedication to sustainable practices extends far beyond their company walls. The ripple effect of their actions is substantial:
|
||||
|
||||
* **Environmental Benefits:** By promoting resource conservation, reduced energy consumption, and minimized waste, ScrewFast contributes significantly to a healthier planet. This translates to cleaner air, a more stable climate, and the preservation of natural resources for future generations.
|
||||
* **Economic Advantages:** Sustainable construction practices often lead to long-term economic benefits. Energy-efficient buildings have lower operational costs, and sustainable materials can sometimes be surprisingly cost-competitive. ScrewFast demonstrates that being green can also be good for the bottom line.
|
||||
* **Social Responsibility:** ScrewFast recognizes that sustainability encompasses more than just the environment. They are committed to creating safe and healthy work environments for their employees and fostering positive relationships with the communities in which they operate.
|
||||
|
||||
## Leading by Example
|
||||
|
||||
ScrewFast isn't just talking the talk, they're walking the walk. Their commitment to sustainability is evident in every project they undertake. By showcasing the tangible benefits of sustainable construction, ScrewFast is inspiring a paradigm shift within the industry. They are paving the way for a future where buildings are not only functional but also environmentally responsible.
|
||||
|
||||
## The Road Ahead
|
||||
|
||||
The construction industry is at a crossroads. ScrewFast stands as a beacon, illuminating the path towards a more sustainable future. By embracing innovative practices and prioritizing environmental responsibility, ScrewFast is not just building structures; they are building a better tomorrow. As more companies follow suit, the impact will be profound. A greener construction industry signifies a healthier planet for all.
|
|
@ -4,15 +4,20 @@ import MainLayout from "@/layouts/MainLayout.astro";
|
|||
import Btn404 from "@components/ui/buttons/Btn404.astro";
|
||||
import { SITE } from "@data/constants";
|
||||
|
||||
const pageTitle: string = `Page Not Found | ${SITE.title}`;
|
||||
|
||||
|
||||
// Define variables for page content
|
||||
|
||||
const pageTitle: string = Astro.currentLocale === "fr" ? `Page Non Trouvée | ${SITE.title}` : `Page Not Found | ${SITE.title}`;
|
||||
const title: string = "404";
|
||||
const subTitle: string = "Oops, this isn't the tool you were looking for!";
|
||||
const content: string =
|
||||
"Don't let this hiccup slow you down. Let's get you back to building your masterpiece.";
|
||||
const btnTitle: string = "Go Back";
|
||||
|
||||
const {
|
||||
subTitle = Astro.currentLocale === "fr" ? "Oops, ce n'est pas l'outil que vous recherchiez!" : "Oops, this isn't the tool you were looking for!", content = Astro.currentLocale === "fr" ? "Ne laissez pas ce contretemps vous ralentir. Revenons à la construction de votre chef-d'œuvre." : "Don't let this hiccup slow you down. Let's get you back to building your masterpiece.", btnTitle = Astro.currentLocale === "fr" ? "Retournez" : "Go Back",
|
||||
} = Astro.props;
|
||||
|
||||
interface Props {
|
||||
subTitle?: string;
|
||||
content?: string;
|
||||
btnTitle?: string;
|
||||
}
|
||||
---
|
||||
|
||||
<MainLayout
|
||||
|
|
|
@ -115,7 +115,7 @@ const pageTitle: string = `${post.data.title} | ${SITE.title}`;
|
|||
class="flex flex-wrap gap-x-2 gap-y-1 sm:flex-nowrap sm:items-center sm:gap-y-0"
|
||||
>
|
||||
{
|
||||
post.data.tags?.map((tag: string, index) => (
|
||||
post.data.tags?.map((tag: string) => (
|
||||
<span class="inline-flex items-center gap-x-1.5 rounded-lg bg-neutral-400/30 px-3 py-1.5 text-xs font-medium text-neutral-700 outline-none focus:outline-none focus-visible:outline-none focus-visible:ring dark:bg-neutral-700/60 dark:text-neutral-300">
|
||||
{capitalize(tag)}
|
||||
</span>
|
||||
|
|
|
@ -14,13 +14,16 @@ const englishBlogEntries = await getCollection("blog", ({ id }) => {
|
|||
return id.startsWith("en/");
|
||||
});
|
||||
|
||||
const englishInsightsEntries = await getCollection("insights", ({ id }) => {
|
||||
return id.startsWith("en/");
|
||||
});
|
||||
|
||||
const blogPosts: CollectionEntry<"blog">[] = englishBlogEntries.sort(
|
||||
(a: CollectionEntry<"blog">, b: CollectionEntry<"blog">) =>
|
||||
b.data.pubDate.valueOf() - a.data.pubDate.valueOf()
|
||||
);
|
||||
// Get all insights posts
|
||||
const insightPosts: CollectionEntry<"insights">[] =
|
||||
await getCollection("insights");
|
||||
const insightPosts: CollectionEntry<"insights">[] = englishInsightsEntries;
|
||||
|
||||
// Separate the most recent post from others
|
||||
const mostRecentPost: CollectionEntry<"blog"> = blogPosts[0];
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
---
|
||||
// Import section components
|
||||
import MainLayout from "@/layouts/MainLayout.astro";
|
||||
import Btn404 from "@components/ui/buttons/Btn404.astro";
|
||||
|
||||
// Define variables for page content
|
||||
const title: string = "404";
|
||||
const subTitle: string = "Oops, ce n'est pas l'outil que vous recherchiez !";
|
||||
const content: string =
|
||||
"Ne laissez pas ce contretemps vous ralentir. Revenons à la construction de votre chef-d'œuvre.";
|
||||
const btnTitle: string = "Retournez";
|
||||
---
|
||||
|
||||
<MainLayout title="Page Non Trouvée | ScrewFast" lang="fr">
|
||||
<section class="grid h-svh place-content-center">
|
||||
<div class="mx-auto max-w-screen-xl px-4 py-8 lg:px-6 lg:py-16">
|
||||
<div class="mx-auto max-w-screen-sm text-center">
|
||||
<h1
|
||||
class="text-dark mb-4 text-7xl font-extrabold text-yellow-500 dark:text-yellow-400 lg:text-9xl"
|
||||
>
|
||||
{title}
|
||||
</h1>
|
||||
<p
|
||||
class="mb-4 text-balance text-3xl font-bold tracking-tight text-neutral-700 dark:text-neutral-300 md:text-4xl"
|
||||
>
|
||||
{subTitle}
|
||||
</p>
|
||||
|
||||
<p
|
||||
class="mb-4 text-pretty text-lg text-neutral-600 dark:text-neutral-400"
|
||||
>
|
||||
{content}
|
||||
</p>
|
||||
<!--Display a button that navigates user back to the previous page-->
|
||||
<Btn404 title={btnTitle} id="go-back" />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</MainLayout>
|
||||
<!--JavaScript code that adds click event to the Button, resulting in going back to the previous page in history-->
|
||||
<script>
|
||||
document.getElementById("go-back")?.addEventListener("click", () => {
|
||||
history.back();
|
||||
});
|
||||
</script>
|
|
@ -14,13 +14,16 @@ const frenchBlogEntries = await getCollection("blog", ({ id }) => {
|
|||
return id.startsWith("fr/");
|
||||
});
|
||||
|
||||
const frenchInsightsEntries = await getCollection("insights", ({ id }) => {
|
||||
return id.startsWith("fr/");
|
||||
});
|
||||
|
||||
const blogPosts: CollectionEntry<"blog">[] = frenchBlogEntries.sort(
|
||||
(a: CollectionEntry<"blog">, b: CollectionEntry<"blog">) =>
|
||||
b.data.pubDate.valueOf() - a.data.pubDate.valueOf(),
|
||||
);
|
||||
// Get all insights posts
|
||||
const insightPosts: CollectionEntry<"insights">[] =
|
||||
await getCollection("insights");
|
||||
const insightPosts: CollectionEntry<"insights">[] = frenchInsightsEntries;
|
||||
|
||||
// Separate the most recent post from others
|
||||
const mostRecentPost: CollectionEntry<"blog"> = blogPosts[0];
|
||||
|
@ -30,7 +33,7 @@ const otherPosts: CollectionEntry<"blog">[] = blogPosts.slice(1);
|
|||
const title: string = "Votre Passerelle vers l'Excellence en Construction";
|
||||
const subTitle: string =
|
||||
"Explorez les dernières actualités, astuces et analyses de ScrewFast pour améliorer vos projets de construction. Des mises en avant de produits aux stratégies de gestion de projet, notre blog est votre ressource incontournable pour tout ce qui concerne les outils et la construction.";
|
||||
const secondTitle: string = "Insights";
|
||||
const secondTitle: string = "Perspectives";
|
||||
const secondSubTitle: string =
|
||||
"Restez à jour avec les dernières tendances et évolutions de l'industrie de la construction grâce aux analyses de l'équipe d'experts de ScrewFast.";
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue