Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(ui) Animated Cooking Pot #827

Draft
wants to merge 1 commit into
base: devel
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions src/components/JamCookingPot.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
.jamPotG1 {
animation: jamPotG1Opacity 600ms linear infinite alternate backwards;
}

@keyframes jamPotG1Opacity {
0% {
opacity: 1;
animation-timing-function: cubic-bezier(0.47, 0, 0.745, 0.715);
}

23.333333% {
opacity: 0.25;
animation-timing-function: cubic-bezier(0.47, 0, 0.745, 0.715);
}

50% {
opacity: 0;
animation-timing-function: cubic-bezier(0.47, 0, 0.745, 0.715);
}

78.333333% {
opacity: 0.25;
animation-timing-function: cubic-bezier(0.47, 0, 0.745, 0.715);
}

100% {
opacity: 0.99;
}
}

.jamPotG3Tr {
animation: jamPotG3TrRotate 600ms linear infinite alternate backwards;
}

@keyframes jamPotG3TrRotate {
0% {
transform: translate(130.297994px, 50.531002px) rotate(0deg);
animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
}

50% {
transform: translate(130.297994px, 50.531002px) rotate(-6.125808deg);
animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
}

100% {
transform: translate(130.297994px, 50.531002px) rotate(0deg);
}
}

.jamPotPath4Tr {
animation: jamPotPath4TrRotate 600ms linear infinite alternate backwards;
}

@keyframes jamPotPath4TrRotate {
0% {
transform: translate(17.805756px, 38.861973px) rotate(0deg);
animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
}

50% {
transform: translate(17.805756px, 38.861973px) rotate(-3.629421deg);
animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
}

100% {
transform: translate(17.805756px, 38.861973px) rotate(0deg);
}
}
278 changes: 278 additions & 0 deletions src/components/JamCookingPot.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,278 @@
import { SVGProps } from 'react'
import styles from './JamCookingPot.module.css'

