Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 217dccfe74 |
BIN
Binary file not shown.
@@ -11,3 +11,7 @@ def home():
|
||||
@login_required
|
||||
def dashboard():
|
||||
return render_template('dashboard.html', user=current_user)
|
||||
|
||||
@main_bp.route('/solver')
|
||||
def solver():
|
||||
return render_template('solver.html')
|
||||
|
||||
+46
-56
@@ -21,11 +21,40 @@ body {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
font-family: "Geist Sans", system-ui, sans-serif;
|
||||
|
||||
background: linear-gradient(135deg, #c6dff4, #7c8384);
|
||||
}
|
||||
|
||||
/* MAGNET EFFECT */
|
||||
.magnetic {
|
||||
padding: 10px 20px;
|
||||
border: none;
|
||||
background: #4facfe;
|
||||
color: white;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.magnetic:hover {
|
||||
background: #2d8cf0;
|
||||
}
|
||||
|
||||
/* Reset */
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
/* Page setup */
|
||||
body {
|
||||
min-height: 100vh;
|
||||
background: var(--primary-bg-color);
|
||||
}
|
||||
|
||||
/* Navbar */
|
||||
nav {
|
||||
width: 100%;
|
||||
background: var(--nav-bg-color);
|
||||
@@ -64,38 +93,17 @@ main h1 {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
main {
|
||||
animation: fadeIn 0.8s ease;
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(15px);
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Form box */
|
||||
form {
|
||||
background: rgba(255, 255, 255, 0.15);
|
||||
backdrop-filter: blur(12px);
|
||||
padding: 35px;
|
||||
border-radius: 12px;
|
||||
width: 320px;
|
||||
background: var(--secondary-bg-color);
|
||||
padding: 30px;
|
||||
border-radius: 8px;
|
||||
width: 300px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
|
||||
/* Labels */
|
||||
label {
|
||||
margin-top: 10px;
|
||||
@@ -104,48 +112,30 @@ label {
|
||||
}
|
||||
|
||||
/* Inputs */
|
||||
form {
|
||||
background: rgba(255, 255, 255, 0.15);
|
||||
backdrop-filter: blur(12px);
|
||||
padding: 35px;
|
||||
border-radius: 12px;
|
||||
width: 320px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
input {
|
||||
padding: 10px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
|
||||
/* Button */
|
||||
button {
|
||||
.button {
|
||||
margin-top: 20px;
|
||||
padding: 12px;
|
||||
padding: 10px;
|
||||
border: none;
|
||||
background: linear-gradient(135deg, #e9eff5, #daebf0);
|
||||
color: rgb(0, 0, 0);
|
||||
border-radius: 8px;
|
||||
background: #4facfe;
|
||||
color: white;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
|
||||
background: #2d8cf0;
|
||||
}
|
||||
|
||||
button:active {
|
||||
transform: scale(0.97);
|
||||
}
|
||||
|
||||
|
||||
/* Error message */
|
||||
.error {
|
||||
color: red;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
/* button anim */
|
||||
@@ -0,0 +1,125 @@
|
||||
:root {
|
||||
--bg-color: #f4f6f8;
|
||||
--text-color: #333;
|
||||
--board-border: #2c3e50;
|
||||
--square-light: #ecf0f1;
|
||||
--square-dark: #95a5a6;
|
||||
--accent-color: #3498db;
|
||||
--btn-hover: #2980b9;
|
||||
--shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||
background-color: var(--bg-color);
|
||||
color: var(--text-color);
|
||||
margin: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-weight: 300;
|
||||
letter-spacing: -0.5px;
|
||||
margin-bottom: 2rem;
|
||||
color: var(--board-border);
|
||||
}
|
||||
|
||||
.container {
|
||||
background: white;
|
||||
padding: 2rem;
|
||||
border-radius: 8px;
|
||||
box-shadow: var(--shadow);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
.chessboard {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(8, 50px);
|
||||
grid-template-rows: repeat(8, 50px);
|
||||
border: 5px solid var(--board-border);
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.square {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
.square.light {
|
||||
background-color: var(--square-light);
|
||||
}
|
||||
|
||||
.square.dark {
|
||||
background-color: var(--square-dark);
|
||||
}
|
||||
|
||||
.queen {
|
||||
color: var(--board-border);
|
||||
text-shadow: 0 2px 2px rgba(0,0,0,0.2);
|
||||
cursor: pointer;
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.queen:hover {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.controls {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
button {
|
||||
background-color: var(--accent-color);
|
||||
color: white;
|
||||
border: none;
|
||||
padding: 0.6rem 1.2rem;
|
||||
border-radius: 4px;
|
||||
font-size: 1rem;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.2s ease;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background-color: var(--btn-hover);
|
||||
}
|
||||
|
||||
button.secondary {
|
||||
background-color: transparent;
|
||||
border: 1px solid var(--accent-color);
|
||||
color: var(--accent-color);
|
||||
}
|
||||
|
||||
button.secondary:hover {
|
||||
background-color: rgba(52, 152, 219, 0.1);
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.chessboard {
|
||||
grid-template-columns: repeat(8, 1fr);
|
||||
grid-template-rows: repeat(8, 1fr);
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
height: auto;
|
||||
aspect-ratio: 1/1;
|
||||
}
|
||||
|
||||
.square {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
+9
-27
@@ -1,32 +1,14 @@
|
||||
const button = document.querySelector(".magnetic");
|
||||
const button = document.querySelector(".magnetic")
|
||||
|
||||
button.addEventListener("mousemove", (e) => {
|
||||
const rect = button.getBoundingClientRect();
|
||||
const x = e.clientX - rect.left - rect.width / 2;
|
||||
const y = e.clientY - rect.top - rect.height / 2;
|
||||
const rect = button.getBoundingClientRect()
|
||||
|
||||
button.style.transform = `translate(${x * 0.2}px, ${y * 0.2}px)`;
|
||||
});
|
||||
const x = e.clientX - rect.left - rect.width / 2
|
||||
const y = e.clientY - rect.top - rect.height / 2
|
||||
|
||||
button.style.transform = `translate(${x * 0.3}px, ${y * 0.3}px)`
|
||||
})
|
||||
|
||||
button.addEventListener("mouseleave", () => {
|
||||
button.style.transform = "translate(0,0)";
|
||||
});
|
||||
|
||||
const inputs = document.querySelectorAll("input");
|
||||
|
||||
inputs.forEach(input => {
|
||||
input.addEventListener("input", () => {
|
||||
input.style.boxShadow = "0 0 8px rgba(79,172,254,0.6)";
|
||||
|
||||
setTimeout(() => {
|
||||
input.style.boxShadow = "";
|
||||
}, 300);
|
||||
});
|
||||
});
|
||||
|
||||
const form = document.querySelector("form");
|
||||
|
||||
form.addEventListener("submit", () => {
|
||||
button.innerText = "Logging in...";
|
||||
button.style.opacity = "0.7";
|
||||
});
|
||||
button.style.transform = "translate(0,0)"
|
||||
})
|
||||
@@ -14,7 +14,7 @@
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="{{ url_for('login.login') }}"><span>Login</span></a></li>
|
||||
<li><a href="{{ url_for('login.register') }}"><span>Create account</span></a></li>
|
||||
<li><a href="{{ url_for('login.register') }}"><span></span>Create account</span></a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
@@ -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>8-Damen-Problem</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/solver.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>8-Damen-Problem Test</h1>
|
||||
<div class="chessboard">
|
||||
{% for row in range(8) %}
|
||||
{% for col in range(8) %}
|
||||
<div class="square {{ 'light' if (row + col) % 2 == 0 else 'dark' }}" data-row="{{ row }}" data-col="{{ col }}">
|
||||
<!-- Queens will be placed here -->
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div class="controls">
|
||||
<button id="solveBtn">Solve</button>
|
||||
<button id="resetBtn" class="secondary">Reset</button>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user