Skip to content

Commit 670cd01

Browse files
committed
Celebrate the 20th birthday of Git
The first commit of Git, ever, was performed on Thu, 7 Apr 2005 15:13:13 -0700 and it is kind of constitutes the birth of Git itself, see: https://web.git.kernel.org/pub/scm/git/git.git/commit/?id=e83c5163316f89bfbde7d9ab23ca2e25604af290 This means that April 7th, 2025 is the 20th birthday of Git. Let's celebrate that by (temporarily!) changing the Git logo on Git's home page in a subtle way. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent aa794fd commit 670cd01

File tree

5 files changed

+72
-0
lines changed

5 files changed

+72
-0
lines changed

assets/js/application.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const baseURLPrefix = (() => {
3232
$(document).ready(function() {
3333
BrowserFallbacks.init();
3434
DarkMode.init();
35+
GitTurns20.init();
3536
Search.init();
3637
Dropdowns.init();
3738
Forms.init();
@@ -102,6 +103,19 @@ var BrowserFallbacks = {
102103

103104
}
104105

106+
var GitTurns20 = {
107+
init: function() {
108+
const today = new Date();
109+
if (today.getFullYear() === 2025 && today.getMonth() === 3 && today.getDate() === 7) {
110+
this.celebrate();
111+
}
112+
},
113+
114+
celebrate: function() {
115+
document.documentElement.dataset.celebration = 'git-turns-20';
116+
}
117+
};
118+
105119
var Search = {
106120
searching: false,
107121
currentSearch: '',

assets/sass/application.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ $baseurl: "{{ .Site.BaseURL }}{{ if (and (ne .Site.BaseURL "/") (ne .Site.BaseUR
2828
@import 'lists';
2929
@import 'about';
3030
@import 'dark-mode';
31+
@import 'git-turns-20';
3132

3233
code {
3334
display: inline;

assets/sass/git-turns-20.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
@mixin logo20($infix: '') {
2+
img[alt="Git"] {
3+
filter: unset;
4+
content: url('./images/logo20' + $infix + '.svg');
5+
}
6+
}
7+
8+
:root[data-celebration="git-turns-20"] {
9+
@include logo20
10+
&[data-theme="dark"] {
11+
@include logo20($infix: '.dark-mode')
12+
}
13+
@media screen and (prefers-color-scheme: dark) {
14+
@include logo20
15+
&:not([data-theme="light"]) {
16+
@include logo20($infix: '.dark-mode')
17+
}
18+
}
19+
}

static/images/logo20.dark-mode.svg

Lines changed: 19 additions & 0 deletions
Loading

static/images/logo20.svg

Lines changed: 19 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)