Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 0849fc6
Author: envilion s. <[email protected]>
Date:   Sun Feb 4 19:07:33 2024 +0700

    fix: styling on open sidebar button

commit 83760be
Author: envilion s. <[email protected]>
Date:   Sun Feb 4 19:04:04 2024 +0700

    fix: styling in codeblock

commit 46181e3
Author: envilion s. <[email protected]>
Date:   Sun Feb 4 19:01:35 2024 +0700

    feat: create custom runtime

commit dec6ee6
Author: envilion s. <[email protected]>
Date:   Sun Feb 4 15:08:49 2024 +0700

    fix: remove unused custom plugin tailwindcss

commit 9321eff
Author: envilion s. <[email protected]>
Date:   Sun Feb 4 15:07:31 2024 +0700

    fix: global styling & add nav links

commit e47aa79
Author: envilion s. <[email protected]>
Date:   Sun Feb 4 01:50:24 2024 +0700

    fix: format command in readme.md

commit 4421cb1
Author: envilion s. <[email protected]>
Date:   Sun Feb 4 01:49:29 2024 +0700

    fix: contributing step

commit e3c30d2
Author: envilion s. <[email protected]>
Date:   Sun Feb 4 01:38:33 2024 +0700

    fix: readme.md

commit 2e2aeaf
Author: Wisnu Kristanto <[email protected]>
Date:   Sun Feb 4 00:03:10 2024 +0700

    feat: switch darkmode (#40)

    * feat: switch darkmode

    * feat: dark css on landing pages

commit dd49b0c
Author: Muhammad Dean Fahreza <[email protected]>
Date:   Sat Feb 3 23:39:34 2024 +0700

    docs: Mempebaharui dokumentasi (#39)

commit fb05669
Author: envilion s. <[email protected]>
Date:   Sat Feb 3 19:56:57 2024 +0700

    feat: new syntax highlighting

commit a0a5faf
Author: envilion s. <[email protected]>
Date:   Sat Feb 3 17:39:38 2024 +0700

    feat: add featured links in sidebar

commit 50d503f
Author: envil a.k.a pow <[email protected]>
Date:   Wed Jan 31 00:24:27 2024 +0700

    fix: ignore package-lock.json file (#32)

    * fix: ignore package-lock.json file

    * fix: remove package-lock.json

commit b65be51
Author: dherlyar <[email protected]>
Date:   Tue Jan 30 20:43:02 2024 +0700

    Docs: instalasi

    minimal versi python ke 3.11.6

commit adce6f7
Author: dherlyar <[email protected]>
Date:   Tue Jan 30 20:31:54 2024 +0700

    Docs: instalasi

    pip install

commit 1bd953e
Author: envil a.k.a pow <[email protected]>
Date:   Mon Jan 29 21:09:41 2024 +0700

    docs: remove instalasi & informasi module link (#26)

commit 03b6b4b
Author: dherlyar <[email protected]>
Date:   Thu Jan 25 11:40:51 2024 +0700

    docs: instalasi

commit c7504f0
Author: dherlyar <[email protected]>
Date:   Thu Jan 25 10:51:29 2024 +0700

    docs:

commit 39faa3c
Author: dherlyar <[email protected]>
Date:   Wed Jan 24 13:29:37 2024 +0700

    ubah kode sumber

commit e1bf2a6
Author: dherlyar <[email protected]>
Date:   Wed Jan 24 13:23:30 2024 +0700

    docs: standar_deviasi & entropy

    ubah kode sumber standar_deviasi & entropy

commit 7fcc67c
Author: dherlyar <[email protected]>
Date:   Wed Jan 24 13:11:52 2024 +0700

    docs:

commit ce46eec
Author: dherlyar <[email protected]>
Date:   Wed Jan 24 13:06:31 2024 +0700

    docs: entropy

    menambahkan dokumentasi entropy

commit b2ddd18
Author: dherlyar <[email protected]>
Date:   Wed Jan 24 12:25:35 2024 +0700

    docs: entropy

    menambahkan dokumentasi entropy

commit c9aacb6
Author: envil a.k.a pow <[email protected]>
Date:   Tue Jan 23 20:06:32 2024 +0700

    feat: embel replit (#13)

commit 8e544ed
Author: envil a.k.a pow <[email protected]>
Date:   Tue Jan 23 19:41:51 2024 +0700

    feat: fix responsive design landing page (#12)

commit 4c63c46
Author: envilion s <[email protected]>
Date:   Tue Jan 23 19:18:43 2024 +0700

    feat: compress img
  • Loading branch information
envil a.k.a pow committed Feb 4, 2024
1 parent dd1bfb4 commit 351628d
Show file tree
Hide file tree
Showing 32 changed files with 657 additions and 120 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
/.pnp
.pnp.js
.yarn/install-state.gz
package-lock.json
yarn.lock

# testing
/coverage
Expand Down Expand Up @@ -36,4 +38,4 @@ yarn-error.log*
next-env.d.ts

/OpenSeries
/testing
/testing
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.11.0
85 changes: 84 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,84 @@
# OpenSeries Web
# Website OpenSeries

Selamat datang di repositori OpenSeries! Repositori ini berisi kode sumber untuk website OpenSeries. Kami menggunakan runtime dan package manager dari Bun, jadi jika Anda ingin berkontribusi, pastikan untuk menginstal Bun terlebih dahulu dengan mengacu pada dokumentasi resmi di https://bun.sh/.

## Memulai

Untuk berkontribusi pada website OpenSeries, ikuti langkah-langkah berikut:

1. Fork repositori ini di GitHub.

2. Clone repositori yang telah di-fork ke mesin lokal Anda:

```bash
git clone https://github.com/nama-anda/OpenSeries.git
```

3. Pindah ke direktori proyek:

```bash
cd OpenSeries
```

4. Pastikan branch Anda diatur ke `develop`:

```bash
git checkout develop
```

5. Buat branch baru untuk fitur atau perbaikan bug:

```bash
git checkout -b nama-fitur
```

## Alur Pengembangan

1. Instal paket yang diperlukan menggunakan Bun:

```bash
bun install
```

2. Jalankan proyek menggunakan Bun:

```bash
bun dev
```

3. Sebelum melakukan commit, jalankan linter Bun untuk memastikan kualitas kode:

```bash
bun lint
```

4. Format kode menggunakan Bun Prettier:

```bash
bun format
```

5. Lakukan commit perubahan Anda dengan menggunakan salah satu awalan pesan commit berikut:

- `feat:` untuk fitur baru
- `fix:` untuk perbaikan bug
- `docs:` untuk perubahan dokumentasi
- `add:` untuk menambahkan file atau aset

Contoh commit:

```bash
git commit -m "feat: menambahkan fitur baru"
```

## Pull Request

Setelah membuat perubahan, dorong branch ke fork Anda di GitHub dan buat pull request yang dituju ke branch develop repositori ini.

## Kontributor

Terima kasih kepada semua kontributor yang telah membantu meningkatkan website OpenSeries! Jika Anda tertarik berkontribusi, silakan fork repositori ini dan kirim pull request ke branch develop.

## Lisensi

Proyek ini dilisensikan di bawah Lisensi MIT.
20 changes: 20 additions & 0 deletions app/(landing)/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"use client";

import { useNavStyle } from "@/hooks/useNavStyle";
import { ReactNode, useEffect } from "react";

type Props = {
children: ReactNode;
};

const Layout = ({ children }: Props) => {
const { setLandingStyles } = useNavStyle();

useEffect(() => {
setLandingStyles();
}, [setLandingStyles]);

return <>{children}</>;
};

export default Layout;
35 changes: 3 additions & 32 deletions app/page.tsx → app/(landing)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,11 @@
import Link from "next/link";
import landingImg from "@/assets/landing.png";
import { projectByLinks } from "@/constants/projectByLinks";
import { socialLinks } from "@/constants/socialLinks";
import Image from "next/image";

export default function Home() {
return (
<>
<nav className="fixed inset-x-0 top-0 z-40 border-b bg-white py-6">
<div className="container flex items-center justify-between">
<Link
className="bg-gradient-to-br from-indigo-600 to-rose-400 bg-clip-text font-bold text-transparent"
href="/"
>
OpenSeries
</Link>
<div className="flex items-center gap-6">
<Link
className="font-medium text-zinc-500 transition-all duration-300 hover:text-indigo-600"
href="/docs"
>
Docs
</Link>
<div className="flex items-center gap-2">
{socialLinks.map((link) => (
<Link
key={link.name}
href={link.href}
target="_blank"
className={`${link.icon} text-xl text-zinc-500 transition-all duration-300 hover:text-indigo-600`}
></Link>
))}
</div>
</div>
</div>
</nav>
<main className="flex min-h-dvh items-center justify-center py-20">
<div className="container grid items-center gap-10 text-center lg:grid-cols-2 lg:text-left">
<div className="order-2 space-y-8 lg:order-1">
Expand All @@ -52,18 +23,18 @@ export default function Home() {
</p>
<div className="flex flex-col items-center gap-6 lg:items-start xl:flex-row xl:items-center">
<Link
className="whitespace-nowrap rounded-md bg-indigo-600 px-8 py-4 font-medium text-white shadow-2xl shadow-indigo-600/60 transition-all duration-200 hover:bg-indigo-700"
className="whitespace-nowrap rounded-md bg-indigo-600 px-8 py-4 font-medium text-white hover:bg-indigo-700"
href="/docs"
>
Get Started
</Link>
<span className="flex flex-wrap items-center gap-2">
<span className="flex flex-wrap items-center gap-2 text-zinc-500 dark:text-zinc-400">
By
{projectByLinks.map((link) => (
<Link
key={link.name}
target="_blank"
className="whitespace-nowrap rounded-full border-2 border-rose-400 px-4 py-1 text-xs font-medium text-rose-400 transition-all duration-200 hover:bg-rose-100"
className="whitespace-nowrap rounded-full border-2 border-rose-400 px-4 py-1 text-xs font-medium text-rose-400 hover:bg-rose-400/20"
href={link.href}
>
{link.name}
Expand Down
9 changes: 8 additions & 1 deletion app/docs/fisika/energi-kinetik/page.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import Codeblock from "@/components/Codeblock";

# Energi Kinetik

Rumus:
Expand Down Expand Up @@ -26,4 +28,9 @@ print(fisika.energi_kinetik(masa_benda, kecepatan_benda))

## Coba Sekarang

<iframe src="https://replit.com/@ItsArul/EnergiKinetik?embed=1&theme=light" className="aspect-video w-full" />
<Codeblock code={`import OpenSeries.fisika as fisika
masa_benda = 14
kecepatan_benda = 23.4
print(fisika.energi_kinetik(masa_benda, kecepatan_benda))
`} />
10 changes: 9 additions & 1 deletion app/docs/fisika/energi-potensial/page.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import Codeblock from "@/components/Codeblock";

# Energi Potensial

Rumus:
Expand Down Expand Up @@ -27,4 +29,10 @@ print(fisika.energi_potensial(massa_benda_potensial, gravitasi_bumi, ketinggian_

## Coba Sekarang

<iframe src="https://replit.com/@ItsArul/EnergiPotensial?embed=1&theme=light" className="aspect-video w-full" />
<Codeblock code={`import OpenSeries.fisika as fisika
massa_benda_potensial = 12
gravitasi_bumi = 9.78
ketinggian_benda = 400
print(fisika.energi_potensial(massa_benda_potensial, gravitasi_bumi, ketinggian_benda))
`} />
9 changes: 8 additions & 1 deletion app/docs/fisika/hukum-ohm/page.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import Codeblock from "@/components/Codeblock";

# Hukum Ohm

Rumus:
Expand All @@ -24,4 +26,9 @@ print(fisika.hukum_ohm(kuat_arus, hambatan))

## Coba Sekarang

<iframe src="https://replit.com/@ItsArul/HukumOhm?embed=1&theme=light" className="aspect-video w-full" />
<Codeblock code={`import OpenSeries.fisika as fisika
kuat_arus = 30
hambatan = 3
print(fisika.hukum_ohm(kuat_arus, hambatan))
`} />
22 changes: 21 additions & 1 deletion app/docs/fisika/kecepatan/page.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
import Codeblock from "@/components/Codeblock";

# Kecepatan

Kecepatan adalah perpindahan yang ditempuh oleh manusia maupun massa benda yang di dalam jangka waktu tertentu yang ditanyakan dalam satuan meter per sekon (`m/s`) yaitu satuan ukuran panjang per satuan ukuran waktu.

Rumus:

```
v = s / t
```

ket:

`v = kecepatan`

`s = jarak`

`t = waktu`

Rumus kecepatan ini biasanya digunakan untuk menentukan besaran waktu perpindahan suatu objek dari suatu tempat ke tempat lainnya,
misalnya pergerakan mobil, penerbangan pesawat, perpindahan sebuah roda, manusia berlari _sprint_, dan lain-lain.

Fungsi [sumber kode [disini](https://github.com/bellshade/OpenSeries/blob/main/OpenSeries/fisika.py#L5C1-L25C55)]

```python
Expand All @@ -24,4 +39,9 @@ print(fisika.kecepatan(jarak, waktu))

## Coba Sekarang

<iframe src="https://replit.com/@ItsArul/Kecepatan?embed=1&theme=light" className="aspect-video w-full" />
<Codeblock code={`import OpenSeries.fisika as fisika
waktu = 2.3
jarak = 4
print(fisika.kecepatan(jarak, waktu))
`} />
9 changes: 8 additions & 1 deletion app/docs/fisika/masa-jenis/page.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import Codeblock from "@/components/Codeblock";

# Masa Jenis

Rumus:
Expand Down Expand Up @@ -26,4 +28,9 @@ print(fisika.masa_jenis(massa_benda, volume_benda))

## Coba Sekarang

<iframe src="https://replit.com/@ItsArul/MasaJenis?embed=1&theme=light" className="aspect-video w-full" />
<Codeblock code={`import OpenSeries.fisika as fisika
massa_benda = 14
volume_benda = 8
print(fisika.masa_jenis(massa_benda, volume_benda))
`} />
6 changes: 3 additions & 3 deletions app/docs/get-started/instalasi/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

Installasi `OpenSeries` membutuhkan antara lain:

- Python (dengan minimal versi 3.10)<br /> OpenSeries library berjalan di atas python dengan minimal 3.10, untuk yang memliki versi dibawah atau belum punya dari python, bisa mengunduh dan menginstallnya terlebih dahulu, untuk sumber dari installasi python bisa dilihat [disini](https://www.python.org/downloads/)
- Python (dengan minimal versi 3.11.6)<br /> OpenSeries library berjalan di atas python dengan minimal 3.11.6, untuk yang memliki versi dibawah atau belum punya dari python, bisa mengunduh dan menginstallnya terlebih dahulu, untuk sumber dari installasi python bisa dilihat [disini](https://www.python.org/downloads/)

Cek versi python

```bash
python --version
```

jika versi python < 3.10 kamu bisa langsung [download windows](https://www.python.org/ftp/python/3.12.1/python-3.12.1-amd64.exe) atau command dibawah:
jika versi python < 3.11.6 kamu bisa langsung [download windows](https://www.python.org/ftp/python/3.12.1/python-3.12.1-amd64.exe) atau command dibawah:

Ubuntu

Expand Down Expand Up @@ -55,7 +55,7 @@ hint: See PEP 668 for the detailed specification.
kamu harus membuat virtual environment terlebih dahulu, bisa dilihat [disini](https://docs.python.org/3/library/venv.html) atau kamu bisa menambahkan parameter tambahan seperti ini (dengan cara install break packages):

```bash
pip install git+https://github.com/bellshade/OpenSeries --break-system-packages
pip install OpenSeriesBellshade --break-system-packages
```

- **installasi via clone dari github**<br/>kamu bisa installasi via github dengan mengclone dari projek `OpenSeries` dengan cara:
Expand Down
32 changes: 21 additions & 11 deletions app/docs/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
"use client";

import Sidebar from "@/components/Sidebar";
import { useNavStyle } from "@/hooks/useNavStyle";
import { useEffect } from "react";
import { PythonProvider } from "react-py";

export default function MdxLayout({ children }: { children: React.ReactNode }) {
const { setDocsStyle } = useNavStyle();
const packages = {
micropip: ["OpenSeriesBellshade"]
};

useEffect(() => {
setDocsStyle();
}, [setDocsStyle]);

export default async function MdxLayout({ children }: { children: React.ReactNode }) {
return (
<>
<div className="flex h-dvh max-h-dvh flex-col overflow-hidden">
<div className="relative flex h-full">
<Sidebar />
<main className="prose prose-indigo w-full max-w-none overflow-y-auto rounded-xl p-10 prose-h1:bg-gradient-to-br prose-h1:from-indigo-600 prose-h1:to-rose-400 prose-h1:bg-clip-text prose-h1:text-transparent prose-img:w-full prose-img:rounded-xl">
{children}
</main>
</div>
</div>
</>
<PythonProvider packages={packages}>
<Sidebar />
<main className="prose prose-indigo max-w-none overflow-y-auto rounded-xl p-8 dark:prose-invert prose-pre:border prose-img:w-full prose-img:rounded-xl dark:prose-h1:bg-clip-text dark:prose-h1:font-bold dark:prose-pre:border-zinc-700 lg:pl-80">
{children}
</main>
</PythonProvider>
);
}
9 changes: 7 additions & 2 deletions app/docs/matematika/diameter-lingkaran/page.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import Codeblock from "@/components/Codeblock";

# Diameter Lingkaran

Rumus:
Expand All @@ -19,9 +21,12 @@ import OpenSeries.matematika as matematika

jari = 10
print(matematika.diameter_lingkaran(jari))
# 20
```

## Coba Sekarang

<iframe src="https://replit.com/@ItsArul/DiameterLingkaran?embed=1&theme=light" className="aspect-video w-full" />
<Codeblock code={`import OpenSeries.matematika as matematika
jari = 10
print(matematika.diameter_lingkaran(jari))
`} />
Loading

0 comments on commit 351628d

Please sign in to comment.