Skip to content

Advertise use cases #264

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ trim_trailing_whitespace=true
max_line_length=120
insert_final_newline=true

[*.{ts,js,jsx,tsx,json,yaml,yml}]
[*.{css,ts,js,jsx,tsx,json,yaml,yml}]
indent_style=space
indent_size=2
tab_width=2
Expand All @@ -19,3 +19,4 @@ tab_width=2
indent_style=space
indent_size=4
tab_width=4

102 changes: 99 additions & 3 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import useDocusaurusContext from '@docusaurus/useDocusaurusContext'
import useBaseUrl from '@docusaurus/useBaseUrl'
import styles from './styles.module.css'

const featureRows = [
const quickLinkRow = [
[
{
title: 'What is KILT?',
Expand Down Expand Up @@ -47,6 +47,43 @@ const featureRows = [
],
]

const useCases = [
{
title: 'Your Friendly Name for the Web',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
title: 'Your Friendly Name for the Web',
title: 'Your Name for the Web',

imageUrl: 'img/expert_light.svg',
imageUrlDark: 'img/expert_dark.svg',
link: 'https://w3n.id',
description: (
<>
Claim your web3name! A unique, human readable name that can be used as an alias for your DID.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Claim your web3name! A unique, human readable name that can be used as an alias for your DID.
No longer identified as a hex string! Claim your web3name! A unique, human-readable name that can be used as an alias for your DID.

</>
),
},
{
title: 'Send Funds to Your DID',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
title: 'Send Funds to Your DID',
title: 'Send Funds to Your web3name or DID',

imageUrl: 'img/tools.svg',
imageUrlDark: 'img/tools.svg',
link: 'docs/develop/sdk/quickstart',
description: (
<>
No need to remember long cryptic account addresses.
Add a service endpoint to your DID that specifies where asset should be send to.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change this? Since I am not sure if the audience would know what a service endpoint is without describing it to them.

Suggested change
Add a service endpoint to your DID that specifies where asset should be send to.
Define where your assets are sent with your DID by using service endpoints.
Time to explore what a DID can do for your convenience.

</>
),
},
{
title: 'Prove Your Public Identity',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
title: 'Prove Your Public Identity',
title: 'Make Your Identity Know',

imageUrl: 'img/apps-light.svg',
imageUrlDark: 'img/apps-dark.svg',
link: 'docs/develop/builtonkilt',
description: (
<>
Make sure that others know who you are when you comment on polkassembly or are a public figure in the polkadot ecosystem.
</>
),
},
]

function Feature({ imageUrl, imageUrlDark, title, description, link }) {
const imgUrl = useBaseUrl(imageUrl)
const imgUrlDark = useBaseUrl(imageUrlDark)
Expand All @@ -72,6 +109,55 @@ function Feature({ imageUrl, imageUrlDark, title, description, link }) {
)
}

function UseCaseImage({ title, imgUrl, imgUrlDark }) {

return (<div className="text--center">
<ThemedImage
alt={title}
className={styles.featureImage}
sources={{
light: imgUrl,
dark: imgUrlDark,
}}
/>
</div>)
}

function UseCaseText({ title, description, link }) {

return (<div className="text--center">
<a href={useBaseUrl(link)} className={styles.featureLink}>
<h3>{title}</h3>
</a>
<p>{description}</p>
</div>)
}

function UseCase({ imageUrl, imageUrlDark, title, description, link, index }) {
const imgUrl = useBaseUrl(imageUrl)
const imgUrlDark = useBaseUrl(imageUrlDark)

let text = (
<div className={clsx('col col--8')}>
{UseCaseText({ title, description, link })}
</div>
)

let img = (
<div className={clsx('col col--4')}>
{imgUrl && (
UseCaseImage({ title, imgUrl, imgUrlDark })
)}
</div>
)

return (<div className={clsx('row')}>
{index % 2 == 0 && [text, img]}
{index % 2 == 1 && [img, text]}
</div>)
}


export default function Home() {
const context = useDocusaurusContext()
const { siteConfig = {} } = context
Expand All @@ -87,10 +173,10 @@ export default function Home() {
</div>
</header>
<main>
{featureRows && featureRows.length > 0 && (
{quickLinkRow && quickLinkRow.length > 0 && (
<section className={styles.features}>
<div className="container">
{featureRows.map((features, row_idx) => (
{quickLinkRow.map((features, row_idx) => (
<div className="row" key={row_idx}>
{features.map((props, idx) => (
<Feature key={`${row_idx}-${idx}`} {...props} />
Expand All @@ -100,6 +186,16 @@ export default function Home() {
</div>
</section>
)}
{useCases && useCases.length > 0 && (
<section className={styles.use_case}>
<div className="container">
<h1>Use Cases</h1>
{useCases.map((useCaseProps, index) => (
<UseCase key={index} index={index} {...useCaseProps} />
))}
</div>
</section>
)}
</main>
</Layout>
)
Expand Down
21 changes: 21 additions & 0 deletions src/pages/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,24 @@
html[data-theme='dark'] .featureLink {
color: white;
}

.useCases {
display: flex;
align-items: center;
padding: 2rem 0;
width: 100%;
text-align: center;
}

.useCaseImage {
height: 200px;
width: 200px;
}

.useCaseLink {
color: #000000;
}

html[data-theme='dark'] .useCaseLink {
color: white;
}