Skip to content

Commit

Permalink
Newyear (#5)
Browse files Browse the repository at this point in the history
* New year theme

* Fix for theme date range crossing new year
  • Loading branch information
hoel authored Nov 21, 2025
1 parent f9d224a commit 5969073
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
Binary file added clock-face-newyear.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 37 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,7 @@
<option value="halloween">Halloween</option>
<option value="movember">Movember</option>
<option value="christmas">Christmas</option>
<option value="newyear">New Year</option>
<option value="saami">Sámi</option>
</select>
</div>
Expand Down Expand Up @@ -1389,7 +1390,7 @@
}
},
christmas: {
dateRange: { startMonth: 11, startDay: 1, endMonth: 11, endDay: 26 }, // Dec 1-26
dateRange: { startMonth: 11, startDay: 1, endMonth: 11, endDay: 29 }, // Dec 1-26
clockFace: 'clock-face-christmas.png',
clockFaceScale: 'cover',
background: 'planks-christmas.png',
Expand All @@ -1413,6 +1414,32 @@
boxShadow: '0 8px 32px rgba(160, 0, 0, 0.3)'
}
},
newyear: {
dateRange: { startMonth: 11, startDay: 30, endMonth: 0, endDay: 4 }, // Dec 30 - Jan 4
clockFace: 'clock-face-newyear.png',
clockFaceScale: 'cover',
background: 'newyear-bg.png',
backgroundSize: 'cover',
backgroundRepeat: 'no-repeat',
backgroundPosition: 'center',
backgroundAttachment: 'fixed',
textColor: '#d3af37', // Gold
centerDotColor: 'radial-gradient(circle, #ffd700 20%, #ffed4e 40%, #daa520 80%, #b8860b 100%)', // Gold gradient
centerDotBorder: '#b8860b', // Dark gold border
handColors: {
hour: 'linear-gradient(to right, #d4b946, #d3af37, #d4b946)', // Gold
minute: 'linear-gradient(to right, #d4b946, #d3af37, #d4b946)', // Gold
second: 'linear-gradient(to bottom, #d4b946, #d3af37, #d4b946)' // Gold
},
clockContainer: {
background: 'rgba(0, 0, 0, 0.15)',
backdropFilter: 'blur(20px)',
borderRadius: '20px',
border: '1px solid rgba(100, 90, 45, 0.5)',
boxShadow: '0 8px 32px rgba(173, 143, 46, 0.3)'
},
handGlow: '0 0 10px #d3af37, 0 0 15px #ad8f2e, 0 0 20px #ad8f2e' // Gold glow effect
},
saami: {
/*
Sámi theme by on@ntnu.no
Expand Down Expand Up @@ -1486,6 +1513,15 @@
if (day >= startDay && day <= endDay) {
return theme;
}
} else if (startMonth > endMonth) {
// Year boundary crossing (e.g., Dec 30 - Jan 4)
if (
(month === startMonth && day >= startDay) ||
(month === endMonth && day <= endDay) ||
(month > startMonth || month < endMonth)
) {
return theme;
}
} else if (
(month === startMonth && day >= startDay) ||
(month === endMonth && day <= endDay) ||
Expand Down
Binary file added newyear-bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5969073

Please sign in to comment.