|
29 | 29 | })() |
30 | 30 | </script> |
31 | 31 |
|
32 | | -<div class="space-y-4 print:space-y-2"> |
33 | | - <!-- Header --> |
34 | | - <section class="hero bg-base-200 rounded-lg p-8 print:p-4 print:bg-white"> |
35 | | - <div class="hero-content text-center"> |
36 | | - <div> |
37 | | - <h1 class="text-4xl font-bold print:text-2xl"> |
38 | | - <a href="https://timetrack.mwco.app">timetrack</a> |
39 | | - </h1> |
40 | | - </div> |
41 | | - </div> |
42 | | - </section> |
43 | | - |
| 32 | +<div class="space-y-2"> |
44 | 33 | <!-- Tasks List --> |
45 | | - {#each pdfDocument as item (`${item.companyName}-${item.projectName}-${item.name}-${item.date}`)} |
46 | | - <div |
47 | | - class="card bg-base-200 shadow-xl print:bg-white print:shadow-none print:border print:border-gray-300" |
48 | | - > |
49 | | - <div class="card-body print:p-4"> |
50 | | - <h3 class="text-sm font-semibold text-base-content/70 print:text-xs"> |
| 34 | + {#each pdfDocument as item (item.id)} |
| 35 | + <div class="card shadow-xl border"> |
| 36 | + <div class="card-body p-4"> |
| 37 | + <h3 class="font-semibold text-xs"> |
51 | 38 | {item.companyName} |
52 | 39 | </h3> |
53 | | - <h2 class="card-title print:text-xl">{item.projectName}</h2> |
54 | | - <p class="text-lg font-semibold print:text-base">{item.name}</p> |
| 40 | + <h2 class="card-title text-xl">{item.projectName}</h2> |
| 41 | + <p class="font-semibold text-base">{item.name}</p> |
55 | 42 | {#if item.description} |
56 | | - <div class="prose max-w-none markdown-content print:text-sm"> |
| 43 | + <div class="prose max-w-none markdown-content text-sm"> |
57 | 44 | <!-- eslint-disable-next-line svelte/no-at-html-tags --> |
58 | 45 | {@html item.description} |
59 | 46 | </div> |
60 | 47 | {/if} |
61 | | - <div class="flex gap-4 mt-2 print:text-sm"> |
| 48 | + <div class="flex gap-4 mt-2 text-sm"> |
62 | 49 | <div class="flex items-center gap-2"> |
63 | | - <i class="fa-solid fa-calendar print:hidden"></i> |
| 50 | + <i class="fa-solid fa-calendar hidden"></i> |
64 | 51 | <time datetime={item.date}>{item.date}</time> |
65 | 52 | </div> |
66 | 53 | <div class="flex items-center gap-2"> |
67 | | - <i class="fa-solid fa-clock print:hidden"></i> |
| 54 | + <i class="fa-solid fa-clock hidden"></i> |
68 | 55 | <span>Time spent: {getHMSStringFromSeconds(item.seconds)}</span> |
69 | 56 | </div> |
70 | 57 | </div> |
|
73 | 60 | {/each} |
74 | 61 |
|
75 | 62 | <!-- Total View --> |
76 | | - <section |
77 | | - class="hero bg-base-200 rounded-lg p-8 print:p-4 print:bg-white print:mt-8" |
78 | | - > |
| 63 | + <section class="hero rounded-lg p-4 mt-8"> |
79 | 64 | <div class="hero-content"> |
80 | 65 | <div> |
81 | | - <h2 class="text-3xl font-bold print:text-xl">Total Time</h2> |
82 | | - <p class="text-lg mt-2 print:text-sm"> |
| 66 | + <h2 class="font-bold text-xl">Total Time</h2> |
| 67 | + <p class="mt-2 text-sm"> |
83 | 68 | Total time spent on projects and tasks combined. |
84 | 69 | </p> |
85 | 70 | </div> |
86 | 71 | </div> |
87 | 72 | </section> |
88 | 73 |
|
89 | 74 | {#each Object.keys(total) as companyName (companyName)} |
90 | | - <div |
91 | | - class="card bg-base-200 shadow-xl print:bg-white print:shadow-none print:border print:border-gray-300" |
92 | | - > |
93 | | - <div class="card-body print:p-4"> |
94 | | - <h2 class="card-title print:text-xl">{companyName}</h2> |
| 75 | + <div class="card shadow-xl border"> |
| 76 | + <div class="card-body p-4"> |
| 77 | + <h2 class="card-title text-xl">{companyName}</h2> |
95 | 78 | {#each Object.keys(total[companyName]) as projectName (projectName)} |
96 | 79 | <div class="mt-4"> |
97 | | - <h3 class="text-lg font-semibold print:text-base mb-2"> |
| 80 | + <h3 class="font-semibold text-base mb-2"> |
98 | 81 | {projectName} |
99 | 82 | </h3> |
100 | | - <div class="space-y-2 print:text-sm ml-4"> |
| 83 | + <div class="space-y-2 text-sm ml-4"> |
101 | 84 | {#each Object.keys(total[companyName][projectName]) as taskName (taskName)} |
102 | 85 | <div class="flex justify-between items-center"> |
103 | 86 | <span class="font-semibold">{taskName}</span> |
104 | | - <span |
105 | | - class="badge badge-primary badge-lg print:badge-sm print:bg-gray-200 print:text-gray-800" |
106 | | - > |
| 87 | + <span class="badge badge-primary badge-sm text-base"> |
107 | 88 | {getHMSStringFromSeconds( |
108 | 89 | total[companyName][projectName][taskName], |
109 | 90 | )} |
|
116 | 97 | </div> |
117 | 98 | </div> |
118 | 99 | {/each} |
| 100 | + |
| 101 | + <!-- Powered by header --> |
| 102 | + <section class="hero rounded-lg p-4"> |
| 103 | + <div class="hero-content text-center"> |
| 104 | + <div> |
| 105 | + <h1 class="font-bold text-sm"> |
| 106 | + Generated with ♥️ <a href="https://timetrack.mwco.app">timetrack</a> |
| 107 | + </h1> |
| 108 | + </div> |
| 109 | + </div> |
| 110 | + </section> |
119 | 111 | </div> |
0 commit comments