Skip to content

Commit

Permalink
feat(website): updated docusaurus v3 and minor style improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
lmammino committed Nov 11, 2023
1 parent b472ea4 commit 60bbf17
Show file tree
Hide file tree
Showing 12 changed files with 7,678 additions and 4,449 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
<img alt="fourTheorem" src="https://raw.githubusercontent.com/middyjs/middy/main/website/static/img/logo/fourthereom.svg" style="max-width:50%" width="380"/>
</a>

<a href="https://github.com/aws">
<img alt="Amazon Web Services Free and Open Source Software Fund (AWS FOSS Fund)" src="https://raw.githubusercontent.com/middyjs/middy/main/website/static/img/logo/amazon-web-services.svg" style="max-width:50%" width="380"/>
</a>

## License

Licensed under [MIT License](LICENSE). Copyright (c) 2017-2023 [Luciano Mammino](https://github.com/lmammino), [will Farrell](https://github.com/willfarrell) and the [Middy team](https://github.com/middyjs/middy/graphs/contributors).
Expand Down
5 changes: 3 additions & 2 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// @ts-check
const { themes } = require('prism-react-renderer')

const lightCodeTheme = require('prism-react-renderer/themes/github')
const darkCodeTheme = require('prism-react-renderer/themes/dracula')
const lightCodeTheme = themes.jettwaveLight
const darkCodeTheme = themes.nightOwl

/** @type {import('@docusaurus/types').Config} */
const config = {
Expand Down
11,933 changes: 7,515 additions & 4,418 deletions website/package-lock.json

Large diffs are not rendered by default.

22 changes: 13 additions & 9 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"name": "middy",
"version": "0.0.0",
"private": true,
"engines": {
"node": ">=18.0"
},
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
Expand All @@ -14,16 +17,16 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "^2.4.1",
"@docusaurus/preset-classic": "^2.4.1",
"@docusaurus/remark-plugin-npm2yarn": "^2.4.1",
"@mdx-js/react": "1.6.22",
"@docusaurus/core": "^3.0.0",
"@docusaurus/preset-classic": "^3.0.0",
"@docusaurus/remark-plugin-npm2yarn": "^3.0.0",
"@mdx-js/react": "^3.0.0",
"classnames": "^2.3.2",
"clsx": "^1.1.1",
"docusaurus-lunr-search": "^2.4.1",
"prism-react-renderer": "^1.3.1",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"docusaurus-lunr-search": "^3.3.0",
"prism-react-renderer": "^2.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"browserslist": {
"production": [
Expand All @@ -38,6 +41,7 @@
]
},
"devDependencies": {
"@docusaurus/types": "^2.4.1"
"@docusaurus/module-type-aliases": "3.0.0",
"@docusaurus/types": "3.0.0"
}
}
2 changes: 1 addition & 1 deletion website/src/components/Example.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default function Example () {
Do you want to see some more <em>realistic</em> examples?
</h3>

<p className='text--center'>
<p className={styles.buttons_list}>
<Link
to='/docs/events/api-gateway-http'
className='button button--info'
Expand Down
7 changes: 7 additions & 0 deletions website/src/components/Example.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,16 @@
.heading2 {
text-align: center;
font-size: 3em;
margin-bottom: 2rem;
}

.heading3 {
text-align: center;
font-size: 2.5em;
margin-bottom: 1.5rem;
}

.buttons_list {
text-align: center;
line-height: 3rem;
}
34 changes: 17 additions & 17 deletions website/src/components/HomepageSponsors.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
import styles from './HomepageSponsors.module.css'
import React from 'react'
import clsx from 'clsx'

/*
AWS Powertools team
*/

/*
{
title: 'Organization Name',
url: 'https://github.com/{github username}', // https://github.com/{username}/{repo}
img: '/img/logo/{from github}.png'
},
*/
import FourTheoremLogo from './sponsors/fourtheorem'
import AwsLogo from './sponsors/aws'

const emptySponsor = {
title: 'Sponsor',
url: 'https://github.com/sponsors/willfarrell',
img: '/img/logo/reserved.svg'
}

// const SponsorListLevel1 = []
const SponsorListLevel2 = [
{
title: 'fourThereom',
url: 'https://fourtheorem.com',
img: '/img/logo/fourthereom.svg'
Component: (
<FourTheoremLogo className={styles.featureSvg} title='fourThereom' />
)
// 2023-07 - 2024-06
},
{
url: 'https://github.com/aws',
Component: (
<AwsLogo
className={styles.featureSvg}
title='Amazon Web Services Free and Open Source Software Fund (AWS FOSS Fund)'
/>
)
// 2023-11-08
},
emptySponsor
]

Expand All @@ -40,11 +40,11 @@ const SponsorListLevel4 = [
}, */
]

