├── Event_Contact_Tool.py
├── Gallery.html
├── Main_Result_Profile.html
├── Product.py
├── README.md
├── Result_Product_FAQ.py
├── Settings_Blog_Pricing.py
├── Settings_Search_Article.py
├── Tutorial_Profile_Tool.py
├── data.json
├── index.html
├── login.html
├── login.js
├── login.php
├── styles-login.css
├── styles.css
└── yc.jpg
/Event_Contact_Tool.py:
--------------------------------------------------------------------------------
1 | def foo():
2 | return 'bar'
3 | print(foo())
--------------------------------------------------------------------------------
/Gallery.html:
--------------------------------------------------------------------------------
1 |
Sample HTMLThis is a commit.
--------------------------------------------------------------------------------
/Main_Result_Profile.html:
--------------------------------------------------------------------------------
1 | Hello, World!
--------------------------------------------------------------------------------
/Product.py:
--------------------------------------------------------------------------------
1 | def foo():
2 | return 'bar'
3 | print(foo())
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Web_YoCode
2 | Web
3 |
--------------------------------------------------------------------------------
/Result_Product_FAQ.py:
--------------------------------------------------------------------------------
1 | import random
2 | print(random.randint(1,100))
--------------------------------------------------------------------------------
/Settings_Blog_Pricing.py:
--------------------------------------------------------------------------------
1 | def foo():
2 | return 'bar'
3 | print(foo())
--------------------------------------------------------------------------------
/Settings_Search_Article.py:
--------------------------------------------------------------------------------
1 | def foo():
2 | return 'bar'
3 | print(foo())
--------------------------------------------------------------------------------
/Tutorial_Profile_Tool.py:
--------------------------------------------------------------------------------
1 | # Sample Python commit
2 | x = 42
3 | print(x)
--------------------------------------------------------------------------------
/data.json:
--------------------------------------------------------------------------------
1 | {
2 | "users": [
3 | { "username": "1", "password": "1" },
4 | { "username": "user2", "password": "pass2" }
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Website YoCode
7 |
8 |
9 |
10 |
30 |
31 |
34 |
35 |
38 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/login.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Login
7 |
8 |
9 |
10 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/login.js:
--------------------------------------------------------------------------------
1 | document.getElementById("loginForm").addEventListener("submit", async function (event) {
2 | event.preventDefault(); // Mencegah reload halaman
3 |
4 | const username = document.getElementById("username").value;
5 | const password = document.getElementById("password").value;
6 |
7 | try {
8 | const response = await fetch("login.php", {
9 | method: "POST",
10 | headers: { "Content-Type": "application/json" },
11 | body: JSON.stringify({ username, password })
12 | });
13 |
14 | if (!response.ok) {
15 | throw new Error("Gagal mengambil data JSON");
16 | }
17 |
18 | const data = await response.json();
19 |
20 | if (data.success) {
21 | alert("Login berhasil!");
22 | localStorage.setItem("username", username); // Simpan username
23 | window.location.replace("index.html"); // Redirect ke halaman utama dengan refresh
24 | } else {
25 | alert("Username atau password salah!");
26 | }
27 | } catch (error) {
28 | console.error("Error saat login:", error);
29 | alert("Terjadi kesalahan saat login, coba lagi.");
30 | }
31 | });
32 |
--------------------------------------------------------------------------------
/login.php:
--------------------------------------------------------------------------------
1 | $success, 'message' => $message, 'redirect' => 'index.html']);
23 | ?>
24 |
--------------------------------------------------------------------------------
/styles-login.css:
--------------------------------------------------------------------------------
1 | .login-container {
2 | max-width: 300px;
3 | margin: 100px auto;
4 | padding: 20px;
5 | background-color: #fff;
6 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
7 | }
8 |
9 | .form-group {
10 | margin-bottom: 15px;
11 | }
12 |
13 | .form-group label {
14 | display: block;
15 | margin-bottom: 5px;
16 | }
17 |
18 | .form-group input {
19 | width: 100%;
20 | padding: 8px;
21 | box-sizing: border-box;
22 | }
23 |
24 | button {
25 | width: 100%;
26 | padding: 10px;
27 | background-color: #333;
28 | color: #fff;
29 | border: none;
30 | cursor: pointer;
31 | }
32 |
33 | button:hover {
34 | background-color: #555;
35 | }
36 |
--------------------------------------------------------------------------------
/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: Arial, sans-serif;
3 | margin: 0;
4 | padding: 0;
5 | background-color: #f4f4f4;
6 | }
7 |
8 | header {
9 | background-color: #333;
10 | color: #fff;
11 | padding: 10px 20px;
12 | display: flex;
13 | justify-content: space-between;
14 | align-items: center;
15 | }
16 |
17 | header .logo h1, header .logo h2 {
18 | margin: 0;
19 | }
20 |
21 | nav ul {
22 | list-style: none;
23 | margin: 0;
24 | padding: 0;
25 | display: flex;
26 | }
27 |
28 | nav ul li {
29 | margin-left: 20px;
30 | }
31 |
32 | nav ul li a {
33 | color: #fff;
34 | text-decoration: none;
35 | }
36 |
37 | .hero {
38 | background-color: #555;
39 | color: #fff;
40 | text-align: center;
41 | padding: 100px 20px;
42 | }
43 |
44 | footer {
45 | background-color: #333;
46 | color: #fff;
47 | text-align: center;
48 | padding: 10px 20px;
49 | position: fixed;
50 | width: 100%;
51 | bottom: 0;
52 | }
53 |
--------------------------------------------------------------------------------
/yc.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YoCode-X/Web_YoCode/4fe781f927ae7262357c1b477a1efc6ccebe86e0/yc.jpg
--------------------------------------------------------------------------------