Skip to content
Merged
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
6 changes: 6 additions & 0 deletions src/assets/aws.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 9 additions & 4 deletions src/components/run-anywhere/platforms.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
[
{
"name": "Vercel",
"label": "Vercel",
"icon": "vercel",
"link": "/guides/hosting/vercel/"
},
{
"name": "Netlify",
"label": "Netlify",
"icon": "netlify",
"link": "/guides/hosting/netlify/"
},
{
"name": "NodeJS",
"label": "NodeJS",
"icon": "nodejs",
"link": "/guides/hosting/#self-hosting"
},
{
"name": "GitHub",
"label": "AWS",
"icon": "aws",
"link": "/guides/hosting/aws/"
},
{
"label": "GitHub",
"icon": "github",
"link": "/guides/hosting/github/"
}
Expand Down
6 changes: 4 additions & 2 deletions src/components/run-anywhere/run-anywhere.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import platforms from "./platforms.json" with { type: "json" };
import awsLogo from "../../assets/aws.svg?type=raw";
import githubLogo from "../../assets/github.svg?type=raw";
import netlifyLogo from "../../assets/netlify.svg?type=raw";
import nodejsLogo from "../../assets/nodejs.svg?type=raw";
import vercelLogo from "../../assets/vercel.svg?type=raw";
import styles from "./run-anywhere.module.css";

const platformImageMapper = {
aws: awsLogo,
github: githubLogo,
netlify: netlifyLogo,
nodejs: nodejsLogo,
Expand All @@ -22,15 +24,15 @@ export default class RunAnywhere extends HTMLElement {
<div class="${styles.platformsContainer}">
${platforms
.map((platform) => {
const { name, icon, link } = platform;
const { label, icon, link } = platform;

return `
<div class="${styles.platformBox}">
<div class="${styles.iconBox}">
${platformImageMapper[icon]}
</div>

<a class="${styles.iconLink}" href="${link}">${name}</a>
<a class="${styles.iconLink}" href="${link}">${label}</a>
</div>
`;
})
Expand Down
4 changes: 2 additions & 2 deletions src/pages/docs/pages/server-rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,14 @@ Any Greenwood [supported frontmatter](/docs/resources/markdown/#frontmatter) can
return {
layout: "user",
collection: "header",
order: 1,
title: `The ${route} page`,
imports: [
"/components/user.js",
"/components/otherItem.js type=module"
],
// any custom data
data: {
/* ... */
order: 1,
},
};
}
Expand Down