Replace the Four Pillars page with the Guide to CommunityRule on the Content page Template.
This commit is contained in:
1 parent
bf9ee79c9f
commit
453139c783
17 files changed
+1005
-32
No files matched your search
@@ -5,7 +5,7 @@
|
||||
import type { Metadata } from "next";
|
||||
import dynamic from "next/dynamic";
|
||||
import messages from "../../../messages/en/index";
|
||||
import { getAllBlogPosts } from "../../../lib/content";
|
||||
import { getRelatedBlogPosts } from "../../../lib/content";
|
||||
import {
|
||||
buildHowItWorksSyntheticPost,
|
||||
HOW_IT_WORKS_SENTINEL_SLUG,
|
||||
@@ -15,6 +15,7 @@ import { absoluteSiteUrl, routeMetadata } from "../../../lib/siteMetadata";
|
||||
import ContentBanner from "../../components/sections/ContentBanner";
|
||||
import ContentTemplateDecorativeShapes from "../_components/ContentTemplateDecorativeShapes";
|
||||
import AskOrganizer from "../../components/sections/AskOrganizer";
|
||||
import HowItWorksGuideBody from "./_components/HowItWorksGuideBody";
|
||||
import "../blog/blog.css";
|
||||
|
||||
const RelatedArticles = dynamic(
|
||||
@@ -48,10 +49,14 @@ export default async function HowItWorksPage() {
|
||||
const origin = await getRequestSiteOrigin();
|
||||
const page = messages.pages.howItWorks;
|
||||
const syntheticPost = buildHowItWorksSyntheticPost(page);
|
||||
const shareUrl = absoluteSiteUrl("/how-it-works", origin);
|
||||
|
||||
const allPosts = getAllBlogPosts();
|
||||
const relatedPosts = allPosts.slice(0, 8);
|
||||
const slugOrder = allPosts.map((post) => post.slug);
|
||||
const relatedPosts = getRelatedBlogPosts(
|
||||
HOW_IT_WORKS_SENTINEL_SLUG,
|
||||
page.relatedSlugs,
|
||||
3,
|
||||
);
|
||||
const slugOrder = page.relatedSlugs;
|
||||
|
||||
const askOrganizerData = {
|
||||
title: messages.pages.home.askOrganizer.title,
|
||||
@@ -64,7 +69,7 @@ export default async function HowItWorksPage() {
|
||||
"@type": "WebPage",
|
||||
name: page.banner.title,
|
||||
description: messages.metadata.howItWorks.description,
|
||||
url: absoluteSiteUrl("/how-it-works", origin),
|
||||
url: shareUrl,
|
||||
publisher: {
|
||||
"@type": "Organization",
|
||||
name: "CommunityRule",
|
||||
@@ -86,7 +91,7 @@ export default async function HowItWorksPage() {
|
||||
"@type": "ListItem",
|
||||
position: 2,
|
||||
name: page.banner.title,
|
||||
item: absoluteSiteUrl("/how-it-works", origin),
|
||||
item: shareUrl,
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -113,10 +118,7 @@ export default async function HowItWorksPage() {
|
||||
<ContentTemplateDecorativeShapes variant="guide" />
|
||||
|
||||
<article className="relative z-10 p-[var(--space-600)] sm:py-[var(--space-800)] xl:px-[calc(268/1440*100%)]">
|
||||
<div
|
||||
className="post-body text-[var(--color-content-default-primary)] text-medium-paragraph sm:text-large-paragraph lg:text-x-large-paragraph xl:text-xx-large-paragraph sm:mx-auto sm:max-w-[390px] md:max-w-[472px] lg:max-w-[700px] xl:max-w-none"
|
||||
dangerouslySetInnerHTML={{ __html: syntheticPost.htmlContent }}
|
||||
/>
|
||||
<HowItWorksGuideBody page={page} shareUrl={shareUrl} />
|
||||
</article>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in new issue
Block a user