File tree 5 files changed +42
-5
lines changed
styles/components/utility-panel 5 files changed +42
-5
lines changed Original file line number Diff line number Diff line change @@ -525,9 +525,25 @@ function loadProjectRequirements(data) {
525
525
526
526
let li = document . createElement ( 'li' ) ;
527
527
li . classList . add ( 'disabled' ) ;
528
- li . textContent = 'There are no mockups for this project 😢 ' ;
528
+ li . textContent = 'There are no mockups for this project. ' ;
529
529
mockupIconContainer . append ( li )
530
530
}
531
+
532
+ let mockupIcons = document . querySelectorAll ( 'li.mockup-type' ) ;
533
+ const gallery = document . getElementById ( 'galleryContainer' ) ;
534
+ mockupIcons . forEach ( ( icon , index ) => {
535
+ icon . setAttribute ( 'data-mockup-index' , index ) ;
536
+
537
+ icon . addEventListener ( 'click' , e => {
538
+ gallery . innerHTML = '' ;
539
+ let currentIndex = e . target . getAttribute ( 'data-mockup-index' ) ;
540
+ let currentMock = projectFileData . currentMocks [ currentIndex ] ;
541
+ let img = document . createElement ( 'img' ) ;
542
+ img . src = currentMock ;
543
+ gallery . appendChild ( img ) ;
544
+ } )
545
+ } ) ;
546
+
531
547
532
548
533
549
}
Original file line number Diff line number Diff line change @@ -525,9 +525,25 @@ function loadProjectRequirements(data) {
525
525
526
526
let li = document . createElement ( 'li' ) ;
527
527
li . classList . add ( 'disabled' ) ;
528
- li . textContent = 'There are no mockups for this project 😢 ' ;
528
+ li . textContent = 'There are no mockups for this project. ' ;
529
529
mockupIconContainer . append ( li )
530
530
}
531
+
532
+ let mockupIcons = document . querySelectorAll ( 'li.mockup-type' ) ;
533
+ const gallery = document . getElementById ( 'galleryContainer' ) ;
534
+ mockupIcons . forEach ( ( icon , index ) => {
535
+ icon . setAttribute ( 'data-mockup-index' , index ) ;
536
+
537
+ icon . addEventListener ( 'click' , e => {
538
+ gallery . innerHTML = '' ;
539
+ let currentIndex = e . target . getAttribute ( 'data-mockup-index' ) ;
540
+ let currentMock = projectFileData . currentMocks [ currentIndex ] ;
541
+ let img = document . createElement ( 'img' ) ;
542
+ img . src = currentMock ;
543
+ gallery . appendChild ( img ) ;
544
+ } )
545
+ } ) ;
546
+
531
547
532
548
533
549
}
Original file line number Diff line number Diff line change 15
15
transition : transform 0.2s ;
16
16
& .disabled {
17
17
pointer-events : none ;
18
+ font-size : 0.8rem ;
19
+ }
20
+ span ,
21
+ i {
22
+ pointer-events : none ;
18
23
}
19
24
span {
20
25
font-size : 0.8rem ;
Original file line number Diff line number Diff line change @@ -204,8 +204,8 @@ <h1 data-project-name></h1>
204
204
< i class ="fa-solid fa-angle-left " data-prev-image > </ i >
205
205
< i class ="fa-solid fa-angle-right " data-next-image > </ i >
206
206
</ div >
207
- < div class ="gallery-container ">
208
- < img src =" https://images.unsplash.com/photo-1531297484001-80022131f5a1?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=3820&q=80 " alt ="" >
207
+ < div class ="gallery-container " id =" galleryContainer " >
208
+ <!-- dynamic -- >
209
209
</ div >
210
210
</ div >
211
211
You can’t perform that action at this time.
0 commit comments