22 <!-- eslint-disable max-len -->
33 <div >
44 <NavBar class =" px-4 sm:px-16 lg:px-32" v-bind:currentRoute =" 'Settings'" ></NavBar >
5- <div class =" w-full md:w-auto md:mx-16 lg:mx-32 relative md:flex items-start h-auto md:mb-16 lg:mb-32 " >
5+ <div class =" w-full md:w-auto md:mx-16 lg:mx-32 relative md:flex items-start h-auto md:mb-16" >
66 <section class =" w-full md:max-w-xss md:shadow-md md:rounded-md" >
77 <div class =" w-full md:hidden h-1 bg-white-matcha" ></div >
88 <div class =" text-wrap bg-white-matcha recommendation-card w-full md:rounded-t-md"
4444 v-bind:type =" 'password'"
4545 v-bind:currentValuePassed =" ''" ></AccountInput >
4646 </section >
47- <section v-if =" getShow === 'profile'" class =" overflow-scroll profile-section flex flex-col items-start z-10 absolute bg-white-matcha w-full top-0 left-0 md:ml-4 md:relative md:shadow-md md:rounded-md" >
48- <SectionHeader class =" mx-auto" v-bind:name =" 'profile'" v-on:click.native =" closeSetting()" ></SectionHeader >
49- <div class =" py-8 px-8 w-full" >
47+ <section v-if =" getShow === 'profile'" class =" flex flex-col items-start z-10 absolute bg-white-matcha w-full top-0 left-0 md:ml-4 md:relative md:shadow-md md:rounded-md" >
48+ <div class =" px-8 w-full" >
49+ <SectionHeader class =" mx-auto" v-bind:name =" 'profile'" v-on:click.native =" closeSetting()" ></SectionHeader >
50+ </div >
51+ <div class =" pb-8 pt-4 px-8 w-full" >
5052 <div class =" mx-auto max-w-sm" >
5153 <h1 class =" inline-block mr-4 text-gray-matcha" >I am</h1 >
5254 <DropdownDisplayChoice
@@ -245,8 +247,17 @@ export default {
245247 }
246248 return this .$store .getters .getLoggedInUser .images [0 ].link ;
247249 },
250+ openSectionOnMd (e ) {
251+ if (e .target .innerWidth >= 768 && this .show === ' ' ) {
252+ this .show = ' profile' ;
253+ }
254+ },
248255 },
249256 beforeMount () {
257+ window .addEventListener (' resize' , this .openSectionOnMd );
258+ if (window .innerWidth >= 768 ) {
259+ this .show = ' profile' ;
260+ }
250261 console .log (this .$store .getters .getLoggedInUser );
251262 const tags = this .$store .getters .getLoggedInUser .tags ;
252263 for (let i = 0 ; i < tags .length ; i += 1 ) {
@@ -268,8 +279,4 @@ export default {
268279 height : 10rem ;
269280 }
270281}
271-
272- .profile-section {
273- height : 34rem ;
274- }
275282 </style >
0 commit comments