Skip to content

Commit

Permalink
Add taco section in home page
Browse files Browse the repository at this point in the history
  • Loading branch information
evandrosaturnino committed Dec 14, 2023
1 parent b920762 commit 0f0ac42
Show file tree
Hide file tree
Showing 3 changed files with 136 additions and 2 deletions.
18 changes: 18 additions & 0 deletions src/content/pages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,24 @@ migrationInfo:
variant: EXTERNAL_OUTLINE
bgColor: "#141414"
rowReverse: false
tacoRole:
title: Lorem ipsum dolor sit amet
description: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation.
image: /images/liquidity.png
buttons:
- label: Lorem ipsum
url: /about
variant: INTERNAL_SOLID
subitems:
- title: Lorem ipsum dolor sit amet
description: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.
image: /images/decentralized-icon.png
- title: Lorem ipsum dolor sit amet
description: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.
image: /images/secure-icon.png
- title: Lorem ipsum dolor sit amet
description: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.
image: /images/private-icon.png
harnessThePower:
title: Harness the power of Threshold
description: Threshold leverages threshold cryptography to protect digital
Expand Down
38 changes: 36 additions & 2 deletions src/templates/home-page/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { graphql } from "gatsby"
import Hero from "./Hero"
import SectionTemplate from "./SectionTemplate"
import MigrationInfoSection from "./MigrationInfoSection"
import HarnessThePower from "./HarnessThePower"
import JoinTheCommunity from "./JoinTheCommunity"
import ActiveCommunity from "./ActiveCommunity"

const SplashPageTemplate: FC<any> = ({ data }) => {
const {
hero,
bugBounty,
tacoRole,
stakerRole,
lpRole,
tokenHolderRole,
Expand All @@ -25,11 +25,12 @@ const SplashPageTemplate: FC<any> = ({ data }) => {
<>
<Hero {...hero} />
<SectionTemplate {...bugBounty} />
<InfoColumnsSection {...tacoRole} bgColor="#161A1F" />
<SectionTemplate {...stakerRole} bgColor="gray.900" />
<SectionTemplate {...lpRole} bgColor="#181D22" />
<SectionTemplate {...tokenHolderRole} bgColor="#161A1F" />
<MigrationInfoSection {...migrationInfo} bgColor="#181D22" />
<HarnessThePower {...harnessThePower} />
<InfoColumnsSection {...harnessThePower} bgColor="gray.800" />
<ActiveCommunity {...activeCommunity} proposals={proposals} />
<JoinTheCommunity {...joinTheCommunity} />
</>
Expand Down Expand Up @@ -162,6 +163,39 @@ export const query = graphql`
variant
}
}
tacoRole {
title
subitems {
description(from: "description")
title
image {
id
relativePath
internal {
mediaType
}
childImageSharp {
gatsbyImageData(width: 200)
}
}
}
description
image {
id
relativePath
internal {
mediaType
}
childImageSharp {
gatsbyImageData(width: 200)
}
}
buttons {
label
url
variant
}
}
harnessThePower {
title
subitems {
Expand Down
82 changes: 82 additions & 0 deletions static/admin/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,88 @@ collections:
},
],
}
- label: "Taco Section"
name: "tacoRole"
widget: "object"
collapsed: true
fields:
- {
label: "Title",
name: "title",
widget: "string",
minimal: true,
}
- {
label: "Description",
name: "description",
widget: "string",
required: false,
}
- {
label: "Image",
name: "image",
widget: file,
media_library: { config: { multiple: false } },
}
- {
label: "Buttons",
name: "buttons",
widget: "list",
allow_add: true,
required: false,
fields:
[
{ label: Label, name: label, widget: string },
{ label: URL, name: url, widget: string },
{
label: Variant,
name: variant,
widget: select,
required: true,
options:
[
{
label: "External Solid",
value: "EXTERNAL_SOLID",
},
{
label: "Internal Solid",
value: "INTERNAL_SOLID",
},
{
label: "External Outline",
value: "EXTERNAL_OUTLINE",
},
{
label: "Internal Outline",
value: "INTERNAL_OUTLINE",
},
],
},
],
}
- {
label: "Sub Items",
name: "subitems",
widget: "list",
hint: "Do not add more than 3",
allow_add: true,
fields:
[
{ label: "Title", name: "title", widget: "string" },
{
label: "Description",
name: "description",
widget: "markdown",
},
{
label: "Image",
name: "image",
widget: file,
media_library: { config: { multiple: false } },
},
],
}
- label: "Harness The Power Section"
name: "harnessThePower"
widget: "object"
Expand Down

0 comments on commit 0f0ac42

Please sign in to comment.