Skip to content

Commit

Permalink
add: basic features
Browse files Browse the repository at this point in the history
  • Loading branch information
Natyrodrigues committed Jan 18, 2025
1 parent 67efb52 commit 76a8484
Show file tree
Hide file tree
Showing 7 changed files with 107 additions and 0 deletions.
Empty file added mastermind/add.html
Empty file.
28 changes: 28 additions & 0 deletions mastermind/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mastermind</title>
<link rel="stylesheet" href="styles/styles.css">
</head>
<body>
<header>
<h1>Mastermind</h1>
<p>Organize seus horários com algoritmos inteligentes.</p>
</header>
<main>
<section id="plans">
<h2>Seus Planejamentos</h2>
<ul id="plan-list">
<!-- Os planejamentos criados aparecerão aqui -->
</ul>
</section>
<div id="actions">
<button id="add-plan">+ Novo Planejamento</button>
<button id="machiavelli-mode">Machiavelli Mode</button>
</div>
</main>
<script src="scripts/app.js"></script>
</body>
</html>
Empty file added mastermind/machiavelli.html
Empty file.
Empty file added mastermind/result.html
Empty file.
Empty file.
28 changes: 28 additions & 0 deletions mastermind/scripts/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// scripts/app.js

// Inicializa a lista de planejamentos
let plans = JSON.parse(localStorage.getItem("plans")) || [];

// Exibe os planejamentos na página inicial
function renderPlans() {
const planList = document.getElementById("plan-list");
planList.innerHTML = ""; // Limpa a lista antes de renderizar
plans.forEach((plan, index) => {
const li = document.createElement("li");
li.textContent = `Planejamento ${index + 1}: ${plan.name}`;
planList.appendChild(li);
});
}

// Redireciona para a página de adicionar planejamento
document.getElementById("add-plan").addEventListener("click", () => {
window.location.href = "add.html";
});

// Redireciona para o modo Machiavelli
document.getElementById("machiavelli-mode").addEventListener("click", () => {
window.location.href = "machiavelli.html";
});

// Renderiza os planejamentos ao carregar a página
renderPlans();
51 changes: 51 additions & 0 deletions mastermind/styles/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
box-sizing: border-box;
}

header {
background-color: #4CAF50;
color: white;
padding: 20px;
text-align: center;
}

main {
padding: 20px;
}

#actions {
margin-top: 20px;
display: flex;
gap: 10px;
}

button {
padding: 10px 20px;
font-size: 16px;
cursor: pointer;
border: none;
background-color: #007BFF;
color: white;
border-radius: 5px;
}

button:hover {
background-color: #0056b3;
}

#plan-list {
list-style: none;
padding: 0;
}

#plan-list li {
margin: 10px 0;
padding: 10px;
background-color: #f4f4f4;
border: 1px solid #ddd;
border-radius: 5px;
}

0 comments on commit 76a8484

Please sign in to comment.