Skip to content

Commit

Permalink
overview flexing
Browse files Browse the repository at this point in the history
  • Loading branch information
graphographer committed Apr 4, 2024
1 parent 786d5be commit a8641de
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 25 deletions.
49 changes: 25 additions & 24 deletions src/components/BeApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,6 @@ export class BeApp extends StateProvider {
background-color: transparent;
}
.flex {
display: flex;
align-items: center;
justify-items: center;
column-gap: 1rem;
max-height: 200px;
margin: 2rem 0 3rem;
}
.flex > * {
flex: 1 0 auto;
}
.filter {
border-radius: var(--standard-border-radius);
padding: 2rem;
Expand All @@ -74,11 +61,26 @@ export class BeApp extends StateProvider {
margin-bottom: 0;
}
@media only screen and (max-width: 720px) {
.flex > .shrink {
.flex {
display: flex;
align-items: center;
justify-content: center;
column-gap: 4rem;
row-gap: 1rem;
margin: 3rem 0;
max-width: 100%;
flex-wrap: wrap;
}
.flex > * {
flex: 0 0 auto;
}
/* @media (max-width: 719px) {
.flex highlightable-map {
display: none;
}
}
} */
`
];

Expand Down Expand Up @@ -139,15 +141,8 @@ export class BeApp extends StateProvider {
</div>
<section id="overview">
<h2>${this.state.selectedCountryFormatted}</h2>
<div class="flex">
${this.state.agencyDisbursementsForSelectedCountryAndLatestFY
? html` <h4 class="sr-only">
${this.state.selectedCountryFormatted}: Overview
</h4>
<be-map-donut-chart class="grow"></be-map-donut-chart>`
: ''}
<h2>${this.state.selectedCountryFormatted}</h2>
${this.state.selectedCountry
? html`
<highlightable-map
Expand All @@ -162,6 +157,12 @@ export class BeApp extends StateProvider {
></highlightable-map>
`
: ''}
${this.state.agencyDisbursementsForSelectedCountryAndLatestFY
? html` <h4 class="sr-only">
${this.state.selectedCountryFormatted}: Overview
</h4>
<be-map-donut-chart class="grow"></be-map-donut-chart>`
: ''}
</div>
${this.state.selectedCountry
Expand Down
2 changes: 1 addition & 1 deletion src/state/State.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ export class State {
);
}

selectedCountry: string = '';
selectedCountry: string = 'KHM';

get selectedCountryFormatted() {
return countryNameFormatter(this.selectedCountry);
Expand Down

0 comments on commit a8641de

Please sign in to comment.