14 Commits

Author SHA1 Message Date
Roland Schneider
551f545935 [yoga-11] add common type and add logo 2025-06-08 21:12:59 +02:00
Roland Schneider
958007ed2f [yoga-11] add common type and add logo 2025-06-08 20:57:18 +02:00
217a26ca83 [ci-skip] New Prod yoga-app deployment version: 202505232026.6bb9365 2025-05-29 11:16:33 +00:00
Jenkins
d50eac40c3 [ci-skip] Update version to 202505262234.f0f0a97 2025-05-29 11:13:39 +00:00
Schneider Roland
f0f0a975a9 improve not found for service 2025-05-26 22:34:24 +02:00
Schneider Roland
97feef9395 improve not found for service 2025-05-25 14:52:31 +02:00
6866c0e41c [ci-skip] New Prod yoga-app deployment version: 202505232026.6bb9365 2025-05-23 18:30:44 +00:00
Jenkins
dd6f21c57b [ci-skip] Update version to 202505232026.6bb9365 2025-05-23 18:27:24 +00:00
Schneider Roland
6bb9365a6c improve cms docker build 2025-05-23 20:26:41 +02:00
Jenkins
434de73554 [ci-skip] Update version to 202505232020.d248ccd 2025-05-23 18:22:14 +00:00
Schneider Roland
d248ccd985 improve cms docker build 2025-05-23 20:20:40 +02:00
Jenkins
0f3056af01 [ci-skip] Update version to 202505232014.0be0070 2025-05-23 18:16:02 +00:00
Schneider Roland
0be0070568 fix app build eslint issues 2025-05-23 20:14:36 +02:00
7a3cf063ed Merge pull request 'service-article' (#10) from service-article into main
Reviewed-on: https://gitea.rschneider.hu/rschneider/yogastic/pulls/10
2025-05-23 13:02:44 +00:00
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'> &