Skip to content

Commit

Permalink
Icons for features
Browse files Browse the repository at this point in the history
  • Loading branch information
dynamite-bud committed May 23, 2023
1 parent e889d35 commit 2137dd2
Show file tree
Hide file tree
Showing 6 changed files with 254 additions and 2 deletions.
135 changes: 135 additions & 0 deletions components/home/Features.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
import React from "react";
import {
AcademicCapIcon,
BanknotesIcon,
CheckBadgeIcon,
ClockIcon,
ReceiptRefundIcon,
UsersIcon,
} from "@heroicons/react/24/outline";

import { BsGlobe2, BsGearFill } from "react-icons/bs";
import { TbRocket } from "react-icons/tb";
import { FaSyncAlt } from "react-icons/fa";
import { VscFileSymlinkDirectory } from "react-icons/vsc";
import { HiLightningBolt } from "react-icons/hi";
import { TbJumpRope } from "react-icons/tb";
import { GiSpawnNode } from "react-icons/gi";
import { MdForkRight } from "react-icons/md";
import { BiTerminal } from "react-icons/bi";

const actions = [
{
title: "Networking",
icon: BsGlobe2,
iconForeground: "text-sky-500",
iconBackground: "bg-sky-800 bg-opacity-30",
},
{
title: "Multi-threading",
href: "#",
icon: TbRocket,
iconForeground: "text-purple-500",
iconBackground: "bg-violet-900 bg-opacity-30",
},
{
title: "Asynchronous",
href: "#",
icon: FaSyncAlt,
iconForeground: "text-red-500",
iconBackground: "bg-red-600 bg-opacity-20",
},
{
title: "Directory Support",
href: "#",
icon: VscFileSymlinkDirectory,
iconForeground: "text-yellow-500",
iconBackground: "bg-yellow-800 bg-opacity-30",
},
{
title: "pthreads",
href: "#",
icon: HiLightningBolt,
iconForeground: "text-rose-700",
iconBackground: "bg-rose-800 bg-opacity-30",
},
{
title: "lngjmp & setjmp",
href: "#",
icon: TbJumpRope,
iconForeground: "text-indigo-500",
iconBackground: "bg-indigo-800 bg-opacity-40",
},
{
title: "Subprocesses",
href: "#",
icon: GiSpawnNode,
iconForeground: "text-emerald-700",
iconBackground: "bg-emerald-900 bg-opacity-30",
},
{
title: "Process Forking",
href: "#",
icon: MdForkRight,
iconForeground: "text-fuchsia-500",
iconBackground: "bg-fuchsia-800 bg-opacity-30",
},
{
title: "TTY Support",
href: "#",
icon: BiTerminal,
iconForeground: "text-white",
iconBackground: "bg-gray-700 bg-opacity-50",
},
{
title: "Runtime Support",
href: "#",
icon: BsGearFill,
iconForeground: "text-amber-500",
iconBackground: "bg-amber-800 bg-opacity-40",
},
];

function classNames(...classes: string[]) {
return classes.filter(Boolean).join(" ");
}

export default function Features() {
return (
<>
<h2 className="text-5xl mb-12 ml-4 sm:ml-0">Features</h2>
<div className="flex flex-col space-y-4 mx-4 sm:ml-0 sm:space-y-0 sm:grid sm:grid-cols-4 sm:gap-4 sm:divide-y-0">
{actions.map((action) => (
<div
key={action.title}
className={classNames(
"relative rounded-lg bg-[#181a1b] p-6 focus-within:ring-2 focus-within:ring-inset focus-within:ring-indigo-500"
)}
>
<div className="features-icon">
<span
className={classNames(
action.iconBackground,
action.iconForeground,
"inline-flex rounded-lg p-3"
)}
>
<action.icon className="h-6 w-6" aria-hidden="true" />
</span>
</div>
<div className="mt-8">
<h3 className="text-base font-semibold leading-6 text-white">
{action.title}
</h3>
<p className="mt-2 text-sm text-gray-500">
Doloribus dolores nostrum quia qui natus officia quod et
dolorem. Sit repellendus qui ut at blanditiis et quo et
molestiae.
</p>
</div>
</div>
))}
</div>
</>
);
}
36 changes: 36 additions & 0 deletions components/home/WasixLogo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import React from "react";

interface Props {
className?: string;
}

function WasixLogo({ className }: Props = {}) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 324 128"
className={className}
>
<path fill="#fff" d="m79.87 67.39-3.11 13.99h9.68l-3.57-13.99h-3Z" />
<path
fill="#fff"
d="M66.13 0c.01.193.01.387 0 .58a12.34 12.34 0 0 1-12.34 12.34A12.329 12.329 0 0 1 41.47.58a5.61 5.61 0 0 1 0-.58H0v107.62h107.62V0H66.13Zm69.62 60.23 3.11-13.99h-9.68l3.57 13.99h3Z"
/>
<path
fill="#fff"
d="M149.49 127.62a5.61 5.61 0 0 1 0-.58 12.338 12.338 0 0 1 12.34-12.34 12.344 12.344 0 0 1 8.716 3.618 12.323 12.323 0 0 1 3.604 8.722c.01.193.01.387 0 .58h41.47V20H108v107.62h41.49Zm146.38-60.23-3.11 13.99h9.68l-3.57-13.99h-3Z"
/>
<path
fill="#fff"
d="M282.13 0c.01.193.01.387 0 .58a12.342 12.342 0 0 1-3.614 8.726 12.34 12.34 0 0 1-8.726 3.614 12.333 12.333 0 0 1-11.385-7.62 12.325 12.325 0 0 1-.935-4.72 5.61 5.61 0 0 1 0-.58H216v107.62h107.62V0h-41.49Z"
/>
<path
fill="#000"
d="M167.029 78.603c0 2.54-.634 4.708-1.904 6.504-1.25 1.778-3.008 3.135-5.273 4.073-2.266.937-4.932 1.406-7.998 1.406-1.622 0-3.155-.078-4.6-.234a31.266 31.266 0 0 1-3.984-.674c-1.211-.293-2.276-.655-3.194-1.084v-4.776c1.465.606 3.252 1.172 5.362 1.7 2.109.507 4.316.761 6.621.761 2.148 0 3.964-.283 5.449-.85 1.484-.585 2.607-1.415 3.369-2.49.781-1.093 1.172-2.402 1.172-3.925 0-1.465-.322-2.686-.967-3.662-.644-.996-1.719-1.895-3.223-2.696-1.484-.82-3.515-1.69-6.093-2.607-1.817-.645-3.418-1.348-4.805-2.11-1.387-.78-2.549-1.66-3.486-2.636a9.922 9.922 0 0 1-2.139-3.399c-.469-1.289-.703-2.763-.703-4.424 0-2.285.576-4.238 1.728-5.859 1.172-1.64 2.784-2.89 4.834-3.75 2.071-.879 4.444-1.318 7.119-1.318 2.286 0 4.395.215 6.329.644 1.953.43 3.74 1.006 5.361 1.729l-1.553 4.277a33.763 33.763 0 0 0-4.922-1.611 21.896 21.896 0 0 0-5.332-.645c-1.836 0-3.388.274-4.658.82-1.25.528-2.207 1.28-2.871 2.256-.664.977-.996 2.14-.996 3.487 0 1.504.312 2.754.937 3.75.645.996 1.661 1.885 3.047 2.666 1.406.761 3.262 1.562 5.567 2.402 2.519.918 4.658 1.895 6.416 2.93 1.757 1.015 3.095 2.265 4.013 3.75.918 1.465 1.377 3.33 1.377 5.596ZM175.789 90V47.168h4.981V90h-4.981Zm76.664 0h-5.654l-11.572-18.867L223.479 90h-5.303l14.267-22.324-13.271-20.508h5.537l10.693 17.08 10.752-17.08h5.274l-13.242 20.42L252.453 90ZM66.522 47.168 55.066 90h-5.01l-8.495-28.828c-.254-.82-.498-1.64-.733-2.461-.215-.84-.42-1.63-.615-2.373-.195-.762-.361-1.426-.498-1.992l-.264-1.319c-.039.293-.117.723-.234 1.29a32.95 32.95 0 0 1-.41 1.962 37.879 37.879 0 0 1-.586 2.373c-.215.84-.45 1.69-.703 2.55L29.256 90h-5.01L12.88 47.168h5.185l6.885 26.865c.235.899.45 1.787.645 2.666.215.86.4 1.7.556 2.52a64.6 64.6 0 0 1 .47 2.402c.136.781.263 1.543.38 2.285.098-.762.225-1.553.38-2.373.157-.84.323-1.69.499-2.549.195-.859.4-1.728.615-2.607.235-.879.479-1.758.733-2.637l7.705-26.572h5.127l8.027 26.777a82.4 82.4 0 0 1 .762 2.725c.234.898.44 1.777.615 2.637.195.84.361 1.65.498 2.431.156.762.293 1.485.41 2.168a75.19 75.19 0 0 1 .498-3.017c.196-1.055.42-2.158.674-3.31.273-1.153.566-2.345.879-3.575l6.885-26.836h5.215ZM100.154 90l-5.273-13.594H77.713L72.469 90h-5.04l16.758-43.008h4.483L105.31 90h-5.157Zm-6.767-18.018-5.01-13.505c-.117-.352-.313-.928-.586-1.729L87 54.258c-.273-.86-.498-1.553-.674-2.08-.195.8-.41 1.601-.644 2.402a63.25 63.25 0 0 1-.645 2.197c-.215.664-.4 1.23-.556 1.7l-5.098 13.505h14.004Z"
/>
</svg>
);
}

export default WasixLogo;
22 changes: 22 additions & 0 deletions components/home/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React from "react";
import WasixLogo from "./WasixLogo";
import Features from "./Features";

function Home() {
return (
<>
<div className=" h-[100lvh] w-[100lvw] flex flex-col items-center justify-center">
<WasixLogo className="h-[100%] w-[100%] sm:h-[80%] sm:w-[50%] shadow-xl shadow-white rounded-xl p-12" />
<div className=" -translate-y-48 text-center">
<h2 className="text-3xl md:text-5xl mb-4">Introducing WASIX</h2>
<h3 className="text-lg md:text-xl">The superset of WASI</h3>
</div>
</div>
<div className="mx-auto max-w-7xl sm:px-6 lg:px-8">
<Features />
</div>
</>
);
}

export default Home;
4 changes: 3 additions & 1 deletion pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
title: Nextra – Next.js Static Site Generator
---

# Nextra – Next.js Static Site Generator
import Home from "../components/home";

<Home />
19 changes: 19 additions & 0 deletions styles/global.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

:global(.dark) .optimization {
background: linear-gradient(27deg, #3d3d3d, #252525);
}

.features-icon {
mask-image: linear-gradient(
60deg,
black 25%,
rgba(0, 0, 0, 0.2) 50%,
black 75%
);
mask-size: 400%;
mask-position: 0%;
}
.features-icon:hover {
mask-position: 100%;
transition: mask-position 1s ease, -webkit-mask-position 1s ease;
}
40 changes: 39 additions & 1 deletion theme.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,45 @@ import React from "react";
import { DocsThemeConfig } from "nextra-theme-docs";

const config: DocsThemeConfig = {
logo: <span>My Project</span>,
logo: (
<span>
<svg
height="20"
viewBox="0 0 361 70"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M114.913 33.2763v28.7642h-11.57V12.9496h11.059v8.3416h.575c1.129-2.7485 2.93-4.9325 5.401-6.5518 2.493-1.6193 5.572-2.429 9.237-2.429 3.388 0 6.339.7244 8.853 2.1733 2.535 1.4489 4.496 3.5476 5.88 6.2962 1.407 2.7486 2.099 6.0831 2.078 10.0035v31.2571h-11.57V32.5732c0-3.2813-.852-5.8487-2.557-7.7024-1.683-1.8537-4.016-2.7806-6.999-2.7806-2.024 0-3.824.4475-5.401 1.3424-1.556.8736-2.781 2.1413-3.676 3.8032-.873 1.662-1.31 3.6755-1.31 6.0405Zm61.407 29.723c-4.922 0-9.172-1.0227-12.752-3.0681-3.558-2.0668-6.296-4.9858-8.214-8.7572-1.917-3.7926-2.876-8.2563-2.876-13.3913 0-5.0497.959-9.4815 2.876-13.2954 1.939-3.8353 4.645-6.8182 8.118-8.9489 3.473-2.152 7.553-3.228 12.241-3.228 3.026 0 5.881.4901 8.565 1.4702 2.706.9588 5.093 2.4503 7.159 4.4744 2.088 2.0242 3.729 4.6023 4.922 7.7344 1.193 3.1108 1.79 6.8182 1.79 11.1221v3.5476h-40.238v-7.7983h29.148c-.021-2.2159-.501-4.1868-1.438-5.9126-.938-1.7472-2.248-3.1215-3.931-4.1229-1.662-1.0014-3.601-1.5021-5.817-1.5021-2.365 0-4.443.5753-6.232 1.7258-1.79 1.1293-3.186 2.6208-4.187 4.4745-.98 1.8324-1.481 3.8459-1.502 6.0405v6.8075c0 2.8551.522 5.3054 1.566 7.3508 1.044 2.0242 2.503 3.5796 4.378 4.6662 1.875 1.0654 4.07 1.598 6.584 1.598 1.683 0 3.207-.2343 4.57-.7031 1.364-.49 2.546-1.2038 3.548-2.1413 1.001-.9375 1.758-2.0987 2.269-3.4837l10.803 1.2145c-.682 2.8551-1.982 5.348-3.9 7.4787-1.896 2.1094-4.325 3.75-7.286 4.9219-2.962 1.1506-6.35 1.7258-10.164 1.7258Zm34.777-50.0497 9.908 18.1215 10.067-18.1215h12.241l-14.798 24.5455 15.054 24.5454h-12.177l-10.387-17.674-10.291 17.674h-12.273l14.957-24.5454-14.574-24.5455h12.273Zm63.878 0v8.9489h-28.221v-8.9489h28.221ZM253.722 1.18825h11.569V47.2749c0 1.5554.235 2.7486.704 3.5795.49.8097 1.129 1.3637 1.917 1.662s1.662.4474 2.621.4474c.724 0 1.385-.0532 1.981-.1598.618-.1065 1.087-.2024 1.407-.2876l1.949 9.0447c-.618.2131-1.502.4475-2.652.7031-1.13.2557-2.515.4049-4.155.4475-2.898.0852-5.508-.3516-7.831-1.3104-2.322-.9801-4.165-2.4929-5.529-4.5383-1.342-2.0455-2.003-4.6023-1.981-7.6705V1.18825Zm29.129 60.85225V12.9496h11.218v8.1818h.512c.895-2.8338 2.429-5.0177 4.602-6.5518 2.173-1.5554 4.677-2.3331 7.511-2.3331 1.321 0 2.535.1598 3.643.4794 1.108.3196 2.088.7564 2.94 1.3104l-3.579 9.588c-.618-.2983-1.3-.5433-2.046-.7351-.745-.1917-1.587-.2876-2.524-.2876-2.003 0-3.814.4474-5.434 1.3423-1.619.8949-2.908 2.1414-3.867 3.7394-.937 1.5767-1.406 3.4091-1.406 5.4971v28.8601h-11.57Zm51.222.863c-3.856 0-7.308-.9908-10.355-2.9723-3.047-1.9816-5.454-4.858-7.223-8.6293-1.768-3.7713-2.652-8.3523-2.652-13.7429 0-5.4546.894-10.0568 2.684-13.8068 1.811-3.7713 4.251-6.6158 7.319-8.5334 3.068-1.9389 6.488-2.9084 10.259-2.9084 2.877 0 5.242.4901 7.095 1.4702 1.854.9588 3.324 2.12 4.411 3.4836 1.087 1.3424 1.928 2.6101 2.525 3.8033h.479v-8.1179h11.602v49.0909h-11.378v-7.7343h-.703c-.597 1.1931-1.46 2.4609-2.589 3.8032-1.129 1.321-2.621 2.4503-4.474 3.3878-1.854.9375-4.187 1.4063-7 1.4063Zm3.228-9.4922c2.451 0 4.539-.6605 6.265-1.9816 1.725-1.3423 3.036-3.2066 3.931-5.593s1.342-5.1669 1.342-8.3416c0-3.1747-.447-5.934-1.342-8.2777-.874-2.3438-2.174-4.1655-3.9-5.4652-1.704-1.2997-3.803-1.9496-6.296-1.9496-2.578 0-4.73.6712-6.456 2.0135s-3.025 3.196-3.899 5.5611c-.873 2.365-1.31 5.071-1.31 8.1179 0 3.0682.437 5.8061 1.31 8.2138.895 2.3863 2.205 4.272 3.931 5.6569 1.747 1.3636 3.889 2.0455 6.424 2.0455Z"
fill="currentColor"
/>
<path
d="m64.8833 1.81335-2.8464 2.84638C47.1274 19.5692 22.9543 19.5692 8.04485 4.65972L5.19848 1.81335c-.93479-.93478-2.45037-.93478-3.38515 0-.93479.93478-.93478 2.45037 0 3.38515L4.6597 8.04487c14.9095 14.90953 14.9095 39.08263 0 53.99213l-2.84637 2.8463c-.93479.9348-.93479 2.4504 0 3.3852.93478.9348 2.45037.9348 3.38515 0l2.84637-2.8464c14.90955-14.9095 39.08255-14.9095 53.99205 0l2.8464 2.8464c.9348.9348 2.4504.9348 3.3852 0 .9347-.9348.9347-2.4504 0-3.3852l-2.8464-2.8463c-14.9095-14.9095-14.9095-39.0826 0-53.99213l2.8464-2.84637c.9347-.93478.9347-2.45037 0-3.38515-.9348-.93478-2.4504-.93478-3.3852 0Z"
fill="currentColor"
stroke="currentColor"
strokeWidth="2"
/>
</svg>
{/* eslint-disable-next-line */}
<style jsx>{`
span {
padding: 0.5rem 0.5rem 0.5rem 0;
mask-image: linear-gradient(
60deg,
black 25%,
rgba(0, 0, 0, 0.2) 50%,
black 75%
);
mask-size: 400%;
mask-position: 0%;
}
span:hover {
mask-position: 100%;
transition: mask-position 1s ease, -webkit-mask-position 1s ease;
}
`}</style>
</span>
),
project: {
link: "https://github.com/shuding/nextra-docs-template",
},
Expand Down

0 comments on commit 2137dd2

Please sign in to comment.