From 351628dc14021a1b3fe4785e8eb28515e36f7594 Mon Sep 17 00:00:00 2001 From: "envil a.k.a pow" Date: Sun, 4 Feb 2024 19:49:37 +0700 Subject: [PATCH] Squashed commit of the following: commit 0849fc6b363ebd74e71fdb16db46d7e21d431a67 Author: envilion s. Date: Sun Feb 4 19:07:33 2024 +0700 fix: styling on open sidebar button commit 83760bea8fbb18447abc5cfd5d3bb59efc3e1a10 Author: envilion s. Date: Sun Feb 4 19:04:04 2024 +0700 fix: styling in codeblock commit 46181e339ac0abec53ac160e408e6c356d424cbf Author: envilion s. Date: Sun Feb 4 19:01:35 2024 +0700 feat: create custom runtime commit dec6ee65b568b3441830a4b6a812b57a32484f16 Author: envilion s. Date: Sun Feb 4 15:08:49 2024 +0700 fix: remove unused custom plugin tailwindcss commit 9321effbea5305c4c2fba2897cbd7f5e95e33284 Author: envilion s. Date: Sun Feb 4 15:07:31 2024 +0700 fix: global styling & add nav links commit e47aa793b8df17f280ebd6bba3297df9423ba0cf Author: envilion s. Date: Sun Feb 4 01:50:24 2024 +0700 fix: format command in readme.md commit 4421cb1a6e0f95dcb45683bd5f9c6cfbf9119893 Author: envilion s. Date: Sun Feb 4 01:49:29 2024 +0700 fix: contributing step commit e3c30d213dab109a9c962da2392cb3d5e0965e92 Author: envilion s. Date: Sun Feb 4 01:38:33 2024 +0700 fix: readme.md commit 2e2aeaf90e140f29b8e2e107a062352d1fca07f1 Author: Wisnu Kristanto <45446283+nu07@users.noreply.github.com> Date: Sun Feb 4 00:03:10 2024 +0700 feat: switch darkmode (#40) * feat: switch darkmode * feat: dark css on landing pages commit dd49b0c5694e95f5b4c4df6677e2ae9fe0d1b46d Author: Muhammad Dean Fahreza Date: Sat Feb 3 23:39:34 2024 +0700 docs: Mempebaharui dokumentasi (#39) commit fb0566920462eb7f01823e182118ad9fee7e4b0f Author: envilion s. Date: Sat Feb 3 19:56:57 2024 +0700 feat: new syntax highlighting commit a0a5faf709d02c615bb3caea8957fc77dbedad37 Author: envilion s. Date: Sat Feb 3 17:39:38 2024 +0700 feat: add featured links in sidebar commit 50d503f80caa6ea12ac116952e2b3d2b2539dea6 Author: envil a.k.a pow <86885041+abnvlf@users.noreply.github.com> 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 b65be510adea2e04716dc5b169f569433942f8dd Author: dherlyar Date: Tue Jan 30 20:43:02 2024 +0700 Docs: instalasi minimal versi python ke 3.11.6 commit adce6f71c59dec01ef748bc5537d3f9c587207f0 Author: dherlyar Date: Tue Jan 30 20:31:54 2024 +0700 Docs: instalasi pip install commit 1bd953ecfb580ebffacfc35bba2cff8b99006df8 Author: envil a.k.a pow <86885041+abnvlf@users.noreply.github.com> Date: Mon Jan 29 21:09:41 2024 +0700 docs: remove instalasi & informasi module link (#26) commit 03b6b4b1eb640dec1bdb09845fc73b5c47aec9c2 Author: dherlyar Date: Thu Jan 25 11:40:51 2024 +0700 docs: instalasi commit c7504f06341e0a19f7ebc3163e83d5397a8f3a2e Author: dherlyar Date: Thu Jan 25 10:51:29 2024 +0700 docs: commit 39faa3c9c3c6a71092d28071ea46937d36bba6ea Author: dherlyar Date: Wed Jan 24 13:29:37 2024 +0700 ubah kode sumber commit e1bf2a6c02058e5415c0b236f62ecf3b066af6ef Author: dherlyar Date: Wed Jan 24 13:23:30 2024 +0700 docs: standar_deviasi & entropy ubah kode sumber standar_deviasi & entropy commit 7fcc67c7e7d9d80fb50ff0521cf24050ac60775d Author: dherlyar Date: Wed Jan 24 13:11:52 2024 +0700 docs: commit ce46eec0b0310d825cffd05d104ae9c5f1e94ad9 Author: dherlyar Date: Wed Jan 24 13:06:31 2024 +0700 docs: entropy menambahkan dokumentasi entropy commit b2ddd1824fa76a005e4504dd8f565347cf133402 Author: dherlyar Date: Wed Jan 24 12:25:35 2024 +0700 docs: entropy menambahkan dokumentasi entropy commit c9aacb6c72644133a9830f540ee444d3ad2d8a1f Author: envil a.k.a pow <86885041+abnvlf@users.noreply.github.com> Date: Tue Jan 23 20:06:32 2024 +0700 feat: embel replit (#13) commit 8e544edbc04568b7d9ed87686409f10b93921b57 Author: envil a.k.a pow <86885041+abnvlf@users.noreply.github.com> Date: Tue Jan 23 19:41:51 2024 +0700 feat: fix responsive design landing page (#12) commit 4c63c4603fa01745ecf5904ed672c0cb23330fb4 Author: envilion s Date: Tue Jan 23 19:18:43 2024 +0700 feat: compress img --- .gitignore | 4 +- .nvmrc | 1 + README.md | 85 +++++++++++++++++- app/(landing)/layout.tsx | 20 +++++ app/{ => (landing)}/page.tsx | 35 +------- app/docs/fisika/energi-kinetik/page.mdx | 9 +- app/docs/fisika/energi-potensial/page.mdx | 10 ++- app/docs/fisika/hukum-ohm/page.mdx | 9 +- app/docs/fisika/kecepatan/page.mdx | 22 ++++- app/docs/fisika/masa-jenis/page.mdx | 9 +- app/docs/get-started/instalasi/page.mdx | 6 +- app/docs/layout.tsx | 32 ++++--- .../matematika/diameter-lingkaran/page.mdx | 9 +- .../matematika/keliling-lingkaran/page.mdx | 9 +- app/docs/matematika/luas-lingkaran/page.mdx | 9 +- .../matematika/persamaan-kuadrat/page.mdx | 8 +- .../matematika/radian-ke-derajat/page.mdx | 9 +- app/docs/statistika/entropy/page.mdx | 10 ++- app/docs/statistika/standar-deviasi/page.mdx | 12 ++- app/globals.css | 49 ++++++++++- app/layout.tsx | 15 ++-- components/Codeblock.tsx | 88 +++++++++++++++++++ components/Navbar.tsx | 70 +++++++++++++++ components/Provider.tsx | 28 ++++++ components/Sidebar.tsx | 86 +++++++++--------- components/ThemeSwitcher.tsx | 45 ++++++++++ constants/featuredLinks.ts | 24 +++++ constants/navLinks.ts | 24 +++++ hooks/useNavStyle.ts | 13 +++ next.config.mjs | 11 ++- package.json | 12 ++- tailwind.config.ts | 4 +- 32 files changed, 657 insertions(+), 120 deletions(-) create mode 100644 .nvmrc create mode 100644 app/(landing)/layout.tsx rename app/{ => (landing)}/page.tsx (60%) create mode 100644 components/Codeblock.tsx create mode 100644 components/Navbar.tsx create mode 100644 components/Provider.tsx create mode 100644 components/ThemeSwitcher.tsx create mode 100644 constants/featuredLinks.ts create mode 100644 constants/navLinks.ts create mode 100644 hooks/useNavStyle.ts diff --git a/.gitignore b/.gitignore index c1d8cbc..2615872 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,8 @@ /.pnp .pnp.js .yarn/install-state.gz +package-lock.json +yarn.lock # testing /coverage @@ -36,4 +38,4 @@ yarn-error.log* next-env.d.ts /OpenSeries -/testing \ No newline at end of file +/testing diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..18c2841 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +20.11.0 \ No newline at end of file diff --git a/README.md b/README.md index b2fa096..84bca74 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/app/(landing)/layout.tsx b/app/(landing)/layout.tsx new file mode 100644 index 0000000..3298b63 --- /dev/null +++ b/app/(landing)/layout.tsx @@ -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; diff --git a/app/page.tsx b/app/(landing)/page.tsx similarity index 60% rename from app/page.tsx rename to app/(landing)/page.tsx index b7947ed..fd2bb01 100644 --- a/app/page.tsx +++ b/app/(landing)/page.tsx @@ -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 ( <> -
@@ -52,18 +23,18 @@ export default function Home() {

Get Started - + By {projectByLinks.map((link) => ( {link.name} diff --git a/app/docs/fisika/energi-kinetik/page.mdx b/app/docs/fisika/energi-kinetik/page.mdx index 650085f..c3809dd 100644 --- a/app/docs/fisika/energi-kinetik/page.mdx +++ b/app/docs/fisika/energi-kinetik/page.mdx @@ -1,3 +1,5 @@ +import Codeblock from "@/components/Codeblock"; + # Energi Kinetik Rumus: @@ -26,4 +28,9 @@ print(fisika.energi_kinetik(masa_benda, kecepatan_benda)) ## Coba Sekarang -