function Feature ({ title, url, img, size }) {
function Feature ({ title, url, Component, size }) {
return (
<div className={clsx('col')}>
<a href={url} className='padding-horiz--md'>
<img className={styles.featureSvg} alt={title} src={img} />
{Component}
</a>
</div>
)
Expand Down
10 changes: 9 additions & 1 deletion website/src/components/HomepageSponsors.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,16 @@
align-items: center;
padding: 2rem 0;
width: 100%;
text-align: center;
}

.features h2 {
font-size: 2.5rem;
margin-bottom: 2.75rem;
}

.featureSvg {
width: 100%;
}
max-width: 250px;
max-height: 100px;
}
34 changes: 34 additions & 0 deletions website/src/components/sponsors/aws.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import * as React from 'react'
const AwsLogo = (props) => (
<svg
xmlns='http://www.w3.org/2000/svg'
xmlSpace='preserve'
id='Layer_1'
x={0}
y={0}
style={{
enableBackground: 'new 0 0 304 182'
}}
viewBox='0 0 304 182'
{...props}
>
<style>
{
"st0{fill:#252F3E;} .st1{fill-rule:evenodd;clip-rule:evenodd;fill:#FF9900;} html[data-theme='dark'] .st0 {fill: #fcfcfc;}"
}
</style>
<path
d='M86.4 66.4c0 3.7.4 6.7 1.1 8.9.8 2.2 1.8 4.6 3.2 7.2.5.8.7 1.6.7 2.3 0 1-.6 2-1.9 3L83.2 92c-.9.6-1.8.9-2.6.9-1 0-2-.5-3-1.4-1.4-1.5-2.6-3.1-3.6-4.7-1-1.7-2-3.6-3.1-5.9-7.8 9.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.6 3.4-4.4 42.4 24.6 94.7 39.5 148.8 39.5 36.5 0 76.6-7.6 113.5-23.2 5.5-2.5 10.2 3.6 4.8 7.6z'
className='st1'
/>
<path
d='M287.2 128.1c-4.2-5.4-27.8-2.6-38.5-1.3-3.2.4-3.7-2.4-.8-4.5 18.8-13.2 49.7-9.4 53.3-5 3.6 4.5-1 35.4-18.6 50.2-2.7 2.3-5.3 1.1-4.1-1.9 4-9.9 12.9-32.2 8.7-37.5z'
className='st1'
/>
</svg>
)
export default AwsLogo
28 changes: 28 additions & 0 deletions website/src/components/sponsors/fourtheorem.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion website/src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,14 @@ html[data-theme='dark'] {
}

html[data-theme='dark'] .docusaurus-highlight-code-line {
background-color: rgba(0, 0, 0, 0.3);
background-color: rgba(181, 24, 24, 0.3);
}

html[data-theme='dark'] .navbar__logo img,
html[data-theme='dark'] img[alt="Middy middleware engine diagram"] {
filter: invert(1);
}

.token-line.theme-code-block-highlighted-line {
background-color: rgba(245, 203, 67, 0.154) !important;
}
42 changes: 42 additions & 0 deletions website/static/img/logo/amazon-web-services.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 60bbf17

Please sign in to comment.