PUZLLE-MEMORY#69
PUZLLE-MEMORY#69tokoanang2depanbanksumsel-dotcom wants to merge 1 commit intoAcode-Foundation:mainfrom
Conversation
Greptile SummaryThis PR replaces the entire
Confidence Score: 0/5This PR must not be merged — it replaces core documentation with an entirely unrelated HTML game, destroying the Acode plugin getting-started page. P0 finding: the only changed file has its entire meaningful content deleted and replaced with off-topic content that is incompatible with the documentation framework. Merging would break the docs site's primary entry point for plugin developers. docs/getting-started/intro.md — must be reverted to the original Acode plugin introduction content.
|
| Filename | Overview |
|---|---|
| docs/getting-started/intro.md | Entire file replaced — original Acode plugin introduction docs deleted and substituted with an unrelated Indonesian-language HTML memory card game; breaks the documentation site. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[PR: PUZLLE-MEMORY] --> B{What changed in intro.md?}
B --> C[Original: Acode Plugin Docs\nMarkdown with VitePress frontmatter\nEN language]
B --> D[New: HTML Memory Game\nraw DOCTYPE html\nID language]
C -->|Expected| E[✅ Getting-started page renders\non docs site]
D -->|Actual| F[❌ Raw HTML in .md file\nbreaks VitePress pipeline\nAll original docs lost]
Reviews (1): Last reviewed commit: "PUZLLE-MEMORY" | Re-trigger Greptile
| <!DOCTYPE html> | ||
| <html lang="id"> | ||
| <head> | ||
| <meta charset="UTF-8"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| <title>Memory Game - Puzzle Sederhana</title> | ||
| <style> | ||
| /* --- BAGIAN CSS --- */ | ||
| body { | ||
| font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | ||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| min-height: 100vh; | ||
| margin: 0; | ||
| background-color: #282c34; | ||
| color: white; | ||
| } | ||
|
|
||
| .game-container { | ||
| text-align: center; | ||
| } | ||
|
|
||
| .grid { | ||
| display: grid; | ||
| grid-template-columns: repeat(4, 80px); /* 4 kolom */ | ||
| gap: 10px; | ||
| margin: 20px auto; | ||
| perspective: 1000px; | ||
| } | ||
|
|
||
| .card { | ||
| width: 80px; | ||
| height: 80px; | ||
| background-color: #444b5a; | ||
| color: transparent; | ||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| font-size: 2rem; | ||
| cursor: pointer; | ||
| border-radius: 10px; | ||
| user-select: none; | ||
| transition: transform 0.4s, background-color 0.3s; | ||
| } | ||
|
|
||
| /* Efek saat kartu terbuka */ | ||
| .card.flipped { | ||
| background-color: #ffffff; | ||
| color: #000; | ||
| transform: rotateY(180deg); | ||
| } | ||
|
|
||
| /* Efek saat kartu sudah cocok */ | ||
| .card.matched { | ||
| background-color: #4caf50; | ||
| color: white; | ||
| cursor: default; | ||
| } | ||
|
|
||
| button { | ||
| padding: 10px 25px; | ||
| font-size: 1rem; | ||
| cursor: pointer; | ||
| background-color: #61dafb; | ||
| color: #282c34; | ||
| border: none; | ||
| border-radius: 5px; | ||
| font-weight: bold; | ||
| transition: 0.3s; | ||
| } | ||
|
|
||
| button:hover { | ||
| background-color: #4fa8c7; | ||
| } | ||
|
|
||
| /* Responsif untuk layar kecil */ | ||
| @media (max-width: 400px) { | ||
| .grid { | ||
| grid-template-columns: repeat(4, 60px); | ||
| } | ||
| .card { | ||
| width: 60px; | ||
| height: 60px; | ||
| font-size: 1.5rem; | ||
| } | ||
| } | ||
| </style> | ||
| </head> | ||
| <body> | ||
|
|
||
| <div class="game-container"> | ||
| <h1>Memory Game</h1> | ||
| <p>Cari pasangan emoji yang sama!</p> | ||
| <div id="game-board" class="grid"></div> | ||
| <button onclick="resetGame()">Ulang Permainan</button> | ||
| </div> | ||
|
|
||
| <script> | ||
| /* --- BAGIAN JAVASCRIPT --- */ | ||
| const board = document.getElementById('game-board'); | ||
| const symbols = ['🐱', '🐱', '🐶', '🐶', '🦊', '🦊', '🐸', '🐸', '🐯', '🐯', '🐵', '🐵', '🐨', '🐨', '🐷', '🐷']; | ||
| let flippedCards = []; | ||
| let matchedCount = 0; | ||
| let isProcessing = false; // Mencegah klik berlebihan saat pengecekan | ||
|
|
||
| // Fungsi untuk mengacak urutan kartu | ||
| function shuffle(array) { | ||
| return array.sort(() => Math.random() - 0.5); | ||
| } | ||
|
|
||
| // Fungsi untuk membuat papan permainan | ||
| function createBoard() { | ||
| const shuffledSymbols = shuffle([...symbols]); | ||
| board.innerHTML = ''; | ||
| shuffledSymbols.forEach((symbol) => { | ||
| const card = document.createElement('div'); | ||
| card.classList.add('card'); | ||
| card.dataset.symbol = symbol; | ||
| card.innerText = symbol; | ||
| card.addEventListener('click', flipCard); | ||
| board.appendChild(card); | ||
| }); | ||
| } | ||
|
|
||
| function flipCard() { | ||
| // Validasi: kartu tidak bisa diklik jika sudah terbuka, sudah cocok, atau sedang mengecek 2 kartu | ||
| if (isProcessing || this.classList.contains('flipped') || this.classList.contains('matched')) { | ||
| return; | ||
| } | ||
|
|
||
| this.classList.add('flipped'); | ||
| flippedCards.push(this); | ||
|
|
||
| if (flippedCards.length === 2) { | ||
| checkMatch(); | ||
| } | ||
| } | ||
|
|
||
| function checkMatch() { | ||
| isProcessing = true; // Kunci input sebentar | ||
| const [card1, card2] = flippedCards; | ||
|
|
||
| if (card1.dataset.symbol === card2.dataset.symbol) { | ||
| // Jika cocok | ||
| card1.classList.add('matched'); | ||
| card2.classList.add('matched'); | ||
| matchedCount += 2; | ||
| flippedCards = []; | ||
| isProcessing = false; | ||
|
|
||
| // Cek apakah semua sudah ketemu | ||
| if (matchedCount === symbols.length) { | ||
| setTimeout(() => { | ||
| alert('Hebat! Kamu berhasil menyelesaikan puzzle ini!'); | ||
| }, 500); | ||
| } | ||
| } else { | ||
| // Jika tidak cocok, tutup kembali setelah 1 detik | ||
| setTimeout(() => { | ||
| card1.classList.remove('flipped'); | ||
| card2.classList.remove('flipped'); | ||
| flippedCards = []; | ||
| isProcessing = false; | ||
| }, 1000); | ||
| } | ||
| } | ||
|
|
||
| function resetGame() { | ||
| matchedCount = 0; | ||
| flippedCards = []; | ||
| isProcessing = false; | ||
| createBoard(); | ||
| } | ||
|
|
||
| // Jalankan game saat halaman dimuat | ||
| createBoard(); | ||
| </script> | ||
|
|
||
| </body> | ||
| </html> |
There was a problem hiding this comment.
Entire documentation page replaced with an unrelated game
This change completely deletes the Acode plugin introduction documentation and replaces it with a standalone HTML memory/puzzle game written in Indonesian. The file docs/getting-started/intro.md is the entry-point documentation page for all Acode plugin developers — removing it breaks the doc site's getting-started section entirely. The replacement is raw HTML with <!DOCTYPE html> inside a .md file, which is incompatible with the VitePress/Markdown documentation pipeline used by this repo. The original content (plugin overview, language support, installation methods) must be restored.
|
BAGUS |
No description provided.