-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Events - Angular Superpowers to events routing (#1079)
* Events - adding angular page * Events - removing the schema to regenerate the auto generated files * Events - adding new schema and page changes * Adding banner image and events header component * Banner - adding banner in middle of background * UI - Updating based on Ken's feedback * Icons - adding staging and days icons * Adding - event content query * Training header - reverting changes * UI - adding new angular banner without offices * Banners - adding banners for other events * UI - adding underline as per Tiago's feedback * Removing - Read more * Underline - removing spacing from the location * Content - fixing typo and adding more event's banners * Content - icons and banners
- Loading branch information
1 parent
d9886ce
commit 2283f4d
Showing
35 changed files
with
323 additions
and
51 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import type { Collection } from "tinacms"; | ||
import * as Schemas from "../../components/blocks"; | ||
import { eventsHeaderSchema } from "../../components/events/eventsHeader"; | ||
import { testimonialRowSchema } from "../../components/testimonials/TestimonialRow"; | ||
import { seoSchema } from "../../components/util/seo"; | ||
import { videoCardSchema } from "../../components/util/videoCards"; | ||
|
||
export const eventsSchema: Collection = { | ||
label: "Events Pages", | ||
name: "events", | ||
format: "mdx", | ||
path: "content/events", | ||
ui: { | ||
router: ({ document }) => { | ||
console.log(document); | ||
return `/events/${document._sys.filename}`; | ||
}, | ||
}, | ||
fields: [ | ||
// @ts-ignore | ||
seoSchema, | ||
// @ts-ignore | ||
eventsHeaderSchema, | ||
// @ts-ignore | ||
testimonialRowSchema, | ||
{ | ||
type: "string", | ||
name: "title", | ||
label: "Title", | ||
}, | ||
{ | ||
type: "boolean", | ||
name: "showBreadcrumb", | ||
label: "Show Breadcrumb", | ||
}, | ||
{ | ||
type: "boolean", | ||
name: "showTestimonials", | ||
label: "Show Testimonials", | ||
}, | ||
{ | ||
type: "object", | ||
list: true, | ||
name: "_body", | ||
label: "Body", | ||
ui: { | ||
visualSelector: true, | ||
}, | ||
templates: [...Schemas.pageBlocks], | ||
}, | ||
{ | ||
type: "rich-text", | ||
name: "footer", | ||
label: "Footer", | ||
templates: [...Schemas.pageBlocks], | ||
}, | ||
// @ts-ignore | ||
videoCardSchema, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import Image from "next/image"; | ||
import { Section } from "../util/section"; | ||
|
||
const EventsHeader = ({ data }) => { | ||
return ( | ||
<Section | ||
className="flex h-102 items-center justify-center border-b-8 border-sswRed bg-white bg-cover bg-no-repeat" | ||
style={{ | ||
backgroundImage: `url(${ | ||
data?.heroBackground || "/images/polygonBackground.png" | ||
})`, | ||
}} | ||
> | ||
<div className="flex max-w-2xl lg:max-w-3xl"> | ||
<Image | ||
src={data?.imgOverlay} | ||
alt={data?.altText} | ||
height={400} | ||
width={680} | ||
/> | ||
</div> | ||
</Section> | ||
); | ||
}; | ||
|
||
export const eventsHeaderSchema = { | ||
type: "object", | ||
label: "Events Header", | ||
name: "eventHeader", | ||
fields: [ | ||
{ | ||
type: "image", | ||
label: "Hero Background", | ||
name: "heroBackground", | ||
uploadDir: () => "/background", | ||
}, | ||
{ | ||
type: "string", | ||
label: "Alt Text", | ||
name: "altText", | ||
}, | ||
{ | ||
type: "image", | ||
label: "Image Overlay", | ||
name: "imgOverlay", | ||
uploadDir: () => "/background", | ||
}, | ||
], | ||
}; | ||
|
||
export default EventsHeader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.