|
525 | 525 | {@render cost("Mechanical")} |
526 | 526 | {@render cost("Electrical")} |
527 | 527 |
|
528 | | - <section class="flex flex-row gap-4 w-min p-4" style:min-height="20rem" style:background-color="darkgray"> |
529 | | - {#snippet bar(team: string)} |
530 | | - <div class="flex flex-col"> |
531 | | - <div class="flex flex-col justify-end flex-grow"> |
532 | | - <div style:background-color="darkred" style:height={`calc(100% * ${expenditures[team] / maxExpenditure})`}> |
| 528 | + <section class="flex flex-col w-min" style:background-color="darkgray"> |
| 529 | + <div class="relative flex flex-row gap-10 w-min pt-8 pr-8 pl-16" style:min-height="20rem"> |
| 530 | + {#each { length: Math.floor(maxExpenditure / 100) + 1 } as _, i} |
| 531 | + <div class="absolute flex flex-row" style:width={"calc(100% - 4rem)"} style:right="1rem" style:bottom={`calc((100% - 2rem) * ${i*100 / maxExpenditure})`}> |
| 532 | + <div class="w-full border-t-2 border-black"></div> |
| 533 | + <p class="absolute mr-2" style:bottom="-0.75rem" style:right="100%">${i * 100}</p> |
| 534 | + </div> |
| 535 | + {/each} |
| 536 | + |
| 537 | + {#snippet bar(team: string)} |
| 538 | + <div class="flex flex-col" style:z-index=1> |
| 539 | + <div class="flex flex-col justify-end flex-grow items-center"> |
| 540 | + <div style:background-color="darkred" style:height={`calc(100% * ${expenditures[team] / maxExpenditure})`} style:width="3rem"> |
| 541 | + </div> |
533 | 542 | </div> |
| 543 | + <!-- <p>{team}</p> --> |
534 | 544 | </div> |
535 | | - <p>{team}</p> |
536 | | - </div> |
537 | | - {/snippet} |
538 | | - {@render bar("Software")} |
539 | | - {@render bar("Mechanical")} |
540 | | - {@render bar("Electrical")} |
| 545 | + {/snippet} |
| 546 | + {@render bar("Software")} |
| 547 | + {@render bar("Mechanical")} |
| 548 | + {@render bar("Electrical")} |
| 549 | + </div> |
| 550 | + <div class="ml-14 flex flex-row gap-4"> |
| 551 | + <p>Software</p> |
| 552 | + <p>Mechanical</p> |
| 553 | + <p>Electrical</p> |
| 554 | + </div> |
541 | 555 | </section> |
542 | 556 | {/if} |
543 | 557 | </section> |
|
0 commit comments