Compare commits

..

14 Commits

14 changed files with 64 additions and 26 deletions

View File

@ -1 +1 @@
202505181151.77363d0
202505262234.f0f0a97

View File

@ -9,4 +9,4 @@ echo "build image ${TAG} from folder ${PROJECT_ROOT}"
cd $PROJECT_ROOT
docker build --build-arg NODE_ENV=production -t $TAG .
docker build --build-arg NODE_ENV=production -t $TAG_INTERNAL -t $TAG_PUBLIC .

View File

@ -6,4 +6,5 @@ echo "Reading version file: ${VERSION_FILE}"
export VERSION=$(cat "${VERSION_FILE}")
export TAG=docker.rschneider.hu/infra/yoga-cms:$VERSION
export TAG_PUBLIC=docker.rschneider.hu/infra/yoga-cms:$VERSION
export TAG_INTERNAL=internal-docker.rschneider.hu/infra/yoga-cms:$VERSION

View File

@ -3,5 +3,7 @@
CURRENT_DIR=$(dirname "$0")
# push docker image
source "${CURRENT_DIR}/build.docker.env.sh"
echo "push image ${TAG}"
docker push $TAG
echo "push image ${TAG_INTERNAL}"
docker push $TAG_INTERNAL
echo "push image ${TAG_PUBLIC}"
docker push $TAG_PUBLIC

View File

@ -1 +1 @@
202505180959.57552b3
202505232026.6bb9365

View File

@ -21,7 +21,7 @@ services:
networks:
- yogastic
app:
image: docker.rschneider.hu/infra/yoga-app:202505181151.77363d0
image: docker.rschneider.hu/infra/yoga-app:202505262234.f0f0a97
platform: linux/amd64
ports:
- '4025:3000'
@ -47,7 +47,7 @@ services:
- proxy_shared
- yogastic
cms:
image: docker.rschneider.hu/infra/yoga-cms:202505180959.57552b3
image: docker.rschneider.hu/infra/yoga-cms:202505232026.6bb9365
ports:
- '4026:1337'
environment:
@ -71,7 +71,6 @@ services:
- yogastic
volumes:
- strapi-uploads:/opt/app/public/uploads
volumes:
next-db: {}
strapi-db: {}

View File

@ -16,9 +16,9 @@ const eslintConfig = [
"next/core-web-vitals",
"next/typescript",
],
// rules: {
// "@typescript-eslint/no-explicit-any": "off"
// },
rules: {
"@typescript-eslint/no-explicit-any": "off"
},
}
),
@ -32,6 +32,6 @@ const eslintConfig = [
// }
];
console.info("eslint config",eslintConfig)
// console.info("eslint config",eslintConfig)
export default eslintConfig;

View File

