@@ -291,16 +291,30 @@ function renderTowers(
291291 const strokeAttr = isGhost
292292 ? `stroke="${ strokeColor } " stroke-opacity="${ t . strokeOpacity } " stroke-width="${ t . strokeWidth } "`
293293 : '' ;
294+
295+ let leftStrokeAttr = strokeAttr ;
296+ let rightStrokeAttr = strokeAttr ;
297+ let topStrokeAttr = strokeAttr ;
298+
299+ if ( t . isToday && t . contributionCount === 0 ) {
300+ const todayStrokeColor = isAutoTheme ? 'var(--cp-accent)' : strokeColor ;
301+ leftStrokeAttr = isGhost
302+ ? `stroke="${ strokeColor } " stroke-opacity="${ t . strokeOpacity } " stroke-width="${ t . strokeWidth } "`
303+ : '' ;
304+ rightStrokeAttr = leftStrokeAttr ;
305+ topStrokeAttr = `stroke="${ todayStrokeColor } " stroke-opacity="0.8" stroke-width="${ 1.2 * sf } "` ;
306+ }
307+
294308 const delay = ( ( t . row + t . col ) * 0.015 ) . toFixed ( 3 ) ;
295309
296310 towers += `
297311 <g transform="translate(${ t . x } , ${ t . y } )">
298312 <g class="cp-tower" style="animation-delay: ${ delay } s;">
299- ${ t . isTodayWithCommits ? '<animate attributeName="opacity" values="1;0.4;1" dur="1.5s" repeatCount="indefinite" />' : '' }
313+ ${ t . isToday ? '<animate attributeName="opacity" values="1;0.4;1" dur="1.5s" repeatCount="indefinite" />' : '' }
300314 <title>${ escapeXML ( t . tooltip ) } </title>
301- <path d="M0 ${ 10 - t . h } L0 10 L-16 0 L-16 ${ - t . h } Z" ${ leftFillAttr } fill-opacity="${ leftFaceOpacity } " ${ strokeAttr } />
302- <path d="M0 ${ 10 - t . h } L0 10 L16 0 L16 ${ - t . h } Z" ${ rightFillAttr } fill-opacity="${ rightFaceOpacity } " ${ strokeAttr } />
303- <path d="M0 ${ - t . h } L16 ${ 10 - t . h } L0 ${ 20 - t . h } L-16 ${ 10 - t . h } Z" ${ finalTopFillAttr } fill-opacity="${ topFaceOpacity } " ${ strokeAttr } />
315+ <path d="M0 ${ 10 - t . h } L0 10 L-16 0 L-16 ${ - t . h } Z" ${ leftFillAttr } fill-opacity="${ leftFaceOpacity } " ${ leftStrokeAttr } />
316+ <path d="M0 ${ 10 - t . h } L0 10 L16 0 L16 ${ - t . h } Z" ${ rightFillAttr } fill-opacity="${ rightFaceOpacity } " ${ rightStrokeAttr } />
317+ <path d="M0 ${ - t . h } L16 ${ 10 - t . h } L0 ${ 20 - t . h } L-16 ${ 10 - t . h } Z" ${ finalTopFillAttr } fill-opacity="${ topFaceOpacity } " ${ topStrokeAttr } />
304318 ${ t . contributionCount > 5 ? `<path d="M0 ${ - t . h } L16 ${ 10 - t . h } L0 ${ 20 - t . h } L-16 ${ 10 - t . h } Z" fill="white" fill-opacity="0.2" />` : '' }
305319 </g>
306320 </g>` ;
@@ -1101,14 +1115,27 @@ function generateAutoThemeVersusSVG(
11011115 const fillClass = t . isGhost ? 'cp-text-fill' : 'cp-accent-fill' ;
11021116 const strokeColor = t . isGhost ? 'var(--cp-text)' : 'var(--cp-accent)' ;
11031117 const delay = ( ( t . row + t . col ) * 0.015 ) . toFixed ( 3 ) ;
1118+
1119+ let leftStrokeAttr = `stroke="${ strokeColor } " stroke-opacity="${ t . strokeOpacity } " stroke-width="${ t . strokeWidth } "` ;
1120+ let rightStrokeAttr = leftStrokeAttr ;
1121+ let topStrokeAttr = leftStrokeAttr ;
1122+
1123+ if ( t . isToday && t . contributionCount === 0 ) {
1124+ leftStrokeAttr = t . isGhost
1125+ ? `stroke="${ strokeColor } " stroke-opacity="${ t . strokeOpacity } " stroke-width="${ t . strokeWidth } "`
1126+ : '' ;
1127+ rightStrokeAttr = leftStrokeAttr ;
1128+ topStrokeAttr = `stroke="var(--cp-accent)" stroke-opacity="0.8" stroke-width="${ 1.2 * sf } "` ;
1129+ }
1130+
11041131 towers1 += `
11051132 <g transform="translate(${ t . x } , ${ t . y } )">
11061133 <g class="cp-tower" style="animation-delay: ${ delay } s;">
1107- ${ t . isTodayWithCommits ? '<animate attributeName="opacity" values="1;0.4;1" dur="1.5s" repeatCount="indefinite" />' : '' }
1134+ ${ t . isToday ? '<animate attributeName="opacity" values="1;0.4;1" dur="1.5s" repeatCount="indefinite" />' : '' }
11081135 <title>${ escapeXML ( t . tooltip ) } </title>
1109- <path d="M0 ${ 10 - t . h } L0 10 L-16 0 L-16 ${ - t . h } Z" class="${ fillClass } " fill-opacity="${ t . faceOpacity . left } " stroke=" ${ strokeColor } " stroke-opacity=" ${ t . strokeOpacity } " stroke-width=" ${ t . strokeWidth } " />
1110- <path d="M0 ${ 10 - t . h } L0 10 L16 0 L16 ${ - t . h } Z" class="${ fillClass } " fill-opacity="${ t . faceOpacity . right } " stroke=" ${ strokeColor } " stroke-opacity=" ${ t . strokeOpacity } " stroke-width=" ${ t . strokeWidth } " />
1111- <path d="M0 ${ - t . h } L16 ${ 10 - t . h } L0 ${ 20 - t . h } L-16 ${ 10 - t . h } Z" class="${ fillClass } " fill-opacity="${ t . faceOpacity . top } " stroke=" ${ strokeColor } " stroke-opacity=" ${ t . strokeOpacity } " stroke-width=" ${ t . strokeWidth } " />
1136+ <path d="M0 ${ 10 - t . h } L0 10 L-16 0 L-16 ${ - t . h } Z" class="${ fillClass } " fill-opacity="${ t . faceOpacity . left } " ${ leftStrokeAttr } />
1137+ <path d="M0 ${ 10 - t . h } L0 10 L16 0 L16 ${ - t . h } Z" class="${ fillClass } " fill-opacity="${ t . faceOpacity . right } " ${ rightStrokeAttr } />
1138+ <path d="M0 ${ - t . h } L16 ${ 10 - t . h } L0 ${ 20 - t . h } L-16 ${ 10 - t . h } Z" class="${ fillClass } " fill-opacity="${ t . faceOpacity . top } " ${ topStrokeAttr } />
11121139 ${ t . contributionCount > 5 ? `<path d="M0 ${ - t . h } L16 ${ 10 - t . h } L0 ${ 20 - t . h } L-16 ${ 10 - t . h } Z" fill="white" fill-opacity="0.2" />` : '' }
11131140 </g>
11141141 </g>` ;
@@ -1121,14 +1148,27 @@ function generateAutoThemeVersusSVG(
11211148 const fillClass = t . isGhost ? 'cp-text-fill' : 'cp-accent-fill' ;
11221149 const strokeColor = t . isGhost ? 'var(--cp-text)' : 'var(--cp-accent)' ;
11231150 const delay = ( ( t . row + t . col ) * 0.015 ) . toFixed ( 3 ) ;
1151+
1152+ let leftStrokeAttr = `stroke="${ strokeColor } " stroke-opacity="${ t . strokeOpacity } " stroke-width="${ t . strokeWidth } "` ;
1153+ let rightStrokeAttr = leftStrokeAttr ;
1154+ let topStrokeAttr = leftStrokeAttr ;
1155+
1156+ if ( t . isToday && t . contributionCount === 0 ) {
1157+ leftStrokeAttr = t . isGhost
1158+ ? `stroke="${ strokeColor } " stroke-opacity="${ t . strokeOpacity } " stroke-width="${ t . strokeWidth } "`
1159+ : '' ;
1160+ rightStrokeAttr = leftStrokeAttr ;
1161+ topStrokeAttr = `stroke="var(--cp-accent)" stroke-opacity="0.8" stroke-width="${ 1.2 * sf } "` ;
1162+ }
1163+
11241164 towers2 += `
11251165 <g transform="translate(${ t . x } , ${ t . y } )">
11261166 <g class="cp-tower" style="animation-delay: ${ delay } s;">
1127- ${ t . isTodayWithCommits ? '<animate attributeName="opacity" values="1;0.4;1" dur="1.5s" repeatCount="indefinite" />' : '' }
1167+ ${ t . isToday ? '<animate attributeName="opacity" values="1;0.4;1" dur="1.5s" repeatCount="indefinite" />' : '' }
11281168 <title>${ escapeXML ( t . tooltip ) } </title>
1129- <path d="M0 ${ 10 - t . h } L0 10 L-16 0 L-16 ${ - t . h } Z" class="${ fillClass } " fill-opacity="${ t . faceOpacity . left } " stroke=" ${ strokeColor } " stroke-opacity=" ${ t . strokeOpacity } " stroke-width=" ${ t . strokeWidth } " />
1130- <path d="M0 ${ 10 - t . h } L0 10 L16 0 L16 ${ - t . h } Z" class="${ fillClass } " fill-opacity="${ t . faceOpacity . right } " stroke=" ${ strokeColor } " stroke-opacity=" ${ t . strokeOpacity } " stroke-width=" ${ t . strokeWidth } " />
1131- <path d="M0 ${ - t . h } L16 ${ 10 - t . h } L0 ${ 20 - t . h } L-16 ${ 10 - t . h } Z" class="${ fillClass } " fill-opacity="${ t . faceOpacity . top } " stroke=" ${ strokeColor } " stroke-opacity=" ${ t . strokeOpacity } " stroke-width=" ${ t . strokeWidth } " />
1169+ <path d="M0 ${ 10 - t . h } L0 10 L-16 0 L-16 ${ - t . h } Z" class="${ fillClass } " fill-opacity="${ t . faceOpacity . left } " ${ leftStrokeAttr } />
1170+ <path d="M0 ${ 10 - t . h } L0 10 L16 0 L16 ${ - t . h } Z" class="${ fillClass } " fill-opacity="${ t . faceOpacity . right } " ${ rightStrokeAttr } />
1171+ <path d="M0 ${ - t . h } L16 ${ 10 - t . h } L0 ${ 20 - t . h } L-16 ${ 10 - t . h } Z" class="${ fillClass } " fill-opacity="${ t . faceOpacity . top } " ${ topStrokeAttr } />
11321172 ${ t . contributionCount > 5 ? `<path d="M0 ${ - t . h } L16 ${ 10 - t . h } L0 ${ 20 - t . h } L-16 ${ 10 - t . h } Z" fill="white" fill-opacity="0.2" />` : '' }
11331173 </g>
11341174 </g>` ;
0 commit comments