Skip to content
Snippets Groups Projects
Commit c6f5be34 authored by Azadpour, Elmera's avatar Azadpour, Elmera
Browse files

add border effect to panels

parent e581bd3d
No related branches found
No related tags found
1 merge request!23set up accordion maps
...@@ -9,23 +9,23 @@ ...@@ -9,23 +9,23 @@
<p>Blue = Negatively correlated to water insecurity conditions</p> <p>Blue = Negatively correlated to water insecurity conditions</p>
<br> <br>
<div class="accordion-container"> <div class="accordion-container">
<button class="accordion orange">Households<span class="symbol">+</span></button> <button class="accordion households-accordion">Households<span class="symbol">+</span></button>
<div class="panel"> <div class="panel">
<img src="@/assets/images/tot_households_2022.png" alt="Choropleth map of total households in the contiguous United States aggregated at the county level where counties with the greatest total households in dark orange include Los Angeles County, California (3,363,093), Harris County, Texas (1,692,896) and Maricopa County, Arizona (1,665,560). Data provided by 2022 American Community Survey, U.S. Census Bureau."> <img src="@/assets/images/tot_households_2022.png" alt="Choropleth map of total households in the contiguous United States aggregated at the county level where counties with the greatest total households in dark orange include Los Angeles County, California (3,363,093), Harris County, Texas (1,692,896) and Maricopa County, Arizona (1,665,560). Data provided by 2022 American Community Survey, U.S. Census Bureau.">
<img src="@/assets/images/tot_female_households_2022.png" alt="Choropleth map of total female householder (no spouse present) in the contiguous United States aggregated at the county level where counties with the greatest total female householder in dark orange include Los Angeles County, California (494,169), Harris County, Texas (258,518) and Maricopa County, Arizona (202,699). Data provided by 2022 American Community Survey, U.S. Census Bureau."> <img src="@/assets/images/tot_female_households_2022.png" alt="Choropleth map of total female householder (no spouse present) in the contiguous United States aggregated at the county level where counties with the greatest total female householder in dark orange include Los Angeles County, California (494,169), Harris County, Texas (258,518) and Maricopa County, Arizona (202,699). Data provided by 2022 American Community Survey, U.S. Census Bureau.">
</div> </div>
<button class="accordion orange">Income<span class="symbol">+</span></button> <button class="accordion income-accordion">Income<span class="symbol">+</span></button>
<div class="panel"> <div class="panel">
<img src="@/assets/images/med_income_census_2022.png" alt="Choropleth map of median household income in the past 12 months (in 2022 inflation-adjusted dollars) in the contiguous United States aggregated at the county level where counties with the greatest median household income in dark orange include Santa Clara County, California (153,792), San Mateo County, California (149,907) and Marin County, California (142,019). Data provided by 2022 American Community Survey, U.S. Census Bureau."> <img src="@/assets/images/med_income_census_2022.png" alt="Choropleth map of median household income in the past 12 months (in 2022 inflation-adjusted dollars) in the contiguous United States aggregated at the county level where counties with the greatest median household income in dark orange include Santa Clara County, California (153,792), San Mateo County, California (149,907) and Marin County, California (142,019). Data provided by 2022 American Community Survey, U.S. Census Bureau.">
</div> </div>
<button class="accordion blue">Renters<span class="symbol">+</span></button> <button class="accordion renters-accordion">Renters<span class="symbol">+</span></button>
<div class="panel"> <div class="panel">
<img src="@/assets/images/median_rent_2022.png" alt="Choropleth map of median gross rent in the contiguous United States aggregated at the county level where counties with the greatest median gross rent in dark blue include San Mateo County, California (2,805), Santa Clara County, California (2,719) and Marin County, California (2,487). Data provided by 2022 American Community Survey, U.S. Census Bureau."> <img src="@/assets/images/median_rent_2022.png" alt="Choropleth map of median gross rent in the contiguous United States aggregated at the county level where counties with the greatest median gross rent in dark blue include San Mateo County, California (2,805), Santa Clara County, California (2,719) and Marin County, California (2,487). Data provided by 2022 American Community Survey, U.S. Census Bureau.">
</div> </div>
<button class="accordion orange">Latino<span class="symbol">+</span></button> <button class="accordion latino-accordion">Latino<span class="symbol">+</span></button>
<div class="panel"> <div class="panel">
<img src="@/assets/images/tot_latino_census_2022.png" alt="Choropleth map of total Hispanic or Latino in the contiguous United States aggregated at the county level where counties with the greatest total Hispanic or Latino in dark orange include Los Angeles County, California (4,837,594), Harris County, Texas (2,076,103) and Maricopa County, Arizona 1,402,753). Data provided by 2022 American Community Survey, U.S. Census Bureau."> <img src="@/assets/images/tot_latino_census_2022.png" alt="Choropleth map of total Hispanic or Latino in the contiguous United States aggregated at the county level where counties with the greatest total Hispanic or Latino in dark orange include Los Angeles County, California (4,837,594), Harris County, Texas (2,076,103) and Maricopa County, Arizona 1,402,753). Data provided by 2022 American Community Survey, U.S. Census Bureau.">
<img src="@/assets/images/perc_latino_census_2022.png" alt="Choropleth map of percent of Hispanic or Latino in the contiguous United States aggregated at the county level where counties with the greatest percent Hispanic or Latino in dark orange include Kenedy County, Texas (96.6%), Starr County, Texas (96.2%) and Webb County, Texas (95.4%). Data provided by 2022 American Community Survey, U.S. Census Bureau."> <img src="@/assets/images/perc_latino_census_2022.png" alt="Choropleth map of percent of Hispanic or Latino in the contiguous United States aggregated at the county level where counties with the greatest percent Hispanic or Latino in dark orange include Kenedy County, Texas (96.6%), Starr County, Texas (96.2%) and Webb County, Texas (95.4%). Data provided by 2022 American Community Survey, U.S. Census Bureau.">
...@@ -40,12 +40,11 @@ ...@@ -40,12 +40,11 @@
</template> </template>
<script> <script>
import { onMounted, ref } from "vue"; import { onMounted } from "vue";
import { isMobile } from 'mobile-device-detect'; import { isMobile } from 'mobile-device-detect';
import * as d3 from 'd3'; import * as d3 from 'd3';
import mapText from './../assets/text/mapText'; import mapText from './../assets/text/mapText';
// global variables
const mobileView = isMobile; const mobileView = isMobile;
const mapsText = mapText.mapText; const mapsText = mapText.mapText;
...@@ -87,17 +86,44 @@ export default { ...@@ -87,17 +86,44 @@ export default {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
font-size: 2.5rem; font-size: 2.5rem;
font-family: $SourceSans; font-family: 'Source Sans Pro', sans-serif;
font-weight: 600; font-weight: 600;
margin-bottom: 10px; position: relative;
border: 2px solid transparent;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
margin-bottom: 15px
} }
.accordion.orange { .accordion.households-accordion {
background-color: #F67926; background-color: #092836;
} }
.accordion.blue { .accordion.income-accordion {
background-color: #317FBD; background-color: #2A468F;
}
.accordion.renters-accordion {
background-color: #2A468F;
}
.accordion.latino-accordion {
background-color: #092836;
}
.accordion::before {
content: "";
position: absolute;
top: -2px;
left: -2px;
right: -2px;
bottom: -2px;
border: 2px solid transparent;
z-index: -1;
transition: border-color 0.3s;
}
.accordion:hover::before, .accordion.active::before {
border-color: #f39c12;
} }
.active, .accordion:hover { .active, .accordion:hover {
...@@ -105,14 +131,17 @@ export default { ...@@ -105,14 +131,17 @@ export default {
} }
.panel { .panel {
padding: 0 18px;
display: none; display: none;
background-color: white;
overflow: hidden; overflow: hidden;
border: 3px solid lightgray;
margin-bottom: 15px;
margin-top: -15px;
border-top-width: 0;
border-radius: 0 0 10px 10px;
} }
.symbol { .symbol {
font-size: 24px; font-size: 32px;
font-weight: bold; font-weight: bold;
} }
</style> </style>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment