Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/vickylaixy/hugo-theme-introduction.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanzei <hanzei@mailbox.org>2018-06-27 12:23:07 +0300
committerHanzei <hanzei@mailbox.org>2018-06-27 12:23:07 +0300
commitae90b403882f9889f75c88b6ed27ae5eaeaea753 (patch)
tree4a1fb02667cd8e42a51a6ead95ced832bda66f6c /layouts/partials/projects.html
parentdb4f7e5d7a12f953f795169fc340b920f784a572 (diff)
Close project modals when pressing esc
Diffstat (limited to 'layouts/partials/projects.html')
-rw-r--r--layouts/partials/projects.html5
1 files changed, 5 insertions, 0 deletions
diff --git a/layouts/partials/projects.html b/layouts/partials/projects.html
index 98ebc71..8e417b2 100644
--- a/layouts/partials/projects.html
+++ b/layouts/partials/projects.html
@@ -68,6 +68,11 @@
$('#close-{{ $index }}').click(function () {
$('#modal-{{ $index }}').removeClass('is-active');
});
+ $(document).keypress(function(e) {
+ if(e.which == 0) {
+ $('#modal-{{ $index }}').removeClass('is-active');
+ }
+ });
</script>
{{ end }} {{ end }}
{{ partial "top-icon.html" . }}