[yoga-21] footer.component.tsx add editable image
This commit is contained in:
parent
a3e57f295f
commit
f1069f3124
@ -88,6 +88,9 @@
|
|||||||
},
|
},
|
||||||
"contactUsPhoneNumber": {
|
"contactUsPhoneNumber": {
|
||||||
"fields": ["*"]
|
"fields": ["*"]
|
||||||
|
},
|
||||||
|
"logo": {
|
||||||
|
"fields": ["name","mime","url"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,6 +32,9 @@
|
|||||||
},
|
},
|
||||||
"contactUsPhoneNumber": {
|
"contactUsPhoneNumber": {
|
||||||
"fields": ["*"]
|
"fields": ["*"]
|
||||||
|
},
|
||||||
|
"logo": {
|
||||||
|
"fields": ["name","mime","url"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -67,6 +67,9 @@
|
|||||||
},
|
},
|
||||||
"contactUsPhoneNumber": {
|
"contactUsPhoneNumber": {
|
||||||
"fields": ["*"]
|
"fields": ["*"]
|
||||||
|
},
|
||||||
|
"logo": {
|
||||||
|
"fields": ["name","mime","url"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,6 +36,9 @@
|
|||||||
},
|
},
|
||||||
"contactUsPhoneNumber": {
|
"contactUsPhoneNumber": {
|
||||||
"fields": ["*"]
|
"fields": ["*"]
|
||||||
|
},
|
||||||
|
"logo": {
|
||||||
|
"fields": ["name","mime","url"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -64,6 +64,9 @@
|
|||||||
},
|
},
|
||||||
"contactUsPhoneNumber": {
|
"contactUsPhoneNumber": {
|
||||||
"fields": ["*"]
|
"fields": ["*"]
|
||||||
|
},
|
||||||
|
"logo": {
|
||||||
|
"fields": ["name","mime","url"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,6 +34,9 @@
|
|||||||
},
|
},
|
||||||
"contactUsPhoneNumber": {
|
"contactUsPhoneNumber": {
|
||||||
"fields": ["*"]
|
"fields": ["*"]
|
||||||
|
},
|
||||||
|
"logo": {
|
||||||
|
"fields": ["name","mime","url"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,6 +26,9 @@
|
|||||||
},
|
},
|
||||||
"contactUsPhoneNumber": {
|
"contactUsPhoneNumber": {
|
||||||
"fields": ["*"]
|
"fields": ["*"]
|
||||||
|
},
|
||||||
|
"logo": {
|
||||||
|
"fields": ["name","mime","url"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -106,6 +106,9 @@
|
|||||||
},
|
},
|
||||||
"contactUsPhoneNumber": {
|
"contactUsPhoneNumber": {
|
||||||
"fields": ["*"]
|
"fields": ["*"]
|
||||||
|
},
|
||||||
|
"logo": {
|
||||||
|
"fields": ["name","mime","url"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import YogaImageComponent from "@/components/yoga.image.component";
|
import YogaImageComponent from "@/components/yoga.image.component";
|
||||||
import {YogaFooter_Plain} from "@/types/generated-strapi-interfaces/api/yoga-footer";
|
import {YogaFooter_Plain} from "@/types/generated-strapi-interfaces/api/yoga-footer";
|
||||||
|
import {StrapiFile} from "@/types/types";
|
||||||
|
import strapiApi from "@/api/strapi/strapi-api";
|
||||||
|
|
||||||
export interface Props{
|
export interface Props{
|
||||||
config: YogaFooter_Plain
|
config: YogaFooter_Plain
|
||||||
@ -14,10 +16,13 @@ const FooterComponent = ({ config: {
|
|||||||
contactUsEmail,
|
contactUsEmail,
|
||||||
contactUsLocation,
|
contactUsLocation,
|
||||||
contactUsPhoneNumber,
|
contactUsPhoneNumber,
|
||||||
copyRight
|
copyRight,
|
||||||
|
logo = undefined
|
||||||
} }: Props) => {
|
} }: Props) => {
|
||||||
|
|
||||||
|
const imageFile: StrapiFile = logo as StrapiFile;
|
||||||
|
const imageUrl = strapiApi.getImageUrl(imageFile?.url)
|
||||||
|
console.info("imageUrl", imageUrl);
|
||||||
|
|
||||||
return (<section className="footer-section" id="footer_section">
|
return (<section className="footer-section" id="footer_section">
|
||||||
<div className="container">
|
<div className="container">
|
||||||
@ -26,7 +31,7 @@ const FooterComponent = ({ config: {
|
|||||||
<div className="col-lg-3 col-md-4 col-sm-6 col-xs-12 d-lg-block d-none">
|
<div className="col-lg-3 col-md-4 col-sm-6 col-xs-12 d-lg-block d-none">
|
||||||
<div className="footer_logo">
|
<div className="footer_logo">
|
||||||
<Link href="/index.html" className="text-decoration-none">
|
<Link href="/index.html" className="text-decoration-none">
|
||||||
<figure className="mb-0"><YogaImageComponent src="/assets/images/footer_logo.png" alt=""
|
<figure className="mb-0"><YogaImageComponent src={imageUrl} alt=""
|
||||||
className="img-fluid"/></figure>
|
className="img-fluid"/></figure>
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,8 +1,11 @@
|
|||||||
// Interface automatically generated by schemas-to-ts
|
// Interface automatically generated by schemas-to-ts
|
||||||
|
|
||||||
import { Link } from '../components/yoga-site/Link';
|
import { Link } from '../components/yoga-site/Link';
|
||||||
|
import { Media } from '../components/shared/Media';
|
||||||
import { Link_Plain } from '../components/yoga-site/Link';
|
import { Link_Plain } from '../components/yoga-site/Link';
|
||||||
|
import { Media_Plain } from '../components/shared/Media';
|
||||||
import { Link_NoRelations } from '../components/yoga-site/Link';
|
import { Link_NoRelations } from '../components/yoga-site/Link';
|
||||||
|
import { AdminPanelRelationPropertyModification } from '../common/AdminPanelRelationPropertyModification';
|
||||||
|
|
||||||
export interface YogaFooter {
|
export interface YogaFooter {
|
||||||
id: number;
|
id: number;
|
||||||
@ -17,6 +20,7 @@ export interface YogaFooter {
|
|||||||
contactUsLocation?: Link;
|
contactUsLocation?: Link;
|
||||||
copyRight?: string;
|
copyRight?: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
|
logo?: { data: Media };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
export interface YogaFooter_Plain {
|
export interface YogaFooter_Plain {
|
||||||
@ -31,6 +35,7 @@ export interface YogaFooter_Plain {
|
|||||||
contactUsLocation?: Link_Plain;
|
contactUsLocation?: Link_Plain;
|
||||||
copyRight?: string;
|
copyRight?: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
|
logo?: Media_Plain;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface YogaFooter_NoRelations {
|
export interface YogaFooter_NoRelations {
|
||||||
@ -45,6 +50,7 @@ export interface YogaFooter_NoRelations {
|
|||||||
contactUsLocation?: Link_NoRelations;
|
contactUsLocation?: Link_NoRelations;
|
||||||
copyRight?: string;
|
copyRight?: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
|
logo?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface YogaFooter_AdminPanelLifeCycle {
|
export interface YogaFooter_AdminPanelLifeCycle {
|
||||||
@ -59,4 +65,5 @@ export interface YogaFooter_AdminPanelLifeCycle {
|
|||||||
contactUsLocation?: Link_Plain;
|
contactUsLocation?: Link_Plain;
|
||||||
copyRight?: string;
|
copyRight?: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
|
logo?: AdminPanelRelationPropertyModification<Media_Plain>;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,11 @@
|
|||||||
// Interface automatically generated by schemas-to-ts
|
// Interface automatically generated by schemas-to-ts
|
||||||
|
|
||||||
import { Link } from '../components/yoga-site/Link';
|
import { Link } from '../components/yoga-site/Link';
|
||||||
|
import { Media } from '../components/shared/Media';
|
||||||
import { Link_Plain } from '../components/yoga-site/Link';
|
import { Link_Plain } from '../components/yoga-site/Link';
|
||||||
|
import { Media_Plain } from '../components/shared/Media';
|
||||||
import { Link_NoRelations } from '../components/yoga-site/Link';
|
import { Link_NoRelations } from '../components/yoga-site/Link';
|
||||||
|
import { AdminPanelRelationPropertyModification } from '../common/AdminPanelRelationPropertyModification';
|
||||||
|
|
||||||
export interface YogaFooter {
|
export interface YogaFooter {
|
||||||
id: number;
|
id: number;
|
||||||
@ -17,6 +20,7 @@ export interface YogaFooter {
|
|||||||
contactUsLocation?: Link;
|
contactUsLocation?: Link;
|
||||||
copyRight?: string;
|
copyRight?: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
|
logo?: { data: Media };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
export interface YogaFooter_Plain {
|
export interface YogaFooter_Plain {
|
||||||
@ -31,6 +35,7 @@ export interface YogaFooter_Plain {
|
|||||||
contactUsLocation?: Link_Plain;
|
contactUsLocation?: Link_Plain;
|
||||||
copyRight?: string;
|
copyRight?: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
|
logo?: Media_Plain;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface YogaFooter_NoRelations {
|
export interface YogaFooter_NoRelations {
|
||||||
@ -45,6 +50,7 @@ export interface YogaFooter_NoRelations {
|
|||||||
contactUsLocation?: Link_NoRelations;
|
contactUsLocation?: Link_NoRelations;
|
||||||
copyRight?: string;
|
copyRight?: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
|
logo?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface YogaFooter_AdminPanelLifeCycle {
|
export interface YogaFooter_AdminPanelLifeCycle {
|
||||||
@ -59,4 +65,5 @@ export interface YogaFooter_AdminPanelLifeCycle {
|
|||||||
contactUsLocation?: Link_Plain;
|
contactUsLocation?: Link_Plain;
|
||||||
copyRight?: string;
|
copyRight?: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
|
logo?: AdminPanelRelationPropertyModification<Media_Plain>;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -50,6 +50,14 @@
|
|||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"logo": {
|
||||||
|
"allowedTypes": [
|
||||||
|
"images",
|
||||||
|
"files"
|
||||||
|
],
|
||||||
|
"type": "media",
|
||||||
|
"multiple": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
1
yoga-cms/types/generated/contentTypes.d.ts
vendored
1
yoga-cms/types/generated/contentTypes.d.ts
vendored
@ -1593,6 +1593,7 @@ export interface ApiYogaFooterYogaFooter extends Struct.CollectionTypeSchema {
|
|||||||
'api::yoga-footer.yoga-footer'
|
'api::yoga-footer.yoga-footer'
|
||||||
> &
|
> &
|
||||||
Schema.Attribute.Private;
|
Schema.Attribute.Private;
|
||||||
|
logo: Schema.Attribute.Media<'images' | 'files'>;
|
||||||
name: Schema.Attribute.String;
|
name: Schema.Attribute.String;
|
||||||
publishedAt: Schema.Attribute.DateTime;
|
publishedAt: Schema.Attribute.DateTime;
|
||||||
quickLinksHeader: Schema.Attribute.String;
|
quickLinksHeader: Schema.Attribute.String;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user