Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wiki-js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
wiki-js
Commits
a0a19cd7
Commit
a0a19cd7
authored
May 26, 2017
by
NGPixel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: improved modal animations
parent
3cb53bd1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
64 additions
and
46 deletions
+64
-46
anchor.vue
client/js/components/anchor.vue
+15
-12
modal-create-page.vue
client/js/components/modal-create-page.vue
+16
-13
modal-move-page.vue
client/js/components/modal-move-page.vue
+17
-14
modal.scss
client/scss/components/modal.scss
+16
-7
No files found.
client/js/components/anchor.vue
View file @
a0a19cd7
<
template
lang=
"pug"
>
.modal(v-bind:class='{ "is-active": isShown }')
.modal-background
.modal-container
.modal-content
header.is-blue
span Copy link to this section
section
p.control.is-fullwidth
input.input(type='text', ref='anchorURLinput', v-model='anchorURL')
footer
a.button.is-grey.is-outlined(v-on:click='cancel') Discard
a.button.is-blue(v-clipboard='anchorURL', @success="clipboardSuccess", @error="clipboardError") Copy to Clipboard
transition(:duration="400")
.modal(v-show='isShown', v-cloak)
transition(name='modal-background')
.modal-background(v-show='isShown')
.modal-container
transition(name='modal-content')
.modal-content(v-show='isShown')
header.is-blue
span Copy link to this section
section
p.control.is-fullwidth
input.input(type='text', ref='anchorURLinput', v-model='anchorURL')
footer
a.button.is-grey.is-outlined(v-on:click='cancel') Discard
a.button.is-blue(v-clipboard='anchorURL', @success="clipboardSuccess", @error="clipboardError") Copy to Clipboard
</
template
>
<
script
>
...
...
client/js/components/modal-create-page.vue
View file @
a0a19cd7
<
template
lang=
"pug"
>
.modal(v-bind:class='{ "is-active": isShown }')
.modal-background
.modal-container
.modal-content
header.is-light-blue Create New Document
section
label.label Enter the new document path:
p.control.is-fullwidth(v-bind:class='{ "is-loading": isLoading }')
input.input(type='text', placeholder='page-name', v-model='userPath', ref='createPageInput', @keyup.enter='create', @keyup.esc='cancel')
span.help.is-red(v-show='isInvalid') This document path is invalid!
footer
a.button.is-grey.is-outlined(v-on:click='cancel') Discard
a.button.is-light-blue(v-on:click='create') Create
transition(:duration="400")
.modal(v-show='isShown', v-cloak)
transition(name='modal-background')
.modal-background(v-show='isShown')
.modal-container
transition(name='modal-content')
.modal-content(v-show='isShown')
header.is-light-blue Create New Document
section
label.label Enter the new document path:
p.control.is-fullwidth(v-bind:class='{ "is-loading": isLoading }')
input.input(type='text', placeholder='page-name', v-model='userPath', ref='createPageInput', @keyup.enter='create', @keyup.esc='cancel')
span.help.is-red(v-show='isInvalid') This document path is invalid!
footer
a.button.is-grey.is-outlined(v-on:click='cancel') Discard
a.button.is-light-blue(v-on:click='create') Create
</
template
>
<
script
>
...
...
client/js/components/modal-move-page.vue
View file @
a0a19cd7
<
template
lang=
"pug"
>
.modal(v-bind:class='{ "is-active": isShown }')
.modal-background
.modal-container
.modal-content
header.is-indigo Move document
section
label.label Enter the new document path:
p.control.is-fullwidth(v-bind:class='{ "is-loading": isLoading }')
input.input(type='text', placeholder='page-name', v-model='movePath', ref='movePageInput', @keyup.enter='move', @keyup.esc='cancel')
span.help.is-red(v-show='isInvalid') This document path is invalid or not allowed!
span.note Note that moving or renaming documents can lead to broken links. Make sure to edit any page that links to this document afterwards!
footer
a.button.is-grey.is-outlined(v-on:click='cancel') Discard
a.button.is-indigo(v-on:click='move') Move
transition(:duration="400")
.modal(v-show='isShown', v-cloak)
transition(name='modal-background')
.modal-background(v-show='isShown')
.modal-container
transition(name='modal-content')
.modal-content(v-show='isShown')
header.is-indigo Move document
section
label.label Enter the new document path:
p.control.is-fullwidth(v-bind:class='{ "is-loading": isLoading }')
input.input(type='text', placeholder='page-name', v-model='movePath', ref='movePageInput', @keyup.enter='move', @keyup.esc='cancel')
span.help.is-red(v-show='isInvalid') This document path is invalid or not allowed!
span.note Note that moving or renaming documents can lead to broken links. Make sure to edit any page that links to this document afterwards!
footer
a.button.is-grey.is-outlined(v-on:click='cancel') Discard
a.button.is-indigo(v-on:click='move') Move
</
template
>
<
script
>
...
...
client/scss/components/modal.scss
View file @
a0a19cd7
.modal
{
align-items
:
flex-start
;
display
:
none
;
&
.is-active
{
display
:
block
;
}
display
:
block
;
&
.is-superimposed
{
.modal-background
{
...
...
@@ -23,8 +19,15 @@
height
:
100vh
;
position
:
fixed
;
background-color
:
rgba
(
0
,
0
,
0
,
0
.85
);
animation
:
.4s
ease
fadeIn
;
z-index
:
10
;
&
-enter-active
{
animation
:
.4s
ease
fadeIn
;
}
&
-leave-active
{
animation
:
.4s
ease
fadeOut
;
}
}
.modal-container
{
position
:
fixed
;
...
...
@@ -38,10 +41,16 @@
align-items
:
center
;
}
.modal-content
{
animation
:
.3s
ease
zoomIn
;
width
:
600px
;
background-color
:
#FFF
;
&
-enter-active
{
animation
:
.3s
ease
zoomIn
;
}
&
-leave-active
{
animation
:
.3s
ease
zoomOut
;
}
&
.is-expanded
{
align-self
:
stretch
;
width
:
100%
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment