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 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 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") CURRENT_DIR=$(dirname "$0")
# push docker image # push docker image
source "${CURRENT_DIR}/build.docker.env.sh" source "${CURRENT_DIR}/build.docker.env.sh"
echo "push image ${TAG}" echo "push image ${TAG_INTERNAL}"
docker push $TAG 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: networks:
- yogastic - yogastic
app: app:
image: docker.rschneider.hu/infra/yoga-app:202505181151.77363d0 image: docker.rschneider.hu/infra/yoga-app:202505262234.f0f0a97
platform: linux/amd64 platform: linux/amd64
ports: ports:
- '4025:3000' - '4025:3000'
@ -47,7 +47,7 @@ services:
- proxy_shared - proxy_shared
- yogastic - yogastic
cms: cms:
image: docker.rschneider.hu/infra/yoga-cms:202505180959.57552b3 image: docker.rschneider.hu/infra/yoga-cms:202505232026.6bb9365
ports: ports:
- '4026:1337' - '4026:1337'
environment: environment:
@ -71,7 +71,6 @@ services:
- yogastic - yogastic
volumes: volumes:
- strapi-uploads:/opt/app/public/uploads - strapi-uploads:/opt/app/public/uploads
volumes: volumes:
next-db: {} next-db: {}
strapi-db: {} strapi-db: {}

View File

@ -16,9 +16,9 @@ const eslintConfig = [
"next/core-web-vitals", "next/core-web-vitals",
"next/typescript", "next/typescript",
], ],
// rules: { rules: {
// "@typescript-eslint/no-explicit-any": "off" "@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; export default eslintConfig;

View File

@ -16,8 +16,6 @@ import webApi from "@/api/web-client/web-api";
export default async function Home() { export default async function Home() {
const pageData = await webApi.getHomePage(); const pageData = await webApi.getHomePage();
console.info(JSON.stringify(pageData))
const { const {
header, header,
ourServices, 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 styles from './page.module.css'
import NextBlocksRenderer from "@/components/next.blocks.renderer"; import NextBlocksRenderer from "@/components/next.blocks.renderer";
import clsx from "clsx"; import clsx from "clsx";
import {notFound} from "next/navigation";
const rewriteStrapiImageUrlToNextImageUrl = (content: BlocksContent) =>{ const rewriteStrapiImageUrlToNextImageUrl = (content: BlocksContent) =>{
console.info("content", content); console.info("content", content);
@ -25,12 +26,21 @@ export default async function ServiceArticlePage({params}: {
params: Promise<{ slug: string }> params: Promise<{ slug: string }>
}) { }) {
const {slug} = await params 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); const servicesByName = await strapiApi.getService(slug);
if (!servicesByName || servicesByName.length === 0) {
return notFound();
}
const selectedService = servicesByName[0]; const selectedService = servicesByName[0];
console.info("selectedService",selectedService); if ( !selectedService?.article?.length ) {
return notFound();
}
const article: BlocksContent = rewriteStrapiImageUrlToNextImageUrl( selectedService.article); const article: BlocksContent = rewriteStrapiImageUrlToNextImageUrl( selectedService.article);
console.info(article);
return ( return (
<> <>

View File

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

View File

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

View File

@ -4,21 +4,27 @@
"info": { "info": {
"singularName": "yoga-common", "singularName": "yoga-common",
"pluralName": "yoga-commons", "pluralName": "yoga-commons",
"displayName": "YogaCommon" "displayName": "YogaCommon",
"description": ""
}, },
"options": { "options": {
"draftAndPublish": true "draftAndPublish": true
}, },
"attributes": { "attributes": {
"logoImage": { "logoImage": {
"type": "media",
"multiple": false,
"required": false,
"allowedTypes": [ "allowedTypes": [
"images", "images",
"files", "files",
"videos", "videos",
"audios" "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 { export interface ApiYogaCommonYogaCommon extends Struct.CollectionTypeSchema {
collectionName: 'yoga_commons'; collectionName: 'yoga_commons';
info: { info: {
description: '';
displayName: 'YogaCommon'; displayName: 'YogaCommon';
pluralName: 'yoga-commons'; pluralName: 'yoga-commons';
singularName: 'yoga-common'; singularName: 'yoga-common';
@ -1255,6 +1256,7 @@ export interface ApiYogaCommonYogaCommon extends Struct.CollectionTypeSchema {
> & > &
Schema.Attribute.Private; Schema.Attribute.Private;
logoImage: Schema.Attribute.Media<'images' | 'files' | 'videos' | 'audios'>; logoImage: Schema.Attribute.Media<'images' | 'files' | 'videos' | 'audios'>;
name: Schema.Attribute.String & Schema.Attribute.Required;
publishedAt: Schema.Attribute.DateTime; publishedAt: Schema.Attribute.DateTime;
updatedAt: Schema.Attribute.DateTime; updatedAt: Schema.Attribute.DateTime;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &