Skip to content

Commit c355708

Browse files
committed
refactor: added favicon, rename chart ids
1 parent ef3fffc commit c355708

File tree

5 files changed

+24
-15
lines changed

5 files changed

+24
-15
lines changed
528 Bytes
Loading
1.06 KB
Loading

git_analytics/static/index.html

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,22 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<title>Git Analytics</title>
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
8+
<title>Git-Analytics</title>
9+
<meta name="description" content="Advanced analytics for Git repositories — commits, authors, code churn, lines of code, trends, and visual dashboards.">
10+
11+
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
12+
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
713
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
14+
815
<link href="css/bootstrap.min.css" rel="stylesheet">
916
<link href="css/bootstrap-icons.min.css" rel="stylesheet">
17+
18+
<script src="js/bootstrap.bundle.min.js" defer></script>
19+
<script src="js/chart.umd.min.js" defer></script>
20+
<script src="js/git-analytics.js" defer></script>
1021
</head>
1122
<body class="d-flex flex-column min-vh-100">
1223
<!-- top menu -->
@@ -263,7 +274,7 @@ <h2>Commits</h2>
263274
</i>
264275
</div>
265276
<div class="card-body">
266-
<canvas id="chartDay"></canvas>
277+
<canvas id="chartCommitsByHour"></canvas>
267278
</div>
268279
</div>
269280
</div>
@@ -280,7 +291,7 @@ <h2>Commits</h2>
280291
</i>
281292
</div>
282293
<div class="card-body">
283-
<canvas id="chartWeek"></canvas>
294+
<canvas id="chartCommitsByWeekday"></canvas>
284295
</div>
285296
</div>
286297
</div>
@@ -297,7 +308,7 @@ <h2>Commits</h2>
297308
</i>
298309
</div>
299310
<div class="card-body">
300-
<canvas id="chartMonth"></canvas>
311+
<canvas id="chartCommitsByDayOfMonth"></canvas>
301312
</div>
302313
</div>
303314
</div>
@@ -309,12 +320,10 @@ <h2>Commits</h2>
309320
<!-- footer -->
310321
<footer class="bg-dark text-white py-3 mt-auto">
311322
<div class="container">
312-
<span>&copy; 2025 ver 0.1.13</span>
323+
<span>&copy; 2025 ver 0.1.14</span>
313324
</div>
314325
</footer>
315-
<script src="js/bootstrap.bundle.min.js"></script>
316-
<script src="js/chart.umd.min.js"></script>
317-
<script src="js/git-analytics.js"></script>
326+
318327
<script>
319328
const views = document.querySelectorAll('.view');
320329
const nav = document.getElementById('sidebarNav');

git_analytics/static/js/git-analytics.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ function buildHourByAuthorChart(hourOfDayData) {
284284
return Object.values(byAuthor).reduce((s, v) => s + v, 0);
285285
});
286286

287-
renderChart("chartDay", {
287+
renderChart("chartCommitsByHour", {
288288
type: "bar",
289289
data: { labels: HOUR_LABELS, datasets: [{
290290
label: "Total",
@@ -315,7 +315,7 @@ function buildHourByAuthorChart(hourOfDayData) {
315315
backgroundColor: getAuthorColor(author),
316316
}));
317317

318-
renderChart("chartDay", {
318+
renderChart("chartCommitsByHour", {
319319
type: "bar",
320320
data: { labels: HOUR_LABELS, datasets },
321321
options: {
@@ -378,7 +378,7 @@ function buildWeekByAuthorChart(dayOfWeekData) {
378378
Object.values(dayOfWeekData[d] || {}).reduce((s, v) => s + v, 0)
379379
);
380380

381-
renderChart("chartWeek", {
381+
renderChart("chartCommitsByWeekday", {
382382
type: "bar",
383383
data: {
384384
labels: WEEK_LABELS,
@@ -412,7 +412,7 @@ function buildWeekByAuthorChart(dayOfWeekData) {
412412
backgroundColor: getAuthorColor(author),
413413
}));
414414

415-
renderChart("chartWeek", {
415+
renderChart("chartCommitsByWeekday", {
416416
type: "bar",
417417
data: { labels: WEEK_LABELS, datasets },
418418
options: {
@@ -446,7 +446,7 @@ function buildDayOfMonthByAuthorChart(dayOfMonthData) {
446446
Object.values(dayOfMonthData[d] || {}).reduce((s, v) => s + v, 0)
447447
);
448448

449-
renderChart("chartMonth", {
449+
renderChart("chartCommitsByDayOfMonth", {
450450
type: "bar",
451451
data: {
452452
labels: DAY_LABELS,
@@ -480,7 +480,7 @@ function buildDayOfMonthByAuthorChart(dayOfMonthData) {
480480
backgroundColor: getAuthorColor(author),
481481
}));
482482

483-
renderChart("chartMonth", {
483+
renderChart("chartCommitsByDayOfMonth", {
484484
type: "bar",
485485
data: { labels: DAY_LABELS, datasets },
486486
options: {

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "git-analytics"
3-
version = "0.1.13"
3+
version = "0.1.14"
44
description = "Advanced analytics for Git repositories — commits, authors, code churn, lines of code, trends, and visual dashboards."
55
authors = ["n0rfas <n0rfas@protonmail.com>"]
66
license = "MIT"

0 commit comments

Comments
 (0)