Skip to content
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

New Smithy Landing Page #2543

Merged
merged 3 commits into from
Feb 27, 2025
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
5 changes: 5 additions & 0 deletions .github/workflows/make-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ jobs:
java-version: 17
distribution: 'corretto'

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: latest

- name: Checkout repo
uses: actions/checkout@v4
- name: Setup
Expand Down
10 changes: 9 additions & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ SHELL := /bin/bash
install: requirements.txt
python3 -m venv build/venv
source build/venv/bin/activate && pip3 install -r requirements.txt . && pip3 install -e .
(cd landing-page && npm install)

clean:
-rm -rf build/* install
Expand All @@ -17,13 +18,20 @@ html1:
html2:
@source build/venv/bin/activate && $(SPHINXBUILD) -M html "source-2.0" "build/2.0" $(SPHINXOPTS) -W --keep-going -n $(O)

html: html2 html1 merge-versions
build-landing-page:
cd landing-page && npm run build

html: html2 html1 build-landing-page merge-versions

serve:
npx http-server build/html

merge-versions:
mkdir -p build/html
cp -R "build/1.0/html" "build/html/1.0"
cp -R "build/2.0/html" "build/html/2.0"
cp -R root/* "build/html"
cp -R landing-page/dist/* "build/html/"

openhtml:
open "build/html/index.html"
Expand Down
5 changes: 2 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ Then to build static output, run:
make html
```

To view the output, just open up `build/html/index.html` in your browser:
To view the output, run:

```
open build/html/1.0/index.html
open build/html/2.0/index.html
make serve
```
27 changes: 27 additions & 0 deletions docs/landing-page/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local
.vite

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

*storybook.log
2 changes: 2 additions & 0 deletions docs/landing-page/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cd docs/landing-page
npm run build && npx lint-staged
1 change: 1 addition & 0 deletions docs/landing-page/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
19 changes: 19 additions & 0 deletions docs/landing-page/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import type { StorybookConfig } from "@storybook/react-vite";

const config: StorybookConfig = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: [
"@storybook/addon-onboarding",
"@storybook/addon-links",
"@storybook/addon-essentials",
"@chromatic-com/storybook",
"@storybook/addon-interactions",
"@storybook/addon-themes",
],
framework: {
name: "@storybook/react-vite",
options: {},
},
staticDirs: ["../public"],
};
export default config;
5 changes: 5 additions & 0 deletions docs/landing-page/.storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<style>
.docs-story {
background-color: hsl(var(--background));
}
</style>
32 changes: 32 additions & 0 deletions docs/landing-page/.storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React from "react";
import type { Preview } from "@storybook/react";
import { withThemeByClassName } from "@storybook/addon-themes";
import "../src/i18n/client.tsx";
import "../src/index.css";

const preview: Preview = {
parameters: {
backgrounds: { disable: true },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
};

export const decorators = [
withThemeByClassName({
themes: {
// light: "light",
dark: "dark",
},
defaultTheme: "dark",
}),
// (Story) => <I18nextProvider i18n={i18n}>
// <Story />
// </I18nextProvider>,
];

export default preview;
1 change: 1 addition & 0 deletions docs/landing-page/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Smithy Landing Page
20 changes: 20 additions & 0 deletions docs/landing-page/components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "src/index.css",
"baseColor": "zinc",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/hooks"
}
}
28 changes: 28 additions & 0 deletions docs/landing-page/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import js from "@eslint/js";
import globals from "globals";
import reactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh";
import tseslint from "typescript-eslint";

export default tseslint.config(
{ ignores: ["dist"] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ["**/*.{ts,tsx}"],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
"react-hooks": reactHooks,
"react-refresh": reactRefresh,
},
rules: {
...reactHooks.configs.recommended.rules,
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
],
},
},
);
50 changes: 50 additions & 0 deletions docs/landing-page/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="description"
content="Modeling a service should be as easy, no matter the interface. Smithy is extensible, typesafe, protocol agnostic, and powers services at AWS."
/>

<link rel="icon" type="image/png" sizes="16x16" href="/favicon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="64x64" href="/favicon-64x64.png" />
<link
rel="icon"
type="image/png"
sizes="192x192"
href="/favicon-192x192.png"
/>
<link
rel="icon"
type="image/png"
sizes="512x512"
href="/favicon-512x512.png"
/>
<link
rel="apple-touch-icon"
type="image/png"
sizes="180x180"
href="/favicon-180x180.png"
/>

<title>Smithy</title>
</head>
<body class="dark">
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>

<script
async
defer
src="https://a0.awsstatic.com/s_code/js/3.0/awshome_s_code.js"
></script>
<script
async
defer
src="https://d2c.aws.amazon.com/client/loader/v1/d2c-load.js"
></script>
</body>
</html>
Loading
Loading