@ -16,8 +16,6 @@ import webApi from "@/api/web-client/web-api";
export default async function Home() {
const pageData = await webApi.getHomePage();
console.info(JSON.stringify(pageData))
const {
header,
ourServices,

View File

@ -0,0 +1,11 @@
import Link from 'next/link'
export default function NotFound() {
return (
<div>
<h2>Nem található</h2>
<p>Could not find requested resource</p>
<Link href="/">Vissza a kezdőoldalra</Link>
</div>
)
}

View File

@ -8,6 +8,7 @@ import AosComponent from "@/components/aos.component";
import styles from './page.module.css'
import NextBlocksRenderer from "@/components/next.blocks.renderer";
import clsx from "clsx";
import {notFound} from "next/navigation";
const rewriteStrapiImageUrlToNextImageUrl = (content: BlocksContent) =>{
console.info("content", content);
@ -25,12 +26,21 @@ export default async function ServiceArticlePage({params}: {
params: Promise<{ slug: string }>
}) {
const {slug} = await params
const {footer, subscribeNow, common} = await strapiApi.getServicePage();
const servicePage = await strapiApi.getServicePage();
if (!servicePage) {
return notFound()
}
const {subscribeNow, footer, common} = servicePage;
const servicesByName = await strapiApi.getService(slug);
if (!servicesByName || servicesByName.length === 0) {
return notFound();
}
const selectedService = servicesByName[0];
console.info("selectedService",selectedService);
if ( !selectedService?.article?.length ) {
return notFound();
}
const article: BlocksContent = rewriteStrapiImageUrlToNextImageUrl( selectedService.article);
console.info(article);
return (
<>

View File

@ -3,13 +3,18 @@ import {YogaSingleService_Plain} from "@/types/generated-strapi-interfaces/api/y
import {StrapiFile} from "@/types/types";
import strapiApi from "@/api/strapi/strapi-api";
import styles from './our.services.item.component.module.css'
import Link from "next/link";
export interface Props {
config: YogaSingleService_Plain
}
const OurServiceItemComponent = ({config: {header,description,image}}: Props) => {
const OurServiceItemComponent = ({config: {header,description,image,name}}: Props) => {
const imageFile: StrapiFile = image as StrapiFile;
if (!imageFile || !imageFile.url) {
return null
}
const path = '/services/' + name;
return (
<div className={styles.serviceSlide}>
@ -17,15 +22,15 @@ const OurServiceItemComponent = ({config: {header,description,image}}: Props) =>
<div className="services_box_content">
<div className="services_box_upper_portion">
<figure className="mb-0">
<YogaImageComponent src={strapiApi.getImageUrl(imageFile?.url)} alt="" className="img-fluid"/>
<YogaImageComponent src={strapiApi.getImageUrl(imageFile.url)} alt="" className="img-fluid"/>
</figure>
</div>
<div className="services_box_lower_portion">
<h3>{header}</h3>
<p>{description}</p>
<div className="btn_wrapper">
<a href="/services" className="text-decoration-none"><i
className="fa-solid fa-arrow-right" aria-hidden="true"></i></a>
<Link href={path} className="text-decoration-none"><i
className="fa-solid fa-arrow-right" aria-hidden="true"></i></Link>
</div>
</div>
</div>

View File

@ -8,19 +8,23 @@ export interface YogaCommon {
id: number;
attributes: {
createdAt: Date; updatedAt: Date; publishedAt?: Date; logoImage?: { data: Media };
name: string;
};
}
export interface YogaCommon_Plain {
id: number;
createdAt: Date; updatedAt: Date; publishedAt?: Date; logoImage?: Media_Plain;
name: string;
}
export interface YogaCommon_NoRelations {
id: number;
createdAt: Date; updatedAt: Date; publishedAt?: Date; logoImage?: number;
name: string;
}
export interface YogaCommon_AdminPanelLifeCycle {
id: number;
createdAt: Date; updatedAt: Date; publishedAt?: Date; logoImage?: AdminPanelRelationPropertyModification<Media_Plain>;
name: string;
}

View File

@ -4,21 +4,27 @@
"info": {
"singularName": "yoga-common",
"pluralName": "yoga-commons",
"displayName": "YogaCommon"
"displayName": "YogaCommon",
"description": ""
},
"options": {
"draftAndPublish": true
},
"attributes": {
"logoImage": {
"type": "media",
"multiple": false,
"required": false,
"allowedTypes": [
"images",
"files",
"videos",
"audios"
],
"type": "media",
"multiple": false
]
},
"name": {
"type": "string",
"required": true
}
}
}

View File

@ -1237,6 +1237,7 @@ export interface ApiYogaBlogPostsComponentYogaBlogPostsComponent
export interface ApiYogaCommonYogaCommon extends Struct.CollectionTypeSchema {
collectionName: 'yoga_commons';
info: {
description: '';
displayName: 'YogaCommon';
pluralName: 'yoga-commons';
singularName: 'yoga-common';
@ -1255,6 +1256,7 @@ export interface ApiYogaCommonYogaCommon extends Struct.CollectionTypeSchema {
> &
Schema.Attribute.Private;
logoImage: Schema.Attribute.Media<'images' | 'files' | 'videos' | 'audios'>;
name: Schema.Attribute.String & Schema.Attribute.Required;
publishedAt: Schema.Attribute.DateTime;
updatedAt: Schema.Attribute.DateTime;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &