Skip to content

Commit

Permalink
chore: updating documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-logan committed Mar 30, 2024
1 parent 3f503e8 commit 5b4c050
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 1 deletion.
8 changes: 8 additions & 0 deletions docs/src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,11 @@ body {
text-wrap: balance;
}
}

a:hover{
color: rgb(0, 157, 255);
}

a:active{
color: rgb(7, 104, 164);
}
5 changes: 4 additions & 1 deletion docs/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";
import Scripts from "@/components/Scripts";

const inter = Inter({ subsets: ["latin"] });

Expand All @@ -18,7 +19,9 @@ export default function RootLayout({
}>) {
return (
<html lang="en">
<body className={inter.className}>{children}</body>
<body className={inter.className}>
{children} <Scripts />
</body>
</html>
);
}
3 changes: 3 additions & 0 deletions docs/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ export default function Home() {
<li>
<Link href="/typescript">Typescript/Javascript</Link>
</li>
<li>
<Link href="/python">Python</Link>
</li>
</ul>
</div>
</div>
Expand Down
62 changes: 62 additions & 0 deletions docs/src/app/python/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import Image from "next/image";
import Link from "next/link";

export default function Readme() {
return (
<div className="flex min-h-screen">
<div className="m-8 mx-auto flex flex-col items-center space-x-4 rounded-xl bg-white p-6 shadow-md">
<div className="flex h-9 w-5/6 flex-row items-center justify-evenly">
<Link href="https://badge.fury.io/py/loganmatic">
<Image
src="https://badge.fury.io/py/loganmatic.svg"
alt="PyPI version"
width={120}
height={120}
/>
</Link>
<Link href="https://opensource.org/licenses/MIT">
<Image
src="https://img.shields.io/badge/License-MIT-yellow.svg"
alt="License: MIT"
width={120}
height={120}
/>
</Link>
<Link href="https://pypistats.org/packages/loganmatic">
<Image
src="https://img.shields.io/pypi/dm/loganmatic.svg?style=flat-square"
alt="PyPI downloads"
width={120}
height={120}
/>
</Link>
</div>
<div className="mb-4">
<div className="text-xl font-medium text-black">Loganmatic</div>
<p className="text-gray-500">
Example usage of the Calculator class:
</p>
<pre className="rounded bg-gray-200 p-2 text-sm text-gray-500">
{`
from loganmatic import loganmatic
print("Pi value", loganmatic.Pi)
print("Euler value", loganmatic.EulerNumber)
print("Absolute value", loganmatic.absoluteValue(-5))
print("Factorial", loganmatic.factorial(5))
print("Square root", loganmatic.squareRoot(25))
print("Cubic root", loganmatic.cubicRoot(27))
print("Factors", loganmatic.factor(12))
print("Sine", loganmatic.sine(0.5))
print("Cosine", loganmatic.cosine(0.5))
print("Random number", loganmatic.random_number_between(1, 10))
print("Root of linear equation", loganmatic.root_of_first_degree(2, 4))
print("Roots of quadratic equation", loganmatic.root_of_second_degree(1, -3, 2))
`}
</pre>
</div>
<Link href="/">Go Back</Link>
</div>
</div>
);
}
19 changes: 19 additions & 0 deletions docs/src/components/Scripts/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export default function Scripts() {
return (
<>
<script
defer
data-name="BMC-Widget"
data-cfasync="false"
src="https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js"
data-id="gabriellogan"
data-description="Support me on Buy me a coffee!"
data-message=""
data-color="#5F7FFF"
data-position="Right"
data-x_margin="18"
data-y_margin="18"
></script>
</>
);
}

0 comments on commit 5b4c050

Please sign in to comment.