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
|
||||
|
||||
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 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")
|
||||
# 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
|
||||
|
||||
@ -1 +1 @@
|
||||
202505180959.57552b3
|
||||
202505232026.6bb9365
|
||||
|
||||
@ -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: {}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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,
|
||||
|
||||
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 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 (
|
||||
<>
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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 {
|
||||
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'> &
|
||||
|
||||
Loading…
Reference in New Issue
Block a user