const JamCookingPot = (props: SVGProps<SVGSVGElement>) => (
<>
<svg
xmlns="http://www.w3.org/2000/svg"
id="jam-pot"
shapeRendering="geometricPrecision"
textRendering="geometricPrecision"
viewBox="0 0 156 117"
{...props}
>
<path
id="jam-pot-s-path1"
fill="none"
stroke="currentColor"
strokeWidth={2.5}
d="M138 50.531h10.75a5.25 5.25 0 1 0 0-10.5H138v59c0 8.837-7.163 16-16 16H34c-8.837 0-16-7.163-16-16v-59H7.25a5.25 5.25 0 1 0 0 10.5H18"
/>
<g mask="url(#jam-pot-u-a)" className={styles.jamPotG1}>
<g id="jam-pot-s-g2">
<rect
id="jam-pot-s-rect1"
width={1}
height={71.321}
rx={1}
ry={1}
transform="rotate(45 -8.296 177.665)"
stroke="currentColor"
strokeWidth={1.5}
/>
<rect
id="jam-pot-s-rect2"
width={1}
height={71.293}
rx={1}
ry={1}
transform="rotate(45 -11.823 169.133)"
stroke="currentColor"
strokeWidth={1.5}
/>
<rect
id="jam-pot-s-rect3"
width={1}
height={71.293}
rx={1}
ry={1}
transform="rotate(45 -15.35 160.602)"
stroke="currentColor"
strokeWidth={1.5}
/>
<rect
id="jam-pot-s-rect4"
width={1}
height={15.127}
rx={1}
ry={1}
transform="rotate(45 -51.328 209.338)"
stroke="currentColor"
strokeWidth={1.5}
/>
<rect
id="jam-pot-s-rect5"
width={1}
height={71.311}
rx={1}
ry={1}
transform="rotate(45 -18.892 152.064)"
stroke="currentColor"
strokeWidth={1.5}
/>
<rect
id="jam-pot-s-rect6"
width={1}
height={25.18}
rx={1}
ry={1}
transform="rotate(45 -42.741 205.824)"
stroke="currentColor"
strokeWidth={1.5}
/>
<rect
id="jam-pot-s-rect7"
width={1}
height={71.311}
rx={1}
ry={1}
transform="rotate(45 -22.42 143.531)"
stroke="currentColor"
strokeWidth={1.5}
/>
<rect
id="jam-pot-s-rect8"
width={1}
height={35.115}
rx={1}
ry={1}
transform="rotate(45 -34.32 202.241)"
stroke="currentColor"
strokeWidth={1.5}
/>
<rect
id="jam-pot-s-rect9"
width={1}
height={71.283}
rx={1}
ry={1}
transform="rotate(45 -25.959 134.995)"
stroke="currentColor"
strokeWidth={1.5}
/>
<rect
id="jam-pot-s-rect10"
width={1}
height={45.17}
rx={1}
ry={1}
transform="rotate(45 -25.7 198.74)"
stroke="currentColor"
strokeWidth={1.5}
/>
<rect
id="jam-pot-s-rect11"
width={1}
height={71.335}
rx={1}
ry={1}
transform="rotate(45 -29.43 126.483)"
stroke="currentColor"
strokeWidth={1.5}
/>
<rect
id="jam-pot-s-rect12"
width={1}
height={55.138}
rx={1}
ry={1}
transform="rotate(45 -17.179 195.2)"
stroke="currentColor"
strokeWidth={1.5}
/>
<rect
id="jam-pot-s-rect13"
width={1}
height={68.395}
rx={1}
ry={1}
transform="rotate(45 -33.042 117.918)"
stroke="currentColor"
strokeWidth={1.5}
/>
<rect
id="jam-pot-s-rect14"
width={1}
height={65.204}
rx={1}
ry={1}
transform="rotate(45 -8.625 191.671)"
stroke="currentColor"
strokeWidth={1.5}
/>
<rect
id="jam-pot-s-rect15"
width={1}
height={60.874}
rx={1}
ry={1}
transform="rotate(45 -36.576 109.38)"
stroke="currentColor"
strokeWidth={1.5}
/>
<rect
id="jam-pot-s-rect16"
width={1}
height={71.338}
rx={1}
ry={1}
transform="rotate(45 -4.712 186.221)"
stroke="currentColor"
strokeWidth={1.5}
/>
<rect
id="jam-pot-s-rect17"
width={1}
height={50.905}
rx={1}
ry={1}
transform="rotate(45 -40.091 100.857)"
stroke="currentColor"
strokeWidth={1.5}
/>
<rect
id="jam-pot-s-rect18"
width={1}
height={40.939}
rx={1}
ry={1}
transform="rotate(45 -43.6 92.331)"
stroke="currentColor"
strokeWidth={1.5}
/>
<rect
id="jam-pot-s-rect19"
width={1}
height={30.945}
rx={1}
ry={1}
transform="rotate(45 -47.298 83.484)"
stroke="currentColor"
strokeWidth={1.5}
/>
<rect
id="jam-pot-s-rect20"
width={1}
height={20.912}
rx={1}
ry={1}
transform="rotate(45 -50.699 75.248)"
stroke="currentColor"
strokeWidth={1.5}
/>
<rect
id="jam-pot-s-rect21"
width={1}
height={10.869}
rx={1}
ry={1}
transform="rotate(45 -54.268 66.7)"
stroke="currentColor"
strokeWidth={1.5}
/>
</g>
<mask id="jam-pot-u-a" width="400%" height="400%" x="-150%" y="-150%" mask-type="alpha">
<path
id="jam-pot-s-path2"
d="M80 73.38c-35.735-27.017-58-3.142-58-3.142v30s.5 5.5 4 8.5 10 4 10 4h85.5s9-1 12-4 3-8.5 3-8.5v-21S115.735 100.4 80 73.381v-.001Z"
/>
</mask>
</g>
<g className={styles.jamPotG3Tr}>
<g id="jam-pot-s-g3" mask="url(#jam-pot-u-b)" transform="translate(-129.48 -53.5)">
<g id="jam-pot-s-g4">
<rect
id="jam-pot-s-rect22"
width={2}
height={83.725}
rx={1.5}
ry={1.5}
transform="rotate(20.732 33.681 397.506)"
stroke="currentColor"
fill="currentColor"
/>
</g>
<mask id="jam-pot-u-b" width="400%" height="400%" x="-150%" y="-150%" mask-type="alpha">
<path
id="jam-pot-s-path3"
d="M80 73.381c-35.735-27.018-58-3.143-58-3.143V40c88.722 0 62.764-23 124.5-27 4.5-.291-7.001 46.986-10 66.238 0 0-20.765 21.161-56.5-5.857Z"
/>
</mask>
</g>
</g>
<g className={styles.jamPotPath4Tr}>
<path
id="jam-pot-s-path4"
fillRule="evenodd"
d="M67.953 17.895a6.052 6.052 0 0 1 5.238-5.623l6.339-.848a6.058 6.058 0 0 1 6.535 4.045l-18.112 2.426Zm-2.01.27a8.051 8.051 0 0 1 6.982-7.875l6.339-.848a8.059 8.059 0 0 1 8.812 5.757l37.292-4.995a11.954 11.954 0 0 1 13.449 10.305l.169 1.29c.07.548-.315 1.05-.862 1.124L19.198 38.853a.996.996 0 0 1-1.121-.858l-.169-1.29c-.858-6.57 3.77-12.611 10.34-13.491l37.694-5.05.001.001ZM19.89 36.44c-.716-5.476 3.142-10.51 8.616-11.243l97.121-13.01a9.961 9.961 0 0 1 11.207 8.588l.039.297L19.93 36.738l-.04-.298Z"
clipRule="evenodd"
transform="translate(-17.806 -38.862)"
stroke="currentColor"
fill="currentColor"
/>
</g>
</svg>
</>
)

export default JamCookingPot
4 changes: 2 additions & 2 deletions src/components/ScheduleProgress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as rb from 'react-bootstrap'
import { Trans, useTranslation } from 'react-i18next'
import styles from './ScheduleProgress.module.css'
import { Schedule } from '../context/ServiceInfoContext'
import Sprite from './Sprite'
import JamCookingPot from './JamCookingPot'

const scheduleToSteps = (schedule: Schedule) => {
// Example Schedule:
Expand Down Expand Up @@ -121,7 +121,7 @@ const ScheduleProgress = ({ schedule }: ScheduleProgressProps) => {
<p className="text-secondary text-small">{t('scheduler.progress_description')}</p>
</div>
<div className="d-flex justify-content-center">
<Sprite symbol="jampot" width="180" />
<JamCookingPot width={180} />
</div>

<div className="d-flex justify-content-center text-secondary">
Expand Down