-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1197 from NYCPlanning/DH0-announcement-modal
Pop Up Modal
- Loading branch information
Showing
17 changed files
with
345 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import Component from '@ember/component'; | ||
|
||
const TOTAL_SLIDES = 7; | ||
|
||
export default Component.extend({ | ||
tagName: '', | ||
open: true, | ||
slideNumber: Math.floor(Math.random() * TOTAL_SLIDES) + 1, // start on a random slide | ||
|
||
actions: { | ||
toggleModal() { | ||
this.toggleProperty('open'); | ||
}, | ||
nextSlide() { | ||
if (this.slideNumber < TOTAL_SLIDES) { | ||
this.set('slideNumber', this.slideNumber + 1); | ||
} else { | ||
// comment out the line below to disable infinite looping | ||
this.set('slideNumber', 1); | ||
} | ||
}, | ||
prevSlide() { | ||
if (this.slideNumber > 1) { | ||
this.set('slideNumber', this.slideNumber - 1); | ||
} else { | ||
// comment out the line below to disable infinite looping | ||
this.set('slideNumber', TOTAL_SLIDES); | ||
} | ||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
// -------------------------------------------------- | ||
// Module: Reveal Modal | ||
// -------------------------------------------------- | ||
|
||
#reveal-modal-container { | ||
z-index: 3; | ||
} | ||
|
||
@include breakpoint(1280px up) { | ||
.mobile-header, | ||
.mobile-body { | ||
display: none; | ||
} | ||
} | ||
|
||
|
||
.reveal-overlay { | ||
padding: 1rem; | ||
|
||
@include breakpoint(medium) { | ||
padding: 8rem 1rem; | ||
// position: absolute; | ||
} | ||
} | ||
|
||
.reveal-overlay-target { | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
bottom: 0; | ||
left: 0; | ||
} | ||
|
||
.reveal { | ||
border: 0; | ||
box-shadow: 0 0 0 rem-calc(4) rgba(0,0,0,0.1); | ||
top: 0; | ||
border-radius: 5px; | ||
padding-top: 40px; | ||
|
||
&:focus { | ||
outline: none; | ||
} | ||
} | ||
|
||
/* Slideshow container */ | ||
.slideshow-container { | ||
position: relative; | ||
/* should we keep this? */ | ||
min-height: 10rem; | ||
} | ||
|
||
/* Next & previous buttons */ | ||
.slideshow-prev, .slideshow-next { | ||
cursor: pointer; | ||
position: absolute; | ||
top: 50%; | ||
width: auto; | ||
padding: 16px; | ||
margin-top: -22px; | ||
color: white; | ||
font-weight: bold; | ||
font-size: 48px; | ||
transition: 0.6s ease; | ||
border-radius: 0 3px 3px 0; | ||
user-select: none; | ||
background-color: rgba(0,0,0,0.1); | ||
} | ||
|
||
/* Position the "next button" to the right */ | ||
.slideshow-next { | ||
right: 0; | ||
border-radius: 3px 0 0 3px; | ||
} | ||
|
||
/* On hover, add a black background color with a little bit see-through */ | ||
.slideshow-prev:hover, .slideshow-next:hover { | ||
background-color: rgba(0,0,0,0.8); | ||
} | ||
|
||
.slideshow-content { | ||
text-align: center; | ||
margin-bottom: 1rem; | ||
} | ||
|
||
.slide { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
padding-top: 1rem; | ||
background-color: lightgray; | ||
} | ||
|
||
.slide img { | ||
height: 350px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<RevealModal @open={{this.openModal}} @closeModal={{this.toggleModal}}> | ||
<h1 class='header-large'> | ||
We're excited to share some new features we've added to ZoLa! Scroll through the updates below, or select the "Features" tab at any time to view the new additions. | ||
</h1> | ||
|
||
<div class="slideshow-container"> | ||
<a class="slideshow-prev" onclick={{action 'prevSlide'}}>❮</a> | ||
<SlideshowContents @slideNumber={{this.slideNumber}} /> | ||
<a class="slideshow-next" onclick={{action 'nextSlide'}}>❯</a> | ||
</div> | ||
|
||
{{input type="checkbox" checked=this.dontShowModalAgain}} | ||
Don't show this message again | ||
|
||
{{!-- Uncomment the below to show a message only on mobile --}} | ||
{{!-- <h1 class='header-large mobile-header'> | ||
labs-zola is optimized for desktop screen widths. | ||
</h1> | ||
<p class='lead mobile-body'> | ||
Mobile support for ZoLa will be added in the future. | ||
For the best experience, please use a browser with a minimum width of | ||
1280px. | ||
</p> --}} | ||
</RevealModal> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{{#if @open}} | ||
<div class="reveal-overlay" style="display:block;"> | ||
<div class="reveal-overlay-target" {{action @closeModal}}></div> | ||
<div | ||
class="reveal" | ||
role="dialog" | ||
aria-hidden="false" | ||
tabindex="-1" | ||
style="display:block;" | ||
> | ||
{{yield}} | ||
<button {{action @closeModal}} class="close-button" aria-label="Close modal" type="button"> | ||
<span aria-hidden="true">×</span> | ||
</button> | ||
</div> | ||
</div> | ||
{{/if}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<div class="slideshow-content"> | ||
{{#if (eq @slideNumber 1)}} | ||
<div class="slide"> | ||
<p>Access what you're looking for more quickly using your <strong>search history</strong></p> | ||
<img src="/img/slideshow/search-history.gif" alt="A video showing the search history functionality" /> | ||
</div> | ||
{{else if (eq @slideNumber 2)}} | ||
<div class="slide"> | ||
<p>See more of the map by <strong>hiding the layers menu</strong></p> | ||
<img src="/img/slideshow/toggle-sidebar.gif" alt="A video showing the sidebar toggle functionality" /> | ||
</div> | ||
{{else if (eq @slideNumber 3)}} | ||
<div class="slide"> | ||
<p><strong>Select two tax lots</strong> for side-by-side comparison</p> | ||
<img src="/img/slideshow/side-by-side.gif" alt="A video showing the tax lot comparison functionality" /> | ||
</div> | ||
{{else if (eq @slideNumber 4)}} | ||
<div class="slide"> | ||
<p><strong>Turn off all layers</strong> with the click of a button</p> | ||
<img src="/img/slideshow/toggle-all-layers-off.gif" alt="A video showing the all layer toggle button functionality" /> | ||
</div> | ||
{{else if (eq @slideNumber 5)}} | ||
<div class="slide"> | ||
<p><strong>Bookmark your selected layers</strong> to return to later</p> | ||
<img src="/img/slideshow/bookmark-layer-sets.gif" alt="A video showing the layer bookmark functionality" /> | ||
</div> | ||
{{else if (eq @slideNumber 6)}} | ||
<div class="slide"> | ||
<p>Sum the area or distance of <strong>multiple measurements</strong></p> | ||
<img src="/img/slideshow/multiple-measurements.gif" alt="A video showing the multiple measurement functionality" /> | ||
</div> | ||
{{else if (eq @slideNumber 7)}} | ||
<div class="slide"> | ||
<p><strong>New links</strong> to sites related to the selected tax lot</p> | ||
<img src="/img/slideshow/relevant-links.gif" alt="A video showing the relevant links functionality" /> | ||
</div> | ||
{{/if}} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.