-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce new Landing Page layout (#2522)
* Introduce new Landing Page layout * Fix UI * Add i18n copy * Change outer padding mobile * CR changes * Add aria-label
- Loading branch information
Showing
7 changed files
with
314 additions
and
12 deletions.
There are no files selected for viewing
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,6 @@ | ||
{ | ||
"en": { | ||
"title": "Secure, seamless & privacy-preserving digital identity", | ||
"subtitle": "Internet Identity is a decentralized identity solution running end-to-end on the Internet Computer blockchain." | ||
} | ||
} |
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,58 @@ | ||
import { I18n } from "$src/i18n"; | ||
import { html, TemplateResult } from "lit-html"; | ||
import { navigationLink } from "./footer"; | ||
import { githubIcon, icLogo, questionIcon } from "./icons"; | ||
import copyJson from "./landingPage.json"; | ||
|
||
/** | ||
* Landing page template | ||
* | ||
* It is a component with split panes left and right in desktop view. | ||
* To the left there is some static content, and to the right there is a slot. | ||
* | ||
* In movile view, the static content is below the slot. | ||
* | ||
*/ | ||
export const landingPage = ({ | ||
slot, | ||
}: { | ||
slot: TemplateResult; | ||
}): TemplateResult => { | ||
const i18n = new I18n(); | ||
const copy = i18n.i18n(copyJson); | ||
|
||
return html` <main class="c-landingPage"> | ||
<div class="c-landingPage__logo"> | ||
<div class="c-logo">${icLogo}</div> | ||
</div> | ||
<section class="c-landingPage__right"> | ||
<div class="c-landingPage__right__content"> | ||
<div class="c-landingPage__right__content--full-width">${slot}</div> | ||
</div> | ||
</section> | ||
<section class="c-landingPage__left" aria-label="Action Pane"> | ||
<div class="c-landingPage__left__content"> | ||
<h1 class="t-title t-title--main">${copy.title}</h1> | ||
<p class="t-paragraph">{${copy.subtitle}}</p> | ||
</div> | ||
<div class="c-landingPage__left__footer"> | ||
${navigationLink({ | ||
icon: questionIcon, | ||
labelText: "Support", | ||
id: "support-link", | ||
url: "https://internetidentity.zendesk.com/hc/en-us", | ||
rel: "noopener noreferrer", | ||
classes: "t-link--discreet c-footer__link", | ||
})} | ||
${navigationLink({ | ||
icon: githubIcon, | ||
labelText: "Source code", | ||
id: "source-link", | ||
url: "https://github.com/dfinity/internet-identity", | ||
rel: "noopener noreferrer", | ||
classes: "t-link--discreet c-footer__link", | ||
})} | ||
</div> | ||
</section> | ||
</main>`; | ||
}; |
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,15 @@ | ||
--- | ||
import Screen from "../layouts/Screen.astro"; | ||
--- | ||
|
||
<Screen title="Manage New" pageName="manageNew"> | ||
<script> | ||
import { toast } from "$src/components/toast"; | ||
import { manage } from "../templates"; | ||
|
||
manage.firstTime({ | ||
useExisting: () => toast.info("Asked for existing"), | ||
register: () => toast.info("Asked for registration"), | ||
}, true); | ||
</script> | ||
</Screen> |
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,17 @@ | ||
--- | ||
import Screen from "../layouts/Screen.astro"; | ||
--- | ||
|
||
<Screen title="Manage Pick" pageName="managePick"> | ||
<script> | ||
import { toast } from "$src/components/toast"; | ||
import { manage } from "../templates"; | ||
|
||
manage.pick({ | ||
anchors: [BigInt(10000), BigInt(243099), BigInt(10000), BigInt(243099), BigInt(10000), BigInt(243099), BigInt(10000), BigInt(243099), BigInt(10000), BigInt(243099), BigInt(10000), BigInt(243099), BigInt(10000), BigInt(243099),BigInt(10000), BigInt(243099),BigInt(10000), BigInt(243099),BigInt(10000), BigInt(243099)], | ||
moreOptions: () => toast.info("Asked for more options"), | ||
onSubmit: (userNumber) => | ||
toast.info(`User number submitted: ${userNumber.toString()}`), | ||
}, true); | ||
</script> | ||
</Screen> |
Oops, something went wrong.