Skip to content

Commit

Permalink
Main mage
Browse files Browse the repository at this point in the history
  • Loading branch information
luzrain committed Mar 22, 2024
1 parent 195bbd8 commit 3659c0d
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 52 deletions.
110 changes: 70 additions & 40 deletions src/components/HomepageFeatures/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,53 +3,83 @@ import Heading from '@theme/Heading';
import styles from './styles.module.css';

const FeatureList = [
{
title: 'PSR-7 HTTP server',
description: (
<>
PHPStreamServer has a built-in PSR-7 web server. You can easily integrate it with any PSR-7 compatible framework.
</>
),
},
{
title: 'Supervisor',
description: (
<>
Run your own long-running processes. PHPStreamServer will keep them alive.
</>
),
},
{
title: 'Workers lifecycle management',
description: (
<>
Reload workers based on predefined conditions such as TTL, maximum memory usage, and more.
</>
),
},
{
icon: (
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
stroke="currentColor" className="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round"
d="M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 0 1 3 12c0-1.605.42-3.113 1.157-4.418"/>
</svg>
),
title: 'PSR-7 HTTP server',
description: (
<>
PHPStreamServer has a built-in PSR-7 web server. You can easily integrate it with any PSR-7 compatible
framework.
</>
),
},
{
icon: (
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
stroke="currentColor" className="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round"
d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"/>
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"/>
</svg>
),
title: 'Supervisor',
description: (
<>
Run your own long-running processes. PHPStreamServer will keep them alive.
</>
),
},
{
icon: (
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5}
stroke="currentColor" className="w-6 h-6">
<path strokeLinecap="round" strokeLinejoin="round"
d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"/>
</svg>
),
title: 'Workers lifecycle management',
description: (
<>
Reload workers based on predefined conditions such as TTL, maximum memory usage, and more.
</>
),
},
];

function Feature({title, description}) {
return (
<div className={clsx('col col--4')}>
<div className="text--center padding-horiz--md">
<Heading as="h3">{title}</Heading>
<p>{description}</p>
function Feature({icon, title, description}) {
return (
<div className={clsx('col col--4')}>
<div className="padding-horiz--md">
<Heading as="h3" className={styles.featureTitle}>
<span className={styles.featureSvg}>
{icon}
</span>
<span>
{title}
</span>
</Heading>
<p>{description}</p>
</div>
</div>
);
}

export default function HomepageFeatures() {
return (
<section className={styles.features}>
<div className="container">
<div className="row">
{FeatureList.map((props, idx) => (
<Feature key={idx} {...props} />
))}
</div>
</div>
</section>
return (
<section className={styles.features}>
<div className="container">
<div className="row">
{FeatureList.map((props, idx) => (
<Feature key={idx} {...props} />
))}
</div>
</div>
</section>
);
}
11 changes: 9 additions & 2 deletions src/components/HomepageFeatures/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@
width: 100%;
}

.featureTitle {
display: flex;
align-items: center;
gap: 0.33em;
}

.featureSvg {
height: 200px;
width: 200px;
display: inline-block;
height: 1.1em;
width: 1.1em;
}
6 changes: 4 additions & 2 deletions src/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import clsx from 'clsx';
import Link from '@docusaurus/Link';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import Layout from '@theme/Layout';
import Layout from '@theme/Layout/Provider';
import Footer from '@theme/Footer';
import HomepageFeatures from '@site/src/components/HomepageFeatures';

import Heading from '@theme/Heading';
Expand Down Expand Up @@ -37,9 +38,10 @@ export default function Home() {
title={`${siteConfig.title}`}
description="PHPStreamServer is a high-performance PHP application server and process manager written in PHP.">
<HomepageHeader />
<main>
<main className={styles.main}>
<HomepageFeatures />
</main>
<Footer></Footer>
</Layout>
);
}
8 changes: 7 additions & 1 deletion src/pages/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

.heroBanner {
padding: 4rem 0;
padding: 5rem 0;
text-align: left;
position: relative;
overflow: hidden;
Expand Down Expand Up @@ -33,3 +33,9 @@
width: 35%;
height: auto;
}

.main {
flex: 1;
display: flex;
align-items: center;
}
7 changes: 0 additions & 7 deletions src/pages/markdown-page.md

This file was deleted.

0 comments on commit 3659c0d

Please sign in to comment.