-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Convert React component to Astro component - Add utils for directus client
- Loading branch information
1 parent
62e120e
commit 701cf07
Showing
4 changed files
with
80 additions
and
78 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,10 @@ | ||
import {createDirectus, rest, staticToken} from '@directus/sdk'; | ||
|
||
const directusUrl = import.meta.env.DIRECTUS_URL; | ||
const directusToken = import.meta.env.DIRECTUS_TOKEN; | ||
|
||
const directusClient = createDirectus(directusUrl) | ||
.with(staticToken(directusToken)) | ||
.with(rest()); | ||
|
||
export default directusClient; |
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,69 @@ | ||
--- | ||
import { readItems } from "@directus/sdk"; | ||
import { Link } from "../../components/Link/Link"; | ||
//import Icon from "../../components/Icon"; | ||
import "./ReachNewHeights.scss"; | ||
import directusClient from "../../utils/client"; | ||
const content = await directusClient.request(readItems("Hero_Section", { | ||
fields: ["*.*"] | ||
})); | ||
--- | ||
|
||
<section class="reach-new-heights" id="Home"> | ||
{JSON.stringify(content)} | ||
<div class="reach-new-heights__content"> | ||
<div> | ||
<div class="reach-new-heights__headline"> | ||
<h1>{}</h1> | ||
<p>{}</p> | ||
</div> | ||
<div class="reach-new-heights__buttons"> | ||
<Link href="/new">{}</Link> | ||
<Link href="#Features" tertiary>{}</Link> | ||
</div> | ||
</div> | ||
<img | ||
src="assets/images/reach-new-heights_light.webp" | ||
alt="Reach new heights" | ||
class="reach-new-heights__image reach-new-heights__image--light" | ||
/> | ||
<img | ||
src="assets/images/reach-new-heights_dark.webp" | ||
alt="Reach new heights" | ||
class="reach-new-heights__image reach-new-heights__image--dark" | ||
/> | ||
<div class="reach-new-heights__information"> | ||
<div class="reach-new-heights__information-item"> | ||
<img | ||
src="assets/icons/icon_what-is-it-about_light.svg" | ||
alt="What is it about?" | ||
class="information-item__icon information-item__icon--light" | ||
/> | ||
<img | ||
src="assets/icons/icon_what-is-it-about_dark.svg" | ||
alt="What is it about?" | ||
class="information-item__icon information-item__icon--dark" | ||
/> | ||
<h2>{}</h2> | ||
<p>{}</p> | ||
</div> | ||
|
||
<div class="reach-new-heights__information-item"> | ||
<img | ||
src="assets/icons/icon_how-can-it-be-used_light.svg" | ||
alt="How can it be used?" | ||
class="information-item__icon information-item__icon--light" | ||
/> | ||
<img | ||
src="assets/icons/icon_how-can-it-be-used_dark.svg" | ||
alt="How can it be used?" | ||
class="information-item__icon information-item__icon--dark" | ||
/> | ||
<h2>{}</h2> | ||
<p>{}</p> | ||
</div> | ||
</div> | ||
</div> | ||
</section> |
This file was deleted.
Oops, something went wrong.