Compare commits
14 Commits
74df8e9248
...
551f545935
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
551f545935 | ||
|
|
958007ed2f | ||
| 217a26ca83 | |||
|
|
d50eac40c3 | ||
|
|
f0f0a975a9 | ||
|
|
97feef9395 | ||
| 6866c0e41c | |||
|
|
dd6f21c57b | ||
|
|
6bb9365a6c | ||
|
|
434de73554 | ||
|
|
d248ccd985 | ||
|
|
0f3056af01 | ||
|
|
0be0070568 | ||
| 7a3cf063ed |
@ -1 +1 @@
|
|||||||
202505181151.77363d0
|
202505262234.f0f0a97
|
||||||
|
|||||||
@ -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 .
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
202505180959.57552b3
|
202505232026.6bb9365
|
||||||
|
|||||||
@ -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: {}
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
11
yoga-app/src/app/services/[slug]/not-found.tsx
Normal file
11
yoga-app/src/app/services/[slug]/not-found.tsx
Normal 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>
|
||||||
|
)
|
||||||
|
}
|
||||||
@ -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 (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@ -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>
|
||||||
|
|||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
2
yoga-cms/types/generated/contentTypes.d.ts
vendored
2
yoga-cms/types/generated/contentTypes.d.ts
vendored
@ -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'> &
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user