Skip to content
This repository was archived by the owner on Mar 29, 2025. It is now read-only.

Commit ce843d7

Browse files
committed
footer, links, home header section
1 parent c9ca4b7 commit ce843d7

14 files changed

+486
-0
lines changed

settings/locales/ar.json

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
"tenet": "تينيت",
3+
"testimonialTitle": "ما تقوله الشخصيات عن",
4+
"theme": "سمة",
5+
"languages": "اللغات",
6+
"learnMore": "المزيد",
7+
"arrows": {
8+
"left": "إلى اليسار",
9+
"right": "إلى اليمين"
10+
},
11+
"day": " يوم {{dayNumber}}",
12+
"rating": {
13+
"aria": "تقدير {{currentRating}} من {{maximum}}"
14+
},
15+
"cookies": {
16+
"title": "إدارة ملفات تعريف الارتباط",
17+
"text": "في تينيت يتدفق الوقت للأمام والخلف - تمامًا مثل ملفات تعريف الارتباط الخاصة بنا. نحن نستخدم ملفات تعريف الارتباط لتحسين تجربتك أثناء تصفح موقعنا، مما يساعدك على التحرك بسلاسة عبر الزمن (أو على الأقل من خلال المحتوى الخاص بنا). سواء كنت تتصفح الصفحات للأمام أو تقلبها للخلف، كن مطمئنًا إلى أنه يتم التعامل مع بياناتك بعناية. يمكنك قبول ملفات تعريف الارتباط أو إدارتها في أي وقت - تمامًا كما يتلاعب بطل الرواية بالوقت، فإنك تتحكم في كيفية تعاملنا مع تفضيلاتك. على استعداد للمضي قدما؟ أو ربما… إلى الوراء؟",
18+
"button": {
19+
"confirm": "تأكيد حفظ البيانات",
20+
"cancel": "إلغاء"
21+
}
22+
},
23+
"section": {
24+
"characters": {
25+
"team": "الشخصيات الرئيسية",
26+
"inNormalFlow": "الشخصيات في تدفق طبيعي",
27+
"inInvertedFlow": "الشخصيات أثناء تدفق معكوس",
28+
"inNormalFlowShort": "تدفق طبيعي",
29+
"inInvertedFlowShort": "تدفق معكوس",
30+
"some": "بعض الشخصيات الفعالة"
31+
},
32+
"skills": {
33+
"title": "المهارات",
34+
"weregood": "نحن جيدون",
35+
"why": "وهنا السبب"
36+
},
37+
"video": {
38+
"title": "موسيقى تصويرية"
39+
},
40+
"gallery": {
41+
"title": "معرض الصور"
42+
},
43+
"relatedScenes": {
44+
"title": "المشاهد",
45+
"inNormalFlow": "مشاهد التدفق الطبيعي",
46+
"inInvertedFlow": "مشاهد التدفق المقلوب"
47+
},
48+
"footer": {
49+
"copyrightMessage": "للحاضر (وفي بعض الجداول الزمنية في الماضي ) Gladtek كل الحقوق محفوظة"
50+
}
51+
},
52+
"countries": {
53+
"UA": "أوكرانيا",
54+
"NO": "النرويج",
55+
"IN": "الهند",
56+
"GB": "المملكة المتحدة",
57+
"IT": "إيطاليا",
58+
"EE": "إستونيا",
59+
"VN": "فيتنام",
60+
"RU": "روسيا"
61+
},
62+
"contact": {
63+
"title": "اتصل بنا",
64+
"why": {
65+
"title": "لماذا تريد الانضمام إلي؟",
66+
"answer": "إجابتك"
67+
},
68+
"name": "مرحباً 👋! اسمي...",
69+
"name-placeholder": "اسمك",
70+
"represent": "وأنا أمثل...",
71+
"team-protagonist": "البطل",
72+
"team-sator": "ساتور",
73+
"ask": "أود أن أسأل عن...",
74+
"ask-placeholder": "مهما كانت رغبات قلبك :)",
75+
"submit": "أرسل"
76+
},
77+
"scene": {
78+
"backToLocation": "عد إلى المكان الأصلي للمشهد"
79+
}
80+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import React from 'react';
2+
import { AddContentButtons, getChildNodes, jahiaComponent, Render } from '@jahia/javascript-modules-library';
3+
import { LinkGroup } from '../shared/Links/LinkGroup';
4+
interface FooterColumnLinksProps {
5+
"jcr:title": string;
6+
}
7+
jahiaComponent(
8+
{
9+
nodeType: 'tenet:footerColumnLinks',
10+
displayName: 'Footer Column Menu Links',
11+
componentType: 'view',
12+
name: 'default',
13+
properties: {
14+
'cache.mainResource': 'true'
15+
}
16+
},
17+
({ "jcr:title": title }: FooterColumnLinksProps, { currentNode }) => {
18+
const allChildren = getChildNodes(currentNode, -1);
19+
20+
return (
21+
<>
22+
<LinkGroup header={title}>
23+
{allChildren && allChildren.map(child =>
24+
<li key={child.getIdentifier()}><Render path={child.getPath()} view="tenet" /></li>
25+
)}
26+
</LinkGroup>
27+
<AddContentButtons />
28+
29+
</>
30+
);
31+
});
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
2+
interface FooterMenuProps {
3+
logo: JCRNodeWrapper;
4+
resume: string;
5+
startYear: number;
6+
}
7+
import { useTranslation } from 'react-i18next';
8+
import i18next from 'i18next';
9+
import type { JCRNodeWrapper } from 'org.jahia.services.content';
10+
import { AddContentButtons, getChildNodes, jahiaComponent, Render, server } from "@jahia/javascript-modules-library";
11+
12+
13+
jahiaComponent(
14+
{
15+
nodeType: 'tenet:footerMenu',
16+
displayName: 'Footer Menu',
17+
componentType: 'view',
18+
properties: {
19+
'cache.mainResource': 'true'
20+
}
21+
},
22+
({ logo, resume, startYear }: FooterMenuProps, { currentNode, renderContext }) => {
23+
const dir = i18next.dir(i18next.language);
24+
const { t } = useTranslation();
25+
26+
const site = renderContext.getSite();
27+
28+
const allChildren = getChildNodes(currentNode, -1);
29+
const allChildrenFiltered = allChildren.filter(child => child.isNodeType('tenet:footerColumnLinks'));
30+
31+
32+
const socialMediaHolderPath = currentNode.getPath() + '/socialMediaHolder';
33+
let isLogoPresent = false;
34+
if (logo) {
35+
server.render.addCacheDependency({ node: logo }, renderContext);
36+
isLogoPresent = true;
37+
}
38+
39+
return (
40+
<div className="relative mt-16 bg-deep-purple-400">
41+
<svg
42+
className="absolute top-0 w-full h-6 -mt-5 sm:-mt-10 sm:h-16 text-deep-purple-accent-400"
43+
preserveAspectRatio="none"
44+
viewBox="0 0 1440 54"
45+
>
46+
<path
47+
fill="currentColor"
48+
d="M0 22L120 16.7C240 11 480 1.00001 720 0.700012C960 1.00001 1200 11 1320 16.7L1440 22V54H1320C1200 54 960 54 720 54C480 54 240 54 120 54H0V22Z"
49+
/>
50+
</svg>
51+
<div className="px-4 pt-12 mx-auto sm:max-w-xl md:max-w-full lg:max-w-screen-xl md:px-24 lg:px-8">
52+
<div className="grid gap-16 row-gap-10 mb-8 lg:grid-cols-6">
53+
<div className="md:max-w-md lg:col-span-2">
54+
55+
{isLogoPresent ?
56+
<img width={200}
57+
height={50}
58+
src={logo.getUrl()}
59+
alt="logo"
60+
className="max-w-full"
61+
/> : <h4 className="text-dark dark:text-white">{site.getTitle()}</h4>}
62+
<div className="mt-4 lg:max-w-sm">
63+
<div dangerouslySetInnerHTML={{ __html: resume }} className="text-sm text-deep-purple-50" />
64+
</div>
65+
</div>
66+
<div className="grid grid-cols-2 gap-5 row-gap-8 lg:col-span-4 md:grid-cols-4">
67+
{allChildrenFiltered && allChildrenFiltered.map(child =>
68+
<Render key={child.getIdentifier()} path={child.getPath()} />
69+
)}
70+
{allChildren.length < 2 &&
71+
<AddContentButtons />}
72+
</div>
73+
</div>
74+
<div className="flex flex-col justify-between pt-5 pb-10 border-t border-deep-purple-accent-200 sm:flex-row">
75+
<p className="text-sm text-gray-100">
76+
© {startYear} - {t('section.footer.copyrightMessage')}
77+
</p>
78+
</div>
79+
</div>
80+
</div>
81+
);
82+
});
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import { AddContentButtons, getChildNodes, jahiaComponent, Render, useUrlBuilder } from "@jahia/javascript-modules-library";
2+
import type { JCRNodeWrapper } from "org.jahia.services.content";
3+
4+
interface HeaderSectionProps {
5+
"jcr:title": string;
6+
description: string;
7+
image: JCRNodeWrapper;
8+
}
9+
jahiaComponent(
10+
{
11+
nodeType: 'tenet:headerSection',
12+
name: 'default',
13+
componentType: 'view'
14+
}, ({ 'jcr:title': title, description, image }: HeaderSectionProps, { currentNode, currentResource, renderContext }) => {
15+
const allChildren = getChildNodes(currentNode, -1);
16+
17+
18+
19+
return (
20+
<section className="bg-white dark:bg-gray-900">
21+
<div className="grid max-w-screen-xl px-4 py-8 mx-auto lg:gap-8 xl:gap-0 lg:py-16 lg:grid-cols-12">
22+
<div className="mr-auto place-self-center lg:col-span-7">
23+
<h1 className="max-w-2xl mb-4 text-4xl font-extrabold tracking-tight leading-none md:text-5xl xl:text-6xl dark:text-white">
24+
{title}
25+
</h1>
26+
27+
<div dangerouslySetInnerHTML={{ __html: description }} className="max-w-2xl mb-6 font-light lg:mb-8 md:text-lg lg:text-xl dark:text-white" />
28+
<div className="mt-10 flex items-center justify-center gap-x-6 lg:justify-start">
29+
{allChildren && allChildren.map(child => (
30+
<Render key={child.getIdentifier()} path={child.getPath()} view="tenet" />
31+
))}
32+
33+
{allChildren.length < 3 && <AddContentButtons />}
34+
</div>
35+
</div>
36+
<div className="hidden lg:mt-0 lg:col-span-5 lg:flex">
37+
<img loading="lazy" src={image.getUrl()} alt="mockup" />
38+
</div>
39+
</div>
40+
</section>
41+
);
42+
});
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import { jahiaComponent } from '@jahia/javascript-modules-library';
2+
import SimpleLink from '../shared/Links/SimpleLink';
3+
4+
5+
interface ExternalLinkProps {
6+
children?: React.ReactNode;
7+
className?: string;
8+
hasNoLabel?: boolean;
9+
ariaLabel?: string;
10+
'jcr:title': string;
11+
'j:url': string;
12+
'j:target'?: string;
13+
linkBackgroundColor: string;
14+
}
15+
16+
jahiaComponent(
17+
{
18+
nodeType: 'jnt:externalLink',
19+
displayName: 'External Link',
20+
name: 'tenet',
21+
componentType: 'view',
22+
properties: {
23+
'cache.mainResource': 'true'
24+
}
25+
}, ({ children, className, hasNoLabel, ariaLabel, 'j:url': url, 'j:target': target, "jcr:title": title, linkBackgroundColor }: ExternalLinkProps, { currentNode }) => {
26+
27+
const hasItsOwnStyle = currentNode.isNodeType('tenetmix:styleForLink');
28+
29+
const cssOverride = 'px-6 py-2 font-medium tracking-wide text-white capitalize transition-colors duration-300 transform bg-[#' + linkBackgroundColor + '] rounded-lg hover:bg-blue-500 focus:outline-none focus:ring focus:ring-blue-300 focus:ring-opacity-80';
30+
let calculatedClassName = hasItsOwnStyle ? cssOverride : 'transition-colors duration-300 text-deep-purple-50 hover:text-teal-accent-400';
31+
if (className) {
32+
calculatedClassName = className;
33+
}
34+
35+
return (
36+
<>
37+
{hasNoLabel && <SimpleLink ariaLabel={ariaLabel} link={url} target={target} className={calculatedClassName}>{children}</SimpleLink>}
38+
{!hasNoLabel && <SimpleLink ariaLabel={ariaLabel} link={url} label={title} target={target} className={calculatedClassName}>{children}</SimpleLink>}
39+
</>
40+
);
41+
});
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import { jahiaComponent } from '@jahia/javascript-modules-library';
2+
import SimpleLink from '../shared/Links/SimpleLink';
3+
4+
import type { JCRNodeWrapper } from 'org.jahia.services.content';
5+
6+
interface NodeLinkProps {
7+
children: React.ReactNode;
8+
className?: string;
9+
hasNoLabel?: boolean;
10+
ariaLabel?: string;
11+
'jcr:title': string;
12+
'j:url': string;
13+
'j:target'?: string;
14+
'j:node': JCRNodeWrapper;
15+
linkBackgroundColor: string;
16+
}
17+
jahiaComponent(
18+
{
19+
nodeType: 'jnt:nodeLink',
20+
displayName: 'Node Link',
21+
name: 'tenet',
22+
componentType: 'view',
23+
properties: {
24+
'cache.mainResource': 'true'
25+
}
26+
}
27+
, ({ 'j:node': node, 'j:target': target, "jcr:title": title, linkBackgroundColor }: NodeLinkProps, { currentNode }) => {
28+
29+
30+
const url = node !== undefined ? node.getUrl() : '';
31+
32+
const hasItsOwnStyle = currentNode.isNodeType('tenetmix:styleForLink');
33+
const cssOverride = 'px-6 py-2 font-medium tracking-wide text-white capitalize transition-colors duration-300 transform bg-[#' + linkBackgroundColor + '] rounded-lg hover:bg-blue-500 focus:outline-none focus:ring focus:ring-blue-300 focus:ring-opacity-80';
34+
const calculatedClassName = hasItsOwnStyle ? cssOverride : 'transition-colors duration-300 text-deep-purple-50 hover:text-teal-accent-400';
35+
36+
return (
37+
<SimpleLink link={url} label={title} target={target} className={calculatedClassName} />
38+
);
39+
});
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { AddContentButtons, getChildNodes, jahiaComponent, Render } from '@jahia/javascript-modules-library';
2+
3+
4+
jahiaComponent(
5+
{
6+
nodeType: 'tenet:socialMediaHolder',
7+
displayName: 'Social Media Holder',
8+
name: 'default',
9+
componentType: 'view',
10+
properties: {
11+
'cache.mainResource': 'true'
12+
}
13+
}
14+
, ({ }, { currentNode }) => {
15+
16+
const allChildren = getChildNodes(currentNode, -1);
17+
18+
return (
19+
<>
20+
<div className="flex items-center mt-4 space-x-4 rtl:space-x-reverse sm:mt-0">
21+
{allChildren.map(child =>
22+
<Render key={child.getIdentifier()} path={child.getPath()} />
23+
)}
24+
</div>
25+
<AddContentButtons />
26+
</>
27+
);
28+
});

0 commit comments

Comments
 (0)