mirror of
https://github.com/overleaf/overleaf.git
synced 2025-03-31 03:32:25 +00:00
Style the onboarding prompt as a modal; close it when clicked outside.
This commit is contained in:
parent
12730caa63
commit
594f2024d1
3 changed files with 16 additions and 9 deletions
|
@ -3,6 +3,7 @@ div(ng-controller="FeatureOnboardingController")
|
|||
ng-class="('feat-onboard-step' + onboarding.innerStep)"
|
||||
ng-if="!state.loading && showCollabFeaturesOnboarding"
|
||||
ng-cloak
|
||||
stop-propagation="click"
|
||||
)
|
||||
a.feat-onboard-dismiss(
|
||||
href
|
||||
|
|
|
@ -24,11 +24,13 @@ define [
|
|||
|
||||
handleKeydown = (e) ->
|
||||
switch e.keyCode
|
||||
when 37 then $scope.gotoPrevStep() # left directional key
|
||||
when 39, 13 then $scope.gotoNextStep() # right directional key, enter
|
||||
when 27 then $scope.dismiss() # escape
|
||||
when 37 then $scope.gotoPrevStep() # left directional key
|
||||
when 39, 13 then $scope.gotoNextStep() # right directional key, enter
|
||||
when 27 then $scope.dismiss() # escape
|
||||
|
||||
$(document).on "keydown", handleKeydown
|
||||
$(document).on "click", $scope.dismiss
|
||||
|
||||
$scope.$on "$destroy", () ->
|
||||
$(document).off "keydown", handleKeydown
|
||||
$(document).off "keydown", handleKeydown
|
||||
$(document).off "click", $scope.dismiss
|
|
@ -1,9 +1,12 @@
|
|||
@feat-onboard-width: 900px;
|
||||
|
||||
.feat-onboard {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
top: 50px;
|
||||
bottom: 50px;
|
||||
left: 50%;
|
||||
width: @feat-onboard-width;
|
||||
margin-left: -(@feat-onboard-width / 2);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: baseline;
|
||||
|
@ -12,11 +15,12 @@
|
|||
background-position-x: 0;
|
||||
color: #FFF;
|
||||
text-align: center;
|
||||
border-radius: 1em;
|
||||
z-index: 102;
|
||||
overflow: auto;
|
||||
}
|
||||
.feat-onboard-wrapper {
|
||||
padding-top: 30px;
|
||||
padding: 30px 0;
|
||||
}
|
||||
|
||||
.feat-onboard-title {
|
||||
|
|
Loading…
Reference in a new issue