-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use custom html component elements
- Loading branch information
Showing
6 changed files
with
91 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
<div class="py-6 space-y-6 rounded-2xl mx-auto bg-gray-800 text-white text-center max-w-3xl sm:text-left font-mono"> | ||
<div class="pb-6 px-6 border-b-2 border-zinc-400 text-center text-lg sm:text-2xl"> | ||
<fitness-card class="block py-6 space-y-6 rounded-2xl mx-auto bg-gray-800 text-white text-center max-w-3xl sm:text-left font-mono"> | ||
<fitness-card-header class="block pb-6 px-6 border-b-2 border-zinc-400 text-center text-lg sm:text-2xl"> | ||
{% renderFile './src/components/header.njk', { date: date } %} | ||
</div> | ||
</fitness-card-header> | ||
|
||
<div class="flex flex-col gap-4 items-center px-6 sm:flex-row sm:justify-evenly"> | ||
<fitness-card-content class="flex flex-col gap-4 items-center px-6 sm:flex-row sm:justify-evenly"> | ||
<div> | ||
{% renderFile './src/components/details.njk', { move: move, exercise: exercise, stand: stand } %} | ||
</div> | ||
|
||
<div class="relative w-full max-w-xs"> | ||
{% renderFile './src/components/ring.njk', { move: move, exercise: exercise, stand: stand } %} | ||
</div> | ||
</div> | ||
</fitness-card-content> | ||
|
||
<div class="pt-6 px-6 border-t-2 border-zinc-400"> | ||
{% renderFile './src/components/footer.njk', { steps: step_count, distance: distance, flights: flights_climbed } %} | ||
</div> | ||
</div> | ||
<fitness-card-footer class="block pt-6 px-6 border-t-2 border-zinc-400"> | ||
{% renderFile './src/components/footer.njk', { steps: steps, distance: distance, flights: flights } %} | ||
</fitness-card-footer> | ||
</fitness-card> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,24 @@ | ||
<fitness-ring class="relative block mx-auto" data=""> | ||
<svg viewBox="0 0 36 36" data-stand="{{ stand | percent }}" data-exercise="{{ exercise | percent }}" data-move="{{ move | percent }}"> | ||
<g class="origin-center -rotate-90"> | ||
<circle stroke-width="3" r="16" class="stroke-move scale-100 fill-transparent translate-x-1/2 translate-y-1/2 opacity-25"/> | ||
<circle stroke-width="3" r="16" class="stroke-move scale-100 fill-transparent translate-x-1/2 translate-y-1/2 animate-move" stroke-linecap="round" stroke-dashoffset="{{ move | percent | max }}" stroke-dasharray="{{ move | percent | max }}, 100"/> | ||
</g> | ||
|
||
<svg viewBox="0 0 36 36" class="relative block mx-auto" data-stand="{{ stand | percent }}" data-exercise="{{ exercise | percent }}" data-move="{{ move | percent }}"> | ||
<g class="origin-center -rotate-90"> | ||
<circle stroke-width="3" r="16" class="stroke-move scale-100 fill-transparent translate-x-1/2 translate-y-1/2 opacity-25"/> | ||
<circle stroke-width="3" r="16" class="stroke-move scale-100 fill-transparent translate-x-1/2 translate-y-1/2 animate-move" stroke-linecap="round" stroke-dashoffset="{{ move | percent | max }}" stroke-dasharray="{{ move | percent | max }}, 100"/> | ||
</g> | ||
<g class="origin-center -rotate-90"> | ||
<circle stroke-width="4" r="16" class="stroke-exercise scale-75 fill-transparent translate-x-1/2 translate-y-1/2 opacity-25"/> | ||
<circle stroke-width="4" r="16" class="stroke-exercise scale-75 fill-transparent translate-x-1/2 translate-y-1/2 animate-exercise" stroke-linecap="round" stroke-dashoffset="{{ exercise | percent | max }}" stroke-dasharray="{{ exercise | percent | max }}, 100"/> | ||
</g> | ||
|
||
<g class="origin-center -rotate-90"> | ||
<circle stroke-width="4" r="16" class="stroke-exercise scale-75 fill-transparent translate-x-1/2 translate-y-1/2 opacity-25"/> | ||
<circle stroke-width="4" r="16" class="stroke-exercise scale-75 fill-transparent translate-x-1/2 translate-y-1/2 animate-exercise" stroke-linecap="round" stroke-dashoffset="{{ exercise | percent | max }}" stroke-dasharray="{{ exercise | percent | max }}, 100"/> | ||
</g> | ||
<g class="origin-center -rotate-90"> | ||
<circle stroke-width="6" r="16" class="stroke-stand scale-50 fill-transparent translate-x-1/2 translate-y-1/2 opacity-25"/> | ||
<circle stroke-width="6" r="16" class="stroke-stand scale-50 fill-transparent translate-x-1/2 translate-y-1/2 animate-stand" stroke-linecap="round" stroke-dashoffset="{{ stand | percent | max }}" stroke-dasharray="{{ stand | percent | max }}, 100"/> | ||
</g> | ||
|
||
<g class="origin-center -rotate-90"> | ||
<circle stroke-width="6" r="16" class="stroke-stand scale-50 fill-transparent translate-x-1/2 translate-y-1/2 opacity-25"/> | ||
<circle stroke-width="6" r="16" class="stroke-stand scale-50 fill-transparent translate-x-1/2 translate-y-1/2 animate-stand" stroke-linecap="round" stroke-dashoffset="{{ stand | percent | max }}" stroke-dasharray="{{ stand | percent | max }}, 100"/> | ||
</g> | ||
|
||
{% svg 'move', { width: 2, height: 2, x: 17, y: 1, class: 'stroke-white fill-white @apply animate-pulse-once' } %} | ||
{% svg 'exercise', { width: 2, height: 2, x: 17, y: 5, class: 'stroke-white fill-white @apply animate-pulse-once' } %} | ||
{% svg 'stand', { width: 2, height: 2, x: 17, y: 9, class: 'stroke-white fill-white @apply animate-pulse-once' } %} | ||
</svg> | ||
{% if true if showIcons else true %} | ||
{% svg 'move', { width: 2, height: 2, x: 17, y: 1, class: 'stroke-white fill-white @apply animate-pulse-once' } %} | ||
{% svg 'exercise', { width: 2, height: 2, x: 17, y: 5, class: 'stroke-white fill-white @apply animate-pulse-once' } %} | ||
{% svg 'stand', { width: 2, height: 2, x: 17, y: 9, class: 'stroke-white fill-white @apply animate-pulse-once' } %} | ||
{% endif %} | ||
</svg> | ||
</fitness-ring> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters