Ruby/dashboard/templates/growth.html
2025-04-26 23:45:06 -04:00

108 lines
2.5 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<title>Ruby's Brain Growth</title>
<style>
body {
background-color: #121212;
color: #e0e0e0;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
padding: 20px;
}
h1 {
color: #ffffff;
}
.stat {
margin-bottom: 20px;
font-size: 1.5em;
}
.nav {
background-color: #1e1e1e;
padding: 10px;
margin-bottom: 20px;
}
.nav a {
color: #e0e0e0;
margin-right: 20px;
text-decoration: none;
}
</style>
</head>
<body>
<div class="nav">
<a href="/">🏠 Home</a>
<a href="/journal">📓 Journal</a>
<a href="/concepts">🧠 Concepts</a>
<a href="/brainmap">🕸️ Brain Map</a>
<a href="/growth">📈 Growth</a>
<a href="/dreams">💬 Dreams</a>
</div>
<h1>📈 Ruby's Brain Growth</h1>
<div class="stat">Vocabulary Size: {{ vocab_size }}</div>
<div class="stat">Brain Map Size: {{ brainmap_size }}</div>
<div class="stat">Memory Entries: {{ memory_size }}</div>
<div class="divider"></div>
<h2>🧠 Vocabulary Growth Over Time</h2>
<canvas id="vocabChart" width="600" height="300"></canvas>
<script>
const ctx = document.getElementById('vocabChart').getContext('2d');
const vocabData = {
labels: [
{% for entry in vocab_growth %}
"{{ entry[0] }}",
{% endfor %}
],
datasets: [{
label: 'Vocab Size',
data: [
{% for entry in vocab_growth %}
{{ entry[1] }},
{% endfor %}
],
fill: true,
borderColor: 'rgb(75, 192, 192)',
backgroundColor: 'rgba(75, 192, 192, 0.2)',
tension: 0.3
}]
};
const vocabChart = new Chart(ctx, {
type: 'line',
data: vocabData,
options: {
scales: {
x: {
ticks: {
autoSkip: true,
maxTicksLimit: 10 // only show up to 10 x-axis labels
},
title: {
display: true,
text: 'Time'
}
},
y: {
title: {
display: true,
text: 'Vocabulary Size'
},
beginAtZero: true
}
}
}
});
</script>
</body>
</html>