everydaytracker 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5cee9ac63cc07ef274e90b5508636e70d80104e822de8639a3af643ca7af18b3
4
- data.tar.gz: 71508f4c059233a262f66be11187f11ca8434ee626f13de5c62d0079ccb19a0e
3
+ metadata.gz: 2115db7da463611f79a2f3d1a7fb4de3538133ea1fb45dac01a7cd89190286dc
4
+ data.tar.gz: 657b0a4e4c41c01f7985eb19faafd50ff24aab841aa1cfab9f953894e4c6e6e9
5
5
  SHA512:
6
- metadata.gz: 8d842458e5071def0043f78559a9f930320faa90bedfedf601c8c59c49ca9b1e08e2d0dd8acadbabd1f522a589870739e36c270b3a824ba247f2fb65e6b76b3d
7
- data.tar.gz: f78a3f51e2fb63f5a5e03c338cc0f8845d8f4a187f60365f9161f0d254a9592e9bce0b471c468b6e0f4398535f324c11cd4408563bb682bf997112c9f092bbf7
6
+ metadata.gz: 8e70fe1a9ff1d56fa7919f802e3da55ad517cddb5581b8d6fae11dc622f097b4614f785fe85da80b09789bca03d531a39559a22ee75fcfc974b0b8f9f94eceb4
7
+ data.tar.gz: 0f06497c6fc5e07fe7b6462177886c196f804364a66c003c938cb54541b8730c547bf67fecb4402eaf2e819f3f729af4c61a61fefc590d293c1a1686a67dfa37
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2025 shivam soni
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # everydaytracker
2
+
3
+ Welcome to your new Jekyll theme! In this directory, you'll find the files you need to be able to package up your theme into a gem. Put your layouts in `_layouts`, your includes in `_includes`, your sass files in `_sass` and any other assets in `assets`.
4
+
5
+ To experiment with this code, add some sample content and run `bundle exec jekyll serve` – this directory is setup just like a Jekyll site!
6
+
7
+ TODO: Delete this and the text above, and describe your gem
8
+
9
+ ## Installation
10
+
11
+ Add this line to your Jekyll site's `Gemfile`:
12
+
13
+ ```ruby
14
+ gem "everydaytracker"
15
+ ```
16
+
17
+ And add this line to your Jekyll site's `_config.yml`:
18
+
19
+ ```yaml
20
+ theme: everydaytracker
21
+ ```
22
+
23
+ And then execute:
24
+
25
+ $ bundle
26
+
27
+ Or install it yourself as:
28
+
29
+ $ gem install everydaytracker
30
+
31
+ ## Usage
32
+
33
+ TODO: Write usage instructions here. Describe your available layouts, includes, sass and/or assets.
34
+
35
+ ## Contributing
36
+
37
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/everydaytracker. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](https://www.contributor-covenant.org/) code of conduct.
38
+
39
+ ## Development
40
+
41
+ To set up your environment to develop this theme, run `bundle install`.
42
+
43
+ Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
44
+
45
+ When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
46
+ To add a custom directory to your theme-gem, please edit the regexp in `everydaytracker.gemspec` accordingly.
47
+
48
+ ## License
49
+
50
+ The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,604 @@
1
+ ---
2
+ layout: default
3
+ title: Habit Tracker
4
+ ---
5
+
6
+ <!DOCTYPE html>
7
+ <html lang="en" data-theme="dark">
8
+ <head>
9
+ <meta charset="UTF-8">
10
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
11
+ <title>Habit Tracker</title>
12
+ <style>
13
+ :root {
14
+ /* Dark theme (default) */
15
+ --bg-primary: #1a1a1a;
16
+ --bg-secondary: #242424;
17
+ --bg-tertiary: #333;
18
+ --bg-active: #404040;
19
+ --text-primary: #c0c0c0;
20
+ --text-secondary: #888;
21
+ --shadow: rgba(0, 0, 0, 0.1);
22
+ --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
23
+ }
24
+
25
+ [data-theme="light"] {
26
+ --bg-primary: #f8f9fa;
27
+ --bg-secondary: #ffffff;
28
+ --bg-tertiary: #e9ecef;
29
+ --bg-active: #dee2e6;
30
+ --text-primary: #333333;
31
+ --text-secondary: #6c757d;
32
+ --shadow: rgba(0, 0, 0, 0.05);
33
+ --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
34
+ }
35
+
36
+ * {
37
+ margin: 0;
38
+ padding: 0;
39
+ box-sizing: border-box;
40
+ }
41
+
42
+ body {
43
+ background-color: var(--bg-primary);
44
+ color: var(--text-primary);
45
+ font-family: system-ui, -apple-system, sans-serif;
46
+ min-height: 100vh;
47
+ transition: background-color 0.3s ease, color 0.3s ease;
48
+ }
49
+
50
+ .container {
51
+ width: 100%;
52
+ max-width: 1800px;
53
+ margin: 0 auto;
54
+ padding: 1.5rem;
55
+ display: flex;
56
+ flex-direction: column;
57
+ }
58
+
59
+ .header {
60
+ display: flex;
61
+ justify-content: space-between;
62
+ align-items: center;
63
+ margin-bottom: 1.5rem;
64
+ padding-left: 1.5rem;
65
+ padding-right: 1.5rem;
66
+ }
67
+
68
+ .year {
69
+ font-size: clamp(2rem, 5vw, 3rem);
70
+ text-align: left;
71
+ }
72
+
73
+ .theme-toggle {
74
+ background: none;
75
+ border: none;
76
+ cursor: pointer;
77
+ width: 40px;
78
+ height: 40px;
79
+ display: flex;
80
+ align-items: center;
81
+ justify-content: center;
82
+ border-radius: 50%;
83
+ background-color: var(--bg-secondary);
84
+ color: var(--text-primary);
85
+ transition: background-color 0.2s ease;
86
+ }
87
+
88
+ .theme-toggle:hover {
89
+ background-color: var(--bg-tertiary);
90
+ }
91
+
92
+ .theme-toggle svg {
93
+ width: 24px;
94
+ height: 24px;
95
+ transition: transform 0.3s ease;
96
+ }
97
+
98
+ .main-content {
99
+ display: flex;
100
+ gap: 3rem;
101
+ padding: 0 1rem;
102
+ flex: 1;
103
+ }
104
+
105
+ .categories {
106
+ min-width: 250px;
107
+ flex-shrink: 0;
108
+ background-color: var(--bg-secondary);
109
+ border-radius: 12px;
110
+ padding: 1rem;
111
+ height: fit-content;
112
+ box-shadow: var(--card-shadow);
113
+ position: sticky;
114
+ top: 1.5rem;
115
+ transition: background-color 0.3s ease, box-shadow 0.3s ease;
116
+ }
117
+
118
+ .category {
119
+ display: flex;
120
+ align-items: center;
121
+ gap: 1rem;
122
+ margin-bottom: 0.5rem;
123
+ cursor: pointer;
124
+ font-size: clamp(1rem, 2.5vw, 1.25rem);
125
+ padding: 0.75rem 1rem;
126
+ border-radius: 8px;
127
+ transition: all 0.2s ease;
128
+ }
129
+
130
+ .category:hover {
131
+ background-color: var(--bg-tertiary);
132
+ }
133
+
134
+ .category.active {
135
+ background-color: var(--bg-active);
136
+ }
137
+
138
+ .dot {
139
+ width: clamp(18px, 4.5vw, 24px);
140
+ height: clamp(18px, 4.5vw, 24px);
141
+ border-radius: 50%;
142
+ display: inline-block;
143
+ flex-shrink: 0;
144
+ }
145
+
146
+ .calendar-wrapper {
147
+ flex-grow: 1;
148
+ background-color: var(--bg-secondary);
149
+ border-radius: 12px;
150
+ padding: 2rem;
151
+ display: flex;
152
+ flex-direction: column;
153
+ transition: background-color 0.3s ease;
154
+ box-shadow: var(--card-shadow);
155
+ }
156
+
157
+ .calendar {
158
+ display: grid;
159
+ grid-template-columns: repeat(4, 1fr);
160
+ gap: 2rem;
161
+ align-items: start;
162
+ }
163
+
164
+ .month {
165
+ display: flex;
166
+ flex-direction: column;
167
+ gap: 0.75rem;
168
+ }
169
+
170
+ .month-name {
171
+ color: var(--text-secondary);
172
+ font-size: 1.2rem;
173
+ text-transform: capitalize;
174
+ font-weight: 500;
175
+ height: 1.5rem;
176
+ display: flex;
177
+ align-items: center;
178
+ transition: color 0.3s ease;
179
+ }
180
+
181
+ .days {
182
+ display: grid;
183
+ grid-template-columns: repeat(7, 1fr);
184
+ gap: 8px;
185
+ justify-items: center;
186
+ }
187
+
188
+ .day {
189
+ width: 32px;
190
+ height: 32px;
191
+ border-radius: 50%;
192
+ background-color: var(--bg-tertiary);
193
+ cursor: pointer;
194
+ transition: all 0.2s ease, background-color 0.3s ease;
195
+ position: relative;
196
+ overflow: hidden;
197
+ }
198
+
199
+ .day:hover {
200
+ transform: scale(1.1);
201
+ }
202
+
203
+ .multi-habit {
204
+ background-color: var(--bg-tertiary) !important;
205
+ display: flex !important;
206
+ flex-wrap: wrap;
207
+ align-items: center;
208
+ justify-content: center;
209
+ position: relative;
210
+ overflow: hidden;
211
+ border-radius: 50%;
212
+ width: 100%;
213
+ height: 100%;
214
+ transition: background-color 0.3s ease;
215
+ }
216
+
217
+ .habit-dot {
218
+ width: 6px;
219
+ height: 6px;
220
+ border-radius: 50%;
221
+ margin: 1px;
222
+ }
223
+
224
+ .hidden {
225
+ opacity: 0.2;
226
+ }
227
+
228
+ .tooltip {
229
+ position: absolute;
230
+ background-color: var(--bg-secondary);
231
+ color: var(--text-primary);
232
+ padding: 1rem;
233
+ border-radius: 8px;
234
+ box-shadow: var(--card-shadow);
235
+ z-index: 1000;
236
+ pointer-events: none;
237
+ opacity: 0;
238
+ transition: opacity 0.2s ease, background-color 0.3s ease, color 0.3s ease;
239
+ max-width: 300px;
240
+ }
241
+
242
+ .tooltip.visible {
243
+ opacity: 1;
244
+ }
245
+
246
+ .tooltip-date {
247
+ font-weight: bold;
248
+ margin-bottom: 0.5rem;
249
+ }
250
+
251
+ .tooltip-habits {
252
+ display: flex;
253
+ flex-direction: column;
254
+ gap: 0.5rem;
255
+ }
256
+
257
+ .tooltip-habit {
258
+ display: flex;
259
+ align-items: center;
260
+ gap: 0.5rem;
261
+ }
262
+
263
+ .tooltip-dot {
264
+ width: 12px;
265
+ height: 12px;
266
+ border-radius: 50%;
267
+ }
268
+
269
+ @media (max-width: 1200px) {
270
+ .calendar {
271
+ grid-template-columns: repeat(3, 1fr);
272
+ }
273
+ }
274
+
275
+ @media (max-width: 900px) {
276
+ .calendar {
277
+ grid-template-columns: repeat(2, 1fr);
278
+ }
279
+ }
280
+
281
+ @media (max-width: 600px) {
282
+ .main-content {
283
+ flex-direction: column;
284
+ }
285
+
286
+ .calendar {
287
+ grid-template-columns: 1fr;
288
+ }
289
+
290
+ .categories {
291
+ width: 100%;
292
+ position: static;
293
+ }
294
+ }
295
+ </style>
296
+ </head>
297
+ <body>
298
+ <div class="container">
299
+ <div class="header">
300
+ <div class="year">2025</div>
301
+ <button class="theme-toggle" aria-label="Toggle theme" title="Toggle theme">
302
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="theme-icon">
303
+ <path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" class="moon-icon"></path>
304
+ <circle cx="12" cy="12" r="5" class="sun-icon" style="display:none"></circle>
305
+ <line x1="12" y1="1" x2="12" y2="3" class="sun-icon" style="display:none"></line>
306
+ <line x1="12" y1="21" x2="12" y2="23" class="sun-icon" style="display:none"></line>
307
+ <line x1="4.22" y1="4.22" x2="5.64" y2="5.64" class="sun-icon" style="display:none"></line>
308
+ <line x1="18.36" y1="18.36" x2="19.78" y2="19.78" class="sun-icon" style="display:none"></line>
309
+ <line x1="1" y1="12" x2="3" y2="12" class="sun-icon" style="display:none"></line>
310
+ <line x1="21" y1="12" x2="23" y2="12" class="sun-icon" style="display:none"></line>
311
+ <line x1="4.22" y1="19.78" x2="5.64" y2="18.36" class="sun-icon" style="display:none"></line>
312
+ <line x1="18.36" y1="5.64" x2="19.78" y2="4.22" class="sun-icon" style="display:none"></line>
313
+ </svg>
314
+ </button>
315
+ </div>
316
+ <div class="main-content">
317
+ <div class="categories">
318
+ {% for habit in site.habits %}
319
+ <div class="category" data-category="{{ habit[0] }}">
320
+ <span class="dot" style="background-color: {{ habit[1] }};"></span>
321
+ <span>{{ habit[0] | capitalize }}</span>
322
+ </div>
323
+ {% endfor %}
324
+ <div class="category" data-category="all">
325
+ <span>Show All</span>
326
+ </div>
327
+ </div>
328
+ <div class="calendar-wrapper">
329
+ <div class="calendar"></div>
330
+ <div class="tooltip">
331
+ <div class="tooltip-date"></div>
332
+ <div class="tooltip-habits"></div>
333
+ </div>
334
+ </div>
335
+ </div>
336
+ </div>
337
+
338
+ <script>
339
+ const habits = {
340
+ {% for habit in site.habits %}
341
+ "{{ habit[0] }}": {
342
+ color: "{{ habit[1] }}",
343
+ dates: [
344
+ {% for post in site.posts %}
345
+ {% if post.category == habit[0] %}
346
+ "{{ post.date | date: '%Y-%m-%d' }}"{% unless forloop.last %},{% endunless %}
347
+ {% endif %}
348
+ {% endfor %}
349
+ ]
350
+ }{% unless forloop.last %},{% endunless %}
351
+ {% endfor %}
352
+ };
353
+
354
+ const months = [
355
+ 'january', 'february', 'march', 'april',
356
+ 'may', 'june', 'july', 'august',
357
+ 'september', 'october', 'november', 'december'
358
+ ];
359
+
360
+ const daysPerMonth = {
361
+ january: 31, february: 28, march: 31, april: 30,
362
+ may: 31, june: 30, july: 31, august: 31,
363
+ september: 30, october: 31, november: 30, december: 31
364
+ };
365
+
366
+ function getDateString(year, month, day) {
367
+ return `${year}-${String(month + 1).padStart(2, '0')}-${String(day).padStart(2, '0')}`;
368
+ }
369
+
370
+ function createMultiHabitDay(activeHabits) {
371
+ const wrapper = document.createElement('div');
372
+ wrapper.className = 'multi-habit';
373
+
374
+ // For two habits
375
+ if (activeHabits.length === 2) {
376
+ activeHabits.forEach(habit => {
377
+ const dot = document.createElement('span');
378
+ dot.className = 'habit-dot';
379
+ dot.style.backgroundColor = habits[habit].color;
380
+ wrapper.appendChild(dot);
381
+ });
382
+ }
383
+ // For three habits - triangle arrangement
384
+ else if (activeHabits.length === 3) {
385
+ const container = document.createElement('div');
386
+ container.style.cssText = 'display: flex; flex-direction: column; align-items: center; padding: 4px;';
387
+
388
+ // Top dot
389
+ const topDot = document.createElement('span');
390
+ topDot.className = 'habit-dot';
391
+ topDot.style.backgroundColor = habits[activeHabits[0]].color;
392
+ container.appendChild(topDot);
393
+
394
+ // Bottom two dots container
395
+ const bottomRow = document.createElement('div');
396
+ bottomRow.style.cssText = 'display: flex; gap: 2px; margin-top: 1px;';
397
+
398
+ activeHabits.slice(1).forEach(habit => {
399
+ const dot = document.createElement('span');
400
+ dot.className = 'habit-dot';
401
+ dot.style.backgroundColor = habits[habit].color;
402
+ bottomRow.appendChild(dot);
403
+ });
404
+
405
+ container.appendChild(bottomRow);
406
+ wrapper.appendChild(container);
407
+ }
408
+ // For four or more habits
409
+ else {
410
+ const container = document.createElement('div');
411
+ container.style.cssText = 'display: flex; flex-wrap: wrap; gap: 1px; padding: 4px; justify-content: center;';
412
+
413
+ activeHabits.forEach(habit => {
414
+ const dot = document.createElement('span');
415
+ dot.className = 'habit-dot';
416
+ dot.style.backgroundColor = habits[habit].color;
417
+ container.appendChild(dot);
418
+ });
419
+
420
+ wrapper.appendChild(container);
421
+ }
422
+
423
+ return wrapper.outerHTML;
424
+ }
425
+
426
+ function createCalendar() {
427
+ const calendar = document.querySelector('.calendar');
428
+ const year = 2025;
429
+
430
+ // Create all month containers first with consistent structure
431
+ months.forEach((monthName, monthIndex) => {
432
+ const monthDiv = document.createElement('div');
433
+ monthDiv.className = 'month';
434
+ monthDiv.setAttribute('data-month', monthName);
435
+
436
+ const monthNameDiv = document.createElement('div');
437
+ monthNameDiv.className = 'month-name';
438
+ monthNameDiv.textContent = monthName;
439
+
440
+ const daysDiv = document.createElement('div');
441
+ daysDiv.className = 'days';
442
+
443
+ monthDiv.appendChild(monthNameDiv);
444
+ monthDiv.appendChild(daysDiv);
445
+ calendar.appendChild(monthDiv);
446
+ });
447
+
448
+ // Then populate each month with days
449
+ months.forEach((monthName, monthIndex) => {
450
+ const daysDiv = document.querySelector(`.month[data-month="${monthName}"] .days`);
451
+
452
+ for (let i = 1; i <= daysPerMonth[monthName]; i++) {
453
+ const dateStr = getDateString(year, monthIndex, i);
454
+ const activeHabits = Object.keys(habits).filter(habit =>
455
+ habits[habit].dates.includes(dateStr)
456
+ );
457
+
458
+ const dayDiv = document.createElement('div');
459
+ dayDiv.className = 'day';
460
+
461
+ if (activeHabits.length > 0) {
462
+ if (activeHabits.length === 1) {
463
+ dayDiv.style.backgroundColor = habits[activeHabits[0]].color;
464
+ } else {
465
+ dayDiv.innerHTML = createMultiHabitDay(activeHabits);
466
+ }
467
+
468
+ dayDiv.setAttribute('data-date', dateStr);
469
+ activeHabits.forEach(habit => {
470
+ dayDiv.setAttribute(`data-${habit}`, true);
471
+ });
472
+ }
473
+
474
+ daysDiv.appendChild(dayDiv);
475
+ }
476
+ });
477
+ }
478
+
479
+ function initializeTooltips() {
480
+ const tooltip = document.querySelector('.tooltip');
481
+ const days = document.querySelectorAll('.day[data-date]');
482
+
483
+ days.forEach(day => {
484
+ day.addEventListener('mouseenter', (e) => {
485
+ const date = new Date(day.dataset.date);
486
+ const activeHabits = Object.keys(habits).filter(habit =>
487
+ day.hasAttribute(`data-${habit}`)
488
+ );
489
+
490
+ tooltip.querySelector('.tooltip-date').textContent =
491
+ date.toLocaleDateString('en-US', {
492
+ weekday: 'short',
493
+ month: 'short',
494
+ day: 'numeric'
495
+ });
496
+
497
+ tooltip.querySelector('.tooltip-habits').innerHTML =
498
+ activeHabits.map(habit => `
499
+ <div class="tooltip-habit">
500
+ <span class="tooltip-dot" style="background-color: ${habits[habit].color}"></span>
501
+ <span>${habit.charAt(0).toUpperCase() + habit.slice(1)}</span>
502
+ </div>
503
+ `).join('');
504
+
505
+ const rect = day.getBoundingClientRect();
506
+ const tooltipRect = tooltip.getBoundingClientRect();
507
+
508
+ let left = rect.left + window.scrollX - tooltipRect.width / 2 + rect.width / 2;
509
+ let top = rect.top + window.scrollY - tooltipRect.height - 10;
510
+
511
+ if (left < 0) left = 0;
512
+ if (left + tooltipRect.width > window.innerWidth) {
513
+ left = window.innerWidth - tooltipRect.width;
514
+ }
515
+ if (top < 0) {
516
+ top = rect.bottom + window.scrollY + 10;
517
+ }
518
+
519
+ tooltip.style.left = `${left}px`;
520
+ tooltip.style.top = `${top}px`;
521
+ tooltip.classList.add('visible');
522
+ });
523
+
524
+ day.addEventListener('mouseleave', () => {
525
+ tooltip.classList.remove('visible');
526
+ });
527
+ });
528
+ }
529
+
530
+ function initializeFilters() {
531
+ const categories = document.querySelectorAll('.category');
532
+ categories.forEach(category => {
533
+ category.addEventListener('click', () => {
534
+ categories.forEach(c => c.classList.remove('active'));
535
+ category.classList.add('active');
536
+
537
+ const selectedCategory = category.dataset.category;
538
+ const days = document.querySelectorAll('.day');
539
+
540
+ days.forEach(day => {
541
+ if (selectedCategory === 'all') {
542
+ day.classList.remove('hidden');
543
+ } else {
544
+ if (!day.hasAttribute(`data-${selectedCategory}`)) {
545
+ day.classList.add('hidden');
546
+ } else {
547
+ day.classList.remove('hidden');
548
+ }
549
+ }
550
+ });
551
+ });
552
+ });
553
+
554
+ // Set "Show All" as initially active
555
+ document.querySelector('[data-category="all"]').classList.add('active');
556
+ }
557
+
558
+ function initializeThemeToggle() {
559
+ const themeToggle = document.querySelector('.theme-toggle');
560
+ const moonIcon = document.querySelector('.moon-icon');
561
+ const sunIconElements = document.querySelectorAll('.sun-icon');
562
+ const htmlElement = document.documentElement;
563
+
564
+ // Check for saved theme preference or use system preference
565
+ const savedTheme = localStorage.getItem('theme');
566
+ if (savedTheme) {
567
+ htmlElement.setAttribute('data-theme', savedTheme);
568
+ updateThemeIcon(savedTheme);
569
+ } else {
570
+ // Check system preference
571
+ const prefersDarkScheme = window.matchMedia('(prefers-color-scheme: dark)').matches;
572
+ const systemTheme = prefersDarkScheme ? 'dark' : 'light';
573
+ htmlElement.setAttribute('data-theme', systemTheme);
574
+ updateThemeIcon(systemTheme);
575
+ }
576
+
577
+ themeToggle.addEventListener('click', () => {
578
+ const currentTheme = htmlElement.getAttribute('data-theme');
579
+ const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
580
+
581
+ htmlElement.setAttribute('data-theme', newTheme);
582
+ localStorage.setItem('theme', newTheme);
583
+ updateThemeIcon(newTheme);
584
+ });
585
+
586
+ function updateThemeIcon(theme) {
587
+ if (theme === 'dark') {
588
+ moonIcon.style.display = 'block';
589
+ sunIconElements.forEach(el => el.style.display = 'none');
590
+ } else {
591
+ moonIcon.style.display = 'none';
592
+ sunIconElements.forEach(el => el.style.display = 'block');
593
+ }
594
+ }
595
+ }
596
+
597
+ // Initialize everything
598
+ createCalendar();
599
+ initializeTooltips();
600
+ initializeFilters();
601
+ initializeThemeToggle();
602
+ </script>
603
+ </body>
604
+ </html>
@@ -0,0 +1,5 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ {{ content }}
@@ -0,0 +1,5 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ {{ content }}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: everydaytracker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - shivam soni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-02-20 00:00:00.000000000 Z
11
+ date: 2025-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -16,22 +16,27 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.4'
19
+ version: '3.4'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '4.4'
26
+ version: '3.4'
27
27
  description:
28
28
  email:
29
29
  - shivamsoni.soni3@gmail.com
30
30
  executables: []
31
31
  extensions: []
32
32
  extra_rdoc_files: []
33
- files: []
34
- homepage: https://i-shivamsoni.github.io/habit-tracker-theme/
33
+ files:
34
+ - LICENSE.txt
35
+ - README.md
36
+ - _layouts/default.html
37
+ - _layouts/page.html
38
+ - _layouts/post.html
39
+ homepage: https://github.com/i-shivamsoni/everydaytracker
35
40
  licenses:
36
41
  - MIT
37
42
  metadata: {}